IP services
XBee Application Service
XBee Wi-Fi RF Module User Guide
66
Receive I/O sample data
Sample data generated by the device is sent to the address configured by the
DL
commands. This
data can be sent to another XBee device or to a network client. It is sent using UDP from the 0xBEE
port as with other XBee Application services. Sample data is received by the client as follows:
Frame fields
Offset Example Description
Application header Number1
0
0x4242
Number2
2
0x0000
Number1 ^ Number2 = 0x4242.
Packet ID
4
0x00
Reserved for later use (0 for now).
Encryption
pad
5
0x00
Command
ID
6
0x04
Indicates I/O sample data.
Command
options
7
0x00
Options not available for this response.
Command-specific
data
Number of
Samples
8
0x01
Indicates one sample set.
Digital
Mask
MSB 9
0x01
Bit Mask. Each bit represents an enabled DIO
line starting with DIO0 at bit 0.
LSB 10 0x01
Analog
Mask
11
0x02
Bit Mask. Each bit represents an enabled ADC
starting with ADC0 at bit 0. This selects ADC1
for analog sampling.
Digital
Sample
MSB
12
0x00
This field is only present if at least one DIO line
is enabled in the digital mask specified above.
Each bit represents a DIO line. Start with bit 0
for DIO0.
LSB 13 0x01
Analog
Sample
MSB
14
0x02
0x200 indicates that reading is half of VREF.
For a default VREF of 2.5 V, 0x200 represents
1.25 volts on ADC1 in this example.
LSB 15 0x00
Send over-the-air firmware updates
A network client can also use the XBee IP services to send a firmware update to the device. This is
done by sending a frame formatted with an application header, followed by a GPM header, followed by
GPM data. The format of the application header is provided in
. See
for details about GPM headers format options. Make sure each GPM header is
preceded by an application header. The following table shows an example of the final step of a
firmware update process.