User Manual

Table Of Contents
XBee®/XBeePRO®ZBRFModules
©2011DigiInternational,Inc. 121
Sending ZigBee Device Objects (ZDO) Commands with the API
ZigBee Device Objects (ZDOs) are defined in the ZigBee Specification 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 will interoperate in a public profile such
as home automation or smart energy, or when communicating with ZigBee devices from other vendors. The ZDO
can also be used 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.
The Explicit Transmit API frame (0x11) is used to send ZigBee Device Objects commands to devices in the network.
Sending ZDO commands with the Explicit Transmit API frame requires some formatting of the data payload field.
When sending a ZDO command with the API, all multiple byte values in the ZDO command (API payload) (e.g. u16,
u32, 64-bit addresses) must be sent in little endian byte order for the command to be executed correctly on a
remote device.
For an API XBee to receive ZDO responses, the AO command must be set to 1 to enable the explicit receive API
frame.
The following table shows how the Explicit API frame can be used to send an "Active Endpoints" request to discover
the active endpoints on a device with a 16-bit address of 0x1234.
ZDO Command Cluster ID
Network Address Request 0x0000
IEEE Address Request 0x0001
Node Descriptor Request 0x0002
Simple Descriptor Request 0x0004
Active Endpoints Request 0x0005
Match Descriptor Request 0x0006
Mgmt LQI Request 0x0031
Mgmt Routing Request 0x0032
Mgmt Leave Request 0x0034
Mgmt Permit Joining Request 0x0036
Mgmt Network Update Request 0x0038