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 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

  • Hi Duc,

    I checked your source code and find the issue. Here I list all the modification need to be done based on original exmaples:

    light_bulb: change to "#define ERASE_PERSISTENT_CONFIG           ZB_TRUE" in main.c line 71

    light_switch: change to "#define ERASE_PERSISTENT_CONFIG           ZB_TRUE" in main.c line 66

    light_coordinator: add "ZB_PIBCACHE_PAN_ID()=0xABCD;" to "zigbee_helper.c" line 282

    Best regards,

    Charlie

  • Hi Charlie,

    Did you test carefully. I relize the issue is still stay there.

    As you can see below, ZED can not join to right PAN.

    I tried many ways, such as other API, but it not better.

    Did NordicSemi team foresee this satuation, now I begin disbelieve about static PANID setting, and maybe I return back dynamic PANID, or tranfer to nCS.

    Thank you.

    VDMinh

  • Hi VDMinh,

    Sorry, I did not realize your test environment also has another ZC enabled with a different PAN ID.

    It is quite tricky on your use case. Zigbee is initially designed or try to avoid static PAN ID on practice usage. NCS will not have much difference since it uses the same ZBOSS stack. It will also have security concerns on this kind of Zigbee network, return back to dynamic PAN ID seems a good idea. I do suggest you switch to NCS as soon as possible for your development, the new version ZBOSS stack used by NCS has fixed some critical bugs. nRF5 SDK Thread_Zigbee_v4.1.0 is currently in the maintenance stage now, there will be no major update in the future.

    Best regards,

    Charlie

Reply
  • Hi VDMinh,

    Sorry, I did not realize your test environment also has another ZC enabled with a different PAN ID.

    It is quite tricky on your use case. Zigbee is initially designed or try to avoid static PAN ID on practice usage. NCS will not have much difference since it uses the same ZBOSS stack. It will also have security concerns on this kind of Zigbee network, return back to dynamic PAN ID seems a good idea. I do suggest you switch to NCS as soon as possible for your development, the new version ZBOSS stack used by NCS has fixed some critical bugs. nRF5 SDK Thread_Zigbee_v4.1.0 is currently in the maintenance stage now, there will be no major update in the future.

    Best regards,

    Charlie

Children
Related