XBee®/XBee‐PRO® ZB SMT RF Modules
Data bytes that need to be escaped:
•0x7E – Frame Delimiter
•0x7D – Escape
•0x11 – XON
•0x13 – XOFF
Example - Raw UART Data Frame (before escaping interfering bytes):
0x7E 0x00 0x02 0x23 0x11 0xCB
0x11 needs to be escaped which results in the following frame:
0x7E 0x00 0x02 0x23 0x7D 0x31 0xCB
Note: In the above example, the length of the raw data (excluding the checksum) is 0x0002 and the
checksum of the non-escaped data (excluding frame delimiter and length) is calculated as:
0xFF - (0x23 + 0x11) = (0xFF - 0x34) = 0xCB.
Length
The length field has a two-byte value that specifies the number of bytes that will be contained in the frame
data field. It does not include the checksum field.
Frame Data
Frame data of the serial port data frame forms an API-specific structure as follows:
Serial Port Data Frame & API‐specific Structure:
Start Delimiter
(Byte 1)
Length
(Bytes 2-3)
Frame Data
(Bytes 4-n)
Checksum
(Byte n + 1)
MSB
LSB
API-specific Structure
1 Byte
0x7E
API Identifier
cmdID
Identifier-specific Data
cmdData
The cmdID frame (API-identifier) indicates which API messages will be contained in the cmdData frame
(Identifier-specific data). Note that multi-byte values are sent big endian.The XBee modules support the
following API frames:
API Frame Names and Values
API Frame Names
API ID
AT Command
0x08
AT Command - Queue Parameter Value
0x09
0x10
0x11
0x17
ZigBee Transmit Request
Explicit Addressing ZigBee Command Frame
Remote Command Request
Create Source Route
0x21
AT Command Response
0x88
0x8A
0x8B
0x90
0x91
0x92
0x94
0x95
0x97
Modem Status
ZigBee Transmit Status
ZigBee Receive Packet (AO=0)
ZigBee Explicit Rx Indicator (AO=1)
ZigBee IO Data Sample Rx Indicator
XBee Sensor Read Indicator (AO=0)
Node Identification Indicator (AO=0)
Remote Command Response
Over-the-Air Firmware Update Status
Route Record Indicator
0xA0
0xA1
0xA3
Many-to-One Route Request Indicator
© 2010 Digi International, Inc.
97