Serial Devices and Protocol
This serial protocol is designed to be a common protocol for any 802.15.4 device which uses a serial interface. Typically these devices are programmable with user-firmware, and this protocol is implemented in the firmware. Devices using the serial interface use the driver named "serial" and must be attached to a wpan device using izattach. The serial driver is not in the mainline kernel but is easily ported. If you are interested in using the serial driver with the mainline kernel, please contact the mailing list.
The only known device using this protocol is the Redwire Econotag.
Serial protocol version 1
Host and serial dongle exchange messages. Each message starts with sequence of two bytes ('z' = 0x7a, 'b' = 0x62). After which comes command/response ID. Messages coming from the host have high bit in cmdID clear, messages coming from the dongle have high bit set.
Power up tranceiver, etc.
- host: 'z' 'b' 0x01
- response: 'z' 'b' 0x81 <status>
Power down tranceiver, shut down current operations, etc.
- host: 'z' 'b' 0x02
- response: 'z' 'b' 0x82 <status>
- Set Channel:
Change used channel. chan# ranges from 1 to 16, which
corresponds to IEEE 802.15.4 page 0 channels 11 to 26.
- host: 'z' 'b' 0x04 <chan#>
- response: 'z' 'b' 0x84 <status>
Start ED measurement.
- host: 'z' 'b' 0x05
- response: 'z' 'b' 0x85 <status> <level>
Perform CCA on the channel. Result is returned as a part of the status
- host: 'z' 'b' 0x06
- response: 'z' 'b' 0x86 <status>
- Set State:
Set the tranceiver to specified <state>.
- host: 'z' 'b' 0x07 <state>
- response: 'z' 'b' 0x87 <status>
- Transmit Block:
Transmit a block of data. <len> is the length of <data> block. <data> is
the MAC frame w/o FCS (it should be autocalculated by dongle).
- host: 'z' 'b' 0x09 <len> <data * len>
- response: 'z' 'b' 0x89 <status>
- Receive block:
The only message that is initiated by the dongle. Indicates received block.
<lqi> is LQI measured during reception, <len> is the length of <data> block.
<data> is the MAC frame w/o FCS
- dongle: 'z' 'b' 0x8b <lqi> <len> <data * len>
- response: 'z' 'b' 0x0b <status>
- Get 64-bit address:
Request a 64-bit address from the dongle.
- host: 'z' 'b' 0x0d
- response: 'z' 'b' 0x8d <status> <8 bytes of hw address>
<status> (as per 802.15.4)
- SUCCESS = 0x00
- RX_ON = 0x01
- TX_ON = 0x02
- TRX_OFF = 0x03
- IDLE = 0x04
- BUSY = 0x05
- BUSY_RX = 0x06
- BUSY_TX = 0x07
- ERR = 0x08
- RX_MODE = 0x02
- TX_MODE = 0x03
- FORCE_TRX_OFF = 0xF0