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

A CLI-Coordinator loses all data of devices after a reboot

Hello,

I continue to deal with Zigbee and I have another question. I use 2 nRF52840 chips. First nRF as a Zigbee Coordinator (CLI in SDK\examples\zigbee\experimental\cli\cli_agent_router), the second nRF as a Zigbee Router (any example which is not a ZCoordinator). SDK version 4.0.0.

There are 2 situations:

  • when I move the ZRouter far from the ZCoordinator and the connection is lost.
  • when I restart the ZCoordinator (through turning the power off / on or through the "reset" command in the terminal) and the connection is lost.

In the first situation, bringing the ZRouter closer to the ZCoordinator, the connection is restored and everything works fine. In the second situation, the connection is never restored until I reset the ZRouter to the factory and reconnect it to the ZCoordinator (on the ZCoordinator you only need to enter the commands "bdb role zc", "bdb start"). After that, the ZRouter successfully connects to the network and receives a new short address.

I concluded that after restarting the ZCoordinator and and reinitializing it ("bdb role zc", "bdb start"), all information about previous devices is deleted from it. What do I need to do so that when I restart the ZCoordinator, he does not lose all his data about the network and about connected devices? Didn't start from scratch?

Thanks in advance.

Parents
  • Hi,

    If you want to save the network parameters in your device you need to call zigbee_erase_persistent_storage (ZB_FALSE) inside main.c. Since the CLI example is meant to be a development tool the ERASE_PERSISTENT_CONFIG is set to ZB_TRUE by default, try changing it to ZB_FALSE if you want to save the network parameters in your device after reboot.

    In the CLI example you will still need to set the device role to coordinator "bdb role zc" and check that the channel is set to the same channel as your router "bdb channel" and then use "bdb start" to start the network again.

    Best regards,

    Marjeris

  • Thanks so much, it worked for me!

    By the way, in order not to write the command "bdb role zc" I changed the value of m_default_role in the file zigbee_cli_cmd_bdb.c.

    static zb_nwk_device_type_t m_default_role = ZB_NWK_DEVICE_TYPE_COORDINATOR;

Reply Children
No Data
Related