Digi International Inc XBEEPRO2 Manual Do Utilizador

Página de 155
XBee®/XBee‐PRO® ZB RF Modules 
© 2011 Digi International, Inc.
     64
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 periodically 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 a remote device, it may traverse multiple hops to reach the destination. As data is 
transmitted from one node to its neighbor, an acknowledgment packet (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 (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.
Encrypted Transmissions
Encrypted transmissions are routed similar to non-encrypted transmissions with one exception. As an encrypted 
packet propagates from one device to another, each device decrypts the packet using the network key, and 
authenticates the packet by verifying packet integrity. It then re-encrypts the packet with its own source address 
and frame counter values, and sends the message to the next hop. This process adds some overhead latency to 
unicast transmissions, but it helps prevent replay attacks. See chapter 5 for details. 
Maximum RF Payload Size
XBee ZB firmware includes a command (ATNP) that returns the maximum number of RF payload bytes that can be 
sent in a unicast transmission. Querying the NP command, like most other commands, returns a HEXADECIMAL 
value. This number will change based on whether security is enabled or not. If security is enabled (EE command), 
the maximum number of RF payload bytes decreases since security requires additional overhead. 
After reading the NP value, the following conditions can affect the maximum number of data bytes in a single RF 
transmission: