Mesh Connection unstable when parent node powered off
I am trying to implement a mesh network with 3 nodes (1 root and 2 non-root). The mesh structure is as follows:
- Root Node is connected to the router.
- Non-Root Node 1 is connected to Root Node.
- Non-Root Node 2 is connected to Non-Root Node 1.
The mesh works fine and is very stable until I switch OFF the Non Root Node 1 (to which Non Root Node 2 is connected).
Expected Behavior: I want the Non Root Node 2 to detect that the Non Root Node 1 is disconnected from the mesh and connect to another AP (in this case the Root Node)
Current Behavior: Non Root Node 2 detects that Non Root Node 1 is disconnected from the mesh and triggers the following functions in a loop.
16:18:24.161 -> CONNECTION: eraseClosedConnections():
16:18:24.208 -> CONNECTION: connectToAP(): No unknown nodes found scan rate set to normal
16:18:26.645 -> CONNECTION: eventSTADisconnectedHandler: SYSTEM_EVENT_STA_DISCONNECTED
I am not quite sure as to what is causing this loop and why connectToAP function cannot detect the Root Node. I also attached the log for your perusal (New_Text_Document.txt). If you have any suggestions for me and want me to try out something, I would be happy to do it.
Thanks.