Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to get short PAN Id of coordinator?

Hello Nordic support,

I am using nRF5 SDK for a Zigbee coordinator application. In zboss_api.h, I see that there are functions for setting short pan id (zb_set_pan_id()), long address (zb_set_long_address()) and extended pan id (zb_set_extended_pan_id()). In addition, I see that there are functions for getting long address (zb_get_long_address()) and extended pan id (zb_get_extended_pan_id()). However, there is no function to get the short pan id. How can I get the short pan id used by the coordinator?

My use case is this: When there is a pan id conflict, I can call zb_start_pan_id_conflict_resolution(), which I believe, changes the short pan id of the coordinator and sends a network update command to all devices in the network. I would like to know what is the new short pan id used by the coordinator when pan id conflict is detected. Therefore, I would like to if there is a way to get the short pan id used by the coordinator.

Thanks,

Anusha

Parents
  • Hi

    I am not a Nordic support, and I am not sure if my method is 100% correct but I have been using

    ZB_PIBCACHE_PAN_ID() from zboss_api_nwk.h
    it returns an unsigned short in hex. 

    printf("PAN ID: 0x%04hx)",  ZB_PIBCACHE_PAN_ID());
    in my case this prints  PAN ID: 0xd270
    I hope this was helpful
    //Garo
Reply
  • Hi

    I am not a Nordic support, and I am not sure if my method is 100% correct but I have been using

    ZB_PIBCACHE_PAN_ID() from zboss_api_nwk.h
    it returns an unsigned short in hex. 

    printf("PAN ID: 0x%04hx)",  ZB_PIBCACHE_PAN_ID());
    in my case this prints  PAN ID: 0xd270
    I hope this was helpful
    //Garo
Children
Related