Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

ESP32-H2, Zigbee and NLME message

Aussie Susan

Advanced Member level 5
Advanced Member level 5
Joined
Jan 5, 2015
Messages
1,612
Helped
415
Reputation
830
Reaction score
474
Trophy points
1,363
Activity points
19,114
(I originally posted this question on the Espressif support forum a week ago but I've had no response. Looking for better luck here.)

I have an ESP32-H2-DevKitM-1 and the Espressif IDF (V1.6.5) installed on VS Code. Using that I did an 'express' setup about 3 days ago so I should have the latest versions of the SDK etc.
I have tried to use the 'HA_ON_OFF_LIGHT" example code (unaltered in all key aspects) to connect to my "Home Assistant" system that has a SkyConnect Zigbee coordinator.
Everything works at first (and I can toggle the light on and off on the DevKit with the 'switch' that the Home Assistant 'device' provides) but then I start to get the "NLME Status Indication - Status 0" messages and I can't find that they mean.
Shortly after each, the SDK seems to restart and successfully rejoins the network, but eventually it wil fail to initialise the zigbe stack and then tells me the device is unavailable.
According to the Home Assistant device, the RSSI is about -42 which should mean a good connection.
How do I start to go about identifying what is the problem as the documentation simply lists the ESP_ZB_NLME_STATUS_INDICATION as an enumerated value (which is obvious) but does not say how to interpret the status code (if it is a Zigbee NWK status then it is 'no path'!).
The log from the devkit is below.
Susan

368368) m�ESP-ROM:esp32h2-20221101
Build:Nov 1 2022
rst:0x1 (POWERON),boot:0xc (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x4083cfd0,len:0xc10
load:0x4083efd0,len:0x2da4
load:0x408460e8,len:0x1784
entry 0x4083cfd0
I (23) boot: ESP-IDF v5.1.1-dirty 2nd stage bootloader
I (24) boot: compile time Nov 8 2023 11:28:32
I (25) boot: chip revision: v0.1
I (27) boot.esp32h2: SPI Speed : 64MHz
I (32) boot.esp32h2: SPI Mode : DIO
I (36) boot.esp32h2: SPI Flash Size : 2MB
I (41) boot: Enabling RNG early entropy source...
I (47) boot: Partition Table:
I (50) boot: ## Label Usage Type ST Offset Length
I (57) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (65) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (72) boot: 2 factory factory app 00 00 00010000 00089800
I (80) boot: 3 zb_storage Unknown data 01 81 0009a000 00004000
I (87) boot: 4 zb_fct Unknown data 01 81 0009e000 00000400
I (95) boot: End of partition table
I (99) esp_image: segment 0: paddr=00010020 vaddr=42060020 size=0e068h ( 57448) map
I (122) esp_image: segment 1: paddr=0001e090 vaddr=40800000 size=01f88h ( 8072) load
I (125) esp_image: segment 2: paddr=00020020 vaddr=42000020 size=59ef0h (368368) map
I (219) esp_image: segment 3: paddr=00079f18 vaddr=40801f88 size=0aac4h ( 43716) load
I (231) esp_image: segment 4: paddr=000849e4 vaddr=4080ca50 size=01328h ( 4904) load
I (235) boot: Loaded app from partition at offset 0x10000
I (236) boot: Disabling RNG early entropy source...
I (251) cpu_start: Unicore app
I (252) cpu_start: Pro cpu up.
W (260) clk: esp_perip_clk_init() has not been implemented yet
I (267) cpu_start: Pro cpu start user code
I (267) cpu_start: cpu freq: 96000000 Hz
I (268) cpu_start: Application information:
I (270) cpu_start: Project name: light_bulb
I (275) cpu_start: App version: 1
I (280) cpu_start: Compile time: Nov 8 2023 11:28:22
I (286) cpu_start: ELF file SHA256: b67f773db4c39b64...
I (292) cpu_start: ESP-IDF: v5.1.1-dirty
I (297) cpu_start: Min chip rev: v0.0
I (302) cpu_start: Max chip rev: v0.99
I (307) cpu_start: Chip rev: v0.1
I (311) heap_init: Initializing. RAM available for dynamic allocation:
I (318) heap_init: At 40814060 len 00039320 (228 KiB): D/IRAM
I (325) heap_init: At 4084D380 len 00002B60 (10 KiB): STACK/DIRAM
I (333) spi_flash: detected chip: generic
I (336) spi_flash: flash io: dio
W (340) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
I (354) sleep: Configure to isolate all GPIO pins in sleep state
I (360) sleep: Enable automatic switching of GPIO sleep configuration
I (367) app_start: Starting scheduler on CPU0
I (372) main_task: Started on CPU0
I (372) main_task: Calling app_main()
W (382) rmt: channel resolution loss, real=10666666
I (382) gpio: GPIO[8]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (402) phy: phy_version: 200,0, 8a31b65, Jun 6 2023, 20:13:10
I (402) phy: libbtbb version: 98b760f, Jun 6 2023, 20:13:22
I (412) main_task: Returned from app_main()
I (502) ESP_ZB_ON_OFF_LIGHT: Production Config Ready - Status : -1
I (502) ESP_ZB_ON_OFF_LIGHT: Zigbee stack initialized
I (502) ESP_ZB_ON_OFF_LIGHT: First Start
I (502) ESP_ZB_ON_OFF_LIGHT: Start network steering
I (9382) ESP_ZB_ON_OFF_LIGHT: Joined network successfully (Extended PAN ID: 83:00:29:28:2d:81:f9:83, PAN ID: 0x2845, Channel:20)
I (82002) ESP_ZB_ON_OFF_LIGHT: NLME Status Indication - Status: 0
I (82042) ESP_ZB_ON_OFF_LIGHT: NLME Status Indication - Status: 0
I (90282) ESP_ZB_ON_OFF_LIGHT: Restart
I (90282) ESP_ZB_ON_OFF_LIGHT: Start network steering
I (90292) ESP_ZB_ON_OFF_LIGHT: Joined network successfully (Extended PAN ID: 83:00:29:28:2d:81:f9:83, PAN ID: 0x2845, Channel:20)
I (181212) ESP_ZB_ON_OFF_LIGHT: NLME Status Indication - Status: 0
I (189442) ESP_ZB_ON_OFF_LIGHT: Restart
I (189442) ESP_ZB_ON_OFF_LIGHT: Start network steering
I (189472) ESP_ZB_ON_OFF_LIGHT: Joined network successfully (Extended PAN ID: 83:00:29:28:2d:81:f9:83, PAN ID: 0x2845, Channel:20)
I (192612) ESP_ZB_ON_OFF_LIGHT: NLME Status Indication - Status: 0
I (200792) ESP_ZB_ON_OFF_LIGHT: Restart
W (200792) ESP_ZB_ON_OFF_LIGHT: Failed to initialize Zigbee stack (status: -1)
W (909762) ESP_ZB_ON_OFF_LIGHT: Device Unavailable - Status: 0
W (1809762) ESP_ZB_ON_OFF_LIGHT: Device Unavailable - Status: 0
W (2709772) ESP_ZB_ON_OFF_LIGHT: Device Unavailable - Status: 0
W (3609772) ESP_ZB_ON_OFF_LIGHT: Device Unavailable - Status: 0
 
Stumbled across your post and thought I would see if this helps. I had a similar issue in not knowing what the codes meant. If you put this in your code it will give you the actual error:

As a temporary solution, you can add the following case to the esp_zb_app_signal_handler() to check the NLME status, which can be referenced from zb_nwk_command_status_t.

case ESP_ZB_NLME_STATUS_INDICATION: {
printf("%s, status: 0x%x\n", esp_zb_zdo_signal_to_string(sig_type), *(uint8_t *)esp_zb_app_signal_get_params(p_sg_p));
} break;

THen you can go and check the zb_nwk_command_status_t to see what error you are getting.

Hope it helps.
 

LaTeX Commands Quick-Menu:

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top