API Operation Data bytes that need to be escaped:
XBee/XBee-PRO® S2C ZigBee® RF Module
153
API frame names API ID
ZigBee Transmit Request 0x10
Explicit Addressing ZigBee Command Frame 0x11
Remote Command Request 0x17
Create Source Route 0x21
AT Command Response 0x88
Modem Status 0x8A
ZigBee Transmit Status 0x8B
ZigBee Receive Packet (AO=0) 0x90
ZigBee Explicit Rx Indicator (AO=1) 0x91
ZigBee I/O Data Sample Rx Indicator 0x92
XBee Sensor Read Indicator (AO=0) 0x94
Node Identification Indicator (AO=0) 0x95
Remote Command Response 0x97
Extended Modem Status 0x98
Over-the-Air Firmware Update Status 0xA0
Route Record Indicator 0xA1
Many-to-One Route Request Indicator 0xA3
Calculate and verify checksums
To test data integrity, the device calculates and verifies a checksum on non-escaped data.
To calculate the checksum of an API frame:
1. Add all bytes of the packet, except the start delimiter 0x7E and the length (the second and
third bytes).
2. Keep only the lowest 8 bits from the result.
3. Subtract this quantity from 0xFF.
To verify the checksum of an API frame:
1. Add all bytes including the checksum; do not include the delimiter and length.
2. If the checksum is correct, the last two digits on the far right of the sum equal 0xFF.
Example
Consider the following sample data packet: 7E 00 0A 01 01 50 01 00 48 65 6C 6C 6F B8