[Zigbee] Problem with Zcl callback handler in zigbee and thread 4.2.0

Hi guys,

So lately, I decided to update the sdk from 4.1.0 to 4.2.0 and there are some problem that I can not solve myself. So I use the macro ZB_ZCL_REGISTER_DEVICE_CB to register a device call back in 4.1.0 and now keeping it in 4.2.0.

But I have this problem when I tried to send an on off cmd from the coordinator to the device(router role) everything is fine. When I tried to send the report (multi state cluster since I have many state of the button) from the router to the coordinator, it is also OK too. But If i just turn the device on by hand and try to turn it off by sending cmd off of zigbee, although the packet is successfully  receive(I use the endpoint handler), It does not call the cb function that I register before.

This problem is not existed in the last SDK so I do not know if there are any config need to be set to use the ZB_ZCL_REGISTER_DEVICE_CB correctly and compare to the light bulb example seem to have that the only diffent is that I declare the context after I call this marcro but I does now seem to make any difference. So can you tell me how I can fix this or can you give me some hint on how to use the ZB_AF_SET_ENDPOINT_HANDLER to replace that.

Thank you very much,

Best regards,

Tu

  • Thank you for your answer and sorry for the late reply,

    So this behavior can be easily seen by using CLI dongle and a NRF_dev board running example from the two light bulb example. You can just add some log in the zcl handler and using the cli dongle to send on/off command. You can tried to send 2-3 off command to see that only the first off command will trigger the callback

    So if nothing you can do to change the SDK, is there any other way I can use to fix this behavior like changing to another command or something.

    Best regards,

    Tu

Related