Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wi-Fi not staying connected - issue wifi connect and device reboots (TZ-1126) #93

Closed
3 tasks done
JanneKiiskila opened this issue Sep 11, 2024 · 7 comments
Closed
3 tasks done

Comments

@JanneKiiskila
Copy link

Checklist

  • Checked the issue tracker for similar issues to ensure this is not a duplicate
  • Read the documentation to confirm the issue is not addressed there and your configuration is set correctly
  • Tested with the latest version to ensure the issue hasn't been fixed

How often does this bug occurs?

always

Expected behavior

I would assume the ESP32 can connect to a Wi-Fi and stay connected - in the esp-thread-br context.

I have been following the documentation in the OpenThread.io website to build the SW.

ESP-SDK:

482a8fb2d7 (HEAD, tag: v5.1.2) change(version): Update version to 5.1.2

Example version v1.0:

b96fbd8 (HEAD, tag: v1.0) Merge branch 'feature/br_board_usb_init_refactor' into 'main'

Actual behavior (suspected bug)

The Wi-Fi connection does not stay up, Wi-Fi is in state disconnected.
When trying to connect manually with wifi connect - the device reboots.

Network SSID and passphrase have been provided via the configuration.

Error logs or terminal output

ELF file SHA256: 57c13efd8b5d9fdf

Rebooting...
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x3 (RTC_SW_SYS_RST),boot:0xb (SPI_FAST_FLASH_BOOT)
Saved PC:0x403758bf
0x403758bf: esp_restart_noos_dig at /home/jannek/openThread/esp32/esp-idf/components/esp_system/port/esp_system_chip.c:57 (discriminator 1)

SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3818,len:0x1750
load:0x403c9700,len:0x4
load:0x403c9704,len:0xbe4
load:0x403cc700,len:0x2d18
entry 0x403c9908
I (26) boot: ESP-IDF v5.1.2 2nd stage bootloader
I (26) boot: compile time Sep  9 2024 12:13:48
I (26) boot: Multicore bootloader
I (29) boot: chip revision: v0.2
I (33) boot.esp32s3: Boot SPI Speed : 80MHz
I (38) boot.esp32s3: SPI Mode       : DIO
I (42) boot.esp32s3: SPI Flash Size : 4MB
I (47) boot: Enabling RNG early entropy source...
I (53) boot: Partition Table:
I (56) boot: ## Label            Usage          Type ST Offset   Length
I (63) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (71) boot:  1 otadata          OTA data         01 00 0000f000 00002000
I (78) boot:  2 phy_init         RF data          01 01 00011000 00001000
I (86) boot:  3 ota_0            OTA app          00 10 00020000 00190000
I (93) boot:  4 ota_1            OTA app          00 11 001b0000 00190000
I (101) boot:  5 web_storage      Unknown data     01 82 00340000 00019000
I (108) boot:  6 rcp_fw           Unknown data     01 82 00359000 000a0000
I (116) boot: End of partition table
I (120) esp_image: segment 0: paddr=00020020 vaddr=3c100020 size=53344h (340804) map
I (190) esp_image: segment 1: paddr=0007336c vaddr=3fc96600 size=0506ch ( 20588) load
I (195) esp_image: segment 2: paddr=000783e0 vaddr=40374000 size=07c38h ( 31800) load
I (203) esp_image: segment 3: paddr=00080020 vaddr=42000020 size=fb918h (1030424) map
I (389) esp_image: segment 4: paddr=0017b940 vaddr=4037bc38 size=0a9a0h ( 43424) load
I (407) boot: Loaded app from partition at offset 0x20000
I (407) boot: Disabling RNG early entropy source...
I (408) cpu_start: Multicore app
I (411) cpu_start: Pro cpu up.
I (415) cpu_start: Starting app cpu, entry point is 0x403754b0
0x403754b0: call_start_cpu1 at /home/jannek/openThread/esp32/esp-idf/components/esp_system/port/cpu_start.c:157

