Open simondean opened 3 weeks ago
@simondean Could you remove this line: https://github.com/espressif/esp-thread-br/blob/main/examples/common/thread_border_router/src/border_router_launch.c#L171, and try again? The issue seems caused by the default netif configuration.
Hi. I've just checked and it still happens if I remove this line:
ESP_ERROR_CHECK(esp_netif_set_default_netif(openthread_netif));
Log output with line removed (same output as with line in place):
I (218429) esp_ot_br: WEBSOCKET_EVENT_CONNECTED
I (222289) esp_ot_br: WEBSOCKET_EVENT_DATA
I (222289) esp_ot_br: Received opcode=1
W (222289) esp_ot_br: Received=echo.websocket.events sponsored by Lob.com
W (222289) esp_ot_br: Total payload length=42, data_len=42, current payload offset=0
I (222309) esp_ot_br: WEBSOCKET_EVENT_DATA
I (222309) esp_ot_br: Received opcode=10
W (222309) esp_ot_br: Received=
W (222309) esp_ot_br: Total payload length=0, data_len=0, current payload offset=0
I (224439) esp_ot_br: Successfully sent message
I (234469) esp_ot_br: Successfully sent message
E (235299) transport_base: poll_read select error 113, errno = Software caused connection abort, fd = 54
E (235299) websocket_client: esp_transport_poll_read() returned -1, transport_error=ESP_OK, tls_error_code=0, tls_flags=0, errno=119
I (235299) esp_ot_br: WEBSOCKET_EVENT_ERROR
E (235299) esp_ot_br: Last error HTTP status code: 0x65
I (235299) websocket_client: Reconnect after 10000 ms
I (235309) esp_ot_br: WEBSOCKET_EVENT_DISCONNECTED
E (235309) esp_ot_br: Last error HTTP status code: 0x65
E (235309) esp_ot_br: Last error captured as transport's socket errno: 0x71
I (240319) OPENTHREAD: Received RIO
I (240319) OPENTHREAD: prefix FD84:C890:3B8C:: lifetime 1800
Checklist
How often does this bug occurs?
always
Expected behavior
WebSocket client's connection stays open for multiple minutes and is reused for sending multiple WebSocket messages
Actual behavior (suspected bug)
Every few seconds the client connection disconnects with this error:
Error logs or terminal output
Steps to reproduce the behavior
See https://github.com/espressif/esp-thread-br/pull/104 which replicates the issue. I have also reproduced the issue in a normal codebase (not the Thread Boarded Route codebase) and confirmed the issue does not occur there
Project release version
unreleased master
System architecture
ARM 64-bit (Apple M1/M2, Raspberry Pi 4/5)
Operating system
MacOS
Operating system version
Sonoma
Shell
Fish
Additional context
No response