Binding

The Digi XBee firmware supports three binding request messages:

End_Device_Bind_req

The End Device Bind request (ZDO cluster 0x0020) is described in the Zigbee Specification.

During a deployment, an installer may need to bind a switch to a light. After pressing a commissioning button sequence on each device, this causes them to send End_Device_Bind_req messages to the Coordinator within a time window (60 s). The payload of each message is a simple descriptor which lists input and output clusterIDs. The Coordinator matches the requests by pairing complementary clusterIDs. After a match has been made, it sends messages to bind the devices together. When the process is over, both devices will have entries in their binding tables which support indirect addressing of messages between their bound endpoints.

R1->C End_Device_Bind_req

R2->C End_Device_Bind_req

R1, R2 send End_Device_Bind_req within 60 s of each other to C

C matches the requests.

C tests one to see if binding is already in place:

R2<-C Unbind_req

R2->C Unbind-rsp (status code - NO_ENTRY)

C proceeds to create binding table entries on the two devices.

R1<-C Bind_req

R1->C Bind_rsp

R2<-C Bind_req

R2->C Bind_rsp

C sends responses to the original End_Device_Bind_req messages.

R1-<C End_Device_Bind_rsp

R2-<C End_Device_Bind_rsp

End Device binding sequence (binding)

This message has a toggle action. If the same two devices were to subsequently send End_Device_Bind_req messages to the Coordinator, the Coordinator would detect they were already bound, and then send Unbind_req messages to remove the binding.

An installer can use this to remove a binding which was made incorrectly, say from a switch to the wrong lamp, by repeating the commissioning button sequence used beforehand.

R1->C End_Device_Bind_req

R2->C End_Device_Bind_req

R1, R2 send End_Device_Bind_req within 60 s of each other to C

C matches the requests.

C tests one to see if binding is already in place:

R2<-C Unbind_req

R2->C Unbind-rsp (status code - SUCCESS)

C proceeds to remove binding table entries from the two devices.

R1<-C Unbind_req

R1->C Unbind_rsp

R2<-C Unbind_req

R2->C Unbind_rsp

C sends responses to the original End_Device_Bind_req messages.

R1-<C End_Device_Bind_rsp

R2-<C End_Device_Bind_rsp

End Device binding sequence (removal)

This example shows a correctly formatted End_Device_Bind_req (ZDO cluster 0x0020) using a Digi 0x11 Explicit API Frame:

The frame as a bytelist:

7e002811010000000000000000fffe000000200000000001f2995cb5474000a21300e605c101010001020046

Same frame broken into labeled fields.

Note Multibyte fields are represented in big-endian format.

7e Frame Delimiter
0028 Frame Length
11 API Frame Type (Explicit Frame)
01 Frame Identifier (for response matching)
0000000000000000 Coordinator address
fffe Code for unknown network address
00 Source Endpoint (need not be 0x00)
00 Destination Endpoint (ZDO endpoint)
0020 Cluster 0x0020 (End_Device_Bind_req)
0000 ProfileID (ZDO)
00 Radius (default, maximum hops)
00 Transmit Options
01f2995cb5474000a21300e605c1010100010200 RFData (ZDO payload)
46 Checksum

Here is the RFData (the ZDO payload) broken into labeled fields. Note the multi-byte fields of a ZDO payload are represented in little-endian format.

01 Transaction Sequence Number
f299 Binding Target (16 bit network address of sending device)
5cb5474000a21300 (64 bit address of sending device)
e6 Source Endpoint on sending device
05c1 ProfileID (0xC105) - used when matching End_Device_Bind_requests
01 Number of input clusters
0100 Input cluster ID list (0x0100)
01 Number of output clusters
0200 Output cluster ID list (0x0200)

Example of a End_Device_Bind_req

Bind_req

The Bind request (ZDO cluster 0x0021) is described in the Zigbee Specification. A binding may be coded for either a unicast or a multicast/groupID message.

Unbind_req

The Unbind request (ZDO cluster 0x0022) is described in the Zigbee Specification.

 

© 2018 Digi International Inc. All rights reserved.
Binding updated on 26 Sep 2017 03:47 PM