I (0) cpu_start: App cpu up.
I (430) cpu_start: Pro cpu start user code
I (430) cpu_start: cpu freq: 160000000 Hz
I (431) cpu_start: Application information:
I (431) cpu_start: Project name:     esp_ot_br
I (431) cpu_start: App version:      v1.0
I (431) cpu_start: Compile time:     Sep  9 2024 12:15:08
I (432) cpu_start: ELF file SHA256:  57c13efd8b5d9fdf...
I (432) cpu_start: ESP-IDF:          v5.1.2
I (432) cpu_start: Min chip rev:     v0.0
I (432) cpu_start: Max chip rev:     v0.99 
I (433) cpu_start: Chip rev:         v0.2
I (433) heap_init: Initializing. RAM available for dynamic allocation:
I (433) heap_init: At 3FCA9D38 len 0003F9D8 (254 KiB): DRAM
I (434) heap_init: At 3FCE9710 len 00005724 (21 KiB): STACK/DRAM
I (434) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM
I (434) heap_init: At 600FE010 len 00001FD8 (7 KiB): RTCRAM
I (435) spi_flash: detected chip: gd
I (435) spi_flash: flash io: dio
W (436) spi_flash: Detected size(8192k) larger than the size in the binary image header(4096k). Using the size in the binary image header.
I (437) sleep: Configure to isolate all GPIO pins in sleep state
I (437) sleep: Enable automatic switching of GPIO sleep configuration
I (438) app_start: Starting scheduler on CPU0
I (438) app_start: Starting scheduler on CPU1
I (438) main_task: Started on CPU0
I (448) main_task: Calling app_main()
I (528) example_connect: Start example_connect.
I (528) pp: pp rom version: e7ae62f
I (528) net80211: net80211 rom version: e7ae62f
I (538) wifi:wifi driver task: 3fcb57b4, prio:23, stack:6144, core=0
I (538) wifi:wifi firmware version: 91b9630
I (538) wifi:wifi certification version: v7.0
I (538) wifi:config NVS flash: enabled
I (538) wifi:config nano formating: enabled
I (538) wifi:Init data frame dynamic rx buffer num: 32
I (538) wifi:Init static rx mgmt buffer num: 5
I (538) wifi:Init management short buffer num: 32
I (538) wifi:Init dynamic tx buffer num: 32
I (538) wifi:Init static tx FG buffer num: 2
I (538) wifi:Init static rx buffer size: 1600
I (538) wifi:Init static rx buffer num: 10
I (538) wifi:Init dynamic rx buffer num: 32
I (538) wifi_init: rx ba win: 6
I (538) wifi_init: tcpip mbox: 32
I (538) wifi_init: udp mbox: 6
I (538) wifi_init: tcp mbox: 6
I (538) wifi_init: tcp tx win: 5744
I (538) wifi_init: tcp rx win: 5744
I (538) wifi_init: tcp mss: 1440
I (538) wifi_init: WiFi IRAM OP enabled
I (538) wifi_init: WiFi RX IRAM OP enabled
I (538) phy_init: phy_version 620,ec7ec30,Sep  5 2023,13:49:13
I (578) wifi:mode : sta (e4:b0:63:a8:bb:08)
I (578) wifi:enable tsf
I (588) example_connect: Connecting to Kiiskila-Deco-Guest...
I (588) example_connect: Waiting for IP(s)
I (2998) wifi:new:<8,1>, old:<1,0>, ap:<255,255>, sta:<8,1>, prof:1
I (3468) wifi:state: init -> auth (b0)
I (3478) wifi:state: auth -> assoc (0)
I (3488) wifi:state: assoc -> run (10)
I (3528) wifi:connected with Kiiskila-Deco-Guest, aid = 1, channel 8, 40U, bssid = 8a:d8:1b:43:2c:e6
I (3528) wifi:security: WPA2-PSK, phy: bgn, rssi: -64
I (3528) wifi:pm start, type: 1

I (3528) wifi:set rx beacon pti, rx_bcn_pti: 0, bcn_timeout: 25000, mt_pti: 0, mt_time: 10000
I (3548) wifi:AP's beacon interval = 102400 us, DTIM period = 1
I (4028) wifi:<ba-add>idx:0 (ifx:0, 8a:d8:1b:43:2c:e6), tid:6, ssn:2, winSize:64
I (5028) esp_netif_handlers: example_netif_sta ip: 192.168.178.56, mask: 255.255.255.0, gw: 192.168.178.1
I (5028) example_connect: Got IPv4 event: Interface "example_netif_sta" address: 192.168.178.56
I (5528) example_connect: Got IPv6 event: Interface "example_netif_sta" address: fe80:0000:0000:0000:e6b0:63ff:fea8:bb08, type: ESP_IP6_ADDR_IS_LINK_LOCAL
I (5528) example_common: Connected to example_netif_sta
I (5528) example_common: - IPv4 address: 192.168.178.56,
I (5528) example_common: - IPv6 address: fe80:0000:0000:0000:e6b0:63ff:fea8:bb08, type: ESP_IP6_ADDR_IS_LINK_LOCAL
I (5528) wifi:Set ps type: 0, coexist: 0

I (5528) RCP_UPDATE: RCP: using update sequence 0
I (5528) OPENTHREAD: spinel UART interface initialization completed
I(5538) OPENTHREAD:[I] Platform------: RCP reset: RESET_POWER_ON
I(5538) OPENTHREAD:[I] Platform------: Software reset RCP successfully
I (5538) obtr_web: <=======================server start========================>

I (5538) obtr_web: http://192.168.178.56:80/index.html

I (5538) obtr_web: <===========================================================>

I (5538) main_task: Returned from app_main()
I (5548) wifi:<ba-add>idx:1 (ifx:0, 8a:d8:1b:43:2c:e6), tid:0, ssn:0, winSize:64
I(5578) OPENTHREAD:[I] ChildSupervsn-: Timeout: 0 -> 190
I(5598) OPENTHREAD:[I] Settings------: Read NetworkInfo {rloc:0xc000, extaddr:dad5c4268c389ece, role:leader, mode:0x0f, version:4, keyseq:0x0, ...
I(5598) OPENTHREAD:[I] Settings------: ... pid:0x209c4b93, mlecntr:0x4439, maccntr:0x32e9, mliid:55edc28bcb21f776}
I (5618) esp_ot_br: Internal RCP Version: openthread-esp32/482a8fb2d7-af5938e38; esp32h2;  2024-09-09 07:27:14 UTC
I (5618) esp_ot_br: Running  RCP Version: openthread-esp32/482a8fb2d7-af5938e38; esp32h2;  2024-09-09 07:27:14 UTC
I (5618) OPENTHREAD: OpenThread attached to netif
> I(5628) OPENTHREAD:[N] RoutingManager: BR ULA prefix: fdc5:5592:9dc2::/48 (loaded)
I(5628) OPENTHREAD:[N] RoutingManager: Local on-link prefix: fd59:a87:a677:99a3::/64
I (5648) OPENTHREAD: Platform UDP bound to port 49153
I(5648) OPENTHREAD:[N] Mle-----------: Role disabled -> detached
I (5678) OT_STATE: netif up
I (5688) OPENTHREAD: NAT64 ready
> I(6128) OPENTHREAD:[N] Mle-----------: Role detached -> leader
I(6138) OPENTHREAD:[N] Mle-----------: Partition ID 0x209c4b93
I (6158) OPENTHREAD: Platform UDP bound to port 49154
I (6668) OPENTHREAD: Received PIO
I (6668) OPENTHREAD: Received PIO
I (6668) OPENTHREAD: Received RIO
I (6668) OPENTHREAD: prefix :: lifetime 1800

I (6668) OPENTHREAD: Received RIO
I (6668) OPENTHREAD: prefix 2001:14BA:725E:3700:: lifetime 1800

I (6818) OPENTHREAD: Platform UDP bound to port 53535
I (6928) OPENTHREAD: Received PIO
I (7528) example_connect: Got IPv6 event: Interface "example_netif_sta" address: 2001:14ba:725e:3700:e6b0:63ff:fea8:bb08, type: ESP_IP6_ADDR_IS_GLOBAL
I (8528) example_connect: Got IPv6 event: Interface "example_netif_sta" address: fd59:0a87:a677:99a3:e6b0:63ff:fea8:bb08, type: ESP_IP6_ADDR_IS_UNIQUE_LOCAL
I (9948) OPENTHREAD: Received PIO
I(10118) OPENTHREAD:[N] MeshForwarder-: Dropping (reassembly queue) IPv6 UDP msg, len:167, chksum:ff88, ecn:no, sec:yes, error:ReassemblyTimeout, prio:net, rss:-63.0
I(10118) OPENTHREAD:[N] MeshForwarder-:     src:[fe80:0:0:0:f074:e280:de71:472f]:19788
I(10118) OPENTHREAD:[N] MeshForwarder-:     dst:[ff02:0:0:0:0:0:0:1]:19788
I (12968) OPENTHREAD: Received PIO
I (15988) OPENTHREAD: Received PIO
> wifi state

disconnected
Done
> state

leader
Done
> I (73448) OPENTHREAD: Received PIO
I (76048) OPENTHREAD: Received PIO
I (76048) OPENTHREAD: Received PIO
I (76048) OPENTHREAD: Received PIO
I (76048) OPENTHREAD: Received RIO
I (76048) OPENTHREAD: prefix :: lifetime 1800

I (76048) OPENTHREAD: Received RIO
I (76048) OPENTHREAD: prefix 2001:14BA:725E:3700:: lifetime 1800

I (77528) example_connect: Got IPv6 event: Interface "example_netif_sta" address: fdc5:5592:9dc2:0001:e6b0:63ff:fea8:bb08, type: ESP_IP6_ADDR_IS_UNIQUE_LOCAL
I (79578) OPENTHREAD: Received PIO
I (145518) OPENTHREAD: Received PIO
I (310018) OPENTHREAD: Received PIO
I (336668) OPENTHREAD: Received PIO
I (336668) OPENTHREAD: Received PIO
I (336668) OPENTHREAD: Received PIO
I (336668) OPENTHREAD: Received RIO
I (336668) OPENTHREAD: prefix :: lifetime 1800

I (336668) OPENTHREAD: Received RIO
I (336668) OPENTHREAD: prefix 2001:14BA:725E:3700:: lifetime 1800

I (339668) OPENTHREAD: Received PIO
I (403728) OPENTHREAD: Received PIO

> wifi connect

I (508938) wifi_init: rx ba win: 6
I (508948) wifi_init: tcpip mbox: 32
I (508948) wifi_init: udp mbox: 6
I (508948) wifi_init: tcp mbox: 6
I (508948) wifi_init: tcp tx win: 5744
I (508948) wifi_init: tcp rx win: 5744
I (508948) wifi_init: tcp mss: 1440
I (508948) wifi_init: WiFi IRAM OP enabled
I (508948) wifi_init: WiFi RX IRAM OP enabled
I (508948) wifi:Set ps type: 0, coexist: 0

I (508948) wifi:state: run -> init (0)
I (508948) wifi:pm stop, total sleep time: lu us / lu us

I (508948) wifi:<ba-del>idx:1, tid:0
I (508948) wifi:<ba-del>idx:0, tid:6
I (508948) wifi:new:<8,0>, old:<8,1>, ap:<255,255>, sta:<8,1>, prof:1
I (508948) wifi:mode : null
I (508948) wifi:mode : sta (e4:b0:63:a8:bb:08)
I (508948) wifi:enable tsf
I (508958) example_connect: Wi-Fi disconnected, trying to reconnect...
ESP_ERROR_CHECK failed: esp_err_t 0x300a (ESP_ERR_WIFI_SSID) at 0x42009f55
0x42009f55: example_handler_on_wifi_disconnect at /home/jannek/openThread/esp32/esp-idf/examples/common_components/protocol_examples_common/wifi_connect.c:85 (discriminator 1)

file: "/IDF/examples/common_components/protocol_examples_common/wifi_connect.c" line 85
func: example_handler_on_wifi_disconnect
expression: err

abort() was called at PC 0x4037c54f on core 0
0x4037c54f: _esp_error_check_failed at /home/jannek/openThread/esp32/esp-idf/components/esp_system/esp_err.c:50



Backtrace: 0x40375a42:0x3fcb2f50 0x4037c559:0x3fcb2f70 0x40382976:0x3fcb2f90 0x4037c54f:0x3fcb3000 0x42009f55:0x3fcb3030 0x420fa25d:0x3fcb3050 0x420fa2e0:0x3fcb30a0
0x40375a42: panic_abort at /home/jannek/openThread/esp32/esp-idf/components/esp_system/panic.c:452
0x4037c559: esp_system_abort at /home/jannek/openThread/esp32/esp-idf/components/esp_system/port/esp_system_chip.c:84
0x40382976: abort at /home/jannek/openThread/esp32/esp-idf/components/newlib/abort.c:38
0x4037c54f: _esp_error_check_failed at /home/jannek/openThread/esp32/esp-idf/components/esp_system/esp_err.c:50
0x42009f55: example_handler_on_wifi_disconnect at /home/jannek/openThread/esp32/esp-idf/examples/common_components/protocol_examples_common/wifi_connect.c:85 (discriminator 1)
0x420fa25d: handler_execute at /home/jannek/openThread/esp32/esp-idf/components/esp_event/esp_event.c:137
 (inlined by) esp_event_loop_run at /home/jannek/openThread/esp32/esp-idf/components/esp_event/esp_event.c:601
0x420fa2e0: esp_event_loop_run_task at /home/jannek/openThread/esp32/esp-idf/components/esp_event/esp_event.c:107 (discriminator 15)





ELF file SHA256: 57c13efd8b5d9fdf

Rebooting...
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x3 (RTC_SW_SYS_RST),boot:0xb (SPI_FAST_FLASH_BOOT)
Saved PC:0x403758bf
0x403758bf: esp_restart_noos_dig at /home/jannek/openThread/esp32/esp-idf/components/esp_system/port/esp_system_chip.c:57 (discriminator 1)

SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3818,len:0x1750
load:0x403c9700,len:0x4
load:0x403c9704,len:0xbe4
load:0x403cc700,len:0x2d18
entry 0x403c9908
I (26) boot: ESP-IDF v5.1.2 2nd stage bootloader
I (26) boot: compile time Sep  9 2024 12:13:48
I (26) boot: Multicore bootloader
I (29) boot: chip revision: v0.2
I (33) boot.esp32s3: Boot SPI Speed : 80MHz
I (38) boot.esp32s3: SPI Mode       : DIO
I (42) boot.esp32s3: SPI Flash Size : 4MB
I (47) boot: Enabling RNG early entropy source...
I (53) boot: Partition Table:
I (56) boot: ## Label            Usage          Type ST Offset   Length
I (63) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (71) boot:  1 otadata          OTA data         01 00 0000f000 00002000
I (78) boot:  2 phy_init         RF data          01 01 00011000 00001000
I (86) boot:  3 ota_0            OTA app          00 10 00020000 00190000
I (93) boot:  4 ota_1            OTA app          00 11 001b0000 00190000
I (101) boot:  5 web_storage      Unknown data     01 82 00340000 00019000
I (108) boot:  6 rcp_fw           Unknown data     01 82 00359000 000a0000
I (116) boot: End of partition table
I (120) esp_image: segment 0: paddr=00020020 vaddr=3c100020 size=53344h (340804) map
I (190) esp_image: segment 1: paddr=0007336c vaddr=3fc96600 size=0506ch ( 20588) load
I (195) esp_image: segment 2: paddr=000783e0 vaddr=40374000 size=07c38h ( 31800) load
I (203) esp_image: segment 3: paddr=00080020 vaddr=42000020 size=fb918h (1030424) map
I (389) esp_image: segment 4: paddr=0017b940 vaddr=4037bc38 size=0a9a0h ( 43424) load
I (407) boot: Loaded app from partition at offset 0x20000
I (407) boot: Disabling RNG early entropy source...
I (408) cpu_start: Multicore app
I (411) cpu_start: Pro cpu up.
I (415) cpu_start: Starting app cpu, entry point is 0x403754b0
0x403754b0: call_start_cpu1 at /home/jannek/openThread/esp32/esp-idf/components/esp_system/port/cpu_start.c:157

I (0) cpu_start: App cpu up.
I (430) cpu_start: Pro cpu start user code
I (431) cpu_start: cpu freq: 160000000 Hz
I (431) cpu_start: Application information:
I (431) cpu_start: Project name:     esp_ot_br
I (431) cpu_start: App version:      v1.0
I (431) cpu_start: Compile time:     Sep  9 2024 12:15:08
I (432) cpu_start: ELF file SHA256:  57c13efd8b5d9fdf...
I (432) cpu_start: ESP-IDF:          v5.1.2
I (432) cpu_start: Min chip rev:     v0.0
I (433) cpu_start: Max chip rev:     v0.99 
I (433) cpu_start: Chip rev:         v0.2
I (433) heap_init: Initializing. RAM available for dynamic allocation:
I (433) heap_init: At 3FCA9D38 len 0003F9D8 (254 KiB): DRAM
I (434) heap_init: At 3FCE9710 len 00005724 (21 KiB): STACK/DRAM
I (434) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM
I (434) heap_init: At 600FE010 len 00001FD8 (7 KiB): RTCRAM
I (436) spi_flash: detected chip: gd
I (436) spi_flash: flash io: dio
W (436) spi_flash: Detected size(8192k) larger than the size in the binary image header(4096k). Using the size in the binary image header.
I (437) sleep: Configure to isolate all GPIO pins in sleep state
I (438) sleep: Enable automatic switching of GPIO sleep configuration
I (438) app_start: Starting scheduler on CPU0
I (438) app_start: Starting scheduler on CPU1
I (438) main_task: Started on CPU0
I (448) main_task: Calling app_main()
I (528) example_connect: Start example_connect.
I (528) pp: pp rom version: e7ae62f
I (528) net80211: net80211 rom version: e7ae62f
I (538) wifi:wifi driver task: 3fcb57b4, prio:23, stack:6144, core=0
I (538) wifi:wifi firmware version: 91b9630
I (538) wifi:wifi certification version: v7.0
I (538) wifi:config NVS flash: enabled
I (538) wifi:config nano formating: enabled
I (538) wifi:Init data frame dynamic rx buffer num: 32
I (538) wifi:Init static rx mgmt buffer num: 5
I (538) wifi:Init management short buffer num: 32
I (538) wifi:Init dynamic tx buffer num: 32
I (538) wifi:Init static tx FG buffer num: 2
I (538) wifi:Init static rx buffer size: 1600
I (538) wifi:Init static rx buffer num: 10
I (538) wifi:Init dynamic rx buffer num: 32
I (538) wifi_init: rx ba win: 6
I (538) wifi_init: tcpip mbox: 32
I (538) wifi_init: udp mbox: 6
I (538) wifi_init: tcp mbox: 6
I (538) wifi_init: tcp tx win: 5744
I (538) wifi_init: tcp rx win: 5744
I (538) wifi_init: tcp mss: 1440
I (538) wifi_init: WiFi IRAM OP enabled
I (538) wifi_init: WiFi RX IRAM OP enabled
I (538) phy_init: phy_version 620,ec7ec30,Sep  5 2023,13:49:13
I (578) wifi:mode : sta (e4:b0:63:a8:bb:08)
I (578) wifi:enable tsf
I (588) example_connect: Connecting to Kiiskila-Deco-Guest...
I (588) example_connect: Waiting for IP(s)
I (2998) wifi:new:<8,1>, old:<1,0>, ap:<255,255>, sta:<8,1>, prof:1
I (3468) wifi:state: init -> auth (b0)
I (3478) wifi:state: auth -> assoc (0)
I (3488) wifi:state: assoc -> run (10)
I (3518) wifi:connected with Kiiskila-Deco-Guest, aid = 1, channel 8, 40U, bssid = 8a:d8:1b:43:2c:e6
I (3528) wifi:security: WPA2-PSK, phy: bgn, rssi: -64
I (3528) wifi:pm start, type: 1

I (3528) wifi:set rx beacon pti, rx_bcn_pti: 0, bcn_timeout: 25000, mt_pti: 0, mt_time: 10000
I (3728) wifi:AP's beacon interval = 102400 us, DTIM period = 1
I (4038) wifi:<ba-add>idx:0 (ifx:0, 8a:d8:1b:43:2c:e6), tid:6, ssn:2, winSize:64
I (5028) esp_netif_handlers: example_netif_sta ip: 192.168.178.56, mask: 255.255.255.0, gw: 192.168.178.1
I (5028) example_connect: Got IPv4 event: Interface "example_netif_sta" address: 192.168.178.56
I (5528) example_connect: Got IPv6 event: Interface "example_netif_sta" address: fe80:0000:0000:0000:e6b0:63ff:fea8:bb08, type: ESP_IP6_ADDR_IS_LINK_LOCAL
I (5528) example_common: Connected to example_netif_sta
I (5528) example_common: - IPv4 address: 192.168.178.56,
I (5528) example_common: - IPv6 address: fe80:0000:0000:0000:e6b0:63ff:fea8:bb08, type: ESP_IP6_ADDR_IS_LINK_LOCAL
I (5528) wifi:Set ps type: 0, coexist: 0

I (5528) RCP_UPDATE: RCP: using update sequence 0
I (5538) OPENTHREAD: spinel UART interface initialization completed
I(5538) OPENTHREAD:[I] Platform------: RCP reset: RESET_POWER_ON
I(5538) OPENTHREAD:[I] Platform------: Software reset RCP successfully
I (5538) obtr_web: <=======================server start========================>

I (5538) obtr_web: http://192.168.178.56:80/index.html

I (5538) obtr_web: <===========================================================>

I (5538) main_task: Returned from app_main()
I (5548) wifi:<ba-add>idx:1 (ifx:0, 8a:d8:1b:43:2c:e6), tid:0, ssn:0, winSize:64
I(5588) OPENTHREAD:[I] ChildSupervsn-: Timeout: 0 -> 190
I(5608) OPENTHREAD:[I] Settings------: Read NetworkInfo {rloc:0xc000, extaddr:dad5c4268c389ece, role:leader, mode:0x0f, version:4, keyseq:0x0, ...
I(5608) OPENTHREAD:[I] Settings------: ... pid:0x209c4b93, mlecntr:0x4823, maccntr:0x36d1, mliid:55edc28bcb21f776}
I (5618) esp_ot_br: Internal RCP Version: openthread-esp32/482a8fb2d7-af5938e38; esp32h2;  2024-09-09 07:27:14 UTC
I (5618) esp_ot_br: Running  RCP Version: openthread-esp32/482a8fb2d7-af5938e38; esp32h2;  2024-09-09 07:27:14 UTC
I (5618) OPENTHREAD: OpenThread attached to netif
> I(5628) OPENTHREAD:[N] RoutingManager: BR ULA prefix: fdc5:5592:9dc2::/48 (loaded)
I(5638) OPENTHREAD:[N] RoutingManager: Local on-link prefix: fd59:a87:a677:99a3::/64
I (5658) OPENTHREAD: Platform UDP bound to port 49153
I(5658) OPENTHREAD:[N] Mle-----------: Role disabled -> detached
I (5688) OT_STATE: netif up
I (5698) OPENTHREAD: NAT64 ready
> I(6208) OPENTHREAD:[N] Mle-----------: Role detached -> leader
I(6208) OPENTHREAD:[N] Mle-----------: Partition ID 0x209c4b93
I (6228) OPENTHREAD: Platform UDP bound to port 49154
I (7518) OPENTHREAD: Received PIO
I (7528) example_connect: Got IPv6 event: Interface "example_netif_sta" address: 2001:14ba:725e:3700:e6b0:63ff:fea8:bb08, type: ESP_IP6_ADDR_IS_GLOBAL
I (8528) example_connect: Got IPv6 event: Interface "example_netif_sta" address: fd59:0a87:a677:99a3:e6b0:63ff:fea8:bb08, type: ESP_IP6_ADDR_IS_UNIQUE_LOCAL
I (9668) OPENTHREAD: Platform UDP bound to port 53535
I (11138) OPENTHREAD: Received PIO
I (11138) OPENTHREAD: Received PIO
I (11138) OPENTHREAD: Received PIO
I (11138) OPENTHREAD: Received RIO
I (11138) OPENTHREAD: prefix :: lifetime 1800

