Digi International Inc XBEEPRO2 Manual Do Utilizador

Página de 155
XBee®/XBee‐PRO® ZB RF Modules 
© 2011 Digi International, Inc.
     123
Frame Fields
Offset Example
Description
A
P
I
 
P
a
c
k
e
t
Start Delimiter
0 0x7E
Length
MSB 1 0x00
Number of bytes between the length and the checksum
Frame-specific Data 
LSB 2 0x17
Frame Type
3 0x11
Frame ID
4 0x01
Identifies the UART data frame for the host to correlate 
with a subsequent transmit status. If set to 0, no transmit 
status frame will be sent out the UART.
64-bit Destination
Address
MSB 5 0x00
64-bit address of the destination device (big endian byte 
order). For unicast transmissions, set to the 64-bit 
address of the destination device, or to 
0x0000000000000000 to send a unicast to the 
coordinator. Set to 0x000000000000FFFF for broadcast.
6 0x00
7 0x00
8 0x00
9 0x00
10 0x00
11 0xFF
12 0xFF
16-bit Destination
Network Address
MSB 13 0xFF
16-bit address of the destination device (big endian byte 
order). Set to 0xFFFE for broadcast, or if the 16-bit 
address is unknown. 
LSB 14 0xFE
Source Endpoint
15 0x00
Set to 0x00 for ZDO transmissions (endpoint 0 is the 
ZDO endpoint).
Destination Endpoint
16 0x00
Set to 0x00 for ZDO transmissions (endpoint 0 is the 
ZDO endpoint).
Cluster ID
MSB 17 0x00
Set to the cluster ID that corresponds to the ZDO 
command being sent.
0x0005 = Active Endpoints Request
LSB 18 0x05
Profile ID
MSB 19 0x00
Set to 0x0000 for ZDO transmissions (Profile ID 0x0000 
is the ZigBee Device Profile that supports ZDOs).
LSB 20 0x00
Broadcast Radius
21 0x00
Sets the maximum number of hops a broadcast 
transmission can traverse. If set to 0, the transmission 
radius will be set to the network maximum hops value.
Transmit Options
22 0x00
All bits must be set to 0.
Data Payload
Transaction Sequence 
Number
23 0x01
The required payload for a ZDO command. All multi-byte 
ZDO parameter values (u16, u32, 64-bit address) must 
be sent in little endian byte order.
The Active Endpoints Request includes the following 
payload:
[16-bit NwkAddrOfInterest]
Note the 16-bit address in the API example (0x1234) is 
sent in little endian byte order (0x3412).
ZDO Payload
24 0x34
25 0x12
Checksum
26 0xA6
0xFF minus the 8 bit sum of bytes from offset 3 to this 
byte.