XBee®/XBee‐PRO® ZB SMT RF Modules
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
0 0x7E
Description
Start Delimiter
Length
MSB 1 0x00
LSB 2 0x14
3 0x21
Number of bytes between the length and the checksum
The Frame ID should always be set to 0.
Frame-specific Data Frame Type
Frame ID
4 0x00
MSB 5 0x00
6 0x13
Set to the 64-bit address of the destination device. The
following addresses are also supported:
0x0000000000000000 - Reserved 64-bit address for the
coordinator
7 0xA2
64-bit Destination
Address
8 0x00
9 0x40
0x000000000000FFFF - Broadcast address
10 0x40
11 0x11
LSB 12 0x22
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.
16-bit Destination
Network Address
LSB 14 0x44
15 0x00
Route Command
Options
Set to 0.
The number of addresses in the
source route (excluding source
and destination). If this number is 0 or greater than the
source route table size (40), this API frame will be silently
discarded. However, there is no use in including more
than 11 intermediate hops because a frame with more
hops than that will be discarded.
Number of Addresses
16 0x03
17 0xEE
18 0xFF
19 0xCC
20 0xDD
21 0xAA
22 0xBB
23 0x01
(neighbor of
destination)
Address 1
Address 2 (closer hop
Address of intermediate hop
Address 3
(neighbor of source)
Checksum
0xFF - the 8 bit sum of bytes from offset 3 to this byte.
Example: Intermediate hop addresses must be ordered starting with the neighbor of the destination, and
working closer to the source. For example, suppose a route is found between A and E as shown below.
A ' B ' C ' D ' E
If device E has the 64-bit and 16-bit addresses of 0x0013A200 40401122 and 0x3344, and if devices B, C, and
D have the following 16-bit addresses:
B = 0xAABB
C = 0xCCDD
D = 0xEEFF
The example above shows how to send the Create Source Route frame to establish a source route between A
and E.
© 2010 Digi International, Inc.
106