Hi,
I have a zigbee application built on top of the NRF5340 as a coordinator and 52840 as End devices. I am trying to keep end devices connected to coordinators and routers. The coordinators and routers are powered through mains power supplies so I have no power concerns there. The end devices are powered through batteries and long battery life is required. Now End devices by default disconnect after a while if the network is inactive as I understand, I would like to reconnect to the coordinator again after a little time. I thought of restating the network steering after 10 minutes of disconnection, so battery life is not too affected, and the device stays connected. As I understand, the coordinator closes the network after 180 seconds, and no devices are allowed to reconnect. So what I did is I added a thread that reopens the network by calling bdb_start_top_level_commissioning(ZB_BDB_NETWORK_STEERING) every 200 seconds and starts after the first network formation. My questions are first:
1- Is the approach of keeping the network open on coordinators and routers good? Is there a better way to accomplish this that doesn't involve the users restarting the devices, the devices are meant to never be touched by the users.
2- Does reopening the network again affects end devices? I have end devices randomly starting the reconnection process without ever firing the disconnect even locally or on the coordinator, and it always happens around the time coordinators reopen the network, so is it happening because of it?
3- On my end device I have a thread that waits for 10 minutes and then calls:
if(!ZB_JOINED()){
LOG_INF("Device Not Connected, Rejoining");
user_input_indicate();
}
Is this the right approach for reconnecting end devices?
Please answer my question purely on theory, Nothing in my application is remarkable enough to change the default behavior of the zigbee library. All I need is the correct logic to keep coordinators always open, and reconnect end devices after X amount of time if they disconnect without having any of them restart the whole application. I couldn't pin point this information in the docs, so your help would be life saving.
Thanks in advance,
Belal