[Issue]Stop and restart mesh - mesh.init(..) doesn't work after mesh.stop()
Hello, Currently, I am working with ESP8266 (NodeMCU). I am facing an issue while re-connecting the mesh after stopping it.
pseudo-code of my requirements:
1. All nodes powered up.
2. Search for target AP (router) to connect.
3. If target AP is not available, form the mesh on channel 1.
4. Periodically keep checking for the target AP **(which could be on any channel)** using TaskScheduler.
4.1 So stop mesh first by calling this -> if(mesh.isConnected(mesh.getNodeId())); mesh.stop();
4.2 Scan the WiFi networks to check target AP, if it is found, save it's channel.
5. Call mesh.init with **MODE_AP_STA** and the channel obtained from the scan.
6. Call **stationManual** to connect to the target AP.
6. If this node can access the internet & no other node is root, declare this as root. (All are having **mesh.setContainRoot(true)** in their setup)
When the target AP is already powered up, nodes are able to directly connect to the router and nodes that are farther works properly in mesh. But when target AP starts after nodes forming a mesh, mesh.init() method doesn't work as expected after calling a mesh.stop() @BlackEdder Any workaround for this issue?