- mesh_main: <MESH_EVENT_PARENT_DISCONNECTED>reason:201
I am looking for an operational IDF example of WiFi Mesh which can be used with MQTT for external communications to a broker. I am using IDF ver 5.3
Looking at the Mesh examples on provided in Vscode I selected ip_internal_network.
I configured built and ran it and it and worked but found it not to be robust.
It doesn't support provisioning which I put to one side but the biggest 2 issues are:
- If I start the application while my WIFI access point is powered off, and then power it up, it never establishes WiFi communications
- If I start the application with my WIFI access point operation and have everything working, and then I power off my access point, it eventually crashes and halts without any useful information
I am hoping for a more mature example app if there is one. Please advise.
If not, I am looking for solutions to solve some problems like, events to detect when the WIFI access point connection is lost from my Root Node, also when coms are restored.
I have found on disconnect I get event:
Is it possible to restart WIFI Mesh? I am thinking on startup, if I dont get:
- mesh_main: <MESH_EVENT_PARENT_CONNECTED>layer:0-->1, parent:5c:e9:31:9a:5d:1a<ROOT>, ID:77:77:77:77:77:76
- mesh_main: <MESH_EVENT_PARENT_DISCONNECTED>reason:200
- mesh_main: <MESH_EVENT_PARENT_DISCONNECTED>reason:201
- mesh_main: <MESH_EVENT_PARENT_DISCONNECTED>reason:211
eg call esp_mesh_stop(void) and esp_mesh_start() or do I ALSO need to call esp_mesh_deinit() and esp_mesh_init()? Are any delays required?
I feel like this should work but it feels like a bit of a hack?
Lastly back to provisioning, I have SoftAP provisioning working with the ESP Provisioning app for WIFI (not WIFI Mesh). Does this apply to WIFI Mesh for connection to the Wifi Access Point?
Can it also be used for Station SoftAP for sub node connections using Mesh AP Password?
Thanks for your help!