Topic

FAQ
Login Register
ZigBee - ZBHCI_CMD_BINDING_REQ
Sep 09, 2022 07:28

/

A

/A

In my previous thread about reporting, I found that there is a problem with binding request.

I programmed a new board to work as a gateway/coordinator so I can use it with ZGC TOOL.

Here are the results from ZGC TOOL:

Device:

22-09-09 08:03:38.559716 recv<--:55 80 43 00 0b f5 67 32 a4 c1 38 35 0c 35 10 a7 8e aa
hci commandid: 0x8043 (ZBHCI_CMD_NODES_DEV_ANNCE_IND)
payload len: 11
nwk_addr: 0x6732
ieee_addr:0xa4c138350c3510a7
capability:0x8e
dev_type:Router


Binding Request:

22-09-09 08:09:23.988277 send-->:55 00 20 00 0e e6 a4 c1 38 ab 24 42 db d0 01 00 06 01 67 32 aa
hci commandid: 0x0020 (ZBHCI_CMD_BINDING_REQ)
payload len: 14
src_addr: 0xa4c138ab2442dbd0
src_ep: 0x01
clister_id: 0x0006
dst_addr_mode: 0x1(group)
dst_addr: 0x6732

22-09-09 08:09:23.992278 recv<--:55 80 00 00 04 a4 00 20 00 00 aa
payload len: 4
msgtype:0x20(ZBHCI_CMD_BINDING_REQ)
status:0x0(ZBHCI_MSG_STATUS_SUCCESS)


There is conformation that the message was send, but no response from the device and binding is not working.


Fragments from ZigBee Specification:

2.2.4.3.1 APSME-BIND.request

This primitive allows the next higher layer to request to bind two devices together, or to bind a device to a group, by creating an entry in its local binding table, if supported.

2.2.4.3.1.2 When Generated

This primitive is generated by the next higher layer and issued to the APS sub-layer in order to instigate a binding operation on a device that supports a binding table.
2.2.4.3.1.3 Effect on Receipt
On receipt of this primitive by a device that is not currently joined to a network, or by a device that does not support a binding table, or if any of the parameters has a value which is out of range, the APSME issues the 1607 APSME-BIND.confirm primitive with the Status parameter set to ILLEGAL_REQUEST.
If the APS sub-layer on a device that supports a binding table receives this primitive from the NHLE, the APSME attempts to create the specified entry directly in its binding table. If the entry could be created, the APSME issues the APSME-BIND.confirm primitive with the Status parameter set to SUCCESS. If the entry could not be created due to a lack of capacity in the binding table, the APSME issues the APSME-BIND. 1612 confirm primitive with the Status parameter set to TABLE_FULL. 


2.2.4.3.2 APSME-BIND.confirm
This primitive allows the next higher layer to be notified of the results of its request to bind two devices 1615 together, or to bind a device to a group.

2.2.4.3.2.2 When Generated

This primitive is generated by the APSME and issued to its NHLE in response to an APSME-BIND.request primitive. If the request was successful, the Status parameter will indicate a successful bind request. Otherwise, the Status parameter indicates an error code of NOT_SUPPORTED, ILLEGAL_REQUEST or 1634 TABLE_FULL.

2.2.4.3.2.3 Effect on Receipt

On receipt of this primitive, the next higher layer is notified of the results of its bind request. If the bind request was successful, the Status parameter is set to SUCCESS. Otherwise, the Status parameter indicates the error.


Why doesn't the device respond to the binding request?

It is important because it binds 2 devices or binds device to a group.

Since, Telink has ZigBee Certification, I believe it should comply with the specification. Is something wrong with the message I sent?


A comment about the ZGC TOOL:

It is a pity that you can't copy all text from the send commands and interpretation of the commands.

You have to copy 1 line a time. Which is really bad.

You can't save this data to a file either so you can view it later!


In old tool (not python version) you could copy all the text.



2 replies
TL_Soyo Sep 09, 2022 14:43
0
/A

HI,

  Please follow the steps,

1、get the light and gw mac address,and short address

ect

light [(>)0x003C84FFFEA134FF],

        0x518C

GW  [(>)0xC419D14144F52F0B]

2、bind light and GW

3、then you can config report parameters to modify default report parameters

   

wes58 [Author] Sep 11, 2022 14:29
0
/A

Issue solved.

After many trials I got it working.

The problem was, that I thought that the source Address is the Gateway and destination address is the other device that the message is sent to - like in many other commands.

But in this case it is the other way round - source address is the device that the message is sent to and the gateway is destination address.

When reading the Zigbee specification it doesn t tell you anything which one is which.


Thanks for your help with this.