Skip to content

Not work (not compile) example ZIGBEE GATEWAY and THREAD BR #369

Description

@pilnikov

Answers checklist.

  • I have read the Rainmaker documentation and the issue is not addressed there.
  • I have updated my IDF branch (release/vX.Y) to the latest version and checked that the issue is present there. This is not applicable if you are using Rainmaker with Arduino.
  • I have searched the Rainmaker forum and issue tracker for a similar issue and not found a similar issue.

IDF / ESP32-Arduino version.

6.1

Operating System used.

Windows

How did you build your project?

Command line with idf.py

Development Kit.

esp32c6 supermini 4mb flash

What is the expected behavior?

PS Z:\examples\esp-rainmaker\examples\thread_br> $env:IDF_PATH = 'z:\esp-idf';
PS Z:\examples\esp-rainmaker\examples\thread_br> & 'C:\Espressif\tools\python\ed7c90c\venv\Scripts\python.exe' 'z:\esp-idf\tools\idf_monitor.py' -p COM6 -b 115200 --toolchain-prefix riscv32-esp-elf- --make '''C:\Espressif\tools\python\ed7c90c\venv\Scripts\python.exe'' ''z:\esp-idf\tools\idf.py''' --target esp32c6 'z:\examples\esp-rainmaker\examples\thread_br\build\thread_border_router.elf'
--- Warning: GDB cannot open serial ports accessed as COMx
--- Using \.\COM6 instead...
--- esp-idf-monitor 1.9.0 on \.\COM6 115200
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H
ESP-ROM:esp32c6-20220919
Build:Sep 19 2022
rst:0x15 (USB_UART_HPSYS),boot:0x6b (SPI_FAST_FLASH_BOOT)
Saved PC:0x4080c4ea
--- 0x4080c4ea: rv_utils_wait_for_intr at Z:/esp-idf/components/riscv/include/riscv/rv_utils.h:80
--- (inlined by) esp_cpu_wait_for_intr at Z:/esp-idf/components/esp_hw_support/cpu.c:62
SPIWP:0xee
mode:DIO, clock div:2
load:0x40875730,len:0x13cc
load:0x4086b910,len:0xfc0
load:0x4086e610,len:0x303c
entry 0x4086b91a
I (23) boot: ESP-IDF v6.1-dev-3357-ged7c90c8aa-dirty 2nd stage bootloader
I (23) boot: compile time Apr 1 2026 13:30:47
I (24) boot: chip revision: v0.2
I (24) boot: efuse block revision: v0.3
I (24) qio_mode: Enabling default flash chip QIO
I (24) boot.esp32c6: SPI Speed : 80MHz
I (25) boot.esp32c6: SPI Mode : QIO
I (25) boot.esp32c6: SPI Flash Size : 4MB
I (25) boot: Enabling RNG early entropy source...
I (26) boot: Partition Table:
I (26) boot: ## Label Usage Type ST Offset Length
I (26) boot: 0 esp_secure_cert unknown 3f 06 0000d000 00002000
I (27) boot: 1 nvs_key NVS keys 01 04 0000f000 00001000
I (27) boot: 2 nvs WiFi data 01 02 00010000 00006000
I (28) boot: 3 otadata OTA data 01 00 00016000 00002000
I (28) boot: 4 phy_init RF data 01 01 00018000 00001000
I (29) boot: 5 ota_0 OTA app 00 10 00020000 001e7000
I (30) boot: 6 ota_1 OTA app 00 11 00210000 001e7000
I (30) boot: 7 rcp_fw Unknown data 01 82 003f7000 00001000
I (31) boot: 8 fctry WiFi data 01 02 003fb000 00005000
I (31) boot: End of partition table
I (32) esp_image: segment 0: paddr=00020020 vaddr=42180020 size=49f20h (302880) map
I (89) esp_image: segment 1: paddr=00069f48 vaddr=40800000 size=060d0h ( 24784) load
I (95) esp_image: segment 2: paddr=00070020 vaddr=42000020 size=17ca10h (1559056) map
I (384) esp_image: segment 3: paddr=001eca38 vaddr=408060d0 size=17224h ( 94756) load
I (404) esp_image: segment 4: paddr=00203c64 vaddr=4081d300 size=032e8h ( 13032) load
I (414) boot: Loaded app from partition at offset 0x20000
I (415) boot: Disabling RNG early entropy source...
I (416) cpu_start: Unicore app
I (424) cpu_start: Pro cpu start user code
I (424) cpu_start: cpu freq: 160000000 Hz
I (424) app_init: Application information:
I (424) app_init: Project name: thread_border_router
I (425) app_init: App version: 1.0
I (425) app_init: Compile time: Apr 1 2026 13:29:23
I (425) app_init: ELF file SHA256: 3ac5b7295...
I (425) app_init: ESP-IDF: v6.1-dev-3357-ged7c90c8aa-dirty
I (426) efuse_init: Min chip rev: v0.0
I (426) efuse_init: Max chip rev: v0.99
I (426) efuse_init: Chip rev: v0.2
I (427) heap_init: Initializing. RAM available for dynamic allocation:
I (427) heap_init: At 40831A90 len 0004AB80 (298 KiB): RAM
I (427) heap_init: At 4087C610 len 00002F54 (11 KiB): RAM
I (427) heap_init: At 50000000 len 00003FE8 (15 KiB): RTCRAM
I (428) spi_flash: detected chip: generic
I (428) spi_flash: flash io: qio
I (429) sleep_gpio: Configure to isolate all GPIO pins in sleep state
I (429) sleep_gpio: Enable automatic switching of GPIO sleep configuration
I (430) main_task: Started on CPU0
I (430) main_task: Calling app_main()
I (430) pp: pp rom version: 5b8dcfa
I (430) net80211: net80211 rom version: 5b8dcfa
I (440) wifi:wifi driver task: 40838f3c, prio:23, stack:6656, core=0
I (440) wifi:wifi firmware version: b997dad
I (440) wifi:wifi certification version: v7.0
I (440) wifi:config NVS flash: enabled
I (440) wifi:config nano formatting: disabled
I (440) wifi:mac_version:HAL_MAC_ESP32AX_761,ut_version:N, band mode:0x1
I (440) wifi:Init data frame dynamic rx buffer num: 32
I (440) wifi:Init static rx mgmt buffer num: 5
I (440) wifi:Init management short buffer num: 32
I (440) wifi:Init dynamic tx buffer num: 32
I (440) wifi:Init static tx FG buffer num: 2
I (440) wifi:Init static rx buffer size: 1700 (rxctrl:92, csi:512)
I (440) wifi:Init static rx buffer num: 10
I (440) wifi:Init dynamic rx buffer num: 32
I (440) wifi_init: rx ba win: 6
I (440) wifi_init: accept mbox: 6
I (440) wifi_init: tcpip mbox: 32
I (440) wifi_init: udp mbox: 6
I (440) wifi_init: tcp mbox: 6
I (440) wifi_init: tcp tx win: 5760
I (440) wifi_init: tcp rx win: 5760
I (440) wifi_init: tcp mss: 1440
I (440) wifi_init: WiFi IRAM OP enabled
I (440) wifi_init: WiFi RX IRAM OP enabled
I (440) wifi_init: WiFi SLP IRAM OP enabled
I (450) esp_rmaker_work_queue: Work Queue created.
I (450) esp_claim: Initialising Assisted Claiming. This may take time.
E (450) esp_claim: mbedtls_ctr_drbg_seed returned -0x0001
E (450) esp_claim: Failed to generate private key.
E (450) esp_rmaker_core: Failed to initialise Claiming.
I (450) esp_rmaker_work_queue: esp_rmaker_work_queue was successfully deinitialized
E (450) esp_rmaker_core: Failed to initialise MQTT Params. Please perform "claiming" using RainMaker CLI.
E (450) app_main: Could not initialise node. Aborting!!!

