Digi International Inc XBEEPRO2 Manuel D’Utilisation

Page de 155
XBee®/XBee‐PRO® ZB RF Modules 
© 2011 Digi International, Inc.
     56
The application should always update the 16-bit address in the address table when one of these frames is 
received to ensure the table has the most recently known 16-bit address. If a transmission failure occurs, 
the application should set the 16-bit address in the table to 0xFFFE (unknown).
Fragmentation
Each unicast transmission may support up to 84 bytes of RF payload. (Enabling security or using source 
routing can reduce this number. See the NP command for details.) However, the XBee ZB firmware supports 
a ZigBee feature called fragmentation that allows a single large data packet to be broken up into multiple 
RF transmissions and reassembled by the receiver before sending data out its UART. This is shown in the 
image below.
The API transmit frame can include up to 255 bytes of data, which will be broken up into multiple 
transmissions and reassembled on the receiving side. If one or more of the fragmented messages are not 
received by the receiving device, the receiver will drop the entire message, and the sender will indicate a 
transmission failure in the Tx Status API frame.  ZB firmware can only support one fragmented packet at a 
time at the receive node, due to memory constraints.
Applications that do not wish to use fragmentation should avoid sending more than the maximum number 
of bytes in a single RF transmission. See the "Maximum RF Payload Size" section for details.
Devices will not receive or reassemble fragmented RF packets if RTS flow control is enabled (D6 command).
Data Transmission Examples
AT Firmware
To send a data packet in AT firmware, the DH and DL commands must be set to match the 64-bit address of 
the destination device. DH must match the upper 4-bytes, and DL must match the lower 4 bytes. Since the 
coordinator always receives a 16-bit address of 0x0000, a 64-bit address of 0x0000000000000000 is 
defined as the coordinator's address (in ZB firmware). The default values of DH and DL are 0x00, which 
sends data to the coordinator.
Example 1: Send a transmission to the coordinator.
(In this example, a '\r' refers to a carriage return character.)
A router or end device can send data in two ways. First, set the destination address (DH and DL 
commands) to 0x00.
1. Enter command mode ('+++')
2. After receiving an OK\r, issue the following commands:
a. ATDH0\r
b. ATDL0\r
c. ATCN\r
3. Verify that each of the 3 commands returned an OK\r response.
4. After setting these command values, all serial characters will be sent as a unicast transmission 
to the coordinator.