Closed JanneKiiskila closed 2 months ago
You can fix this issue by manually configuring it with idf.py menuconfig
.
Component config
-> LWIP
-> (8) Number of IPv6 addresses per network interface
Change that to 12. However, after this - the device will just crash/reset.
Rebooting...
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x40375a01
0x40375a01: esp_restart_noos at /home/jannek/openThread/esp32/esp-idf/components/esp_system/port/soc/esp32s3/system_internal.c:158
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce2810,len:0x178c
load:0x403c8700,len:0x4
load:0x403c8704,len:0xc10
load:0x403cb700,len:0x2dc0
entry 0x403c8904
I (26) boot: ESP-IDF v5.3.1 2nd stage bootloader
I (26) boot: compile time Sep 11 2024 15:12:25
I (26) boot: Multicore bootloader
I (27) boot: chip revision: v0.2
I (27) boot.esp32s3: Boot SPI Speed : 80MHz
I (27) boot.esp32s3: SPI Mode : DIO
I (27) boot.esp32s3: SPI Flash Size : 4MB
I (28) boot: Enabling RNG early entropy source...
I (28) boot: Partition Table:
I (28) boot: ## Label Usage Type ST Offset Length
I (28) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (29) boot: 1 otadata OTA data 01 00 0000f000 00002000
I (29) boot: 2 phy_init RF data 01 01 00011000 00001000
I (30) boot: 3 ota_0 OTA app 00 10 00020000 00190000
I (30) boot: 4 ota_1 OTA app 00 11 001b0000 00190000
I (31) boot: 5 web_storage Unknown data 01 82 00340000 00019000
I (31) boot: 6 rcp_fw Unknown data 01 82 00359000 000a0000
I (32) boot: End of partition table
I (32) esp_image: segment 0: paddr=00020020 vaddr=3c100020 size=4ed10h (322832) map
I (90) esp_image: segment 1: paddr=0006ed38 vaddr=3fc99700 size=012e0h ( 4832) load
I (92) esp_image: segment 2: paddr=00070020 vaddr=42000020 size=f386ch (997484) map
I (271) esp_image: segment 3: paddr=00163894 vaddr=3fc9a9e0 size=03be4h ( 15332) load
I (275) esp_image: segment 4: paddr=00167480 vaddr=40374000 size=156ach ( 87724) load
I (303) boot: Loaded app from partition at offset 0x20000
I (303) boot: Disabling RNG early entropy source...
I (305) cpu_start: Multicore app
I (313) cpu_start: Pro cpu start user code
I (313) cpu_start: cpu freq: 160000000 Hz
I (314) app_init: Application information:
I (314) app_init: Project name: esp_ot_br
I (314) app_init: App version: v1.0-77-gceeb84a
I (314) app_init: Compile time: Sep 11 2024 15:12:18
I (315) app_init: ELF file SHA256: 630dc64a6...
I (315) app_init: ESP-IDF: v5.3.1
I (315) efuse_init: Min chip rev: v0.0
I (315) efuse_init: Max chip rev: v0.99
I (315) efuse_init: Chip rev: v0.2
I (316) heap_init: Initializing. RAM available for dynamic allocation:
I (316) heap_init: At 3FCAE218 len 0003B4F8 (237 KiB): RAM
I (316) heap_init: At 3FCE9710 len 00005724 (21 KiB): RAM
I (316) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM
I (317) heap_init: At 600FE100 len 00001EE8 (7 KiB): RTCRAM
I (318) spi_flash: detected chip: gd
I (318) spi_flash: flash io: dio
W (318) spi_flash: Detected size(8192k) larger than the size in the binary image header(4096k). Using the size in the binary image header.
I (319) sleep: Configure to isolate all GPIO pins in sleep state
I (320) sleep: Enable automatic switching of GPIO sleep configuration
I (321) main_task: Started on CPU0
I (331) main_task: Calling app_main()
I (381) RCP_UPDATE: RCP: using update sequence 0
I (381) uart: ESP_INTR_FLAG_IRAM flag not set while CONFIG_UART_ISR_IN_IRAM is enabled, flag updated
I (381) OPENTHREAD: spinel UART interface initialization completed
I (381) main_task: Returned from app_main()
W(391) OPENTHREAD:[W] P-SpinelDrive-: Error processing frame: Drop
W(391) OPENTHREAD:[W] P-SpinelDrive-: Error processing frame: Drop
I(391) OPENTHREAD:[I] P-SpinelDrive-: co-processor reset: RESET_POWER_ON
E(391) OPENTHREAD:[C] P-SpinelDrive-: Software reset co-processor successfully
E(401) OPENTHREAD:[C] P-RadioSpinel-: RCP is missing required capabilities:
E(411) OPENTHREAD:[C] Platform------: CheckRadioCapabilities() at radio_spinel.cpp:245: RadioSpinelIncompatible
abort() was called at PC 0x420077f2 on core 0
0x420077f2: syscall_not_implemented_aborts at /home/jannek/openThread/esp32/esp-idf/components/newlib/syscalls.c:27
Backtrace: 0x40375ac2:0x3fcb9e30 0x4037d37d:0x3fcb9e50 0x40384c72:0x3fcb9e70 0x420077f2:0x3fcb9ee0 0x420def7d:0x3fcb9f00 0x420626a5:0x3fcb9f20 0x42062ab2:0x3fcb9f60 0x42040059:0x3fcb9f90 0x4203fbfc:0x3fcb9fe0 0x4203e889:0x3fcba010 0x42008ca1:0x3fcba040
0x40375ac2: panic_abort at /home/jannek/openThread/esp32/esp-idf/components/esp_system/panic.c:463
0x4037d37d: esp_system_abort at /home/jannek/openThread/esp32/esp-idf/components/esp_system/port/esp_system_chip.c:92
0x40384c72: abort at /home/jannek/openThread/esp32/esp-idf/components/newlib/abort.c:38
0x420077f2: syscall_not_implemented_aborts at /home/jannek/openThread/esp32/esp-idf/components/newlib/syscalls.c:27
0x420def7d: exit at /builds/idf/crosstool-NG/.build/xtensa-esp-elf/src/newlib/newlib/libc/stdlib/exit.c:65
0x420626a5: ot::Spinel::RadioSpinel::CheckRadioCapabilities(unsigned short) at /home/jannek/openThread/esp32/esp-idf/components/openthread/openthread/src/lib/spinel/radio_spinel.cpp:245 (discriminator 2)
0x42062ab2: ot::Spinel::RadioSpinel::Init(bool, bool, ot::Spinel::SpinelDriver*, unsigned short) at /home/jannek/openThread/esp32/esp-idf/components/openthread/openthread/src/lib/spinel/radio_spinel.cpp:154
0x42040059: esp_openthread_radio_init at /home/jannek/openThread/esp32/esp-idf/components/openthread/src/port/esp_openthread_radio_spinel.cpp:92
0x4203fbfc: esp_openthread_platform_init at /home/jannek/openThread/esp32/esp-idf/components/openthread/src/esp_openthread_platform.cpp:149
0x4203e889: esp_openthread_init at /home/jannek/openThread/esp32/esp-idf/components/openthread/src/esp_openthread.cpp:69
0x42008ca1: ot_task_worker at /home/jannek/openThread/esp32/esp-thread-br/examples/common/thread_border_router/src/border_router_launch.c:164
Also, once the device is in the crashloop you can't exit the idf.py monitor
anymore. :-(
CTRL-T - CTRL-X or CTRL-] do not seem to work.
Seems the rcp is not compatible somehow?
It seems that the ESP32-H2 has an older ot_rcp
firmware , which could lead to compatibility issues.
You need to connect the ESP32-S3 and run idf.py -p <port> erase-flash
, then connect the ESP32-H2 and run idf.py -p <port> erase-flash
. After that, re-flash the latest firmware(based on idf v5.3.1
and esp-thread-br ceeb84af
) you built to the ESP32-S3, wait for the the RCP auto update
.
Damn, did I half duplicate this issue? https://github.com/espressif/esp-thread-br/issues/96
My setup is a new board, first time flashing it following the prescribed instructions. Seems like they need updating.
, then connect the ESP32-H2 and run
idf.py -p <port> erase-flash
. After that, re-flash the latest firmware(based onidf v5.3.1
andesp-thread-br ceeb84af
) you built to the ESP32-S3, wait for the theRCP auto update
.
So, @gytxxsy do mean that because I have once built this example with an earlier version - the firmware in the ESP32-H2 does not get updated at all with steps in the current documentation? The instructions are lacking this information then completely.
However, based on @elgerg 's comments something is still not matching.
Manually flashing the ot_rcp firmware (espressif/esp-idf@4d0db70) to esp32h2 and then the boarder router firmware (2eab508) to esp32s3 indeed fix the problem on my board. The number of IP addresses also requires manual fixing every time I switch targets.
Yes, I noticed the same. If you change the target you will lose all configuration changes. Not so pleasant or polite to override all configs without a warning.
@mys721tx @JanneKiiskila If you are using the IDF v5.3.1 or later releases, you can change the default configuration here: https://github.com/espressif/esp-thread-br/blob/main/examples/basic_thread_border_router/sdkconfig.defaults#L63, then the configuration will be persistent.
The current IDF version suggested in the Thread BR docs is v5.1.3, with which the default configuration works. We will update both the docs and default configuration to work with IDF v5.3.1 soon.
Checklist
How often does this bug occurs?
always
Expected behavior
I would expect I should be able to update the ESF-IDF to latest version (to get latest openthread and Wi-Fi SW) against the
master
of this repository.That's however not the case.
esp-idf/examples/openthread/ot_rcp
was built succesfully.esp-idf version:
esp-thread-br version:
Actual behavior (suspected bug)
The build will fail with a complaint that the LwIP IPv6 addresses are not configured right.
Error logs or terminal output
git clone -b v5.3.1 --recursive https://github.com/espressif/esp-idf.git cd esp-idf ./install.sh . ./export.sh cd .. git clone -b v1.0 --recursive https://github.com/espressif/esp-thread-br.git