Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chip-tool connect fail, how to solve #82

Closed
Firesuiry opened this issue Nov 5, 2022 · 13 comments
Closed

chip-tool connect fail, how to solve #82

Firesuiry opened this issue Nov 5, 2022 · 13 comments

Comments

@Firesuiry
Copy link

Firesuiry commented Nov 5, 2022

I have built a example light with esp32c3
I want to connect it with chip-tool
But it need setup_passcode and I dont know where to get it.
I try it but it seems connecting fail.

The log from esp32c3 is as follows:

--- idf_monitor on /dev/ttyUSB0 115200 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
ESP-ROM:esp32c3-api1-20210207
Build:Feb  7 2021
rst:0x1 (POWERON),boot:0xc (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd6100,len:0x16b4
load:0x403ce000,len:0x930
load:0x403d0000,len:0x2d28
entry 0x403ce000
I (30) boot: ESP-IDF v4.4.2 2nd stage bootloader
I (30) boot: compile time 22:00:44
I (30) boot: chip revision: 3
I (32) boot.esp32c3: SPI Speed      : 80MHz
I (37) boot.esp32c3: SPI Mode       : DIO
I (41) boot.esp32c3: SPI Flash Size : 4MB
I (46) boot: Enabling RNG early entropy source...
I (52) boot: Partition Table:
I (55) boot: ## Label            Usage          Type ST Offset   Length
I (62) boot:  0 sec_cert         unknown          3f 06 0000d000 00003000
I (70) boot:  1 nvs              WiFi data        01 02 00010000 00006000
I (77) boot:  2 otadata          OTA data         01 00 00016000 00002000
I (85) boot:  3 phy_init         RF data          01 01 00018000 00001000
I (92) boot:  4 ota_0            OTA app          00 10 00020000 001e0000
I (100) boot:  5 ota_1            OTA app          00 11 00200000 001e0000
I (107) boot:  6 fctry            WiFi data        01 02 003e0000 00006000
I (115) boot: End of partition table
I (119) boot: No factory image, trying OTA 0
I (124) esp_image: segment 0: paddr=00020020 vaddr=3c100020 size=2efd0h (192464) map
I (163) esp_image: segment 1: paddr=0004eff8 vaddr=3fc90400 size=01020h (  4128) load
I (164) esp_image: segment 2: paddr=00050020 vaddr=42000020 size=f4e50h (1003088) map
I (325) esp_image: segment 3: paddr=00144e78 vaddr=3fc91420 size=02680h (  9856) load
I (327) esp_image: segment 4: paddr=00147500 vaddr=40380000 size=1033ch ( 66364) load
I (343) esp_image: segment 5: paddr=00157844 vaddr=50000010 size=00010h (    16) load
I (348) boot: Loaded app from partition at offset 0x20000
I (393) boot: Set actual ota_seq=1 in otadata[0]
I (393) boot: Disabling RNG early entropy source...
I (404) cpu_start: Pro cpu up.
I (413) cpu_start: Pro cpu start user code
I (413) cpu_start: cpu freq: 160000000
I (413) cpu_start: Application information:
I (416) cpu_start: Project name:     light
I (420) cpu_start: App version:      v1.0
I (425) cpu_start: Compile time:     Nov  5 2022 13:50:42
I (431) cpu_start: ELF file SHA256:  1ca4d5ca67212762...
I (437) cpu_start: ESP-IDF:          v4.4.2
I (442) heap_init: Initializing. RAM available for dynamic allocation:
I (449) heap_init: At 3FCA4650 len 0001B9B0 (110 KiB): DRAM
I (455) heap_init: At 3FCC0000 len 0001F060 (124 KiB): STACK/DRAM
I (462) heap_init: At 50000020 len 00001FE0 (7 KiB): RTCRAM
I (469) spi_flash: detected chip: generic
I (473) spi_flash: flash io: dio
I (478) sleep: Configure to isolate all GPIO pins in sleep state
I (484) sleep: Enable automatic switching of GPIO sleep configuration
I (491) coexist: coexist rom version 9387209
I (496) cpu_start: Starting scheduler.
I (523) led_driver_ws2812: Initializing light driver
I (523) gpio: GPIO[9]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 
I (533) app_main: Light created with endpoint_id 1
E (533) esp_matter_core: Command 0x0047 on cluster 0x0300 already exists. Not creating again.
I (543) pp: pp rom version: 9387209
I (543) net80211: net80211 rom version: 9387209
I (563) wifi:wifi driver task: 3fcb0750, prio:23, stack:6656, core=0
I (563) system_api: Base MAC address is not set
I (563) system_api: read default base MAC address from EFUSE
I (573) wifi:wifi firmware version: eeaa27d
I (573) wifi:wifi certification version: v7.0
I (573) wifi:config NVS flash: enabled
I (573) wifi:config nano formating: disabled
I (583) wifi:Init data frame dynamic rx buffer num: 32
I (583) wifi:Init management frame dynamic rx buffer num: 32
I (593) wifi:Init management short buffer num: 32
I (593) wifi:Init dynamic tx buffer num: 32
I (603) wifi:Init static tx FG buffer num: 2
I (603) wifi:Init static rx buffer size: 1600
I (603) wifi:Init static rx buffer num: 10
I (613) wifi:Init dynamic rx buffer num: 32
I (613) wifi_init: rx ba win: 6
I (623) wifi_init: tcpip mbox: 32
I (623) wifi_init: udp mbox: 6
I (623) wifi_init: tcp mbox: 6
I (633) wifi_init: tcp tx win: 5744
I (633) wifi_init: tcp rx win: 5744
I (643) wifi_init: tcp mss: 1440
I (643) wifi_init: WiFi IRAM OP enabled
I (643) wifi_init: WiFi RX IRAM OP enabled
I (663) chip[DL]: NVS set: chip-counters/reboot-count = 9 (0x9)
I (663) CHIP[DL]: WiFi station already provisioned, not initializing BLE
W (663) BTDM_INIT: esp_bt_mem_release not implemented, return OK
I (673) chip[DL]: Real time clock set to 946684800 (0100/00/01 00:00:00 UTC)
I (683) chip[DL]: Starting ESP WiFi layer
I (683) phy_init: phy_version 912,d001756,Jun  2 2022,16:28:07
I (723) wifi:mode : sta (58:cf:79:e9:96:f8)
I (723) wifi:enable tsf
W (723) wifi:Haven't to connect to a suitable AP now!
I (723) chip[DL]: Attempting to connect WiFi station interface
I (723) chip[DL]: WiFi station state change: NotConnected -> Connecting
I (733) chip[DL]: Done driving station state, nothing else to do...
I (743) chip[SVR]: Server initializing...
I (743) chip[TS]: Last Known Good Time: 2022-11-04T22:12:24
I (753) chip[TS]: Setting Last Known Good Time to firmware build time 2022-11-05T13:51:25
I (773) chip[FP]: Fabric index 0x1 was retrieved from storage. Compressed FabricId 0x992322CA0AB8BB0A, FabricId 0x0000000000000001, NodeId 0x0000000000000001, VendorId 0xFFF1
I (783) chip[DMG]: AccessControl: initializing
I (783) chip[DMG]: Examples::AccessControlDelegate::Init
I (793) chip[DMG]: AccessControl: setting
I (793) chip[DMG]: DefaultAclStorage: initializing
I (803) chip[DMG]: DefaultAclStorage: 1 entries loaded
I (813) chip[ZCL]: Using ZAP configuration...
I (813) esp_matter_cluster: Cluster plugin init common callback
I (813) chip[DMG]: AccessControlCluster: initializing
I (823) chip[ZCL]: 0x3c10b848ep 0 clus 0x0000_0030 attr 0x0000_0000 not supported
I (833) chip[ZCL]: Initiating Admin Commissioning cluster.
E (833) chip[ZCL]: Duplicate attribute override registration failed
I (843) chip[SVR]: Fabric already commissioned. Disabling BLE advertisement
I (853) chip[IN]: CASE Server enabling CASE session setups
I (863) chip[SVR]: Joining Multicast groups
I (863) chip[SVR]: Server Listening...
I (873) esp_matter_core: Dynamic endpoint 0 added
I (873) esp_matter_attribute: ********** Endpoint 0x0001's Cluster 0x0003's Attribute 0x0001 is 0 **********
I (883) esp_matter_attribute: ********** Endpoint 0x0001's Cluster 0x0004's Attribute 0x0000 is 128 **********
I (893) esp_matter_attribute: ********** Endpoint 0x0001's Cluster 0x0004's Attribute 0xFFFC is <invalid type: 0> **********
I (903) esp_matter_attribute: ********** Endpoint 0x0001's Cluster 0x0005's Attribute 0x0000 is 0 **********
I (913) esp_matter_attribute: ********** Endpoint 0x0001's Cluster 0x0006's Attribute 0xFFFC is 1 **********
I (923) esp_matter_attribute: ********** Endpoint 0x0001's Cluster 0x0006's Attribute 0x4003 is 1 **********
I (933) esp_matter_attribute: ********** Endpoint 0x0001's Cluster 0x0006's Attribute 0x0000 is 1 **********
I (943) chip[ZCL]: On/Off set value: 1 1
I (953) esp_matter_attribute: ********** Endpoint 0x0001's Cluster 0x0006's Attribute 0x0000 is 1 **********
I (963) chip[ZCL]: On/off already set to new value
I (973) esp_matter_attribute: ********** Endpoint 0x0001's Cluster 0x0008's Attribute 0x0002 is 1 **********
I (983) esp_matter_attribute: ********** Endpoint 0x0001's Cluster 0x0008's Attribute 0x0003 is 254 **********
I (993) esp_matter_attribute: ********** Endpoint 0x0001's Cluster 0x0008's Attribute 0xFFFC is 3 **********
I (1003) esp_matter_attribute: ********** Endpoint 0x0001's Cluster 0x0008's Attribute 0x0000 is 64 **********
I (1013) esp_matter_attribute: ********** Endpoint 0x0001's Cluster 0x0008's Attribute 0x4000 is 64 **********
I (1023) esp_matter_attribute: ********** Endpoint 0x0001's Cluster 0x0008's Attribute 0x0000 is 64 **********
I (1033) led_driver_ws2812: led set r:0, g:0, b:0
I (1043) esp_matter_attribute: ********** Endpoint 0x0001's Cluster 0x0300's Attribute 0x4010 is 250 **********
I (1053) esp_matter_attribute: ********** Endpoint 0x0001's Cluster 0x0300's Attribute 0x0007 is 250 **********
I (1063) esp_matter_attribute: ********** Endpoint 0x0001's Cluster 0x0300's Attribute 0x400B is 0 **********
I (1073) esp_matter_attribute: ********** Endpoint 0x0001's Cluster 0x0300's Attribute 0x400C is 65279 **********
I (1083) esp_matter_attribute: ********** Endpoint 0x0001's Cluster 0x0300's Attribute 0x0007 is 250 **********
I (1093) led_driver_ws2812: led set r:0, g:0, b:0
I (1093) esp_matter_attribute: ********** Endpoint 0x0001's Cluster 0x0300's Attribute 0x0008 is 2 **********
I (1103) esp_matter_attribute: ********** Endpoint 0x0001's Cluster 0x0300's Attribute 0x4001 is 2 **********
I (1123) esp_matter_core: Dynamic endpoint 1 added
E (1123) chip[DL]: Long dispatch time: 385 ms, for event type 2
W (1133) wifi:Haven't to connect to a suitable AP now!
E (1133) chip[DL]: Failed to get configured network when updating network status: Error ESP32:0x0500300F
I (1143) chip[DL]: WIFI_EVENT_STA_START
I (1153) phy: chan:1,max_power:80
I (1153) phy: chan:2,max_power:80
I (1153) phy: chan:3,max_power:80
I (1163) phy: chan:4,max_power:80
I (1163) phy: chan:5,max_power:80
I (1173) phy: chan:6,max_power:80
I (1173) phy: chan:7,max_power:80
I (1173) phy: chan:8,max_power:80
I (1183) phy: chan:9,max_power:80
I (1183) phy: chan:10,max_power:80
I (1193) phy: chan:11,max_power:80
I (1193) phy: chan:12,max_power:80
I (1193) phy: chan:13,max_power:80
I (1203) phy: chan:14,max_power:80
W (1203) wifi:Haven't to connect to a suitable AP now!
I (1213) chip[DL]: Attempting to connect WiFi station interface
E (1213) wifi:sta is connecting, return error
E (1223) chip[DL]: esp_wifi_connect() failed: ESP_ERR_WIFI_CONN
I (1233) led_driver_ws2812: led set r:0, g:0, b:0
I (1233) led_driver_ws2812: led set r:0, g:0, b:0
I (1243) led_driver_ws2812: led set r:25, g:20, b:16
> I (3153) wifi:new:<4,0>, old:<1,0>, ap:<255,255>, sta:<4,0>, prof:1
I (3153) wifi:state: init -> auth (b0)
I (3193) wifi:state: auth -> assoc (0)
I (3223) wifi:state: assoc -> run (10)
I (3363) wifi:connected with Firesuiry, aid = 4, channel 4, BW20, bssid = c8:bf:4c:47:a0:25
I (3363) wifi:security: WPA2-PSK, phy: bgn, rssi: -29
I (3373) wifi:pm start, type: 1

I (3373) wifi:set rx beacon pti, rx_bcn_pti: 14, bcn_timeout: 14, mt_pti: 25000, mt_time: 10000
I (3373) chip[DL]: WIFI_EVENT_STA_CONNECTED
I (3383) chip[DL]: WiFi station state change: Connecting -> Connecting_Succeeded
I (3393) phy: chan:1,max_power:80
I (3403) phy: chan:2,max_power:80
I (3403) phy: chan:3,max_power:80
I (3403) phy: chan:4,max_power:80
I (3413) phy: chan:5,max_power:80
I (3413) phy: chan:6,max_power:80
I (3413) phy: chan:7,max_power:80
I (3423) phy: chan:8,max_power:80
I (3423) phy: chan:9,max_power:80
I (3423) phy: chan:10,max_power:80
I (3433) phy: chan:11,max_power:80
I (3433) phy: chan:12,max_power:80
I (3433) phy: chan:13,max_power:80
I (3443) phy: chan:14,max_power:80
I (3453) chip[DL]: WiFi station state change: Connecting_Succeeded -> Connected
I (3463) chip[DL]: WiFi station interface connected
I (3453) wifi:BcnInt:102400, DTIM:1
I (3463) chip[ZCL]: WiFiDiagnosticsDelegate: OnConnectionStatusChanged
I (3473) chip[DL]: Done driving station state, nothing else to do...
I (3473) chip[DL]: Updating advertising data
W (3543) wifi:<ba-add>idx:0 (ifx:0, c8:bf:4c:47:a0:25), tid:0, ssn:2, winSize:64
I (4543) esp_netif_handlers: sta ip: 172.16.6.141, mask: 255.255.255.0, gw: 172.16.6.1
I (4543) chip[DL]: IP_EVENT_GOT_IP6
I (4543) chip[DL]: IPv6 addr available. Ready on WIFI_STA_DEF interface: fe80:0000:0000:0000:5acf:79ff:fee9:96f8
I (4553) chip[DL]: IPv4 Internet connectivity ESTABLISHED
I (4563) chip[DL]: IP_EVENT_STA_GOT_IP
I (4563) chip[DL]: IPv4 address changed on WiFi station interface: 172.16.6.141/255.255.255.0 gateway 172.16.6.1
I (4573) app_main: Interface IP Address changed
I (4593) chip[DIS]: Updating services using commissioning mode 0
I (4593) chip[DIS]: CHIP minimal mDNS started advertising.
I (4593) chip[DIS]: Advertise operational node 992322CA0AB8BB0A-0000000000000001
I (4603) chip[DIS]: CHIP minimal mDNS configured as 'Operational device'; instance name: 992322CA0AB8BB0A-0000000000000001.
I (4623) chip[DIS]: mDNS service published: _matter._tcp
I (4623) app_main: Interface IP Address changed
I (4623) chip[DIS]: Updating services using commissioning mode 0
I (4633) chip[DIS]: CHIP minimal mDNS started advertising.
I (4643) chip[DIS]: Advertise operational node 992322CA0AB8BB0A-0000000000000001
I (4653) chip[DIS]: CHIP minimal mDNS configured as 'Operational device'; instance name: 992322CA0AB8BB0A-0000000000000001.
I (4663) chip[DIS]: mDNS service published: _matter._tcp
I (4673) ROUTE_HOOK: Hook already installed on netif, skip...
I (7543) chip[DL]: IP_EVENT_GOT_IP6
I (7543) chip[DL]: IPv6 addr available. Ready on WIFI_STA_DEF interface: 2408:8207:184c:ce50:5acf:79ff:fee9:96f8
I (7553) chip[DL]: IPv6 Internet connectivity ESTABLISHED
I (7553) app_main: Interface IP Address changed
I (7563) chip[DIS]: Updating services using commissioning mode 0
I (7563) chip[DIS]: CHIP minimal mDNS started advertising.
I (7583) chip[DIS]: Advertise operational node 992322CA0AB8BB0A-0000000000000001
I (7583) chip[DIS]: CHIP minimal mDNS configured as 'Operational device'; instance name: 992322CA0AB8BB0A-0000000000000001.
I (7603) chip[DIS]: mDNS service published: _matter._tcp
I (7603) ROUTE_HOOK: Hook already installed on netif, skip...

the log from chip-tool is as follows:

>>> pairing code-wifi 0x7283 Firesuiry 11111111 34970112332     
[1667628547.999130][18807:18812] CHIP:CTL: Setting wifi credentials from parameters
[1667628547.999152][18807:18812] CHIP:CTL: Setting attestation nonce to random value
[1667628547.999201][18807:18812] CHIP:CTL: Setting CSR nonce to random value
[1667628547.999238][18807:18812] CHIP:CTL: Stopping commissioning discovery over DNS-SD
[1667628547.999247][18807:18812] CHIP:CTL: Starting commissioning discovery over BLE
[1667628547.999260][18807:18812] CHIP:CTL: Starting commissioning discovery over DNS-SD
[1667628547.999624][18807:19205] CHIP:DL: TRACE: Bluez mainloop starting Thread
[1667628547.999694][18807:18810] CHIP:DL: TRACE: Bus acquired for name C-4977
[1667628551.722697][18807:18811] CHIP:DL: No wifi interface name. Ignoring IP update event.
[1667628573.022062][18807:18810] CHIP:DL: FAIL: Error getting object manager client: Error calling StartServiceByName for org.bluez: Timeout was reached
[1667628573.022129][18807:18812] CHIP:DL: PlatformBlueZInit init success
[1667628573.022173][18807:18812] CHIP:CTL: Commissioning discovery over BLE failed: ../third_party/connectedhomeip/src/platform/Linux/BLEManagerImpl.cpp:655: CHIP Error 0x00000003: Incorrect state
[1667628573.022191][18807:18812] CHIP:-: ../third_party/connectedhomeip/src/platform/Linux/BLEManagerImpl.cpp:655: CHIP Error 0x00000003: Incorrect state at ../third_party/connectedhomeip/src/controller/SetUpCodePairer.cpp:283
[1667628573.022205][18807:18812] CHIP:BLE: No adapter available for new connection establishment
[1667628573.022223][18807:18812] CHIP:DL: Long dispatch time: 25023 ms, for event type 2
[1667628578.000555][18807:18812] CHIP:CTL: Discovery timed out
[1667628578.000581][18807:18812] CHIP:CTL: Stopping commissioning discovery over DNS-SD
[1667628578.000590][18807:18812] CHIP:TOO: Secure Pairing Failed
[1667628578.000644][18807:18807] CHIP:TOO: Run command failure: ../commands/pairing/PairingCommand.cpp:164: CHIP Error 0x00000003: Incorrect state
[1667628603.043806][18807:18812] CHIP:DIS: Timeout waiting for mDNS resolution.
[1667628633.744451][18807:18811] CHIP:DL: No wifi interface name. Ignoring IP update event.
[1667628712.046897][18807:18811] CHIP:DL: No wifi interface name. Ignoring IP update event.

>>> pairing onnetwork 0x11 20202021
[1667627929.186146][18807:18812] CHIP:CTL: Stopping commissioning discovery over DNS-SD
[1667627929.186177][18807:18812] CHIP:CTL: Setting attestation nonce to random value
[1667627929.186242][18807:18812] CHIP:CTL: Setting CSR nonce to random value
[1667627929.186828][18807:18812] CHIP:CTL: Generating NOC
[1667627929.187336][18807:18812] CHIP:FP: Validating NOC chain
[1667627929.188357][18807:18812] CHIP:FP: NOC chain validation successful
[1667627929.188454][18807:18812] CHIP:FP: Updated fabric at index: 0x1, Node ID: 0x000000000001B669
[1667627929.188466][18807:18812] CHIP:TS: Last Known Good Time: 2022-11-04T16:11:17
[1667627929.188475][18807:18812] CHIP:TS: New proposed Last Known Good Time: 2021-01-01T00:00:00
[1667627929.188482][18807:18812] CHIP:TS: Retaining current Last Known Good Time
[1667627929.189216][18807:18812] CHIP:FP: Metadata for Fabric 0x1 persisted to storage.
[1667627929.189852][18807:18812] CHIP:TS: Committing Last Known Good Time to storage: 2022-11-04T16:11:17
[1667627929.190445][18807:18812] CHIP:CTL: Joined the fabric at index 1. Compressed fabric ID is: 0x0000000000000000
[1667627929.190465][18807:18812] CHIP:IN: UDP::Init bind&listen port=5550
[1667627929.190501][18807:18812] CHIP:IN: UDP::Init bound to port=5550
[1667627929.190510][18807:18812] CHIP:IN: UDP::Init bind&listen port=5550
[1667627929.190530][18807:18812] CHIP:IN: UDP::Init bound to port=5550
[1667627929.190537][18807:18812] CHIP:IN: TransportMgr initialized
[1667627960.227283][18807:18812] CHIP:DIS: Timeout waiting for mDNS resolution.
[1667627981.110249][18807:18811] CHIP:DL: No wifi interface name. Ignoring IP update event.
[1667628049.186089][18807:18807] CHIP:TOO: Run command failure: ../commands/common/CHIPCommand.cpp:513: CHIP Error 0x00000032: Timeout
[1667628068.031544][18807:18811] CHIP:DL: No wifi interface name. Ignoring IP update event.
[1667628150.053108][18807:18811] CHIP:DL: No wifi interface name. Ignoring IP update event.
[1667628232.065105][18807:18811] CHIP:DL: No wifi interface name. Ignoring IP update event.
[1667628316.106758][18807:18811] CHIP:DL: No wifi interface name. Ignoring IP update event.
[1667628379.658315][18807:18811] CHIP:DL: No wifi interface name. Ignoring IP update event.
[1667628388.678755][18807:18811] CHIP:DL: No wifi interface name. Ignoring IP update event.
[1667628470.700702][18807:18811] CHIP:DL: No wifi interface name. Ignoring IP update event.
@dhrishi
Copy link
Collaborator

dhrishi commented Nov 5, 2022

@Firesuiry If it is the default example from the repository, you can find the documentation for commissioning using chip-tool here

@Firesuiry
Copy link
Author

Firesuiry commented Nov 5, 2022 via email

@dhrishi
Copy link
Collaborator

dhrishi commented Nov 5, 2022

@Firesuiry Looks like some issue with the chip-tool BLE adapter:

[1667628573.022205][18807:18812] CHIP:BLE: No adapter available for new connection establishment

If the Bluetooth interface is available and working fine, then please start afresh:

Reset to factory the device by entering the following command on the device (ESP32) console:
matter esp factoryreset

Chip-tool command:

$ chip-tool interactive start
$ pairing ble-wifi 0x7283 <ssid> <passphrase> 20202021 3840

@Firesuiry Firesuiry changed the title How to use chip-tool? chip-tool connect fail? Nov 5, 2022
@Firesuiry Firesuiry changed the title chip-tool connect fail? chip-tool connect fail, how to solve Nov 5, 2022
@Firesuiry
Copy link
Author

@Firesuiry Looks like some issue with the chip-tool BLE adapter:

[1667628573.022205][18807:18812] CHIP:BLE: No adapter available for new connection establishment

If the Bluetooth interface is available and working fine, then please start afresh:

Reset to factory the device by entering the following command on the device (ESP32) console: matter esp factoryreset

Chip-tool command:

$ chip-tool interactive start
$ pairing ble-wifi 0x7283 <ssid> <passphrase> 20202021 3840

Thank you for your reply~
There are still 3 problems:

  1. My PC don`t have a BLE adapter, should I buy one to connect it?
  2. the ESP32C3 has joined the wifi, can I connect it with "pairing onnetwork 0x11 20202021"?
  3. I tried reset but got an error, the log is as follows:
I (7507) chip[DL]: IPv6 Internet connectivity ESTABLISHED
I (7507) app_main: Interface IP Address changed
I (7517) chip[DIS]: Updating services using commissioning mode 0
I (7517) chip[DIS]: CHIP minimal mDNS started advertising.
I (7537) chip[DIS]: Advertise operational node 992322CA0AB8BB0A-0000000000000001
I (7537) chip[DIS]: CHIP minimal mDNS configured as 'Operational device'; instance name: 992322CA0AB8BB0A-0000000000000001.
I (7557) chip[DIS]: mDNS service published: _matter._tcp
I (7557) ROUTE_HOOK: Hook already installed on netif, skip...
> matter esp factoryreset
Error: 83886338

@dhrishi
Copy link
Collaborator

dhrishi commented Nov 5, 2022

@Firesuiry If you do not have BLE adapter then you can try on-network commissioning. But the above case won't help as it is in some inconsistent state of being commissioned ie. BLE based commissioning incomplete.

Erase flash and re-flash (as reset to factory is not working on your side) and follow this

If you want to try out BLE based commissioning then you will require a BLE adapter

@Firesuiry
Copy link
Author

@Firesuiry If you do not have BLE adapter then you can try on-network commissioning. But the above case won't help as it is in some inconsistent state of being commissioned ie. BLE based commissioning incomplete.

Erase flash and re-flash (as reset to factory is not working on your side) and follow this

If you want to try out BLE based commissioning then you will require a BLE adapter

I tried

chip-tool pairing onnetwork 0x11 20202021

the log is as follows, dose it success?

yinsy@yinsy-B450M-GAMING:~/esp$ chip-tool interactive start
[1667735632.871747][6075:6075] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_kvs
[1667735632.873267][6075:6075] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_factory.ini
[1667735632.873305][6075:6075] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_config.ini
[1667735632.873325][6075:6075] CHIP:DL: ChipLinuxStorage::Init: Using KVS config file: /tmp/chip_counters.ini
[1667735632.873419][6075:6075] CHIP:DL: writing settings to file (/tmp/chip_counters.ini-Lck0HE)
[1667735632.873556][6075:6075] CHIP:DL: renamed tmp file to file (/tmp/chip_counters.ini)
[1667735632.873567][6075:6075] CHIP:DL: NVS set: chip-counters/reboot-count = 3 (0x3)
[1667735632.873735][6075:6075] CHIP:DL: Got Ethernet interface: enp9s0
[1667735632.873820][6075:6075] CHIP:DL: Found the primary Ethernet interface:enp9s0
[1667735632.873935][6075:6075] CHIP:DL: Failed to get WiFi interface
[1667735632.873940][6075:6075] CHIP:DL: Failed to reset WiFi statistic counts
[1667735632.873962][6075:6075] CHIP:IN: UDP::Init bind&listen port=0
[1667735632.873979][6075:6075] CHIP:IN: UDP::Init bound to port=42336
[1667735632.873982][6075:6075] CHIP:IN: UDP::Init bind&listen port=0
[1667735632.873995][6075:6075] CHIP:IN: UDP::Init bound to port=55028
[1667735632.873998][6075:6075] CHIP:IN: BLEBase::Init - setting/overriding transport
[1667735632.874001][6075:6075] CHIP:IN: TransportMgr initialized
[1667735632.874011][6075:6075] CHIP:FP: Initializing FabricTable from persistent storage
[1667735632.874047][6075:6075] CHIP:TS: Last Known Good Time: 2022-11-04T16:11:17
[1667735632.874440][6075:6075] CHIP:FP: Fabric index 0x1 was retrieved from storage. Compressed FabricId 0x33FCBF0B0691884B, FabricId 0x0000000000000001, NodeId 0x000000000001B669, VendorId 0xFFF1
[1667735632.874760][6075:6075] CHIP:ZCL: Using ZAP configuration...
[1667735632.874958][6075:6075] CHIP:CTL: System State Initialized...
[1667735632.874973][6075:6075] CHIP:CTL: Stopping commissioning discovery over DNS-SD
[1667735632.874988][6075:6075] CHIP:CTL: Setting attestation nonce to random value
[1667735632.874996][6075:6075] CHIP:CTL: Setting CSR nonce to random value
[1667735632.875009][6075:6075] CHIP:IN: UDP::Init bind&listen port=5550
[1667735632.875022][6075:6075] CHIP:IN: UDP::Init bound to port=5550
[1667735632.875025][6075:6075] CHIP:IN: UDP::Init bind&listen port=5550
[1667735632.875041][6075:6075] CHIP:IN: UDP::Init bound to port=5550
[1667735632.875044][6075:6075] CHIP:IN: TransportMgr initialized
[1667735632.875134][6075:6080] CHIP:DL: CHIP task running
[1667735633.356055][6075:6079] CHIP:DL: No wifi interface name. Ignoring IP update event.
>>> pairing onnetwork 0x11 20202021             
[1667735655.156283][6075:6080] CHIP:CTL: Stopping commissioning discovery over DNS-SD
[1667735655.156316][6075:6080] CHIP:CTL: Setting attestation nonce to random value
[1667735655.156389][6075:6080] CHIP:CTL: Setting CSR nonce to random value
[1667735655.156936][6075:6080] CHIP:CTL: Generating NOC
[1667735655.157486][6075:6080] CHIP:FP: Validating NOC chain
[1667735655.158621][6075:6080] CHIP:FP: NOC chain validation successful
[1667735655.158722][6075:6080] CHIP:FP: Updated fabric at index: 0x1, Node ID: 0x000000000001B669
[1667735655.158735][6075:6080] CHIP:TS: Last Known Good Time: 2022-11-04T16:11:17
[1667735655.158743][6075:6080] CHIP:TS: New proposed Last Known Good Time: 2021-01-01T00:00:00
[1667735655.158749][6075:6080] CHIP:TS: Retaining current Last Known Good Time
[1667735655.159550][6075:6080] CHIP:FP: Metadata for Fabric 0x1 persisted to storage.
[1667735655.160204][6075:6080] CHIP:TS: Committing Last Known Good Time to storage: 2022-11-04T16:11:17
[1667735655.160806][6075:6080] CHIP:CTL: Joined the fabric at index 1. Compressed fabric ID is: 0x0000000000000000
[1667735655.160829][6075:6080] CHIP:IN: UDP::Init bind&listen port=5550
[1667735655.160867][6075:6080] CHIP:IN: UDP::Init bound to port=5550
[1667735655.160874][6075:6080] CHIP:IN: UDP::Init bind&listen port=5550
[1667735655.160896][6075:6080] CHIP:IN: UDP::Init bound to port=5550
[1667735655.160903][6075:6080] CHIP:IN: TransportMgr initialized
[1667735686.194536][6075:6080] CHIP:DIS: Timeout waiting for mDNS resolution.
[1667735711.380320][6075:6079] CHIP:DL: No wifi interface name. Ignoring IP update event.
[1667735775.156561][6075:6075] CHIP:TOO: Run command failure: ../commands/common/CHIPCommand.cpp:513: CHIP Error 0x00000032: Timeout
[1667735796.424806][6075:6079] CHIP:DL: No wifi interface name. Ignoring IP update event.

@Firesuiry
Copy link
Author

@Firesuiry If you do not have BLE adapter then you can try on-network commissioning. But the above case won't help as it is in some inconsistent state of being commissioned ie. BLE based commissioning incomplete.

Erase flash and re-flash (as reset to factory is not working on your side) and follow this

If you want to try out BLE based commissioning then you will require a BLE adapter

what`s more, my device is esp32c3-devkitm,
how can I close the led on the board?
I tried

>>> onoff off 0x11 0x0  
[1667736008.418236][6075:6080] CHIP:TOO: Sending command to node 0x11
[1667736008.418447][6075:6080] CHIP:CSM: FindOrEstablishSession: PeerId = [1:0000000000000011]
[1667736008.418481][6075:6080] CHIP:CSM: FindOrEstablishSession: No existing OperationalSessionSetup instance found
[1667736008.418499][6075:6080] CHIP:CTL: OperationalSessionSetup[1:0000000000000011]: State change 1 --> 2
[1667736008.619154][6075:6080] CHIP:DIS: Checking node lookup status after 200 ms
[1667736023.426908][6075:6080] CHIP:DIS: Checking node lookup status after 15008 ms
[1667736023.426948][6075:6080] CHIP:DIS: OperationalSessionSetup[1:0000000000000011]: operational discovery failed: ../third_party/connectedhomeip/src/lib/address_resolve/AddressResolve_DefaultImpl.cpp:174: CHIP Error 0x00000032: Timeout
[1667736023.426960][6075:6080] CHIP:-: ../third_party/connectedhomeip/src/lib/address_resolve/AddressResolve_DefaultImpl.cpp:174: CHIP Error 0x00000032: Timeout at ../commands/clusters/ModelCommand.cpp:62
[1667736023.427028][6075:6075] CHIP:TOO: Run command failure: ../third_party/connectedhomeip/src/lib/address_resolve/AddressResolve_DefaultImpl.cpp:174: CHIP Error 0x00000032: Timeout
[1667736039.442516][6075:6080] CHIP:DIS: Timeout waiting for mDNS resolution.
[1667736039.493752][6075:6079] CHIP:DL: No wifi interface name. Ignoring IP update event.
[1667736116.506368][6075:6079] CHIP:DL: No wifi interface name. Ignoring IP update event.
[1667736186.518540][6075:6079] CHIP:DL: No wifi interface name. Ignoring IP update event.

but it has no effect..

@Firesuiry
Copy link
Author

2022-11-06-200601

@Firesuiry
Copy link
Author

I success! thank you~

@sidhoo2
Copy link

sidhoo2 commented Nov 17, 2022

@Firesuiry If you do not have BLE adapter then you can try on-network commissioning. But the above case won't help as it is in some inconsistent state of being commissioned ie. BLE based commissioning incomplete.
Erase flash and re-flash (as reset to factory is not working on your side) and follow this
If you want to try out BLE based commissioning then you will require a BLE adapter

what`s more, my device is esp32c3-devkitm, how can I close the led on the board? I tried

>>> onoff off 0x11 0x0  
[1667736008.418236][6075:6080] CHIP:TOO: Sending command to node 0x11
[1667736008.418447][6075:6080] CHIP:CSM: FindOrEstablishSession: PeerId = [1:0000000000000011]
[1667736008.418481][6075:6080] CHIP:CSM: FindOrEstablishSession: No existing OperationalSessionSetup instance found
[1667736008.418499][6075:6080] CHIP:CTL: OperationalSessionSetup[1:0000000000000011]: State change 1 --> 2
[1667736008.619154][6075:6080] CHIP:DIS: Checking node lookup status after 200 ms
[1667736023.426908][6075:6080] CHIP:DIS: Checking node lookup status after 15008 ms
[1667736023.426948][6075:6080] CHIP:DIS: OperationalSessionSetup[1:0000000000000011]: operational discovery failed: ../third_party/connectedhomeip/src/lib/address_resolve/AddressResolve_DefaultImpl.cpp:174: CHIP Error 0x00000032: Timeout
[1667736023.426960][6075:6080] CHIP:-: ../third_party/connectedhomeip/src/lib/address_resolve/AddressResolve_DefaultImpl.cpp:174: CHIP Error 0x00000032: Timeout at ../commands/clusters/ModelCommand.cpp:62
[1667736023.427028][6075:6075] CHIP:TOO: Run command failure: ../third_party/connectedhomeip/src/lib/address_resolve/AddressResolve_DefaultImpl.cpp:174: CHIP Error 0x00000032: Timeout
[1667736039.442516][6075:6080] CHIP:DIS: Timeout waiting for mDNS resolution.
[1667736039.493752][6075:6079] CHIP:DL: No wifi interface name. Ignoring IP update event.
[1667736116.506368][6075:6079] CHIP:DL: No wifi interface name. Ignoring IP update event.
[1667736186.518540][6075:6079] CHIP:DL: No wifi interface name. Ignoring IP update event.

but it has no effect..

@Firesuiry hi, i hv met the same issue, ./chip-tool onoff toggle 1234 0x1 failed, can u share how to solve this issue? thanks

@Firesuiry
Copy link
Author

Firesuiry commented Nov 17, 2022 via email

@sidhoo2
Copy link

sidhoo2 commented Nov 17, 2022

@Firesuiry 0x1234 is not work too .

@sidhoo2
Copy link

sidhoo2 commented Nov 18, 2022

@Firesuiry erase flash and reflash , repairing. it suceses. thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants