esp-idf: ESP32-C6 Unable to join zigbee network (IDFGH-9286)
Answers checklist.
- I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
- I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
- I have searched the issue tracker for a similar issue and not found a similar issue.
IDF version.
v5.1-dev-3066-g236fa5e669
Operating System used.
Linux
How did you build your project?
Command line with idf.py
If you are using Windows, please specify command line type.
None
Development Kit.
ESP32-C6-DevKitC-1
Power Supply used.
USB
What is the expected behavior?
I have two boards, run HA_on_off_light and HA_on_off_switch respectively, and then I use zigbee sniffer to get their incoming packets, but I can’t get anything.
What is the actual behavior?
I can’t get the Beacon Request message when I use Ubiqua.

Steps to reproduce.
- cd examples/zigbee/light_sample/HA_on_off_switch
- idf.py --preview set-target esp32c6
- idf.py build
- idf.py flash
- cd examples/zigbee/light_sample/HA_on_off_light
- idf.py --preview set-target esp32c6
- idf.py build
- idf.py flash
Debug Logs.
Executing action: monitor
Running idf_monitor in directory /home/lewin/esp/esp-idf-v5.0/examples/zigbee/light_sample/HA_on_off_switch
Executing "/home/lewin/.espressif/python_env/idf5.1_py3.8_env/bin/python /home/lewin/esp/esp-idf-v5.0/tools/idf_monitor.py -p /dev/ttyUSB1 -b 115200 --toolchain-prefix riscv32-esp-elf- --target esp32c6 --decode-panic backtrace /home/lewin/esp/esp-idf-v5.0/examples/zigbee/light_sample/HA_on_off_switch/build/light_switch.elf -m '/home/lewin/.espressif/python_env/idf5.1_py3.8_env/bin/python' '/home/lewin/esp/esp-idf-v5.0/tools/idf.py' '-p' '/dev/ttyUSB1'"...
--- idf_monitor on /dev/ttyUSB1 115200 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
ESP-ROM:esp32c6-20220919
Build:Sep 19 2022
rst:0x1 (POWERON),boot:0xc (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:2
load:0x4086c610,len:0xc98
load:0x4086e610,len:0x2a0c
load:0x40875720,len:0x17b0
entry 0x4086c610
I (23) boot: ESP-IDF v5.1-dev-3066-g236fa5e669 2nd stage bootloader
I (24) boot: compile time Jan 31 2023 15:42:51
I (24) boot: chip revision: v0.0
I (28) boot.esp32c6: SPI Speed : 40MHz
I (33) boot.esp32c6: SPI Mode : DIO
I (38) boot.esp32c6: SPI Flash Size : 2MB
I (42) boot: Enabling RNG early entropy source...
W (48) bootloader_random: bootloader_random_enable() has not been implemented yet
I (56) boot: Partition Table:
I (59) boot: ## Label Usage Type ST Offset Length
I (67) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (74) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (82) boot: 2 factory factory app 00 00 00010000 00089800
I (89) boot: 3 zb_storage Unknown data 01 81 0009a000 00020000
I (97) boot: 4 zb_fct Unknown data 01 81 000ba000 00000400
I (104) boot: End of partition table
I (108) esp_image: segment 0: paddr=00010020 vaddr=42060020 size=0a250h ( 41552) map
I (125) esp_image: segment 1: paddr=0001a278 vaddr=40800000 size=05da0h ( 23968) load
I (131) esp_image: segment 2: paddr=00020020 vaddr=42000020 size=5cbb0h (379824) map
I (206) esp_image: segment 3: paddr=0007cbd8 vaddr=40805da0 size=06008h ( 24584) load
I (212) esp_image: segment 4: paddr=00082be8 vaddr=4080bdb0 size=01538h ( 5432) load
I (217) boot: Loaded app from partition at offset 0x10000
I (218) boot: Disabling RNG early entropy source...
W (224) bootloader_random: bootloader_random_enable() has not been implemented yet
I (243) cpu_start: Pro cpu up.
W (252) clk: esp_perip_clk_init() has not been implemented yet
W (258) CACHE_ERR: esp_cache_err_int_init() has not been implemented yet
I (259) cpu_start: Pro cpu start user code
I (259) cpu_start: cpu freq: 160000000 Hz
I (264) cpu_start: Application information:
I (269) cpu_start: Project name: light_switch
I (274) cpu_start: App version: v5.1-dev-3066-g236fa5e669
I (281) cpu_start: Compile time: Jan 31 2023 15:42:44
I (287) cpu_start: ELF file SHA256: 6a2fee3c1530ebe6...
I (293) cpu_start: ESP-IDF: v5.1-dev-3066-g236fa5e669
I (299) cpu_start: Min chip rev: v0.0
I (304) cpu_start: Max chip rev: v0.99
I (309) cpu_start: Chip rev: v0.0
I (314) heap_init: Initializing. RAM available for dynamic allocation:
I (321) heap_init: At 40812E10 len 00069800 (422 KiB): D/IRAM
I (327) heap_init: At 4087C610 len 00002F54 (11 KiB): STACK/DRAM
I (334) heap_init: At 50000010 len 00003FF0 (15 KiB): RTCRAM
I (341) spi_flash: detected chip: gd
I (345) spi_flash: flash io: dio
W (348) spi_flash: Detected size(8192k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
I (362) app_start: Starting scheduler on CPU0
I (367) main_task: Started on CPU0
I (367) main_task: Calling app_main()
I (377) gpio: GPIO[9]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:2
I (377) phy_init: phy_version 101,587adde,Dec 20 2022,14:21:21
I (457) main_task: Returned from app_main()
I (467) ESP_ZB_ON_OFF_SWITCH: ZDO signal: 23, status: -1
I (467) ESP_ZB_ON_OFF_SWITCH: Zigbee stack initialized
I (497) ESP_ZB_ON_OFF_SWITCH: Start network formation
I (42757) ESP_ZB_ON_OFF_SWITCH: send 'on_off toggle' command
I (42757) ESP_ZB_ON_OFF_SWITCH: ZDO signal: 60, status: 0
I (43297) ESP_ZB_ON_OFF_SWITCH: send 'on_off toggle' command
I (43297) ESP_ZB_ON_OFF_SWITCH: ZDO signal: 60, status: 0
I (44187) ESP_ZB_ON_OFF_SWITCH: send 'on_off toggle' command
I (44187) ESP_ZB_ON_OFF_SWITCH: ZDO signal: 60, status: 0
I (44847) ESP_ZB_ON_OFF_SWITCH: send 'on_off toggle' command
I (44847) ESP_ZB_ON_OFF_SWITCH: ZDO signal: 60, status: 0
I (45167) ESP_ZB_ON_OFF_SWITCH: send 'on_off toggle' command
I (45167) ESP_ZB_ON_OFF_SWITCH: ZDO signal: 60, status: 0
I (45417) ESP_ZB_ON_OFF_SWITCH: send 'on_off toggle' command
I (45417) ESP_ZB_ON_OFF_SWITCH: ZDO signal: 60, status: 0
I (45717) ESP_ZB_ON_OFF_SWITCH: send 'on_off toggle' command
I (45717) ESP_ZB_ON_OFF_SWITCH: ZDO signal: 60, status: 0
I (45977) ESP_ZB_ON_OFF_SWITCH: send 'on_off toggle' command
I (45977) ESP_ZB_ON_OFF_SWITCH: ZDO signal: 60, status: 0
I (46247) ESP_ZB_ON_OFF_SWITCH: send 'on_off toggle' command
I (46247) ESP_ZB_ON_OFF_SWITCH: ZDO signal: 60, status: 0
I (46507) ESP_ZB_ON_OFF_SWITCH: send 'on_off toggle' command
I (46507) ESP_ZB_ON_OFF_SWITCH: ZDO signal: 60, status: 0
I (46827) ESP_ZB_ON_OFF_SWITCH: send 'on_off toggle' command
I (46827) ESP_ZB_ON_OFF_SWITCH: ZDO signal: 60, status: 0
I (48077) ESP_ZB_ON_OFF_SWITCH: send 'on_off toggle' command
I (48077) ESP_ZB_ON_OFF_SWITCH: ZDO signal: 60, status: 0
I (50417) ESP_ZB_ON_OFF_SWITCH: send 'on_off toggle' command
I (50417) ESP_ZB_ON_OFF_SWITCH: ZDO signal: 60, status: 0
I (50677) ESP_ZB_ON_OFF_SWITCH: send 'on_off toggle' command
I (50677) ESP_ZB_ON_OFF_SWITCH: ZDO signal: 60, status: 0
I (50937) ESP_ZB_ON_OFF_SWITCH: send 'on_off toggle' command
I (50937) ESP_ZB_ON_OFF_SWITCH: ZDO signal: 60, status: 0
More Information.
No response
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 29
@Tokn59 Within esp_zb_light.c of HA_on_off_light example, replace esp_zb_task function with the following code, that’s all.
@likunqiao097304 It works! ! !
Make two suggestions:
I tested the code with esp-idf 5.1.2(esp-zigbee-lib: 0.9.5, esp-zboss-lib: 0.7.2). No problem! The device are set to that right model id and manufacturer name on zigbee2mqtt.
2023년 11월 30일 (목) 오후 8:46, pcurt @.***>님이 작성:
@likunqiao097304 Thank you!
After setting the channel number, I could make the device to be registered to home assistant via zigbee2mqtt addon with zigbee 3.0 usb dongle.
I used HA_on_off_switch example that was modified to include manufname and modelid attributes in basic cluster, refered by this custom example.
Then, I added the following switch converter to HA repository as to this procedure.
screenshot of z2m device list on HA.
screenshot of z2m dashboard on HA.

@momo1 It is recommended that you buy a zigbee sniffer, which can capture zigbee data packets, making it easier to locate problems.
@lbuque the default channel is 13. If you want to change to different one, please refer to the esp_zigbee_core.h: esp_zb_set_network_channel(uint8_t channel); BTW, it seems like on-off switch didn’t formed network successfully. Try to erase the NVRAM first, before flash the code. Please refer to the README.md under HA_on_off_switch.