espressif / esp-rainmaker

ESP RainMaker Agent for firmware development
Apache License 2.0
431 stars 145 forks source link

[Matter_light example] I cannot connect to the esp via WiFi or BLE (MEGH-5315) #302

Closed dovebman closed 4 months ago

dovebman commented 4 months ago

Answers checklist.

IDF / ESP32-Arduino version.

ESP-IDF v5.2

Operating System used.

Linux

How did you build your project?

None

Development Kit.

ESP32-C6-DevKitC-1

What is the expected behavior?

Visible QR code and Visible WiFi or BLE.

What is the actual behavior?

idf.py menuconfig -> ESP RainMaker App Wi-Fi Provisioning -> Provisioning Transport Method (Bluetooth LE) - option not available in my menuconfig The ESP starting, the private key is generated (for the assisted claiming) but after that there is no visible QR code or link, and I can not see neither the WiFi or BLE. Hence I can not connect the esp via the phone app.

Steps to reproduce.

  1. Set menuconfig assisted claiming
  2. build
  3. flash
  4. monitor

Debug Logs.

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:0x40875720,len:0x1804
load:0x4086c410,len:0xde0
load:0x4086e610,len:0x2e00
entry 0x4086c41a
I (23) boot: ESP-IDF v5.2 2nd stage bootloader
I (24) boot: compile time Feb 21 2024 10:53:50
I (24) boot: chip revision: v0.0
I (26) boot.esp32c6: SPI Speed      : 80MHz
I (31) boot.esp32c6: SPI Mode       : DIO
I (36) boot.esp32c6: SPI Flash Size : 4MB
I (40) boot: Enabling RNG early entropy source...
I (46) boot: Partition Table:
I (49) boot: ## Label            Usage          Type ST Offset   Length
I (57) boot:  0 esp_secure_cert  unknown          3f 06 0000d000 00002000
I (64) boot:  1 nvs              WiFi data        01 02 00010000 00006000
I (72) boot:  2 nvs_keys         NVS keys         01 04 00016000 00001000
I (79) boot:  3 otadata          OTA data         01 00 00017000 00002000
I (87) boot:  4 phy_init         RF data          01 01 00019000 00001000
I (94) boot:  5 ota_0            OTA app          00 10 00020000 001e0000
I (102) boot:  6 ota_1            OTA app          00 11 00200000 001e0000
I (109) boot:  7 reserved         unknown          06 06 003e0000 0001a000
I (117) boot:  8 fctry            WiFi data        01 02 003fa000 00006000
I (124) boot: End of partition table
I (129) esp_image: segment 0: paddr=00020020 vaddr=42160020 size=62350h (402256) map
I (219) esp_image: segment 1: paddr=00082378 vaddr=40800000 size=0dca0h ( 56480) load
I (232) esp_image: segment 2: paddr=00090020 vaddr=42000020 size=15fb50h (1440592) map
I (526) esp_image: segment 3: paddr=001efb78 vaddr=4080dca0 size=10264h ( 66148) load
I (541) esp_image: segment 4: paddr=001ffde4 vaddr=50000000 size=00004h (     4) load
I (548) boot: Loaded app from partition at offset 0x20000
I (549) boot: Disabling RNG early entropy source...
I (562) cpu_start: Unicore app
W (572) clk: esp_perip_clk_init() has not been implemented yet
I (579) cpu_start: Pro cpu start user code
I (579) cpu_start: cpu freq: 160000000 Hz
I (579) cpu_start: Application information:
I (582) cpu_start: Project name:     matter_light
I (587) cpu_start: App version:      909c7f0
I (592) cpu_start: Compile time:     Feb 21 2024 11:05:59
I (598) cpu_start: ELF file SHA256:  c5f456ffb...
I (603) cpu_start: ESP-IDF:          v5.2
I (608) cpu_start: Min chip rev:     v0.0
I (613) cpu_start: Max chip rev:     v0.99 
I (618) cpu_start: Chip rev:         v0.0
I (622) heap_init: Initializing. RAM available for dynamic allocation:
I (630) heap_init: At 4082FF20 len 0004C6F0 (305 KiB): RAM
I (636) heap_init: At 4087C610 len 00002F54 (11 KiB): RAM
I (642) heap_init: At 50000004 len 00003FE4 (15 KiB): RTCRAM
I (649) spi_flash: detected chip: generic
I (653) spi_flash: flash io: dio
W (657) spi_flash: Detected size(8192k) larger than the size in the binary image header(4096k). Using the size in the binary image header.
W (670) eFuse: calibration efuse version does not match, set default version to 0
W (685) eFuse: calibration efuse version does not match, set default version to 0
W (686) eFuse: calibration efuse version does not match, set default version to 0
W (695) eFuse: calibration efuse version does not match, set default version to 0
W (703) eFuse: calibration efuse version does not match, set default version to 0
W (711) eFuse: calibration efuse version does not match, set default version to 0
W (719) eFuse: calibration efuse version does not match, set default version to 0
W (727) eFuse: calibration efuse version does not match, set default version to 0
W (735) eFuse: calibration efuse version does not match, set default version to 0
W (751) eFuse: calibration efuse version does not match, set default version to 0
W (752) eFuse: calibration efuse version does not match, set default version to 0
W (760) eFuse: calibration efuse version does not match, set default version to 0
W (768) eFuse: calibration efuse version does not match, set default version to 0
W (776) eFuse: calibration efuse version does not match, set default version to 0
W (784) eFuse: calibration efuse version does not match, set default version to 0
W (792) eFuse: calibration efuse version does not match, set default version to 0
W (801) eFuse: calibration efuse version does not match, set default version to 0
W (816) eFuse: calibration efuse version does not match, set default version to 0
W (817) eFuse: calibration efuse version does not match, set default version to 0
W (825) eFuse: calibration efuse version does not match, set default version to 0
W (833) eFuse: calibration efuse version does not match, set default version to 0
W (841) eFuse: calibration efuse version does not match, set default version to 0
W (850) eFuse: calibration efuse version does not match, set default version to 0
W (858) eFuse: calibration efuse version does not match, set default version to 0
W (866) eFuse: calibration efuse version does not match, set default version to 0
W (881) eFuse: calibration efuse version does not match, set default version to 0
W (882) eFuse: calibration efuse version does not match, set default version to 0
W (890) eFuse: calibration efuse version does not match, set default version to 0
W (898) eFuse: calibration efuse version does not match, set default version to 0
W (907) eFuse: calibration efuse version does not match, set default version to 0
W (915) eFuse: calibration efuse version does not match, set default version to 0
W (923) eFuse: calibration efuse version does not match, set default version to 0
W (931) rmt(legacy): legacy driver is deprecated, please migrate to `driver/rmt_tx.h` and/or `driver/rmt_rx.h`
I (943) sleep: Configure to isolate all GPIO pins in sleep state
I (948) sleep: Enable automatic switching of GPIO sleep configuration
I (955) coexist: coex firmware version: 77cd7f8
I (961) coexist: coexist rom version 5b8dcfa
I (966) main_task: Started on CPU0
I (966) main_task: Calling app_main()
I (986) led_driver_ws2812: Initializing light driver
I (986) gpio: GPIO[9]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 
I (986) esp_rmaker_console: Initialising UART on port 0
I (996) uart: queue free spaces: 8
I (996) esp_rmaker_commands: Registering command: reboot
I (1006) esp_rmaker_commands: Registering command: up-time
I (1006) esp_rmaker_commands: Registering command: mem-dump
I (1016) esp_rmaker_commands: Registering command: task-dump
I (1016) esp_rmaker_commands: Registering command: cpu-dump
I (1026) esp_rmaker_commands: Registering command: sock-dump
I (1036) esp_rmaker_commands: Registering command: heap-trace
I (1036) esp_rmaker_commands: Registering command: reset-to-factory
I (1046) esp_rmaker_commands: Registering command: local-time
I (1056) esp_rmaker_commands: Registering command: tz-set
I (1056) esp_rmaker_commands: Registering command: add-user
I (1066) esp_rmaker_commands: Registering command: get-node-id
I (1076) esp_rmaker_commands: Registering command: wifi-prov
I (1076) esp_rmaker_commands: Registering command: cmd
I (1086) app_matter: Light created with endpoint_id 1
I (1096) pp: pp rom version: 5b8dcfa
I (1096) net80211: net80211 rom version: 5b8dcfa
I (1106) wifi:wifi driver task: 4083f81c, prio:23, stack:6656, core=0
I (1106) wifi:wifi firmware version: cc1dd81
I (1106) wifi:wifi certification version: v7.0
I (1116) wifi:config NVS flash: enabled
I (1116) wifi:config nano formating: disabled
I (1116) wifi:mac_version:HAL_MAC_ESP32AX_761,ut_version:N
I (1126) wifi:Init data frame dynamic rx buffer num: 32
I (1136) wifi:Init static rx mgmt buffer num: 5
I (1136) wifi:Init management short buffer num: 32
I (1136) wifi:Init dynamic tx buffer num: 32
I (1146) wifi:Init static tx FG buffer num: 2
I (1146) wifi:Init static rx buffer size: 1700
I (1156) wifi:Init static rx buffer num: 10
I (1156) wifi:Init dynamic rx buffer num: 32
I (1156) wifi_init: rx ba win: 6
I (1166) wifi_init: tcpip mbox: 32
I (1166) wifi_init: udp mbox: 6
I (1176) wifi_init: tcp mbox: 6
I (1176) wifi_init: tcp tx win: 5760
I (1176) wifi_init: tcp rx win: 5760
I (1186) wifi_init: tcp mss: 1440
I (1186) wifi_init: WiFi IRAM OP enabled
I (1196) wifi_init: WiFi RX IRAM OP enabled
I (1226) chip[DL]: NVS set: chip-counters/reboot-count = 2 (0x2)
I (1226) chip[DL]: Real time clock set to 946684800 (0100/00/01 00:00:00 UTC)
I (1226) BLE_INIT: Using main XTAL as clock source
controller lib commit: [620fbe7]
I (1236) phy_init: phy_version 230,c773401,Oct 30 2023,15:07:16
I (1286) phy: libbtbb version: 7243671, Oct 30 2023, 15:07:30
I (1286) NimBLE: GAP procedure initiated: stop advertising.

