Atmel AVR2052
59
8200M-AVR-11/11
14 Appendix B-1: WSNDemo over-the-air protocol
This appendix describes the protocol used by the WSNDemo sample application. The
description includes the format of the messages exchanged over the air between the
connected nodes. The protocol description allows non-standard nodes (for example,
those using third-party sensors not available on the standard evaluation boards and
kits) to transfer sensor readings and have them visualized in the same WSNMonitor
application.
14.1 Message format
End devices and routers send messages to the coordinator using the following
format.
Table 14-1.
WSNDemo message format.
Field name
Length
Description
Message type
1 byte
Type of the messages. Must be 0x01 (0x01 is the only
supported message type for the current revision of
WSNDemo)
Node type
1 byte
Type of the sending node:
0 – coordinator
1 – router
2 – end device
IEEE address
8 bytes
IEEE address of the sending node
Short address
2 bytes
Short address of the sending node
Version
4 bytes
Version of the WSNDemo application protocol used by
the sending node. Currently set to 0x01010100
Channel mask
4 bytes
Channel mask set on the sending node
PANID
2 bytes
PAN ID of the network to which the sending node is
attached
Channel
1 byte
The channel on which the sending node operates
Parent address
2 bytes
Short address of the parent node
LQI
1 byte
LQI observed by the node that sends this message
RSSI
1 byte
RSSI observed by the node that sends this message
<Additional fields>
<Variable> Optional additional fields; see description in Section
14.2 Additional fields
The message may contain zero, one, or more additional fields that follow the
mandatory fixed-width fields described in
. The order of the additional fields
is not fixed. The size of the additional fields may vary – each field contains a sub-field
defining its size. Below is the description of the general format of an additional field.