Specifications
XBee®/XBee‐PRO®SERFModules
©2009DigiInternational,Inc. 53
To send a source-routed packet to R3, the application must send a Create Source Route API frame
(0x21) to the XBee, with a destination of R3, and 2 hops (R1 and R2). If the 64- bit address of R3
is 0x0013A200 404a1234 and the 16-bit addresses of R1, R2, and R3 are:
Then the Create Source Route API frame would be:
7E 0012 21 00 0013A200 404A1234 EEFF 00 02 CCDD AABB 5C
Where:
0x0012 - length
0x21 - API ID (create source route)
0x00 - frame ID (set to 0 always)
0x0013A200 404A1234 - 64-bit address of R3 (destination)
0xEEFF - 16-bit address of R3 (destination)
0x00 - Route options (set to 0)
0x02 - Number of intermediate devices in the source route
0xCCDD - Address of furthest device (1-hop from target)
0xAABB - Address of next-closer device
0x5C - Checksum (0xFF - SUM (all bytes after length))
Repairing Source Routes
It is possible in a network to have an existing source route fail (i.e. a device in the route moves or
goes down, etc.). If a device goes down in a source routed network, all routes that used the device
will be broken.
As mentioned previously, source routing must be used with many-to-one routing. (A device that
uses source routing must also send a periodic many-to-one broadcast in order to keep routes
fresh). If a source route is broken, remote devices must send in new route record transmissions to
the data collector to provide it with a new source route. This requires that remote devices send
data transmissions into the data collector. See the earlier "Acquiring Source Routes" section for
details.
Retries and Acknowledgments
ZigBee includes acknowledgment packets at both the MAC and Application Support (APS) layers.
When data is transmitted to remote device, it may traverse multiple hops to reach the destination.
As data is transmitted from one node to its neighbor, an acknowledgment packet (MAC ACK) is
transmitted in the opposite direction to indicate that the transmission was successfully received. If
the ACK is not received, the transmitting device will retransmit the data, up to 4 times. This ACK is
called the MAC layer acknowledgment.
In addition, the device that originated the transmission expects to receive an acknowledgment
packet (Nwk ACK) from the destination device. This ACK will traverse the same path that the data
traversed, but in the opposite direction. If the originator fails to receive this ACK, it will retransmit
the data, up to 2 times until an ACK is received. This ACK is called the ZigBee APS layer
acknowledgment.
Refer to the ZigBee specification for more details.
Device 16-bit address
R1 0xAABB
R2 0xCCDD
R3 0xEEFF