Hi,
When add Homekit using the Matter Template(SDK V2.8.0) routine on the NRF52840DK development board, Homekit displays a final result of failed pairing with accessories. The Matter light_switch routine can be used to join Homekit normally. Below is the log message when you join Homekit using the Matter Template. Please help to analyze the reason. How to resolve it?
uart:~$ *** Booting My Application v2.8.0-3dfad874319c *** *** Using nRF Connect SDK v2.8.0-a2386bfc8401 *** *** Using Zephyr OS v3.7.99-0bc3393fb112 *** I: 36 [DL]BLE address: C3:74:92:03:D9:65 I: 46 [DL]CHIP task running I: Init CHIP stack I: 52 [DL]OpenThread started: OK I: 55 [DL]Setting OpenThread device type to MINIMAL END DEVICE D: Registered new test event: 0xffffffff00000000 D: Registered new test event: 0xffffffff10000000 I: 70 [SVR]Subscription persistence not supported I: 74 [SVR]Server initializing... I: 77 [TS]Last Known Good Time: 2023-10-14T01:16:48 I: 83 [DMG]AccessControl: initializing I: 86 [DMG]Examples::AccessControlDelegate::Init I: 90 [DMG]AccessControl: setting I: 93 [DMG]DefaultAclStorage: initializing I: 97 [DMG]DefaultAclStorage: 0 entries loaded D: 101 [IN]UDP::Init bind&listen port=5540 E: 105 [IN]IPV6_PKTINFO failed: 109 D: 109 [IN]UDP::Init bound to port=5540 D: 112 [IN]BLEBase::Init - setting/overriding transport D: 117 [IN]TransportMgr initialized D: 124 [DL]Using Thread extended MAC for hostname. I: 130 [ZCL]Using ZAP configuration... I: 134 [DMG]AccessControlCluster: initializing D: 138 [DL]Boot reason: 1 I: 141 [ZCL]Initiating Admin Commissioning cluster. D: 146 [IN]SecureSession[0x20003648]: Allocated Type:1 LSID:48109 D: 152 [DL]CHIPoBLE advertising set to on I: 156 [DIS]Updating services using commissioning mode 1 E: 161 [DIS]Failed to remove advertised services: 3 D: 165 [DL]Using Thread extended MAC for hostname. I: 170 [DIS]Advertise commission parameter vendorID=65521 productID=32768 discriminator=3840/15 cm=1 cp=0 E: 179 [DIS]Failed to advertise commissionable node: 3 E: 184 [DIS]Failed to finalize service update: 3 I: 189 [DIS]Updating services using commissioning mode 1 E: 194 [DIS]Failed to remove advertised services: 3 D: 198 [DL]Using Thread extended MAC for hostname. I: 203 [DIS]Advertise commission parameter vendorID=65521 productID=32768 discriminator=3840/15 cm=1 cp=0 E: 212 [DIS]Failed to advertise commissionable node: 3 E: 217 [DIS]Failed to finalize service update: 3 I: 221 [IN]CASE Server enabling CASE session setups D: 226 [IN]SecureSession[0x20003718]: Allocated Type:2 LSID:48110 I: 232 [SVR]Joining Multicast groups I: 236 [SVR]Server Listening... I: 239 [DL]Device Configuration: I: 242 [DL] Serial Number: 11223344556677889900 I: 246 [DL] Vendor Id: 65521 (0xFFF1) I: 249 [DL] Product Id: 32768 (0x8000) I: 253 [DL] Product Name: not-specified I: 257 [DL] Hardware Version: 0 I: 260 [DL] Setup Pin Code (0 for UNKNOWN/ERROR): 20202021 I: 265 [DL] Setup Discriminator (0xFFFF for UNKNOWN/ERROR): 3840 (0xF00) I: 271 [DL] Manufacturing Date: 2022-01-01 I: 275 [DL] Device Type: 65535 (0xFFFF) I: 279 [SVR]SetupQRCode: [MT:Y.K9042C00KA0648G00] I: 283 [SVR]Copy/paste the below URL in a browser to see the QR Code: I: 290 [SVR]https://project-chip.github.io/connectedhomeip/qrcode.html?data=MT%3AY.K9042C00KA0648G00 I: 299 [SVR]Manual pairing code: [34970112332] E: 303 [DL]Long dispatch time: 254 ms, for event type 2 I: 310 [DL]CHIPoBLE advertising started I: 30314 [DL]CHIPoBLE advertising mode changed to slow I: 30320 [DL]CHIPoBLE advertising started
I: 151231 [DL]Current number of connections: 1/1 I: 151236 [DL]BLE connection established (ConnId: 0x00) I: 151241 [DL]CHIPoBLE advertising stopped D: 152051 [DL]Write request received for CHIPoBLE RX characteristic (ConnId 0x00) I: 152058 [BLE]local and remote recv window sizes = 5 I: 152063 [BLE]selected BTP version 4 I: 152066 [BLE]using BTP fragment sizes rx 244 / tx 244. D: 152171 [DL]ConnId: 0x00, New CCCD value: 0x0002 D: 152176 [DL]Sending indication for CHIPoBLE TX characteristic (ConnId 00, len 6) D: 152183 [IN]BLE EndPoint 0x2000d1b8 Connection Complete I: 152188 [DL]CHIPoBLE connection established (ConnId: 0x00, GATT MTU: 247) D: 152261 [DL]Indication for CHIPoBLE TX characteristic done (ConnId 0x00, result 0x00) D: 152292 [DL]Write request received for CHIPoBLE RX characteristic (ConnId 0x00) I: 152300 [EM]>>> [E:63484r S:0 M:67664660] (U) Msg RX from 0:9D675177EA9E49D1 [0000] --- Type 0000:20 (SecureChannel:PBKDFParamRequest) I: 152313 [EM]<<< [E:63484r S:0 M:121399990] (U) Msg TX to 0:0000000000000000 [0000] [BLE] --- Type 0000:21 (SecureChannel:PBKDFParamResponse) D: 152326 [DL]Sending indication for CHIPoBLE TX characteristic (ConnId 00, len 159) I: 152333 [SVR]Commissioning session establishment step started D: 152381 [DL]Indication for CHIPoBLE TX characteristic done (ConnId 0x00, result 0x00) D: 152389 [DL]Write request received for CHIPoBLE RX characteristic (ConnId 0x00) I: 152397 [EM]>>> [E:63484r S:0 M:67664661] (U) Msg RX from 0:9D675177EA9E49D1 [0000] --- Type 0000:22 (SecureChannel:PASE_Pake1) I: 152537 [EM]<<< [E:63484r S:0 M:121399991] (U) Msg TX to 0:0000000000000000 [0000] [BLE] --- Type 0000:23 (SecureChannel:PASE_Pake2) D: 152549 [DL]Sending indication for CHIPoBLE TX characteristic (ConnId 00, len 132) E: 152557 [DL]Long dispatch time: 168 ms, for event type 16388 D: 152591 [DL]Indication for CHIPoBLE TX characteristic done (ConnId 0x00, result 0x00) D: 152599 [DL]Write request received for CHIPoBLE RX characteristic (ConnId 0x00) I: 152607 [EM]>>> [E:63484r S:0 M:67664662] (U) Msg RX from 0:9D675177EA9E49D1 [0000] --- Type 0000:24 (SecureChannel:PASE_Pake3) I: 152619 [EM]<<< [E:63484r S:0 M:121399992] (U) Msg TX to 0:0000000000000000 [0000] [BLE] --- Type 0000:40 (SecureChannel:StatusReport) D: 152631 [DL]Sending indication for CHIPoBLE TX characteristic (ConnId 00, len 35) I: 152641 [SC]SecureSession[0x20003648, LSID:48109]: State change 'kEstablishing' --> 'kActive' D: 152649 [IN]SecureSession[0x20003648]: Activated - Type:1 LSID:48109 D: 152656 [IN]New secure session activated for device <FFFFFFFB00000000, 0>, LSID:48109 PSID:32309! I: 152665 [SVR]Commissioning completed session establishment step I: 152671 [DIS]Updating services using commissioning mode 0 E: 152676 [DIS]Failed to remove advertised services: 3 E: 152681 [DIS]Failed to finalize service update: 3 D: 152686 [DL]CHIPoBLE advertising set to off I: 152690 [SVR]Device completed Rendezvous process D: 152726 [DL]Indication for CHIPoBLE TX characteristic done (ConnId 0x00, result 0x00) D: 152786 [DL]Write request received for CHIPoBLE RX characteristic (ConnId 0x00) I: 152794 [EM]>>> [E:63485r S:48109 M:77732658] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0001:02 (IM:ReadRequest) D: 152805 [IM]Received Read request I: 152810 [EM]<<< [E:63485r S:48109 M:65228770] (S) Msg TX to 0:FFFFFFFB00000000 [0000] [BLE] --- Type 0001:05 (IM:ReportData) D: 152821 [DL]Sending indication for CHIPoBLE TX characteristic (ConnId 00, len 71) D: 152966 [DL]Indication for CHIPoBLE TX characteristic done (ConnId 0x00, result 0x00) D: 152974 [DL]Write request received for CHIPoBLE RX characteristic (ConnId 0x00) I: 152982 [EM]>>> [E:63486r S:48109 M:77732659] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0001:02 (IM:ReadRequest) D: 152993 [IM]Received Read request I: 152998 [EM]<<< [E:63486r S:48109 M:65228771] (S) Msg TX to 0:FFFFFFFB00000000 [0000] [BLE] --- Type 0001:05 (IM:ReportData) D: 153010 [DL]Sending indication for CHIPoBLE TX characteristic (ConnId 00, len 91) D: 153086 [DL]Indication for CHIPoBLE TX characteristic done (ConnId 0x00, result 0x00) D: 153094 [DL]Write request received for CHIPoBLE RX characteristic (ConnId 0x00) I: 153102 [EM]>>> [E:63487r S:48109 M:77732660] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0001:02 (IM:ReadRequest) D: 153113 [IM]Received Read request I: 153118 [EM]<<< [E:63487r S:48109 M:65228772] (S) Msg TX to 0:FFFFFFFB00000000 [0000] [BLE] --- Type 0001:05 (IM:ReportData) D: 153129 [DL]Sending indication for CHIPoBLE TX characteristic (ConnId 00, len 72) D: 153206 [DL]Indication for CHIPoBLE TX characteristic done (ConnId 0x00, result 0x00) D: 153214 [DL]Write request received for CHIPoBLE RX characteristic (ConnId 0x00) I: 153222 [EM]>>> [E:63488r S:48109 M:77732661] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0001:02 (IM:ReadRequest) D: 153233 [IM]Received Read request I: 153238 [EM]<<< [E:63488r S:48109 M:65228773] (S) Msg TX to 0:FFFFFFFB00000000 [0000] [BLE] --- Type 0001:05 (IM:ReportData) D: 153249 [DL]Sending indication for CHIPoBLE TX characteristic (ConnId 00, len 71) D: 153326 [DL]Indication for CHIPoBLE TX characteristic done (ConnId 0x00, result 0x00) D: 153334 [DL]Write request received for CHIPoBLE RX characteristic (ConnId 0x00) I: 153342 [EM]>>> [E:63489r S:48109 M:77732662] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0001:02 (IM:ReadRequest) D: 153353 [IM]Received Read request I: 153358 [EM]<<< [E:63489r S:48109 M:65228774] (S) Msg TX to 0:FFFFFFFB00000000 [0000] [BLE] --- Type 0001:05 (IM:ReportData) D: 153369 [DL]Sending indication for CHIPoBLE TX characteristic (ConnId 00, len 72) D: 153446 [DL]Indication for CHIPoBLE TX characteristic done (ConnId 0x00, result 0x00) D: 153454 [DL]Write request received for CHIPoBLE RX characteristic (ConnId 0x00) I: 153463 [EM]>>> [E:63490r S:48109 M:77732663] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0001:02 (IM:ReadRequest) D: 153474 [IM]Received Read request I: 153483 [EM]<<< [E:63490r S:48109 M:65228775] (S) Msg TX to 0:FFFFFFFB00000000 [0000] [BLE] --- Type 0001:05 (IM:ReportData) D: 153494 [DL]Sending indication for CHIPoBLE TX characteristic (ConnId 00, len 244) D: 153566 [DL]Indication for CHIPoBLE TX characteristic done (ConnId 0x00, result 0x00) D: 153574 [DL]Sending indication for CHIPoBLE TX characteristic (ConnId 00, len 21) D: 153686 [DL]Indication for CHIPoBLE TX characteristic done (ConnId 0x00, result 0x00) D: 153694 [DL]Write request received for CHIPoBLE RX characteristic (ConnId 0x00) I: 153703 [EM]>>> [E:63491r S:48109 M:77732664] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0001:02 (IM:ReadRequest) D: 153713 [IM]Received Read request I: 153721 [EM]<<< [E:63491r S:48109 M:65228776] (S) Msg TX to 0:FFFFFFFB00000000 [0000] [BLE] --- Type 0001:05 (IM:ReportData) D: 153732 [DL]Sending indication for CHIPoBLE TX characteristic (ConnId 00, len 185) D: 153806 [DL]Indication for CHIPoBLE TX characteristic done (ConnId 0x00, result 0x00) D: 153814 [DL]Write request received for CHIPoBLE RX characteristic (ConnId 0x00) I: 153822 [EM]>>> [E:63492r S:48109 M:77732665] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0001:08 (IM:InvokeCommandRequest) I: 153835 [FS]GeneralCommissioning: Received ArmFailSafe (60s) I: 153842 [EM]<<< [E:63492r S:48109 M:65228777] (S) Msg TX to 0:FFFFFFFB00000000 [0000] [BLE] --- Type 0001:09 (IM:InvokeCommandResponse) D: 153854 [DL]Sending indication for CHIPoBLE TX characteristic (ConnId 00, len 71) D: 153926 [DL]Indication for CHIPoBLE TX characteristic done (ConnId 0x00, result 0x00) D: 153934 [DL]Write request received for CHIPoBLE RX characteristic (ConnId 0x00) I: 153942 [EM]>>> [E:63493r S:48109 M:77732666] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0001:08 (IM:InvokeCommandRequest) I: 153956 [EM]<<< [E:63493r S:48109 M:65228778] (S) Msg TX to 0:FFFFFFFB00000000 [0000] [BLE] --- Type 0001:09 (IM:InvokeCommandResponse) D: 153968 [DL]Sending indication for CHIPoBLE TX characteristic (ConnId 00, len 71) D: 154046 [DL]Indication for CHIPoBLE TX characteristic done (ConnId 0x00, result 0x00) D: 154054 [DL]Write request received for CHIPoBLE RX characteristic (ConnId 0x00) I: 154062 [EM]>>> [E:63494r S:48109 M:77732667] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0001:08 (IM:InvokeCommandRequest) I: 154075 [ZCL]OpCreds: Certificate Chain request received for PAI I: 154084 [EM]<<< [E:63494r S:48109 M:65228779] (S) Msg TX to 0:FFFFFFFB00000000 [0000] [BLE] --- Type 0001:09 (IM:InvokeCommandResponse) D: 154096 [DL]Sending indication for CHIPoBLE TX characteristic (ConnId 00, len 244) D: 154166 [DL]Indication for CHIPoBLE TX characteristic done (ConnId 0x00, result 0x00) D: 154174 [DL]Sending indication for CHIPoBLE TX characteristic (ConnId 00, len 244) D: 154286 [DL]Indication for CHIPoBLE TX characteristic done (ConnId 0x00, result 0x00) D: 154294 [DL]Sending indication for CHIPoBLE TX characteristic (ConnId 00, len 48) D: 154406 [DL]Indication for CHIPoBLE TX characteristic done (ConnId 0x00, result 0x00) D: 154414 [DL]Write request received for CHIPoBLE RX characteristic (ConnId 0x00) I: 154422 [EM]>>> [E:63495r S:48109 M:77732668] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0001:08 (IM:InvokeCommandRequest) I: 154435 [ZCL]OpCreds: Certificate Chain request received for DAC I: 154444 [EM]<<< [E:63495r S:48109 M:65228780] (S) Msg TX to 0:FFFFFFFB00000000 [0000] [BLE] --- Type 0001:09 (IM:InvokeCommandResponse) D: 154456 [DL]Sending indication for CHIPoBLE TX characteristic (ConnId 00, len 244) D: 154526 [DL]Indication for CHIPoBLE TX characteristic done (ConnId 0x00, result 0x00) D: 154533 [DL]Sending indication for CHIPoBLE TX characteristic (ConnId 00, len 244)