Digi International Inc XBEEPRO2 Manuel D’Utilisation

Page de 155
XBee®/XBee‐PRO® ZB RF Modules 
© 2011 Digi International, Inc.
     57
Alternatively, if the coordinator's 64-bit address is known, DH and DL can be set to the coordinator's 64-bit 
address. Suppose the coordinator's address is 0x0013A200404A2244.
1. Enter command mode ('+++')
2. After receiving an OK\r, issue the following commands:
a. ATDH13A200\r
b. ATDL404A2244\
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.
API Firmware
Use the transmit request, or explicit transmit request frame (0x10 and 0x11 respectively) to send data to 
the coordinator. The 64-bit address can either be set to 0x0000000000000000, or to the 64-bit address of 
the coordinator. The 16-bit address should be set to 0xFFFE when using the 64-bit address of all 0x00s.
To send an ascii "1" to the coordinator's 0x00 address, the following API frame can be used:
7E 00 0F 10 01  0000 0000 0000 0000 FFFE 00 00 31 C0
If the explicit transmit frame is used, the cluster ID should be set to 0x0011, the profile ID to 0xC105, and 
the source and destination endpoints to 0xE8 (recommended defaults for data transmissions in the Digi 
profile.) The same transmission could be sent using the following explicit transmit frame:
7E 00 15 11 01  0000 0000 0000 0000 FFFE E8 E8 0011 C105 00 00 31 18
Notice the 16-bit address is set to 0xFFFE. This is required when sending to a 64-bit address of 0x00s.
Now suppose the coordinator's 64-bit address is 0x0013A200404A2244. The following transmit request API 
frame (0x10) will send an ASCII "1" to the coordinator:
7E 00 0F 10  01 0013 A200 404A 2244 0000 0000 31 18
Example 2: Send a broadcast transmission.
(In this example, a '\r' refers to a carriage return character.)
Perform the following steps to configure a broadcast transmission:
1. Enter command mode ('+++')
2. After receiving an OK\r, issue the following commands:
a. ATDH0\r
b. ATDLffff\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 broadcast 
transmission.
API Firmware
This example will use the transmit request API frame (0x10) to send an ASCII "1" in a broadcast 
transmission.
To send an ascii "1" as a broadcast transmission, the following API frame can be used:
7E 00 0F 10 01  0000 0000 0000 FFFF FFFE 00 00 31 C2
Notice the destination 16-bit address is set to 0xFFFE for broadcast transmissions.
RF Packet Routing
Unicast transmissions may require some type of routing. ZigBee includes several different ways to route data, each 
with its own advantages and disadvantages. These are summarized in the table below.