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

  • 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

  • Hi VDMinh,

    Sorry, I did more test today, move "ZB_PIBCACHE_PAN_ID()=0xABCD;" to "zigbee_helper.c" line 282 should work now.

    For "#define ERASE_PERSISTENT_CONFIG  ZB_TRUE" in zigbee_helper.c, I actually mean main.c. I have correct the former answer to avoid confusion. I suggest you modify this definition on all the three examples. For the coordinator, it will always create a new network with PAN ID 0xABCD. For the other two devices, they will join the coordinator formed network instead of their former cached one.

    Best regards,

    Charlie

  • Hi Charlie,

    The commands you added that I did before, now I check it again.

    The work case happen, then it's will fault after reset ZC / Bulb / Switch. I give you some results of test.

    1. Bulb and Sw didn't get PAN_ID, Sw couldn't send data to Bulb.

    I did step by step:

    And logs were got:

    2. Bulb and Sw booted to seem right PAN_ID, but they didn't work:

    And logs were got:

    Do you think I should shutt off PAN scan ?  If can, how to do it ?

    Thank you.

    VDMinh

  • Hi VDMinh,

    For the ZC, I modify the "#define ERASE_PERSISTENT_CONFIG  ZB_FALSE" then it can pass the tests you specified on my setup now.

    Remember to "Erase All" before you program the new firmware.

    Best regards,

    Charlie

  • Hi Charlie,

    I tried above ways many times, and it wasn's better.

    Because test results of us were different, so I give you my code, could you check them.

    https://www.dropbox.com/s/hoigni3n3qe0ln3/light_control.rar?dl=0

    The code is been " C:\Nordic_Semi\Thread_Zigbee_v4.1.0\examples\zigbee\light_control "

    Thank you.

    VDMinh

Related