API operation Sending ZigBee Cluster Library (ZCL) commands with the API
XBee/XBee-PRO ZigBee RF Modules User Guide 145
In the above example, the Frame Control field (offset 23) was constructed as follows:
See the ZigBee Cluster Library specification for details.
Frame-
specific
Data
Data
Payload
ZCL
Frame
Header
Frame
Control
23 0x00
Bitfield that defines the command type and
other relevant information in the ZCL
command. See the ZCL specification for
details.
Transaction
Sequence
Number
24 0x01
A sequence number used to correlate a ZCL
command with a ZCL response. The
hardware version response will include this
byte as a sequence number in the response.
The value 0x01 was arbitrarily selected.
Command
ID
25 0x00
Since the frame control “frame type” bits are
00, this byte specifies a general command.
Command ID 0x00 is a Read Attributes
command.
ZCL
Payload
Attribute ID 26 0x03
The payload for a “Read Attributes”
command is a list of Attribute Identifiers that
are being read.
Note the 16-bit Attribute ID (0x0003) is sent in
little endian byte order (0x0300). All multi-
byte ZCL header and payload values must be
sent in little endian byte order.
27 0x00
Checksum
28 0xFA
0xFF minus the 8 bit sum of bytes from offset
3 to this byte.
Frame Fields Offset Example Description
Name Bits Example Value Description
Frame Type 0-1 00 - Command acts across the entire profile
Manufacturer Specific 2 0 - The manufacturer code field is omitted from the ZCL Frame Header
Direction 3 0 - The command is being sent from the client side to the server side
Disable Default Response 4 0 - Default response not disabled
Reserved 5-7 Set to 0