This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Migrating some methods from nRF Zigbee & Thread SDK to NCS

Hi,

We are porting our application from nRF Zigbee & Thread SDK to NCS.

On the ZIgbee side, we have been using this methods:

1. zb_zdo_find_bind_src(): to check if a binding was already stored in the local bindings table

2. bdb_load_factory_new_flag(): called before the method zb_bdb_is_factory_new() to update the returned value.

Is there any new alternative method or procedure to get the same result in 1)?

Is still bdb_load_factory_new_flag() necessary on NCS?

Regards,

Santiago

  • Hi Santiago

    1. I don't think you'll need to add this to NCS, as most functions have "replacements" in NCS already. Check out the zdo mgmt_bind function here.

    2. I could not find any load_factory_new_flag() on NCS, so it might not be needed in NCS. I have asked the Zigbee development team for clarification here and will update you when I hear back from them.

    Best regards,

    Simon

  • Hi Simon,

    Thanks for your answer. zdo_mgmt_bind was already available in the old SDK. This is not related to send a request to get the bindings table since you want to get the info from local tables.

    Can you check it with the Zigbee team too?

    Regards

  • Hi

    The zb_bdb_is factory_new() issue is resolved as of NCS v1.4.0, so it should not be necessary to use this function to update the returned value.

    My colleague in the Zigbee team couldn't find an equivalent to the zb_zdo_find_bind_src() in NCS either. What's the reason you want to check if a binding was already stored in the local bindings table? Is it necessary to your application?

    Best regards,

    Simon

  • Hi Simon,

    Yes, if the binding does not exist it send a bind request. Otherwise it skips that step...

    Please, we would like to port it as smoothly as possible since Nordic's support suggested to migrate from the old SDK to the new one

    Regards

  • Hi

    There doesn't seem to be a similar API in NCS, but you can implement the reading device's binding table and look for an entry associated with a specific device. Pleasse take a look at a CLI example for how it can be implemented:

    • zdo mgmt_bind. Have a CLI command read the binding table from a device, then the device can ask itself for a binding table.
    • cmd_zb_mgmt_bind_cb(). Have a callback function that parses and prints received entries of a binding table.

    You can also use the Zigbee CLI to test this solution, so for example, the coordinator device can read its own binding table:

    uart:~$ zdo short 
    0000
    Done
    uart:~$ zdo mgmt_bind 0x0000
    [idx] src_address      src_endp cluster_id dst_addr_mode dst_addr         dst_endp
    [  0] f4ce361fe8ab4e51       10     0x0001           003 f4ce36f71a6cab56      010
    Total entries for the binding table: 1
    Done

    Best regards,

    Simon

Related