Designate a "preferred" root node
Posted: Mon Jan 07, 2019 2:04 pm
by ltbeck
I have an application where it may be desirable to designate a "preferred" root node in the mesh but if this node malfunctions, the election process can still find a new root. The root node will always connect to the Internet via WiFi router.
Is there any example that is close to this scenario or are there some general guidelines?
Thanks - Lance
Re: Designate a "preferred" root node
Posted: Thu Jan 31, 2019 11:54 am
by ESP_LBB
Hi ltbeck,
Yes, your idea is feasible.
We don't have a similar example yet, but it's should be easy:
We can set one kind of devices to be root in the code, which will and only will become root. And then set the other kind of devices to be normal ones. In this senario, the prefered root should be powered earlier (at least no later) than other ones, then after the normal nodes are powered, there should be a time period for them to scan whether the prefered node exists.
When the root is off, the other nodes can run the election process to have a new root as it's designed. Also you can design a function that enables the network to scan from time to time if the prefered root is online again, if yes, then switch back to it.
This is what occurs in my head for now, let's have more discussion if needed.
Bangbang