
MASSA PRODUCTS CORPORATION June 11, 2013
Product Manual 5 M3 Wireless Ultrasonic Level Sensor
7.0 RF Message Format
The XBee Series 2 RF module supports up to 72 bytes of data in its RF packet in addition to the 8 byte MAC address. The
message format for the M3 Sensor is shown below. The message direction is from the host device (PC/gateway) to the M3
Sensor. Note that all ZigBee incoming and outgoing messages will be preceded by the radio’s MAC address. The radio’s MAC
address is the sensor’s identifier.
<MAC address> <DestinationID> <SenderID> <Message Length> <Command> <Data Byte 1> <Data Byte 2> · · · <Data Byte n> <Checksum>
8 byte addr Sensor ID Host ID x x x x x checksum
of radio default=1 default=251
Sensor ID values are defined from 1 to 250 and typically will be set to 1 with the radio’s MAC address being the primary sensor
identifier. The Host ID values are defined from 251 to 255 with 251 being the typical value. Address bytes in the message will
follow the Command byte in Data Byte 1 (LSB) and Data Byte 2 (MSB).
The sensor’s response message will return through the Digi Gateway. Here is the format of the message seen by the host device.
<DestinationID> <SenderID> <Message Length> <Command> <Data Byte 1> <Data Byte 2> · · · <Data Byte n> <Checksum>
Host ID Sensor ID x x x x x checksum
default=251 default=1
DestinationID: This byte represents the destination ID for the message. If the message is going to a sensor from a host device,
then the values will be from 1 to 250 with the default value of 1. If the message is being set to a host device from a sensor, then
the values will be from 251 to 255 with the default value of 251.
SenderID: This byte represents the sender’s ID for the message. If the message is going to a sensor from a host device, the
values will be from 1 to 250 with the default value of 1. If the message is being set to a host device from a sensor, then the values
will be from 251 to 255 with the default value of 251.
Message Length: This will contain the total number of bytes in the message not including the MAC address.
Data Bytes: These bytes contain the data that will be transferred to and from the sensor. If specific commands require an address
like reading and writing to Configuration Registers, Data Byte 1 will contain the LSB address and Data Byte 2 will contain the
MSB address.
Checksum: This is the sum of all bytes (not including MAC address) modulo 256
Commenti su questo manuale