I (1286) NimBLE: Failed to restore IRKs from store; status=8

I (1296) CHIP[DL]: BLE host-controller synced
I (1796) chip[DL]: Starting ESP WiFi layer
W (1796) wifi:(bf)761:0x600a7cac:0x01b4b4b0
W (1796) wifi:(agc)0x600a7128:0xd21bf800, min.avgNF:0xce->0xd2(dB), RCalCount:0x1bf, min.RRssi:0x800(-128.00)
W (1796) wifi:(TB)WDEV_PWR_TB_MCS0:19
W (1806) wifi:(TB)WDEV_PWR_TB_MCS1:19
W (1806) wifi:(TB)WDEV_PWR_TB_MCS2:19
W (1806) wifi:(TB)WDEV_PWR_TB_MCS3:19
W (1816) wifi:(TB)WDEV_PWR_TB_MCS4:19
W (1816) wifi:(TB)WDEV_PWR_TB_MCS5:19
W (1816) wifi:(TB)WDEV_PWR_TB_MCS6:18
W (1826) wifi:(TB)WDEV_PWR_TB_MCS7:18
W (1826) wifi:(TB)WDEV_PWR_TB_MCS8:17
W (1826) wifi:(TB)WDEV_PWR_TB_MCS9:15
W (1836) wifi:(TB)WDEV_PWR_TB_MCS10:15
W (1836) wifi:(TB)WDEV_PWR_TB_MCS11:15
I (1836) wifi:11ax coex: WDEVAX_PTI0(0x55777555), WDEVAX_PTI1(0x00003377).

I (1846) wifi:mode : sta (60:55:f9:f7:13:68)
I (1846) wifi:enable tsf
W (1856) wifi:Haven't to connect to a suitable AP now!
I (1856) chip[DL]: Done driving station state, nothing else to do...
W (1866) wifi:Haven't to connect to a suitable AP now!
I (1866) chip[DL]: Done driving station state, nothing else to do...
I (1876) chip[SVR]: Initializing subscription resumption storage...
I (1886) chip[SVR]: Server initializing...
I (1886) chip[TS]: Last Known Good Time: 2023-10-14T01:16:48
I (1896) chip[DMG]: AccessControl: initializing
I (1896) chip[DMG]: Examples::AccessControlDelegate::Init
I (1906) chip[DMG]: AccessControl: setting
I (1906) chip[DMG]: DefaultAclStorage: initializing
I (1916) chip[DMG]: DefaultAclStorage: 0 entries loaded
I (1936) chip[ZCL]: Using ZAP configuration...
I (1936) esp_matter_cluster: Cluster plugin init common callback
I (1936) chip[DMG]: AccessControlCluster: initializing
I (1946) chip[ZCL]: 0x42165e40 ep 0 clus 0x0000_0030 attr 0x0000_0000 not supported
I (1956) chip[ZCL]: Initiating Admin Commissioning cluster.
I (1956) chip[DIS]: Updating services using commissioning mode 0
I (1966) chip[DIS]: CHIP minimal mDNS started advertising.
E (1966) chip[SVR]: ERROR setting up transport: 201
I (1976) esp_matter_core: Dynamic endpoint 0 added
I (1986) esp_matter_attribute: ********** W : Endpoint 0x0001's Cluster 0x00000003's Attribute 0x00000001 is 0 **********
I (1996) app_matter: RainMaker init not done. Not processing attribute update
I (1996) esp_matter_attribute: ********** W : Endpoint 0x0001's Cluster 0x00000004's Attribute 0x00000000 is 128 **********
I (2016) app_matter: RainMaker init not done. Not processing attribute update
I (2016) esp_matter_attribute: ********** W : Endpoint 0x0001's Cluster 0x00000004's Attribute 0x0000FFFC is <invalid type: 0> **********
I (2036) esp_matter_attribute: ********** R : Endpoint 0x0001's Cluster 0x00000006's Attribute 0x0000FFFC is 1 **********
I (2046) esp_matter_attribute: ********** R : Endpoint 0x0001's Cluster 0x00000006's Attribute 0x00004003 is null **********
I (2056) esp_matter_attribute: ********** R : Endpoint 0x0001's Cluster 0x00000006's Attribute 0x00000000 is 1 **********
I (2066) esp_matter_attribute: ********** R : Endpoint 0x0001's Cluster 0x00000006's Attribute 0x00000000 is 1 **********
I (2076) chip[ZCL]: Endpoint 1 On/off already set to new value
I (2086) esp_matter_attribute: ********** R : Endpoint 0x0001's Cluster 0x00000008's Attribute 0x00000002 is 1 **********
I (2096) esp_matter_attribute: ********** R : Endpoint 0x0001's Cluster 0x00000008's Attribute 0x00000003 is 254 **********
I (2106) esp_matter_attribute: ********** R : Endpoint 0x0001's Cluster 0x00000008's Attribute 0x0000FFFC is 3 **********
I (2126) esp_matter_attribute: ********** R : Endpoint 0x0001's Cluster 0x00000008's Attribute 0x00000000 is 25 **********
I (2136) esp_matter_attribute: ********** R : Endpoint 0x0001's Cluster 0x00000008's Attribute 0x00004000 is 25 **********
I (2146) esp_matter_attribute: ********** W : Endpoint 0x0001's Cluster 0x00000008's Attribute 0x00000000 is 25 **********
I (2156) led_driver_ws2812: led set r:0, g:0, b:0
I (2166) app_matter: RainMaker init not done. Not processing attribute update
I (2166) esp_matter_attribute: ********** R : Endpoint 0x0001's Cluster 0x00000300's Attribute 0x00004010 is null **********
I (2186) esp_matter_core: Dynamic endpoint 1 added
I (2186) chip[DL]: WIFI_EVENT_STA_START
W (2196) wifi:Haven't to connect to a suitable AP now!
I (2196) chip[DL]: Done driving station state, nothing else to do...
I (2206) app_matter: Commissioning window closed
I (2206) led_driver_ws2812: led set r:0, g:0, b:0
I (2216) led_driver_ws2812: led set r:0, g:0, b:0
I (2216) led_driver_ws2812: led set r:22, g:17, b:12
E (2226) esp_rmaker_core: Failed to get device certificate.
I (2236) esp_rmaker_work_queue: Work Queue created.
I (2236) esp_claim: Initialising Assisted Claiming. This may take time.
W (2246) esp_claim: Generating the private key. This may take time.
I (6576) esp_rmaker_node: Node ID ----- 6055F9F71368
I (6576) esp_rmaker_ota_using_topics: OTA enabled with Topics
I (6576) esp_rmaker_ota: OTA state = 2
I (6576) esp_rmaker_time: Initializing SNTP. Using the SNTP server: pool.ntp.org
I (6586) esp_rmaker_time_service: Time service enabled
I (6596) esp_rmaker_time: SNTP already initialized.
I (6606) app_insights: Enable CONFIG_ESP_INSIGHTS_ENABLED to get Insights.
I (6606) esp_matter_attribute: ********** W : Endpoint 0x0000's Cluster 0x131BFC00's Attribute 0x00000001 is 6055F9F71368 **********
I (6616) app_matter: RainMaker init not done. Not processing attribute update
I (6626) esp_rmaker_core: Starting RainMaker Work Queue task
I (6636) esp_rmaker_work_queue: RainMaker Work Queue task started.
W (6636) wifi:Haven't to connect to a suitable AP now!
I (6646) esp_claim: Waiting for assisted claim to finish.
I (6656) main_task: Returned from app_main()

More Information.

No response

shahpiyushv commented 4 months ago

The regular provisioning and assisted claiming concepts do not apply to matter examples. Please refer this README instead.

wangwenxue1989 commented 2 months ago

[this README](https://github.com/espressif/esp-rainmaker/blob/master/examples/matter/README.md) says IDF should use V4.4.4 or V5.0.1,my question is if V5.2 can be used?