ESP-WIFI-MESH: 2nd layer node failure after root reboot
Posted: Thu Feb 01, 2024 11:40 am
I'm using ip_internal_network example from idf release v5.2 on my ESP32-C6 devkit without any change.
Until now, I0m testing with 2 devices. Everything runs smoothly until I reset/reboot my root node and check it again and I see it connects to my home router. I expect the 2nd layer node to fail sending a few packets but then recovering. However, It doesn't seem to recover.
Per recommendations from GitHub issues, I
To me, this is because the root node just reset and connected too fast to my home router so the 2nd layer node thinks it was just a connection failure and not a root reset.
Root node logs show that the node is not in its routing table. So node did not try to reconnect to it.
And 2nd layer node logs show that MQTT failed, and mesh_send also returns errors. It also shows that it has an IP address of 10.0.0.2 which means it assumes that it is connected to the root node, but root logs show that the root does not have any information about this node!
Until now, I0m testing with 2 devices. Everything runs smoothly until I reset/reboot my root node and check it again and I see it connects to my home router. I expect the 2nd layer node to fail sending a few packets but then recovering. However, It doesn't seem to recover.
Per recommendations from GitHub issues, I
Code: Select all
set esp_mesh_send_block_time(5000)
Root node logs show that the node is not in its routing table. So node did not try to reconnect to it.
Code: Select all
I (849779) mesh_main: Sending routing table to [0] 40:4c:ca:41:b7:90: sent with err code: 0
I (849779) mesh_main: Received Routing table [0] 40:4c:ca:41:b7:90
Code: Select all
W (1039709) mesh: [mesh_schedule.c,3130] [WND-RX]max_wnd:2, 1200 ms timeout, seqno:0, xseqno:268, no_wnd_count:0, timeout_count:749
E (1039709) mesh_netif: Send with err code 16394 ESP_ERR_MESH_TIMEOUT
E (1039709) esp-tls: Failed to open new connection
E (1039719) transport_base: Failed to open a new connection
E (1039719) mqtt_client: Error transport connect
I (1039729) mesh_mqtt: MQTT_EVENT_ERROR
I (1039729) mesh_mqtt: MQTT_EVENT_DISCONNECTED
I (1039739) mesh_mqtt: sent publish returned msg_id=15518
W (1041409) mesh: [mesh_schedule.c,3130] [WND-RX]max_wnd:2, 1200 ms timeout, seqno:0, xseqno:269, no_wnd_count:0, timeout_count:750
I (1041749) mesh_main: Tried to publish layer:2 IP:10.0.0.2
I (1041749) mesh_mqtt: sent publish returned msg_id=8804
W (1042609) mesh: [mesh_schedule.c,3130] [WND-RX]max_wnd:2, 1200 ms timeout, seqno:0, xseqno:269, no_wnd_count:0, timeout_count:751