API operation API frames
XBee/XBee-PRO ZigBee RF Modules User Guide 123
Create Source Route
Frame type: 0x21
This frame creates a source route in the module. A source route specifies the complete route a packet should
traverse to get from source to destination. Source routing should be used with many-to-one routing for best
results.
Note Both the 64-bit and 16-bit destination addresses are required when creating a source route. These are
obtained when a Route Record Indicator (0xA1) frame is received.
Frame Fields Offset Example Description
Start Delimiter
00x7E
Length
MSB 1 0x00
Number of bytes between the length and the checksum
LSB 2 0x14
Frame-specific
Data
Frame Type
30x21
Frame ID
40x00
The Frame ID should always be set to 0.
64-bit Destination
Address
MSB 5 0x00
Set to the 64-bit address of the destination device. The
following addresses are also supported:
0x0000000000000000 - Reserved 64-bit address for the
coordinator
0x000000000000FFFF - Broadcast address
60x13
70xA2
80x00
90x40
10 0x40
11 0x11
LSB 12 0x22
16-bit Destination
Network Address
MSB 13 0x33
Set to the 16-bit address of the destination device, if known.
Set to 0xFFFE if the address is unknown, or if sending a
broadcast.
LSB 14 0x44
Route Command
Options
15 0x00
Set to 0.
Number of
Addresses
16 0x03
The number of addresses in the source route (excluding
source and destination).
Address 1
17 0xEE
(neighbor of destination)
18 0xFF
Address 2 (closer
hop
19 0xCC
Address of intermediate hop
20 0xDD