API operation Sending public profile commands with the API
XBee/XBee-PRO ZigBee RF Modules User Guide 146
Sending public profile commands with the API
Commands in public profiles such as Smart Energy and Home Automation can be sent with the XBee API using
the Explicit Transmit API frame (0x11). Sending public profile commands with the Explicit Transmit API frame
requires some formatting of the data payload field. Most of the public profile commands fit into the ZigBee
Cluster Library (ZCL) arcpressecture as described in the previous section.
The following table shows how the Explicit API frame can be used to send a demand response and load control
message (cluster ID 0x701) in the smart energy profile (profile ID 0x0109) in the revision 14 Smart Energy
specification. The message will be a “Load Control Event” (command ID 0x00) and will be sent to a device with 64-
bit address of 0x0013A200 40401234 with a 16-bit address of 0x5678. The event will start a load control event for
water heaters and smart appliances, for a duration of 1 minute, starting immediately.
Note When sending public profile commands, the AO command should be set to 1 to enable the explicit receive
API frame. This will provide indication of the source 64- and 16-bit addresses, cluster ID, profile ID, and
endpoint information for each received packet. This information is required to properly decode received
data.
Frame Fields Offset Example Description
Start Delimiter
00x7E
Length MSB 1 0x00
Number of bytes between the length and the
checksum.
Frame-
specific
Data
LSB 2 0x19
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.
60x13
70xA2
80x00
90x40
10 0x40
11 0x12
12 0x34
16-bit Destination Network Address
MSB 13 0x56
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 0x78