project-chip / connectedhomeip

Matter (formerly Project CHIP) creates more connections between more objects, simplifying development for manufacturers and increasing compatibility for consumers, guided by the Connectivity Standards Alliance.
https://buildwithmatter.com
Apache License 2.0
7.43k stars 1.99k forks source link

How can my Matter-over-Thread device(nrf52840dongle) connect to Apple TV? #25680

Closed 392625227 closed 1 year ago

392625227 commented 1 year ago

In this question, I used the Apple TV 7 128G (with thread support) as the border router, not the Raspberry Pi . Apple TV is connected to the iPhone and working. Without the Apple TV, when I tried to add my NRF52840dongle to my 'apple home' network with the iPhone, the iPhone said "border routing required". When Apple TV working, it becomes a prompt "Unable to pair".

How can my Matter-over-Thread device connect to Apple TV? My ultimate goal, of course, is that Matter-over-Thread devices end up like Apple home-kits.

I burned examples/lighting-app on nrf52840dongle, tried to test this lighting example with the home-kit app connection on the iphone, but the iPhone shows "Unable to add accessories, pairing failed", nrf52840dongle's uart log file is as follows:

renxn@Jason_Ren:~$ sudo minicom -D /dev/ttyACM0 -C log -c on ``` Welcome to minicom 2.7.1 OPTIONS: I18n Compiled on Dec 23 2019, 02:06:26. Port /dev/ttyACM0, 12:31:07 Press CTRL-A Z for help on special keys I: Init CHIP stack I: 279184 [DL]BLE address: D0:E1:82:09:73:9B I: SoftDevice Controller build revision: I: 6d 90 41 2a 38 e8 ad 17 |m.A*8... I: 29 a5 03 38 39 27 d7 85 |)..89'.. I: 1f 85 d8 e1 |.... I: 279196 [DL]OpenThread started: OK I: 279197 [DL]Setting OpenThread device type to MINIMAL END DEVICE I: 279198 [SVR]Server initializing... I: 279199 [TS]Last Known Good Time: 2023-03-09T08:43:41 I: 279202 [DMG]AccessControl: initializing I: 279202 [DMG]Examples::AccessControlDelegate::Init I: 279203 [DMG]AccessControl: setting I: 279204 [DMG]DefaultAclStorage: initializing I: 279204 [DMG]DefaultAclStorage: 0 entries loaded E: 279205 [IN]SO_REUSEPORT failed: 109 I: 279213 [ZCL]Using ZAP configuration... I: 279231 [DMG]AccessControlCluster: initializing I: 279232 [ZCL]Initiating Admin Commissioning cluster. I: 279232 [ZCL]Door Lock server initialized I: 279233 [ZCL]Initialize PCC Plugin Server Cluster. E: 279234 [ZCL]DeviceInfoProvider is not registered E: 279235 [ZCL]Failed to read calendar type with error: 0x86 I: 279236 [ZCL]Initialize PCC Server Cluster [EP:1] I: 279237 [ZCL]Constant Pressure Not Supported I: 279238 [ZCL]PCC Server: Constant Proportional Pressure Not Supported I: 279239 [ZCL]PCC Server: Constant Flow Not Supported I: 279239 [ZCL]PCC Server: Constant Temperature Not Supported I: 279240 [ZCL]PCC Server: Constant Speed Not Supported I: 279241 [ZCL]PCC Server: ControlMode attribute not available I: 279242 [ZCL]PCC Server: PumpStatus attribute not available I: 279246 [DIS]Updating services using commissioning mode 1 I: 279248 [DIS]Advertise commission parameter vendorID=65521 productID=32769 discriminator=3840/15 cm=1 E: 279250 [DIS]Failed to advertise commissionable node: 3 E: 279250 [DIS]Failed to finalize service update: 1c I: 279251 [DIS]Updating services using commissioning mode 1 I: 279253 [DIS]Advertise commission parameter vendorID=65521 productID=32769 discriminator=3840/15 cm=1 E: 279254 [DIS]Failed to advertise commissionable node: 3 E: 279255 [DIS]Failed to finalize service update: 1c I: 279256 [DIS]Delaying proxy of operational discovery: missing delegate I: 279257 [IN]CASE Server enabling CASE session setups I: 279258 [SVR]Joining Multicast groups I: 279259 [SVR]Server Listening... I: 279259 [DL]Device Configuration: I: 279260 [DL] Serial Number: 11223344556677889900 I: 279261 [DL] Vendor Id: 65521 (0xFFF1) I: 279262 [DL] Product Id: 32769 (0x8001) I: 279263 [DL] Hardware Version: 0 I: 279264 [DL] Setup Pin Code (0 for UNKNOWN/ERROR): 20202021 I: 279266 [DL] Setup Discriminator (0xFFFF for UNKNOWN/ERROR): 3840 (0xF00) I: 279268 [DL] Manufacturing Date: (not set) I: 279269 [DL] Device Type: 65535 (0xFFFF) I: 279271 [SVR]SetupQRCode: [MT:-24J042C00KA0648G00] I: 279272 [SVR]Copy/paste the below URL in a browser to see the QR Code: I: 279273 [SVR]https://project-chip.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J042C00KA0648G00 I: 279274 [SVR]Manual pairing code: [34970112332] I: 279276 [DL]CHIP task running I: 279279 [DL]CHIPoBLE advertising started I: 279281 [SVR]Cannot load binding table: a0 I: 298675 [DL]BLE connection established (ConnId: 0x00) I: 298676 [DL]Current number of connections: 1/2 I: 298676 [DL]CHIPoBLE advertising stopped W: Ignoring data for unknown channel ID 0x003a I: 299648 [BLE]local and remote recv window sizes = 5 I: 299649 [BLE]selected BTP version 4 I: 299650 [BLE]using BTP fragment sizes rx 244 / tx 244. I: 299768 [DL]CHIPoBLE connection established (ConnId: 0x00, GATT MTU: 247) I: 299829 [EM]>>> [E:31096r M:81400257] (U) Msg RX from 0:0415B3D24DD90B1A [0000] --- Type 0000:20 (SecureChannel:PBKDFParamRequest) I: 299832 [EM]<<< [E:31096r M:2660910] (U) Msg TX to 0:0000000000000000 [0000] --- Type 0000:21 (SecureChannel:PBKDFParamResponse) I: 299833 [IN](https://github.com/openthread/openthread/discussions/U) Sending msg 2660910 to IP address 'BLE' I: 299979 [EM]>>> [E:31096r M:81400258] (U) Msg RX from 0:0415B3D24DD90B1A [0000] --- Type 0000:22 (SecureChannel:PASE_Pake1) I: 302011 [EM]<<< [E:31096r M:2660911] (U) Msg TX to 0:0000000000000000 [0000] --- Type 0000:23 (SecureChannel:PASE_Pake2) I: 302012 [IN](https://github.com/openthread/openthread/discussions/U) Sending msg 2660911 to IP address 'BLE' E: 302013 [DL]Long dispatch time: 2035 ms, for event type 16388 I: 302109 [EM]>>> [E:31096r M:81400259] (U) Msg RX from 0:0415B3D24DD90B1A [0000] --- Type 0000:24 (SecureChannel:PASE_Pake3) I: 302111 [EM]<<< [E:31096r M:2660912] (U) Msg TX to 0:0000000000000000 [0000] --- Type 0000:40 (SecureChannel:StatusReport) I: 302112 [IN](https://github.com/openthread/openthread/discussions/U) Sending msg 2660912 to IP address 'BLE' I: 302114 [SC]SecureSession[0x20002fa0]: Moving from state 'kEstablishing' --> 'kActive' I: 302115 [SVR]Commissioning completed session establishment step I: 302117 [DIS]Updating services using commissioning mode 0 I: 302119 [DIS]Advertise commission parameter vendorID=65521 productID=32769 discriminator=3840/15 cm=0 E: 302120 [DIS]Failed to advertise extended commissionable node: 3 E: 302121 [DIS]Failed to finalize service update: 1c I: 302122 [SVR]Device completed Rendezvous process I: 302170 [EM]>>> [E:31097r M:4996490] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0001:02 (IM:ReadRequest) I: 302173 [EM]<<< [E:31097r M:136667552] (S) Msg TX to 0:FFFFFFFB00000000 [0000] --- Type 0001:05 (IM:ReportData) I: 302175 [IN](https://github.com/openthread/openthread/discussions/S) Sending msg 136667552 on secure session with LSID: 8143 I: 302230 [EM]>>> [E:31098r M:4996491] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0001:02 (IM:ReadRequest) I: 302237 [EM]<<< [E:31098r M:136667553] (S) Msg TX to 0:FFFFFFFB00000000 [0000] --- Type 0001:05 (IM:ReportData) I: 302238 [IN](https://github.com/openthread/openthread/discussions/S) Sending msg 136667553 on secure session with LSID: 8143 I: 302529 [EM]>>> [E:31099r M:4996492] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0001:02 (IM:ReadRequest) I: 302533 [EM]<<< [E:31099r M:136667554] (S) Msg TX to 0:FFFFFFFB00000000 [0000] --- Type 0001:05 (IM:ReportData) I: 302534 [IN](https://github.com/openthread/openthread/discussions/S) Sending msg 136667554 on secure session with LSID: 8143 I: 302590 [EM]>>> [E:31100r M:4996493] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0001:02 (IM:ReadRequest) I: 302593 [EM]<<< [E:31100r M:136667555] (S) Msg TX to 0:FFFFFFFB00000000 [0000] --- Type 0001:05 (IM:ReportData) I: 302595 [IN](https://github.com/openthread/openthread/discussions/S) Sending msg 136667555 on secure session with LSID: 8143 I: 302650 [EM]>>> [E:31101r M:4996494] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0001:02 (IM:ReadRequest) I: 302657 [EM]<<< [E:31101r M:136667556] (S) Msg TX to 0:FFFFFFFB00000000 [0000] --- Type 0001:05 (IM:ReportData) I: 302658 [IN](https://github.com/openthread/openthread/discussions/S) Sending msg 136667556 on secure session with LSID: 8143 I: 302949 [EM]>>> [E:31102r M:4996495] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0001:02 (IM:ReadRequest) I: 302953 [EM]<<< [E:31102r M:136667557] (S) Msg TX to 0:FFFFFFFB00000000 [0000] --- Type 0001:05 (IM:ReportData) I: 302954 [IN](https://github.com/openthread/openthread/discussions/S) Sending msg 136667557 on secure session with LSID: 8143 I: 303010 [EM]>>> [E:31103r M:4996496] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0001:02 (IM:ReadRequest) I: 303018 [EM]<<< [E:31103r M:136667558] (S) Msg TX to 0:FFFFFFFB00000000 [0000] --- Type 0001:05 (IM:ReportData) I: 303019 [IN](https://github.com/openthread/openthread/discussions/S) Sending msg 136667558 on secure session with LSID: 8143 I: 303130 [EM]>>> [E:31104r M:4996497] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0001:08 (IM:InvokeCommandRequest) I: 303132 [FS]GeneralCommissioning: Received ArmFailSafe (60s) I: 303134 [EM]<<< [E:31104r M:136667559] (S) Msg TX to 0:FFFFFFFB00000000 [0000] --- Type 0001:09 (IM:InvokeCommandResponse) I: 303135 [IN](https://github.com/openthread/openthread/discussions/S) Sending msg 136667559 on secure session with LSID: 8143 I: 303190 [EM]>>> [E:31105r M:4996498] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0001:08 (IM:InvokeCommandRequest) I: 303194 [EM]<<< [E:31105r M:136667560] (S) Msg TX to 0:FFFFFFFB00000000 [0000] --- Type 0001:09 (IM:InvokeCommandResponse) I: 303195 [IN](https://github.com/openthread/openthread/discussions/S) Sending msg 136667560 on secure session with LSID: 8143 I: 303250 [EM]>>> [E:31106r M:4996499] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0001:08 (IM:InvokeCommandRequest) I: 303252 [ZCL]OpCreds: Certificate Chain request received for PAI I: 303256 [EM]<<< [E:31106r M:136667561] (S) Msg TX to 0:FFFFFFFB00000000 [0000] --- Type 0001:09 (IM:InvokeCommandResponse) I: 303257 [IN](https://github.com/openthread/openthread/discussions/S) Sending msg 136667561 on secure session with LSID: 8143 I: 303430 [EM]>>> [E:31107r M:4996500] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0001:08 (IM:InvokeCommandRequest) I: 303432 [ZCL]OpCreds: Certificate Chain request received for DAC I: 303436 [EM]<<< [E:31107r M:136667562] (S) Msg TX to 0:FFFFFFFB00000000 [0000] --- Type 0001:09 (IM:InvokeCommandResponse) I: 303437 [IN](https://github.com/openthread/openthread/discussions/S) Sending msg 136667562 on secure session with LSID: 8143 I: 303610 [EM]>>> [E:31108r M:4996501] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0001:08 (IM:InvokeCommandRequest) I: 303612 [ZCL]OpCreds: Received an AttestationRequest command I: 303644 [ZCL]OpCreds: AttestationRequest successful. I: 303649 [EM]<<< [E:31108r M:136667563] (S) Msg TX to 0:FFFFFFFB00000000 [0000] --- Type 0001:09 (IM:InvokeCommandResponse) I: 303650 [IN](https://github.com/openthread/openthread/discussions/S) Sending msg 136667563 on secure session with LSID: 8143 I: 303917 [EM]>>> [E:31109r M:4996502] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0001:08 (IM:InvokeCommandRequest) I: 303919 [FS]GeneralCommissioning: Received ArmFailSafe (60s) I: 303921 [EM]<<< [E:31109r M:136667564] (S) Msg TX to 0:FFFFFFFB00000000 [0000] --- Type 0001:09 (IM:InvokeCommandResponse) I: 303923 [IN](https://github.com/openthread/openthread/discussions/S) Sending msg 136667564 on secure session with LSID: 8143 I: 306137 [EM]>>> [E:31110r M:4996503] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0001:08 (IM:InvokeCommandRequest) I: 306139 [ZCL]OpCreds: Received a CSRRequest command I: 306338 [ZCL]OpCreds: AllocatePendingOperationalKey succeeded I: 306370 [ZCL]OpCreds: CSRRequest successful. I: 306373 [EM]<<< [E:31110r M:136667565] (S) Msg TX to 0:FFFFFFFB00000000 [0000] --- Type 0001:09 (IM:InvokeCommandResponse) I: 306374 [IN](https://github.com/openthread/openthread/discussions/S) Sending msg 136667565 on secure session with LSID: 8143 E: 306376 [DL]Long dispatch time: 240 ms, for event type 16388 I: 306738 [EM]>>> [E:31111r M:4996504] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0001:08 (IM:InvokeCommandRequest) I: 306740 [ZCL]OpCreds: Received an AddTrustedRootCertificate command I: 306799 [ZCL]OpCreds: AddTrustedRootCertificate successful. I: 306801 [EM]<<< [E:31111r M:136667566] (S) Msg TX to 0:FFFFFFFB00000000 [0000] --- Type 0001:09 (IM:InvokeCommandResponse) I: 306803 [IN](https://github.com/openthread/openthread/discussions/S) Sending msg 136667566 on secure session with LSID: 8143 I: 307039 [EM]>>> [E:31112r M:4996505] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0001:08 (IM:InvokeCommandRequest) I: 307041 [ZCL]OpCreds: Received an AddNOC command I: 307045 [FP]Validating NOC chain I: 307104 [FP]NOC chain validation successful I: 307105 [FP]Added new fabric at index: 0x1 I: 307105 [FP]Assigned compressed fabric ID: 0x0F13E60B764CCA33, node ID: 0x00000000D22D0399 I: 307107 [TS]Last Known Good Time: 2023-03-09T08:43:41 I: 307107 [TS]New proposed Last Known Good Time: 2023-03-14T04:35:57 I: 307108 [TS]Updating pending Last Known Good Time to 2023-03-14T04:35:57 I: 307131 [ZCL]OpCreds: ACL entry created for Fabric index 0x1 CASE Admin Subject 0x52A344CD8DC3F715 I: 307132 [DIS]Advertise operational node 0F13E60B764CCA33-00000000D22D0399 I: 307134 [ZCL]OpCreds: successfully created fabric index 0x1 via AddNOC I: 307136 [EM]<<< [E:31112r M:136667567] (S) Msg TX to 1:FFFFFFFB00000000 [CA33] --- Type 0001:09 (IM:InvokeCommandResponse) I: 307137 [IN](https://github.com/openthread/openthread/discussions/S) Sending msg 136667567 on secure session with LSID: 8143 E: 307138 [DL]Long dispatch time: 102 ms, for event type 16388 I: 307218 [EM]>>> [E:31113r M:4996506] (S) Msg RX from 1:FFFFFFFB00000000 [CA33] --- Type 0001:08 (IM:InvokeCommandRequest) I: 307227 [EM]<<< [E:31113r M:136667568] (S) Msg TX to 1:FFFFFFFB00000000 [CA33] --- Type 0001:09 (IM:InvokeCommandResponse) I: 307228 [IN](https://github.com/openthread/openthread/discussions/S) Sending msg 136667568 on secure session with LSID: 8143 I: 307338 [EM]>>> [E:31114r M:4996507] (S) Msg RX from 1:FFFFFFFB00000000 [CA33] --- Type 0001:08 (IM:InvokeCommandRequest) I: 309069 [DL]SRP Client was started, detected server: fd0b:9776:80bd:0000:d41b:8f9a:05b4:83c7 I: 309076 [EM]<<< [E:31114r M:136667569] (S) Msg TX to 1:FFFFFFFB00000000 [CA33] --- Type 0001:09 (IM:InvokeCommandResponse) I: 309078 [IN](https://github.com/openthread/openthread/discussions/S) Sending msg 136667569 on secure session with LSID: 8143 I: 309079 [DIS]Advertise operational node 0F13E60B764CCA33-00000000D22D0399 I: 309080 [SVR]Operational advertising enabled I: 310033 [DIS]Setting operational delegate post init I: 310033 [DIS]Updating services using commissioning mode 0 I: 310034 [DIS]Advertise operational node 0F13E60B764CCA33-00000000D22D0399 I: 310036 [DL]advertising srp service: 0F13E60B764CCA33-00000000D22D0399._matter._tcp I: 310039 [DIS]Advertise commission parameter vendorID=65521 productID=32769 discriminator=3840/15 cm=0 I: 310041 [DL]advertising srp service: 022D169D4ED61DD1._matterc._udp I: 311640 [EM]>>> [E:31115r M:81400260] (U) Msg RX from 0:403625E96DBD5A13 [0000] --- Type 0000:30 (SecureChannel:CASE_Sigma1) I: 311641 [[IN](https://github.com/openthread/openthread/discussions/U)]CASE Server received Sigma1 message. Starting handshake. EC 0x20004920 I: 311642 [[IN](https://github.com/openthread/openthread/discussions/U)]CASE Server disabling CASE session setups I: 311644 [EM]<<< [E:31115r M:2660913 (Ack:81400260)] (U) Msg TX to 0:0000000000000000 [0000] --- Type 0000:10 (SecureChannel:StandaloneAck) I: 311645 [IN](https://github.com/openthread/openthread/discussions/U) Sending msg 2660913 to IP address 'UDP:[fd87:f4a6:e613:4d2c:82b:171c:fed6:5d99]:51634' I: 311647 [SC]Received Sigma1 msg I: 311653 [SC]CASE matched destination ID: fabricIndex 1, NodeID 0x00000000D22D0399 I: 311883 [EM]<<< [E:31115r M:2660914 (Ack:81400260)] (U) Msg TX to 0:0000000000000000 [0000] --- Type 0000:31 (SecureChannel:CASE_Sigma2) I: 311885 [IN](https://github.com/openthread/openthread/discussions/U) Sending msg 2660914 to IP address 'UDP:[fd87:f4a6:e613:4d2c:82b:171c:fed6:5d99]:51634' I: 311887 [SC]Sent Sigma2 msg I: 312031 [EM]>>> [E:31115r M:81400261 (Ack:2660914)] (U) Msg RX from 0:403625E96DBD5A13 [0000] --- Type 0000:40 (SecureChannel:StatusReport) E: 312033 [SC]Received error (protocol code 2) during pairing process: 54 E: 312034 [[IN](https://github.com/openthread/openthread/discussions/U)]CASE Session establishment failed: 54 I: 312035 [EM]<<< [E:31115r M:2660915 (Ack:81400261)] (U) Msg TX to 0:0000000000000000 [0000] --- Type 0000:10 (SecureChannel:StandaloneAck) I: 312036 [IN](https://github.com/openthread/openthread/discussions/U) Sending msg 2660915 to IP address 'UDP:[fd87:f4a6:e613:4d2c:82b:171c:fed6:5d99]:51634' I: 312039 [IN]CASE Server enabling CASE session setups I: 312280 [EM]>>> [E:31116r M:81400262] (U) Msg RX from 0:461BEBD62DE29576 [0000] --- Type 0000:30 (SecureChannel:CASE_Sigma1) I: 312282 [IN]CASE Server received Sigma1 message. Starting handshake. EC 0x20004920 I: 312283 [IN]CASE Server disabling CASE session setups I: 312284 [EM]<<< [E:31116r M:2660916 (Ack:81400262)] (U) Msg TX to 0:0000000000000000 [0000] --- Type 0000:10 (SecureChannel:StandaloneAck) I: 312285 IN Sending msg 2660916 to IP address 'UDP:[fd87:f4a6:e613:4d2c:82b:171c:fed6:5d99]:51634' I: 312287 [SC]Received Sigma1 msg I: 312293 [SC]CASE matched destination ID: fabricIndex 1, NodeID 0x00000000D22D0399 I: 312524 [EM]<<< [E:31116r M:2660917 (Ack:81400262)] (U) Msg TX to 0:0000000000000000 [0000] --- Type 0000:31 (SecureChannel:CASE_Sigma2) I: 312525 IN Sending msg 2660917 to IP address 'UDP:[fd87:f4a6:e613:4d2c:82b:171c:fed6:5d99]:51634' I: 312528 [SC]Sent Sigma2 msg I: 312753 [EM]>>> [E:31116r M:81400263 (Ack:2660917)] (U) Msg RX from 0:461BEBD62DE29576 [0000] --- Type 0000:40 (SecureChannel:StatusReport) E: 312755 [SC]Received error (protocol code 2) during pairing process: 54 E: 312756 [IN]CASE Session establishment failed: 54 I: 312757 [EM]<<< [E:31116r M:2660918 (Ack:81400263)] (U) Msg TX to 0:0000000000000000 [0000] --- Type 0000:10 (SecureChannel:StandaloneAck) I: 312758 IN Sending msg 2660918 to IP address 'UDP:[fd87:f4a6:e613:4d2c:82b:171c:fed6:5d99]:51634' I: 312760 [IN]CASE Server enabling CASE session setups I: 363920 [FS]Fail-safe timer expired E: 363920 [SVR]Failsafe timer expired I: 363921 [SC]SecureSession[0x20002fa0]: Moving from state 'kActive' --> 'kPendingEviction' E: 363922 [SVR]Commissioning failed (attempt 1): 32 I: 363923 [BLE]Releasing end point's BLE connection back to application. I: 363923 [DL]Closing BLE GATT connection (ConnId 00) I: 363928 [DIS]Updating services using commissioning mode 1 I: 363928 [DIS]Advertise operational node 0F13E60B764CCA33-00000000D22D0399 I: 363931 [DIS]Advertise commission parameter vendorID=65521 productID=32769 discriminator=3840/15 cm=1 I: 363933 [DL]advertising srp service: 022D169D4ED61DD1._matterc._udp E: 363934 [ZCL]OpCreds: Got FailSafeTimerExpired E: 363934 [ZCL]OpCreds: Proceeding to FailSafeCleanup on fail-safe expiry! E: 363935 [FP]Reverting pending fabric data for fabric 0x1 E: 363937 [FP]Warning: metadata not found during delete of fabric 0x1 I: 363967 [FP]Fabric (0x1) deleted. I: 363968 [ZCL][OnFabricRemoved] Handling a fabric removal from the door lock server [endpointId=1,fabricIndex=1] E: 363969 [ZCL]Failed to read DoorLock attribute: attribute=0x11, status=0x86 E: 363970 [ZCL][OnFabricRemoved] Unable to cleanup fabric from users - internal error [endpointId=1,fabricIndex=1] E: 363971 [ZCL]Unable to handle fabric removal from the Door Lock Server instance [endpointId=1,fabricIndex=1] I: 364010 [ZCL]UserLabel: Last Fabric index 0x1 was removed I: 364011 [ZCL]OpCreds: Fabric index 0x1 was removed I: 364142 [TS]Pending Last Known Good Time: 2023-03-14T04:35:57 I: 364144 [TS]Previous Last Known Good Time: 2023-03-09T08:43:41 I: 364145 [TS]Reverted Last Known Good Time to previous value E: 364147 [FP]Warning: metadata not found during delete of fabric 0x1 E: 364151 [ZCL]OpCreds: failed to delete fabric at index 1: d8 I: 364153 [NP]Reverting Thread operational dataset E: 364163 [DL]Long dispatch time: 243 ms, for event type 32782 I: 364164 [FS]Fail-safe cleanly disarmed I: 364167 [DL]BLE GAP connection terminated (reason 0x16) I: 364168 [DL]Current number of connections: 0/2 I: 364171 [DL]CHIPoBLE advertising started I: 394171 [DL]CHIPoBLE advertising mode changed to slow ```
bzbarsky-apple commented 1 year ago

