Legacy data format
If sample data is generated from an S1 or S2C 802.15.4 XBee or an XBee 3 802.15.4 that has AO set to 2, the format of the sample data will be represented as a series of bytes in the following format which is compatible with the S1 802.15.4 and S2C 802.15.4 devices:
Bytes |
Name |
Description |
---|---|---|
1 |
Sample sets |
Number of sample sets. This is determined by IT (Samples before TX) on the source node. |
2 |
Digital and analog channel mask |
Indicates which digital I/O and ADC lines have sampling enabled. Each bit corresponds to one digital I/O or ADC line on the device. bit 0 = DIO0 Example: a channel mask of 0x063C means ADC0, ADC1, DIO2, DIO3, and DIO5 are configured as digital inputs or outputs. |
2 |
Digital data set |
Each bit in the digital data set corresponds to a digital bit in the channel mask and indicates the state of the digital pin, whether high (1) or low (0). If the digital portion of the channel mask is 0, then these two bytes are omitted as no digital I/O lines are enabled. bit 0 = DIO0 |
2 |
Analog data set (multiple) |
Each enabled ADC line in the analog portion of the channel mask has a separate 2-byte value based on the number of ADC inputs on the originating device. The data starts with AD0 and continues sequentially for each enabled analog input channel up to AD3. If the analog portion of the channel mask is 0, then no analog sample bytes are included. |