API Operation Send ZDO commands with the API
Digi XBee® 3 Zigbee® RF Module
240
Byte(s) Description
7E Start delimiter
00 08 Length bytes
08 API identifier
01 API frame ID
4E 49 AT Command
58 42 45 45 Parameter value
3B Checksum
To calculate the check sum you add all bytes of the packet, excluding the frame delimiter 7E and the
length (the second and third bytes):
7E 00 08 08 01 4E 49 58 42 45 45 3B
Add these hex bytes:
0x08 + 0x01 + 0x4E + 0x49 + 0x58 + 0x42 + 0x45 + 0x45 = 0x01C4
Now take the result of 0x01C4 and keep only the lowest 8 bits which in this example is 0xC4 (the two
far right digits). Subtract 0xC4 from 0xFF and you get 0x3B (0xFF - 0xC4 = 0x3B). 0x3B is the checksum
for this data packet.
If an API data packet is composed with an incorrect checksum, the XBee 3 Zigbee RF Module will
consider the packet invalid and will ignore the data.
To verify the check sum of an API packet add all bytes including the checksum (do not include the
delimiter and length) and if correct, the last two far right digits of the sum will equal FF.
0x08 + 0x01 + 0x4E + 0x49 + 0x58 + 0x42 + 0x45 + 0x45 + 0x3B = 0x01FF
Send ZDO commands with the API
Zigbee specifications define Zigbee device objects (ZDOs) as part of the Zigbee device profile. These
objects provide functionality to manage and map out the Zigbee network and to discover services on
Zigbee devices. ZDOs are typically required when developing a Zigbee product that interoperates in a
public profile such as home automation or smart energy, or when communicating with Zigbee devices
from other vendors. You can also use the ZDO to perform several management functions such as
frequency agility (energy detect and channel changes - Mgmt Network Update Request), discovering
routes (Mgmt Routing Request) and neighbors (Mgmt LQI Request), and managing device connectivity
(Mgmt Leave and Permit Join Request).
The following table shows some of the more prominent ZDOs with their respective cluster identifier.
Each ZDO command has a defined payload. See the Zigbee device profile section of the Zigbee
specification for details.
ZDO command Cluster ID
Network Address Request 0x0000
IEEE Address Request 0x0001
Node Descriptor Request 0x0002