I (11138) OPENTHREAD: Received RIO
I (11138) OPENTHREAD: prefix 2001:14BA:725E:3700:: lifetime 1800

I(11278) OPENTHREAD:[N] MeshForwarder-: Dropping rx frag frame, error:Drop, len:48, src:f274e280de71472f, dst:0xffff, tag:10213, offset:128, dglen:176, sec:yes
I (11498) OPENTHREAD: Received PIO
I (12528) example_connect: Got IPv6 event: Interface "example_netif_sta" address: fdc5:5592:9dc2:0001:e6b0:63ff:fea8:bb08, type: ESP_IP6_ADDR_IS_UNIQUE_LOCAL
I (14578) OPENTHREAD: Received PIO
I (15148) OPENTHREAD: Received PIO
I (15148) OPENTHREAD: Received PIO
I (15148) OPENTHREAD: Received PIO
I (15148) OPENTHREAD: Received RIO
I (15148) OPENTHREAD: prefix :: lifetime 1800

I (15148) OPENTHREAD: Received RIO
I (15148) OPENTHREAD: prefix 2001:14BA:725E:3700:: lifetime 1800

I (17598) OPENTHREAD: Received PIO


### Steps to reproduce the behavior

Configure your SSID and passphrase.
Build
Flash
Monitor


### Project release version

v1.0

### System architecture

Intel/AMD 64-bit (modern PC, older Mac)

### Operating system

Linux

### Operating system version

Ubuntu 22.04

### Shell

Bash

### Additional context

Wi-Fi network is based on TP-Link Deco M5, using the guest network.

Network is in IP-address range: 192.168.178.00/24

@github-actions github-actions bot changed the title Wi-Fi not staying connected - issue wifi connect and device reboots Wi-Fi not staying connected - issue wifi connect and device reboots (TZ-1126) Sep 11, 2024
@gytxxsy
Copy link
Contributor

gytxxsy commented Sep 12, 2024

It seems that the device connected to Wi-Fi successfully and get ipv4 address 192.168.178.56.

For command wifi state returns disconnected at auto start mode, it is a legacy issue present in esp-thread-br v1.0, which has been resolved in the latest code. You can switch to esp-idf v5.1.3 and esp-thread-br main, and try again.

Additionally, when manually connecting to Wi-Fi, the SSID must be specified. For example, use wifi connect -s my_ssid -p my_password instead of wifi connect.

@JanneKiiskila
Copy link
Author

Why would you not then update the documentation to match this? Though it's probably not good to point to a floating main, but you should then advice:

  • People to use ESP-IDF version v5.1.3 (instead of v5.1.2)
  • Tag a new release v1.0.1 or similar from main and point people to it.

@JanneKiiskila
Copy link
Author

JanneKiiskila commented Sep 12, 2024

I can confirm Wi-Fi now stays online. However, the NRF 52840 is now not able to connect fully to the OpenThread network. Earlier it (ESP-IDF 5.1.2 and v1.0) was able.

<inf> net_state: Waiting for OT connection

Is the place where it hangs in the NRF 52840.
If I run discover in the ESP32 it says:

> discover

| Network Name     | Extended PAN     | PAN  | MAC Address      | Ch | dBm | LQI |
+------------------+------------------+------+------------------+----+-----+-----+
| OpenThread-7491  | 590a87a6774a99a3 | 7491 | d69404908b004a00 | 14 | -60 |   9 |
I(1612049) OPENTHREAD:[N] MeshForwarder-: Failed to send IPv6 UDP msg, len:56, chksum:c694, ecn:no, to:None, sec:no, error:Abort, prio:net
I(1612049) OPENTHREAD:[N] MeshForwarder-:     src:[fe80:0:0:0:d8d5:c426:8c38:9ece]:19788
I(1612049) OPENTHREAD:[N] MeshForwarder-:     dst:[ff02:0:0:0:0:0:0:2]:19788
Done

With the version 1.0 it did not give those errors of not being able to send.

@JanneKiiskila
Copy link
Author

JanneKiiskila commented Sep 12, 2024

There is still something funny going on with the Wi-Fi or connectivity overall as well, as I would assume I should be able to do for example dns resolve www.google.com w/o issues.

It does not work, it times out.

> dns resolve www.google.com

DNS response for www.google.com. - 
Error 28: ResponseTimeout

Ping does not seem to accept anything but direct IP-addresses.

> ping 142.251.116.94

Pinging synthesized IPv6 address: fdc5:5592:9dc2:2:0:0:8efb:745e
1 packets transmitted, 0 packets received. Packet loss = 100.0%.
Done
> ipaddr

fd16:e34a:a433:eea8:0:ff:fe00:fc37
fd16:e34a:a433:eea8:0:ff:fe00:fc10
fdc5:5592:9dc2:1:b1e1:43a3:9ad6:b3d9
fd16:e34a:a433:eea8:0:ff:fe00:fc00
fd16:e34a:a433:eea8:0:ff:fe00:c000
fd16:e34a:a433:eea8:55ed:c28b:cb21:f776
fe80:0:0:0:d8d5:c426:8c38:9ece
Done
> netdata show

Prefixes:
fdc5:5592:9dc2:1::/64 paros low c000
Routes:
fdc5:5592:9dc2:2:0:0::/96 sn low c000
::/0 sa med c000
Services:
44970 5d fd16e34aa433eea855edc28bcb21f776d11f s c000
Contexts:
fdc5:5592:9dc2:1::/64 1 c
Commissioning:
49983 c000 - 00000000000000000000000000000000
Done
> ping 8.8.8.8

Pinging synthesized IPv6 address: fdc5:5592:9dc2:2:0:0:808:808
1 packets transmitted, 0 packets received. Packet loss = 100.0%.
Done

@gytxxsy
Copy link
Contributor

gytxxsy commented Sep 12, 2024

In the documentation, we default to using the latest esp-thread-br commit. In fact, if you follow the git clone xxx command in the document, esp-idf will be on v5.1.3 and esp-thread-br will be on the main branch by default, with no need to manually switch.

For the esp-thread-br tag, we will specify the corresponding esp-idf tag at the time of release. Please refer to:
https://github.com/espressif/esp-thread-br/releases/tag/v1.0

@zwx1995esp
Copy link
Collaborator

zwx1995esp commented Sep 12, 2024

There is still something funny going on with the Wi-Fi or connectivity overall as well, as I would assume I should be able to do for example dns resolve www.google.com w/o issues.

It does not work, it times out.

> dns resolve www.google.com

DNS response for www.google.com. - 
Error 28: ResponseTimeout

Ping does not seem to accept anything but direct IP-addresses.

> ping 142.251.116.94

Pinging synthesized IPv6 address: fdc5:5592:9dc2:2:0:0:8efb:745e
1 packets transmitted, 0 packets received. Packet loss = 100.0%.
Done
> ipaddr

fd16:e34a:a433:eea8:0:ff:fe00:fc37
fd16:e34a:a433:eea8:0:ff:fe00:fc10
fdc5:5592:9dc2:1:b1e1:43a3:9ad6:b3d9
fd16:e34a:a433:eea8:0:ff:fe00:fc00
fd16:e34a:a433:eea8:0:ff:fe00:c000
fd16:e34a:a433:eea8:55ed:c28b:cb21:f776
fe80:0:0:0:d8d5:c426:8c38:9ece
Done
> netdata show

Prefixes:
fdc5:5592:9dc2:1::/64 paros low c000
Routes:
fdc5:5592:9dc2:2:0:0::/96 sn low c000
::/0 sa med c000
Services:
44970 5d fd16e34aa433eea855edc28bcb21f776d11f s c000
Contexts:
fdc5:5592:9dc2:1::/64 1 c
Commissioning:
49983 c000 - 00000000000000000000000000000000
Done
> ping 8.8.8.8

Pinging synthesized IPv6 address: fdc5:5592:9dc2:2:0:0:808:808
1 packets transmitted, 0 packets received. Packet loss = 100.0%.
Done

Hi @JanneKiiskila Please refer to 3.3. Service Discovery, Notice a suffix .default.service.arpa. is needed, and also, the dns resolve should only work for the thread devices(not BR but the other device in the thread network.) For the BR, it can access the wifi link, so if you want to resolve some websites on BR, you can use the LWIP api directly.

For the ping command, also only works for the thread device. Hope this FAQ can help you a lot.

@chshu
Copy link
Collaborator

chshu commented Sep 19, 2024

@JanneKiiskila Hope the previous answers helped, feel free to reopen if you have any follow up questions.

@chshu chshu closed this as completed Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants