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

[ZIGBEE] Leave network from End Device

Hello,

I am trying to reset the Zigbee network configuration on my End Device when the user press on a reset button for a long time.

I don't want to restart the product and erase the Zigbee persistent storage (using zigbee_erase_persistent_storage available in zigbee_helpers.c for example).

From what I understand, the best way to achieve this would be to call zb_bdb_reset_via_local_action(0) but this function does not return and the program finally end up being reset by the watchdog. I pushed the watchdog to 10 seconds but it doesn't help.

I took a look at https://devzone.nordicsemi.com/f/nordic-q-a/62157/how-to-leave-a-zigbee-network-and-erase-all-network-data-then-join-another/296064#296064, but it doesn't help.

Some more info: nRF5 SDK for Zigbee v4.1, nRF52840, multiprotocol: BLE+Zigbee.

Best,

Parents
  • Hi,

    You should be able to use zb_bdb_reset_via_local_action() for this, as it will perform a factory reset of the device with regards to network information. After this function has been called, you should get the ZB_ZDO_SIGNAL_LEAVE signal, which is handled by the default signal handler, but from what you're writing I assume that you don't get this signal? Have you tested this without using a long button press to do this, like using a normal button press instead? 

    Is your application based on one of the examples in the SDK, and if so, which one? Could you please perform a sniffer log of this behavior and add it here as a pcap file?

    Best regards,

    Marte

  • Hi Marte,

    This is very interesting and quite surprising... I have been trying to improve current consumption since yesterday and I got a huge power consumption when enabling a GPIOTE interrupt used to inform that some sensor data is ready (P1.09). After your answer, I did not enable the interrupt on the GPIO to try once again the function zb_bdb_reset_via_local_action and that time, the function worked as expected (I got the signal ZB_ZDO_SIGNAL_LEAVE, which is handled in the default signal handler).
    Now if I enable the interrupt, the function does not work....
    I will continue to dig into that problem but at least, the function zb_bdb_reset_via_local_action does seem to work. 

    It is using some interrupts internally? Thinking

    Best,

    Cyril

Reply
  • Hi Marte,

    This is very interesting and quite surprising... I have been trying to improve current consumption since yesterday and I got a huge power consumption when enabling a GPIOTE interrupt used to inform that some sensor data is ready (P1.09). After your answer, I did not enable the interrupt on the GPIO to try once again the function zb_bdb_reset_via_local_action and that time, the function worked as expected (I got the signal ZB_ZDO_SIGNAL_LEAVE, which is handled in the default signal handler).
    Now if I enable the interrupt, the function does not work....
    I will continue to dig into that problem but at least, the function zb_bdb_reset_via_local_action does seem to work. 

    It is using some interrupts internally? Thinking

    Best,

    Cyril

Children
No Data
Related