This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
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

Static PAN_ID / Address for Zed

Hi Everyone,

I'm working on "Thread_Zigbee_v4.1.0\examples\zigbee\light_control".

I need configuration as above title.

But I relize that "zb_set_pan_id(0x1234)", "nrf_802154_short_address_set(0xABCD)" are not enough to work.

I think needing more pre_configs / more APIs.

So could you advise me procedure / examples.

Thank you.
VDMinh

Parents
  • Hi Duc Minh Vo,

    I believe you should be able to set PAN ID with ZB_PIBCACHE_PAN_ID(). This must be done before the stack is started. Additionally, this only works if it does not have an existing PAN ID stored, so you need to have ERASE_PERSISTENT_CONFIG set to ZB_TRUE.

    I kindly remind you to switch to NCS if you are still in the early stage of your development. The nRF5 SDK is currently in the maintenance stage and its Zigbee stack is a bit out of date, you can find more information here: nRF Connect SDK and nRF5 SDK statement.

    Best regards,

    Charlie

  • Hi Charlie,
    I'm still work on "Thread_Zigbee_v4.1.0", cause I added few functions base on this flatform. Now, I haven't switched to nCS yet.

    I tested "light_coordinator" and "light_bulb" with below configuration:

    But, I relized that pan_id was not stable (see below image):
            Step 1. ZC power on, it has 0xABCD pan_id, that's right >> Bulb power on, Bulb also has right pan_id
    But:
            Step 2. Just resetting only ZC, it has other random pan_id
    And:
            Step 3. Continues resetting only ZC, it has another one pan_id

    >> So, "ZB_PIBCACHE_PAN_ID()" is not achieve my wish. Please give me more guidances.

    Thank you.
    VDMinh

  • Hi VDMinh,

    Can you explain your purpose to set static PAN ID for those devices?

    As far as I can understand, PAN ID is just like the IP address for the Zigbee network, I am not sure what will happen when you set two devices with the same PAN ID. As a Zigbee application developer, I do not think you should work on the bottom level so much.

    Best regards,

    Charlie

  • Hi Charlie,
    Example, you can see below image:

    Incidentally, we have two factorys, side by side.
    They are two different systems, different ZCs, different Servers, and maybe two different owners.
    By using dynamic pan_id, maybe ZED 1.3 connect to ZC 2, that is also incidentally.
    And we implement for factorys, we don't wanna to use binding/finding, just power on and running.


    I think like as IP address, someone uses dynamic, another use static, dependent their situations.
    About us, for many reasons, we choose static pan_id, in our stage it's more convenient, like as 10 points versus 9.5 points.
    I agree with you, I have to manage for conflicting.

    With nCS, could this issue solved satisfactorily ?

    Thank you.

    VDMinh

  • Hi VDMinh,

    Thanks for explaining your use case. 

    Can you add "ZB_PIBCACHE_PAN_ID()=0xABCD;" to zigbee_helper.c line 472?

    also make sure "#define ERASE_PERSISTENT_CONFIG           ZB_TRUE" in main.c.

    NCS should also have similar settings that can set static PAN ID.

    Best regards,

    Charlie

Reply
  • Hi VDMinh,

    Thanks for explaining your use case. 

    Can you add "ZB_PIBCACHE_PAN_ID()=0xABCD;" to zigbee_helper.c line 472?

    also make sure "#define ERASE_PERSISTENT_CONFIG           ZB_TRUE" in main.c.

    NCS should also have similar settings that can set static PAN ID.

    Best regards,

    Charlie

Children
  • Hi Charlie,

    * I tried to add "ZB_PIBCACHE_PAN_ID()=0xABCD;" to "zigbee_helper.c" line 472 in ZC, but it's still not ok, even worse.

    * About "#define ERASE_PERSISTENT_CONFIG  ZB_TRUE" in zigbee_helper.c, I'm not real clear, what is ERASE_PERSISTENT_CONFIG  affect in "zigbee_helper.c", I think it has influence a bit in only "main.c". Could you explain more.

    Thank you.

    VDMinh

Related