ESP-MESH timeouts
Posted: Mon Apr 22, 2019 3:53 pm
Hello,
I have been evaluating the ESP-MESH using the Internal Communications sample code. I get very slow response and recovery times upon a node disconnection. If I switch off for example a node in layer 2, it takes 10 seconds for the root node to complete the esp_mesh_send and return an error:
W (652452) mesh_main: [#RX:622/622][L:1] parent:84:16:f9:2d:a9:f2, receive from 30:ae:a4:d3:41:8c, size:1460, heap:168060, flag:0[err:0x0, proto:0, tos:0]
W (653452) mesh_main: [#RX:623/623][L:1] parent:84:16:f9:2d:a9:f2, receive from 30:ae:a4:d3:41:8c, size:1460, heap:169620, flag:0[err:0x0, proto:0, tos:0]
W (663272) wifi: inactive timer: now=26759c1a last_rx_time=25d08cd9 diff=2a41, aid[1]30:ae:a4:d3:9f:d8 leave
I (663272) wifi: station: 30:ae:a4:d3:9f:d8 leave, AID = 1, bss_flags is 134243
I (663282) wifi: new:<6,2>, old:<6,2>, ap:<6,2>, sta:<6,2>, prof:6
I (663292) mesh_main: <MESH_EVENT_CHILD_DISCONNECTED>aid:1, 30:ae:a4:d3:9f:d8
W (663302) mesh_main: <MESH_EVENT_ROUTING_TABLE_REMOVE>remove 2, new:2
I (663302) mesh: [scan]new scanning time:300ms
W (663302) wifi: [beacon]new interval:100ms
E (663312) mesh_main: [ROOT-2-UNICAST:623][L:1]parent:84:16:f9:2d:a9:f2 to 30:ae:a4:d3:9f:d8, heap:171068[err:0x400b, proto:0, tos:0]
E (663332) mesh_main: [ROOT-2-UNICAST:623][L:1]parent:84:16:f9:2d:a9:f2 to 30:ae:a4:d3:a0:c4, heap:171076[err:0x400f, proto:0, tos:0]
W (664342) mesh_main: [#RX:624/624][L:1] parent:84:16:f9:2d:a9:f2, receive from 30:ae:a4:d3:41:8c, size:1460, heap:171084, flag:0[err:0x0, proto:0, tos:0]
Likewise, it takes 10 seconds to the child node in layer 3 to detect parent disconnected:
W (523077) mesh_main: [#RX:505/622][L:3] parent:30:ae:a4:d3:9f:d9, receive from 30:ae:a4:d3:41:8c, size:1460, heap:171856, flag:0[err:0x0, proto:0, tos:0]
I (530687) mesh_main: layer:3, rtableSize:1, NODE
I (533077) wifi: bcn_timout,ap_probe_send_start
I (535587) wifi: ap_probe_send over, resett wifi status to disassoc
I (535587) wifi: state: run -> init (c800)
I (535587) wifi: pm stop, total sleep time: 0 us / 524927152 us
I (535597) wifi: new:<6,0>, old:<6,2>, ap:<6,2>, sta:<6,2>, prof:6
I (535607) mesh_main: <MESH_EVENT_PARENT_DISCONNECTED>reason:200
My questions are:
1. Is it possible to reduce the timeout for the root to send a packet with no ack returned?
2. Is it possible to reduce the child beacon timeout (I saw in the documentation it needs to lose 60 beacons, is this a must?)
3. Is the MESH and WiFi source code available for developers?
Thanks!
I have been evaluating the ESP-MESH using the Internal Communications sample code. I get very slow response and recovery times upon a node disconnection. If I switch off for example a node in layer 2, it takes 10 seconds for the root node to complete the esp_mesh_send and return an error:
W (652452) mesh_main: [#RX:622/622][L:1] parent:84:16:f9:2d:a9:f2, receive from 30:ae:a4:d3:41:8c, size:1460, heap:168060, flag:0[err:0x0, proto:0, tos:0]
W (653452) mesh_main: [#RX:623/623][L:1] parent:84:16:f9:2d:a9:f2, receive from 30:ae:a4:d3:41:8c, size:1460, heap:169620, flag:0[err:0x0, proto:0, tos:0]
W (663272) wifi: inactive timer: now=26759c1a last_rx_time=25d08cd9 diff=2a41, aid[1]30:ae:a4:d3:9f:d8 leave
I (663272) wifi: station: 30:ae:a4:d3:9f:d8 leave, AID = 1, bss_flags is 134243
I (663282) wifi: new:<6,2>, old:<6,2>, ap:<6,2>, sta:<6,2>, prof:6
I (663292) mesh_main: <MESH_EVENT_CHILD_DISCONNECTED>aid:1, 30:ae:a4:d3:9f:d8
W (663302) mesh_main: <MESH_EVENT_ROUTING_TABLE_REMOVE>remove 2, new:2
I (663302) mesh: [scan]new scanning time:300ms
W (663302) wifi: [beacon]new interval:100ms
E (663312) mesh_main: [ROOT-2-UNICAST:623][L:1]parent:84:16:f9:2d:a9:f2 to 30:ae:a4:d3:9f:d8, heap:171068[err:0x400b, proto:0, tos:0]
E (663332) mesh_main: [ROOT-2-UNICAST:623][L:1]parent:84:16:f9:2d:a9:f2 to 30:ae:a4:d3:a0:c4, heap:171076[err:0x400f, proto:0, tos:0]
W (664342) mesh_main: [#RX:624/624][L:1] parent:84:16:f9:2d:a9:f2, receive from 30:ae:a4:d3:41:8c, size:1460, heap:171084, flag:0[err:0x0, proto:0, tos:0]
Likewise, it takes 10 seconds to the child node in layer 3 to detect parent disconnected:
W (523077) mesh_main: [#RX:505/622][L:3] parent:30:ae:a4:d3:9f:d9, receive from 30:ae:a4:d3:41:8c, size:1460, heap:171856, flag:0[err:0x0, proto:0, tos:0]
I (530687) mesh_main: layer:3, rtableSize:1, NODE
I (533077) wifi: bcn_timout,ap_probe_send_start
I (535587) wifi: ap_probe_send over, resett wifi status to disassoc
I (535587) wifi: state: run -> init (c800)
I (535587) wifi: pm stop, total sleep time: 0 us / 524927152 us
I (535597) wifi: new:<6,0>, old:<6,2>, ap:<6,2>, sta:<6,2>, prof:6
I (535607) mesh_main: <MESH_EVENT_PARENT_DISCONNECTED>reason:200
My questions are:
1. Is it possible to reduce the timeout for the root to send a packet with no ack returned?
2. Is it possible to reduce the child beacon timeout (I saw in the documentation it needs to lose 60 beacons, is this a must?)
3. Is the MESH and WiFi source code available for developers?
Thanks!