Specifications

XBee®/XBeePRO®SERFModules
©2009DigiInternational,Inc. 85
Checksum
To test data integrity, a checksum is calculated and verified on non-escaped data.
To calculate: Not including frame delimiters and length, add all bytes keeping only the lowest 8
bits of the result and subtract the result from 0xFF.
To verify: Add all bytes (include checksum, but not the delimiter and length). If the checksum is
correct, the sum will equal 0xFF.
API Examples
Example: Create an API AT command frame to configure an XBee to allow joining (set NJ to
0xFE). The frame should look like:
0x7E 0x00 0x05 0x08 0x01 0x4E 0x4A 0xFE 60
Where 0x0005 = length
0x08 = AT Command API frame type
0x01 = Frame ID (set to non-zero value)
0x4E4A = AT Command ('NJ')
0xFE = value to set command to
0x60 = Checksum
The checksum is calculated as [0xFF - (0x08 + 0x01 + 0x4E + 0x4A + 0xFE) & 0xFF]
API UART Exchanges
AT Commands
The following image shows the API frame exchange that takes place at the UART when sending an
AT command request to read or set a module parameter. The response can be disabled by setting
the frame ID to 0 in the request.
Transmitting and Receiving RF Data
The following image shows the API exchanges that take place at the UART when sending RF data
to another device. The transmit status frame is always sent at the end of a data transmission
unless the frame ID is set to 0 in the transmit request. If the packet cannot be delivered to the
destination, the transmit status frame will indicate the cause of failure.