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

Get Zigbee Long Address inside of ZB_ZDO_SIGNAL_DEVICE_ANNCE

Hi,
I'm using:
nRF52840 Preview DK
Zigbee v2 (nRF5_SDK_for_Thread_and_Zigbee_2)
Segger Embedded Studio for ARM 3.52
Developing on a MacBook (macOS Mojave v10.14.5)
1) Is there any way to get the long address of a node connecting to the Zigbee network? I can get the short address through ZB_ZDO_SIGNAL_DEVICE_ANNCE in zboss_signal_handler:
    case ZB_ZDO_SIGNAL_DEVICE_ANNCE:
        {
            zb_zdo_signal_device_annce_params_t * dev_annce_params = ZB_ZDO_SIGNAL_GET_PARAMS(&sig, zb_zdo_signal_device_annce_params_t);
            printf("ZB Signal Device Annce, short address: %hx\n", dev_annce_params->device_short_addr);
            
            zigbee_connected_code(dev_annce_params);
}
break;
2) If that's not possible then is there any way to convert the Zigbee short address to the long address?
Thanks,
John
  • Hi, 

    Please use the latest ZigBee SDK which is v3.1.

    With the latest one, you can get the long address using "zb_zdo_signal_device_update_params_s".

            case ZB_ZDO_SIGNAL_DEVICE_UPDATE:
                {
                    char ieee_addr_buf[17] = {0};
                    zb_zdo_signal_device_update_params_t * p_update_params;
                    p_update_params = ZB_ZDO_SIGNAL_GET_PARAMS(p_sg_p, zb_zdo_signal_device_update_params_t);
                    UNUSED_RETURN_VALUE(ieee_addr_to_str(ieee_addr_buf, sizeof(ieee_addr_buf), p_update_params->long_addr));
                    NRF_LOG_INFO("Device has updated its status in the network, short address: %04x, long address: %s, status: %d",
                                 p_update_params->short_addr, NRF_LOG_PUSH(ieee_addr_buf), p_update_params->status);
                }
                break;

    I'm not sure that you want to get the long address before joining or after joining, but you can get it through that.

    I hope that this is helpful for you.

    BR

    Justin

  • Justin, that was very helpful. Thank you!

    I updated my code to the latest ZigBee SDK v3.1.

    So when a Router connects to my Coordinator, I should receive the ZB_ZDO_SIGNAL_DEVICE_UPDATE signal and then I can keep a table of which Routers are connected. That takes care of one problem.

    Now, how does the Router get the long address of the Coordinator?

    Thanks,

    John

  • Hi John, 

    From what I know, there is no way to get long address of the ZC on the ZR.

    The ZC manages devices which try to connect or are connected.

    In that case, the ZC can get information of them, but the ZR or ZED are not possible.

    Maybe, I don't know how.

    Please create a private ticket and ask it to Nordic R&D.

    BR

    Justin 

Related