What seems to be happening is the CASE handshake fails after the device is on the Thread network. This part from the log:

I: 312528 [SC]Sent Sigma2 msg
I: 312753 [EM]>>> [E:31116r M:81400263 (Ack:2660917)] (U) Msg RX from 0:461BEBD62DE29576 [0000] --- Type 0000:40 (SecureChannel:StatusReport)
E: 312755 [SC]Received error (protocol code 2) during pairing process: 54

where 0x54 is CHIP_ERROR_INVALID_CASE_PARAMETER.

@392625227 What SHA is the Thread device version of Matter built from? Can you commission that device using command-line chip-tool (if you pass it the right Thread credentials)?

392625227 commented 1 year ago

After a few weeks of studying, I finally figured out some problems.

The first question, webUI is a web tool used to manage thread devices on otbr (open thread board router), through the join button can see the thread PAN ID of the matter device, such as Apple TV box has established a thread network, assuming you know PSK, you can join this network. Unfortunately, I don't know how to get Apple TV Box's thread network PSK. The second problem, compiled with matter/example/lighting-app/nrfconnect, burned on nrf52840dongles, can already be well controlled by Apple HomeKit. The original problem was that the connection process only needed to ensure that the matter device, Apple TV box, iPhone, all three must be in close range, keep the wireless communication signal good, and connect well to the Internet. When adding a new matter device to your iPhone, enter the QR code, 20202021, 34970112332, all three ways ok.