Page 1 of 1

tuyaos_demo_matter_quickstart 如何使用 chip tool 工具进行配网调试

Posted: 2023年 Oct 10日 16:59
by sky

我使用的是 BK7231N_TuyaOS-3.7.6, 调试使用[https://developer.tuya.com/cn/docs/iot/ ... 72e6net3bs] Wi-Fi&BLE SoC NANO主控板(BK7231N)

编译烧录 OK, 根据log 的二维码,使用 Google home 配网一直超时。

目前是调试阶段,请问我如何通过 chip tool 工具 对 tuyaos_demo_matter_quickstart 的设备进行配网呢


Re: tuyaos_demo_matter_quickstart 如何使用 chip tool 工具进行配网调试

Posted: 2023年 Oct 14日 16:53
by sky

使用 chip tool 配网失败在 step 13, 配网指令如下:

Code: Select all

out/debug/standalone/chip-tool pairing ble-wifi 0x020D6B1EBD2DF481 ssid pwd 78024109 438

chip tool 输出的 log 如下:

Code: Select all

[1697273315.012681][5668:5674] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0003
[1697273315.012701][5668:5674] CHIP:CTL: Received certificate chain from the device
[1697273315.012719][5668:5674] CHIP:CTL: Successfully finished commissioning step 'SendDACCertificateRequest'
[1697273315.012734][5668:5674] CHIP:CTL: Commissioning stage next step: 'SendDACCertificateRequest' -> 'SendAttestationRequest'
[1697273315.012750][5668:5674] CHIP:CTL: Performing next commissioning step 'SendAttestationRequest'
[1697273315.012761][5668:5674] CHIP:CTL: Sending Attestation Request to the device.
[1697273315.012772][5668:5674] CHIP:CTL: Sending Attestation request to 0x7fb560033290 device
[1697273315.012806][5668:5674] CHIP:DMG: ICR moving to [AddingComm]
[1697273315.012822][5668:5674] CHIP:DMG: ICR moving to [AddedComma]
[1697273315.012899][5668:5674] CHIP:EM: <<< [E:64779i S:59873 M:157549881] (S) Msg TX to 0:FFFFFFFB00000000 [0000] [BLE] --- Type 0001:08 (IM:InvokeCommandRequest)
[1697273315.013170][5668:5674] CHIP:DMG: ICR moving to [CommandSen]
[1697273315.013197][5668:5674] CHIP:CTL: Sent Attestation request, waiting for the Attestation Information
[1697273315.013230][5668:5674] CHIP:DMG: ICR moving to [AwaitingDe]
[1697273315.203405][5668:5674] CHIP:DL: HandlePlatformSpecificBLEEvent 16387
[1697273315.703944][5668:5672] CHIP:DL: Indication received, conn = 0x7fb568052b90
[1697273315.704088][5668:5674] CHIP:DL: HandlePlatformSpecificBLEEvent 16389
[1697273315.803842][5668:5672] CHIP:DL: Indication received, conn = 0x7fb568052b90
[1697273315.803969][5668:5674] CHIP:DL: HandlePlatformSpecificBLEEvent 16389
[1697273315.804060][5668:5674] CHIP:EM: >>> [E:64779i S:59873 M:196163936] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0001:09 (IM:InvokeCommandResponse)
[1697273315.804081][5668:5674] CHIP:EM: Found matching exchange: 64779i, Delegate: 0x7fb5600305a8
[1697273315.804102][5668:5674] CHIP:DMG: ICR moving to [ResponseRe]
[1697273315.804134][5668:5674] CHIP:DMG: InvokeResponseMessage =
[1697273315.804146][5668:5674] CHIP:DMG: {
[1697273315.804160][5668:5674] CHIP:DMG:        suppressResponse = false,
[1697273315.804176][5668:5674] CHIP:DMG:        InvokeResponseIBs =
[1697273315.804213][5668:5674] CHIP:DMG:        [
[1697273315.804230][5668:5674] CHIP:DMG:                InvokeResponseIB =
[1697273315.804260][5668:5674] CHIP:DMG:                {
[1697273315.804275][5668:5674] CHIP:DMG:                        CommandDataIB =
[1697273315.804296][5668:5674] CHIP:DMG:                        {
[1697273315.804315][5668:5674] CHIP:DMG:                                CommandPathIB =
[1697273315.804338][5668:5674] CHIP:DMG:                                {
[1697273315.804363][5668:5674] CHIP:DMG:                                        EndpointId = 0x0,
[1697273315.804387][5668:5674] CHIP:DMG:                                        ClusterId = 0x3e,
[1697273315.804409][5668:5674] CHIP:DMG:                                        CommandId = 0x1,
[1697273315.804429][5668:5674] CHIP:DMG:                                },
[1697273315.804454][5668:5674] CHIP:DMG:
[1697273315.804472][5668:5674] CHIP:DMG:                                CommandFields =
[1697273315.804496][5668:5674] CHIP:DMG:                                {
[1697273315.804516][5668:5674] CHIP:DMG:                                        0x0 = [
[1697273315.804699][5668:5674] CHIP:DMG:                                                        0x15, 0x30, 0x01, 0xea, 0x30, 0x81, 0xe7, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x02, 0xa0, 0x81, 0xd9, 0x30, 0x81, 0xd6, 0x02, 0x01, 0x03, 0x31, 0x0d, 0x30, 0x0b, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x30, 0x43, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x01, 0xa0, 0x36, 0x04, 0x34, 0x15, 0x24, 0x00, 0x01, 0x25, 0x01, 0x5d, 0x12, 0x36, 0x02, 0x04, 0x16, 0x18, 0x24, 0x03, 0x16, 0x2c, 0x04, 0x13, 0x5a, 0x49, 0x47, 0x32, 0x30, 0x31, 0x34, 0x32, 0x5a, 0x42, 0x33, 0x33, 0x30, 0x30, 0x30, 0x33, 0x2d, 0x32, 0x34, 0x24, 0x05, 0x00, 0x24, 0x06, 0x00, 0x25, 0x07, 0x94, 0x26, 0x24, 0x08, 0x00, 0x18, 0x31, 0x7d, 0x30, 0x7b, 0x02, 0x01, 0x03, 0x80, 0x14, 0x62, 0xfa, 0x82, 0x33, 0x59, 0xac, 0xfa, 0xa9, 0x96, 0x3e, 0x1c, 0xfa, 0x14, 0x0a, 0xdd, 0xf5, 0x04, 0xf3, 0x71, 0x60, 0x30, 0x0b, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x04, 0x47, 0x30, 0x45, 0x02, 0x21, 0x00, 0xda, 0x99, 0x36, 0xee, 0xea, 0xa7, 0x72, 0xcb, 0xf3, 0xa0, 0xac, 0xcd, 0x40, 0xeb, 0xe3, 0x42, 0xe1, 0xb4, 0xa7, 0xd1, 0x00, 0x8c, 0x6c, 0x21, 0xed, 0x85, 0x39, 0xcc, 0x34, 0xed, 0x80, 0xce, 0x02, 0x20, 0x1d, 0x53, 0xef, 0x3b, 0x76, 0xb4, 0x3f, 0x64, 0x79, 0x1c, 0x1f, 0x1b, 0x0a, 0xb9, 0x85, 0x5b, 0x1e, 0x45, 0xd3, 0x34, 0xec, 0x31, 0x82, 0xc3, 0x01, 0x6e, 0x18, 0x9c, 0x23, 0x88, 0x97, 0x30, 0x30, 0x02, 0x20, 0x54, 0x49, 0x35, 0xde, 0xb4, 0xf0, 0xf1, 0x66, 0xe8, 0x9b, 0x28, 0x71, 0xea, 0xf6, 0xc2, 0xee, 0x08, 0x90, 0xa9, 0x52, 0x79, 0x27, 0x17, 0xfd, 0xd3, 0xa8, 0xac, 0x7e, 0x21, 0x2a, 0x4b, 0x5e, 0x24, 0x03, 0x00, 0x18,
[1697273315.804782][5668:5674] CHIP:DMG:                                        ] (277 bytes)
[1697273315.804805][5668:5674] CHIP:DMG:                                        0x1 = [
[1697273315.804861][5668:5674] CHIP:DMG:                                                        0x94, 0x17, 0xfb, 0x3d, 0x97, 0x6a, 0x9e, 0x87, 0x07, 0xaa, 0xf2, 0x8b, 0xfd, 0x5a, 0xae, 0x8f, 0xbb, 0xd3, 0x0a, 0x9f, 0xa7, 0xb0, 0xbc, 0x73, 0x74, 0x5e, 0x7e, 0xb8, 0x9b, 0x16, 0xe3, 0xb8, 0x35, 0x20, 0xc4, 0x46, 0xc2, 0x03, 0xa4, 0xfa, 0xf7, 0x7a, 0xd8, 0xb4, 0x21, 0xf3, 0x85, 0x18, 0xcb, 0xf7, 0x34, 0x3a, 0xd5, 0x14, 0x1e, 0x86, 0x4b, 0xb6, 0x46, 0x52, 0x84, 0x4d, 0x83, 0xa0,
[1697273315.804892][5668:5674] CHIP:DMG:                                        ] (64 bytes)
[1697273315.804915][5668:5674] CHIP:DMG:                                },
[1697273315.804932][5668:5674] CHIP:DMG:                        },
[1697273315.804961][5668:5674] CHIP:DMG:
[1697273315.804977][5668:5674] CHIP:DMG:                },
[1697273315.805005][5668:5674] CHIP:DMG:
[1697273315.805020][5668:5674] CHIP:DMG:        ],
[1697273315.805050][5668:5674] CHIP:DMG:
[1697273315.805066][5668:5674] CHIP:DMG:        InteractionModelRevision = 1
[1697273315.805083][5668:5674] CHIP:DMG: },
[1697273315.805152][5668:5674] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0001
[1697273315.805180][5668:5674] CHIP:CTL: Received Attestation Information from the device
[1697273315.805202][5668:5674] CHIP:CTL: Successfully finished commissioning step 'SendAttestationRequest'
[1697273315.805219][5668:5674] CHIP:CTL: AutoCommissioner setting attestationElements buffer size 277/277
[1697273315.805259][5668:5674] CHIP:CTL: Commissioning stage next step: 'SendAttestationRequest' -> 'AttestationVerification'
[1697273315.805280][5668:5674] CHIP:CTL: Performing next commissioning step 'AttestationVerification'
[1697273315.805297][5668:5674] CHIP:CTL: Verifying attestation
[1697273315.827967][5668:5674] CHIP:CTL: Failed in verifying 'Attestation Information' command received from the device: err 101. Look at AttestationVerificationResult enum to understand the errors
[1697273315.828005][5668:5674] CHIP:CTL: Error on commissioning step 'AttestationVerification': 'src/controller/CHIPDeviceController.cpp:1124: CHIP Error 0x000000AC: Internal error'
[1697273315.828028][5668:5674] CHIP:CTL: Failed to perform commissioning step 13
[1697273315.828053][5668:5674] CHIP:CTL: Going from commissioning step 'AttestationVerification' with lastErr = 'src/controller/CHIPDeviceController.cpp:1124: CHIP Error 0x000000AC: Internal error' -> 'Cleanup'
[1697273315.828082][5668:5674] CHIP:CTL: Performing next commissioning step 'Cleanup' with completion status = 'src/controller/CHIPDeviceController.cpp:1124: CHIP Error 0x000000AC: Internal error'
[1697273315.828099][5668:5674] CHIP:CTL: Expiring failsafe on proxy 0x7fb560033290
[1697273315.828152][5668:5674] CHIP:DMG: ICR moving to [AddingComm]
[1697273315.828173][5668:5674] CHIP:DMG: ICR moving to [AddedComma]
[1697273315.828248][5668:5674] CHIP:EM: <<< [E:64780i S:59873 M:157549882] (S) Msg TX to 0:FFFFFFFB00000000 [0000] [BLE] --- Type 0001:08 (IM:InvokeCommandRequest)
[1697273315.828566][5668:5674] CHIP:DMG: ICR moving to [CommandSen]
[1697273315.828623][5668:5674] CHIP:DMG: ICR moving to [AwaitingDe]
[1697273316.003470][5668:5674] CHIP:DL: HandlePlatformSpecificBLEEvent 16387
[1697273316.303893][5668:5672] CHIP:DL: Indication received, conn = 0x7fb568052b90
[1697273316.304013][5668:5674] CHIP:DL: HandlePlatformSpecificBLEEvent 16389
[1697273316.304111][5668:5674] CHIP:EM: >>> [E:64780i S:59873 M:196163937] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0001:09 (IM:InvokeCommandResponse)
[1697273316.304136][5668:5674] CHIP:EM: Found matching exchange: 64780i, Delegate: 0x7fb5600652d8
[1697273316.304165][5668:5674] CHIP:DMG: ICR moving to [ResponseRe]
[1697273316.304208][5668:5674] CHIP:DMG: InvokeResponseMessage =
[1697273316.304223][5668:5674] CHIP:DMG: {
[1697273316.304245][5668:5674] CHIP:DMG:        suppressResponse = false,
[1697273316.304263][5668:5674] CHIP:DMG:        InvokeResponseIBs =
[1697273316.304293][5668:5674] CHIP:DMG:        [
[1697273316.304309][5668:5674] CHIP:DMG:                InvokeResponseIB =
[1697273316.304338][5668:5674] CHIP:DMG:                {
[1697273316.304354][5668:5674] CHIP:DMG:                        CommandDataIB =
[1697273316.304376][5668:5674] CHIP:DMG:                        {
[1697273316.304394][5668:5674] CHIP:DMG:                                CommandPathIB =
[1697273316.304417][5668:5674] CHIP:DMG:                                {
[1697273316.304438][5668:5674] CHIP:DMG:                                        EndpointId = 0x0,
[1697273316.304481][5668:5674] CHIP:DMG:                                        ClusterId = 0x30,
[1697273316.304499][5668:5674] CHIP:DMG:                                        CommandId = 0x1,
[1697273316.304517][5668:5674] CHIP:DMG:                                },
[1697273316.304540][5668:5674] CHIP:DMG:
[1697273316.304557][5668:5674] CHIP:DMG:                                CommandFields =
[1697273316.304578][5668:5674] CHIP:DMG:                                {
[1697273316.304599][5668:5674] CHIP:DMG:                                        0x0 = 0,
[1697273316.304620][5668:5674] CHIP:DMG:                                        0x1 = "" (0 chars),
[1697273316.304640][5668:5674] CHIP:DMG:                                },
[1697273316.304656][5668:5674] CHIP:DMG:                        },
[1697273316.304682][5668:5674] CHIP:DMG:
[1697273316.304697][5668:5674] CHIP:DMG:                },
[1697273316.304723][5668:5674] CHIP:DMG:
[1697273316.304736][5668:5674] CHIP:DMG:        ],
[1697273316.304764][5668:5674] CHIP:DMG:
[1697273316.304778][5668:5674] CHIP:DMG:        InteractionModelRevision = 1
[1697273316.304794][5668:5674] CHIP:DMG: },
[1697273316.304856][5668:5674] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0001
[1697273316.304881][5668:5674] CHIP:CTL: Failsafe disarmed
[1697273316.304900][5668:5674] CHIP:CTL: Successfully finished commissioning step 'Cleanup'
[1697273316.304927][5668:5674] CHIP:TOO: Device commissioning Failure: src/controller/CHIPDeviceController.cpp:1124: CHIP Error 0x000000AC: Internal error
[1697273316.304957][5668:5674] CHIP:DIS: Closing all BLE connections
[1697273316.304972][5668:5674] CHIP:IN: Clearing BLE pending packets.
[1697273316.305217][5668:5674] CHIP:BLE: Auto-closing end point's BLE connection.
[1697273316.305241][5668:5674] CHIP:DL: Closing BLE GATT connection (con 0x7fb568052b90)
[1697273316.305335][5668:5672] CHIP:DL: BluezDisconnect peer=C8:47:8C:00:00:01
[1697273318.696666][5668:5674] CHIP:IN: SecureSession[0x7fb560014960]: MarkForEviction Type:1 LSID:59873
[1697273318.696772][5668:5674] CHIP:SC: SecureSession[0x7fb560014960, LSID:59873]: State change 'kActive' --> 'kPendingEviction'
[1697273318.696898][5668:5674] CHIP:DMG: ICR moving to [AwaitingDe]
[1697273318.696940][5668:5674] CHIP:IN: SecureSession[0x7fb560014960]: Released - Type:1 LSID:59873
[1697273318.696968][5668:5674] CHIP:DL: Long dispatch time: 2393 ms, for event type 16389
[1697273318.696986][5668:5674] CHIP:DL: HandlePlatformSpecificBLEEvent 16388
[1697273318.697000][5668:5674] CHIP:BLE: no endpoint for unsub complete
[1697273318.697034][5668:5672] CHIP:DL: Bluez disconnected
[1697273318.697065][5668:5672] CHIP:DL: Bluez notify CHIPoBluez connection disconnected
[1697273318.697179][5668:5668] CHIP:CTL: Shutting down the commissioner
[1697273318.697229][5668:5668] CHIP:CTL: Shutting down the controller
[1697273318.697733][5668:5668] CHIP:IN: Expiring all sessions for fabric 0x1!!
[1697273318.697751][5668:5668] CHIP:FP: Forgetting fabric 0x1
[1697273318.697776][5668:5668] CHIP:TS: Pending Last Known Good Time: 2023-10-09T23:33:56
[1697273318.697898][5668:5668] CHIP:TS: Previous Last Known Good Time: 2023-10-09T23:33:56
[1697273318.697913][5668:5668] CHIP:TS: Reverted Last Known Good Time to previous value
[1697273318.697947][5668:5668] CHIP:CTL: Shutting down the commissioner
[1697273318.697960][5668:5668] CHIP:CTL: Shutting down the controller
[1697273318.697976][5668:5668] CHIP:CTL: Shutting down the System State, this will teardown the CHIP Stack
[1697273318.698073][5668:5668] CHIP:DMG: All ReadHandler-s are clean, clear GlobalDirtySet
[1697273318.698139][5668:5668] CHIP:FP: Shutting down FabricTable
[1697273318.698161][5668:5668] CHIP:TS: Pending Last Known Good Time: 2023-10-09T23:33:56
[1697273318.698280][5668:5668] CHIP:TS: Previous Last Known Good Time: 2023-10-09T23:33:56
[1697273318.698295][5668:5668] CHIP:TS: Reverted Last Known Good Time to previous value
[1697273318.698494][5668:5668] CHIP:DL: writing settings to file (/tmp/chip_counters.ini-teeyIF)
[1697273318.698926][5668:5668] CHIP:DL: renamed tmp file to file (/tmp/chip_counters.ini)
[1697273318.698962][5668:5668] CHIP:DL: NVS set: chip-counters/total-operational-hours = 0 (0x0)
[1697273318.698975][5668:5668] CHIP:DL: Inet Layer shutdown
[1697273318.698985][5668:5668] CHIP:DL: BLE shutdown
[1697273318.700272][5668:5668] CHIP:DL: System Layer shutdown
[1697273318.700497][5668:5668] CHIP:TOO: Run command failure: src/controller/CHIPDeviceController.cpp:1124: CHIP Error 0x000000AC: Internal error


Re: tuyaos_demo_matter_quickstart 如何使用 chip tool 工具进行配网调试

Posted: 2023年 Nov 15日 10:06
by haitun

https://dcl.iotledger.io/pki下载涂鸦paa证书,搜索tuya有两个,下载这个:CN=Tuya Matter PAA,vid=0x125D
使用chip-tool配网时,指定paa证书所在路径:--paa-trust-store-path ../../credentials/development/paa-root-certs