abort() was called at PC 0x4200b093 on core 0
--- 0x4200b093: app_main at Z:/examples/esp-rainmaker/examples/thread_br/main/app_main.c:90
Core 0 register dump:
MEPC : 0x4080e8f4 RA : 0x4080e8c2 SP : 0x40834aa0 GP : 0x4081db04
--- 0x4080e8f4: panic_abort at Z:/esp-idf/components/esp_system/panic.c:473
--- 0x4080e8c2: esp_vApplicationTickHook at Z:/esp-idf/components/esp_system/freertos_hooks.c:31
TP : 0x40834c50 T0 : 0x37363534 T1 : 0x7271706f T2 : 0x33323130
S0/FP : 0x40834acc S1 : 0x40834acc A0 : 0x40834acc A1 : 0x40834aae
A2 : 0x00000000 A3 : 0x40834af9 A4 : 0x00000001 A5 : 0x40831000
A6 : 0x00000000 A7 : 0x76757473 S2 : 0x40834ab0 S3 : 0x00000000
S4 : 0x00000000 S5 : 0x00000000 S6 : 0x00000000 S7 : 0x00000000
S8 : 0x00000000 S9 : 0x00000000 S10 : 0x00000000 S11 : 0x00000000
T3 : 0x6e6d6c6b T4 : 0x6a696867 T5 : 0x66656463 T6 : 0x62613938
MSTATUS : 0x00001881 MTVEC : 0x40800001 MCAUSE : 0x00000002 MTVAL : 0x00000000
--- 0x40800001: _vector_table at Z:/esp-idf/components/riscv/vectors_intc.S:54
MHARTID : 0x00000000

Stack memory:
40834aa0: 0x00000014 0x40831000 0x00000000 0x00000030 0x30303234 0x33393062 0x00000000 0x408200ac
40834ac0: 0x40834ab0 0x408200c8 0x40834aac 0x726f6261 0x20292874 0x20736177 0x6c6c6163 0x61206465
40834ae0: 0x43502074 0x34783020 0x62303032 0x20333930 0x63206e6f 0x2065726f 0x00000030 0x00000000
40834b00: 0x00000000 0x42182000 0x00000000 0x4200b096 0x0000000a 0x0000000a 0x4081d600 0x4216a0c2
--- Error: ClearCommError failed (PermissionError(13, '╨г╤Б╤В╤А╨╛╨╣╤Б╤В╨▓╨╛ ╨╜╨╡ ╨╛╨┐╨╛╨╖╨╜╨░╨╡╤В ╨║╨╛╨╝╨░╨╜╨┤╤Г.', None, 22))

log from my board
I tried compile thread_br and zigbee_gateway examples

What is the actual behavior?

does not work correctly

Steps to reproduce.

  1. Step remove from idf_component.yml espressif/m5stack_core_s3: version: "^1.1.1" because version is unknown.
  2. Step add espressif/mqtt: '*' between add-dependency
  3. Step rework partitions.csv

Name, Type, SubType, Offset, Size, Flags
esp_secure_cert, 0x3F, , 0xD000, 0x2000, encrypted
nvs_key, data, nvs_keys, 0xF000, 0x1000, encrypted
nvs, data, nvs, 0x10000, 0x6000,
otadata, data, ota, , 0x2000
phy_init, data, phy, , 0x1000,
ota_0, app, ota_0, 0x20000, 0x1E7000,
ota_1, app, ota_1, , 0x1E7000,
rcp_fw, data, spiffs, , 0x1000,
fctry, data, nvs, 0x3FB000, 0x5000

because size of main image is too big
4. rework caim.c and node auth.c (in attach) because "mbedtls/sha256.h not found" and more components from mbedtls.
5. MBEDTLS_X509_CRT_WRITE_C switch to "ON" in sdconfig, because several func is not compiling
6. little more fix for new version of idf

E (450) esp_claim: mbedtls_ctr_drbg_seed returned -0x0001 because

int ret = -1;
#if defined(MBEDTLS_ENTROPY_C)
mbedtls_entropy_context entropy;
const char *pers = "gen_csr";
mbedtls_entropy_init(&entropy);
ret = mbedtls_ctr_drbg_seed( &ctr_drbg, mbedtls_entropy_func, &entropy, (const unsigned char *) pers, strlen(pers));
#endif

and

MBEDTLS_ENTROPY_C is not defined because

#if !defined(MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG)
#define MBEDTLS_ENTROPY_C
#endif

and

#ifndef CONFIG_IDF_TARGET_LINUX
#undef MBEDTLS_PSA_BUILTIN_GET_ENTROPY
#define MBEDTLS_PSA_DRIVER_GET_ENTROPY
#define MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG
#endif // !CONFIG_IDF_TARGET_LINUX

MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG defined, because my IDF_TARGET is not "LINUX"

thank you

Build Logs.


More Information.

esp_rmaker_claim.c

esp_rmaker_node_auth.c

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions