I am using the MatterSupport extension to commission devices for my own ecosystem. I use the extension to do the initial connection to the device (BLE, PASE, bring device onto wifi/thread) and then use the method
commissionDevice(in home: MatterAddDeviceRequest.Home?, onboardingPayload: String, commissioningID: UUID)
in MatterAddDeviceExtensionRequestHandler to send a request to my own hub on the local network where it then connects to the device via wifi/thread and fully commissions the device. This flow is working correctly for wifi enabled devices, however it fails for thread devices. For some context, I am using my own border router (and have already added the router's credentials to the phone using THClient's storeCredentials). Here are some device-specific results:
- ESP32 (WIFI): successful commission
- ESP32 (THREAD): failure
- Matter Certified ONVIS smart plug (THREAD): failure
The ESP32's are running espressif matter examples. Example border router is a running OTBR docker container
I believe that the entire PASE session is established and the device gets onto the thread network, but the process seems to stall after that. I have verified that selectThreadNetwork(...)
and validateDeviceCredential(...)
get called but the commissioning process seems to stall before it can get to commissionDevice(...)
I am limited to 7k characters, but I'll try to include as many relevant log lines as I can near the error if anyone has any ideas. I've already created a bug report with ID: FB18985348 which includes the full logs from the esp32 and a sysdiagnose from an iPhone 12 Pro (iOS 18.5) using the following log profiles:
- Home app/HomeKit
- HomeThread
- ThreadNetwork
When commissioning directly from my hub, the entire commissioning completes successfully 100% of the time. This failure only happens when I use MatterSupport to initiate commissioning for Matter over Thread devices specifically.
Very condensed homed log overview for uncertified ESP32 thread example
Next: 'SecurePairing' -> 'ReadCommissioningInfo'
Step: 'ReadCommissioningInfo'
Sending read requests for commissioning information
NetworkCommissioning Features: has Thread. endpointid = 0
<MTRDeviceController_Concrete: ..., uuid: F9BB9F53-BF73-4B82-B00B-045E7709530E...> completed for nodeID 0x0000000055d193ec with status: Success
✔ 'ReadCommissioningInfo'
Next: 'ReadCommissioningInfo' -> 'ArmFailSafe'
Step: 'ArmFailSafe'
✔ 'ArmFailSafe'
Next: 'ArmFailSafe' -> 'ConfigRegulatory'
Step: 'ConfigRegulatory'
✔ 'ConfigRegulatory'
Next: 'ConfigRegulatory' -> 'ConfigureTCAcknowledgments'
Step: 'ConfigureTCAcknowledgments'
✔ 'ConfigureTCAcknowledgments'
Next: 'ConfigureTCAcknowledgments' -> 'SendPAICertificateRequest'
Step: 'SendPAICertificateRequest'
✔ 'SendPAICertificateRequest'
Next: 'SendPAICertificateRequest' -> 'SendDACCertificateRequest'
Step: 'SendDACCertificateRequest'
✔ 'SendDACCertificateRequest'
Next: 'SendDACCertificateRequest' -> 'SendAttestationRequest'
Step: 'SendAttestationRequest'
✔ 'SendAttestationRequest'
Next: 'SendAttestationRequest' -> 'AttestationVerification'
Step: 'AttestationVerification'
Error on commissioning step 'AttestationVerification': Internal error
Next: 'AttestationVerification' -> 'AttestationRevocationCheck'
Step: 'AttestationRevocationCheck' (with error)
Device attestation error: Integrity check failed.
Continue commissioning (ignore attestation failure: YES)
✔ 'AttestationRevocationCheck'
Next: 'AttestationRevocationCheck' -> 'SendOpCertSigningRequest'
Step: 'SendOpCertSigningRequest'
✔ 'SendOpCertSigningRequest'
Next: 'SendOpCertSigningRequest' -> 'ValidateCSR'
Step: 'ValidateCSR'
✔ 'ValidateCSR'
Next: 'ValidateCSR' -> 'GenerateNOCChain'
Step: 'GenerateNOCChain'
✔ 'GenerateNOCChain'
Step: 'SendTrustedRootCert'
✔ 'SendTrustedRootCert'
Next: 'SendTrustedRootCert' -> 'SendNOC'
Step: 'SendNOC'
✔ 'SendNOC'
Next: 'SendNOC' -> 'ThreadNetworkSetup'
Step: 'ThreadNetworkSetup'
✔ 'ThreadNetworkSetup'
Next: 'ThreadNetworkSetup' -> 'FailsafeBeforeThreadEnable'
Step: 'FailsafeBeforeThreadEnable'
✔ 'FailsafeBeforeThreadEnable'
Next: 'FailsafeBeforeThreadEnable' -> 'ThreadNetworkEnable'
Step: 'ThreadNetworkEnable'
✔ 'ThreadNetworkEnable'
Next: 'ThreadNetworkEnable' -> 'kEvictPreviousCaseSessions'
Step: 'kEvictPreviousCaseSessions'
✔ 'kEvictPreviousCaseSessions'
Next: 'kEvictPreviousCaseSessions' -> 'kFindOperationalForStayActive'
Step: 'kFindOperationalForStayActive'
Error: Timeout
Next: 'kFindOperationalForStayActive' -> 'Cleanup'
Step: 'Cleanup' (with timeout error)
✔ 'Cleanup'
Commissioning complete for node ID 0x0000000055D193EC with timeout error
When commissioning directly from my hub, the entire commissioning completes successfully 100% of the time. This failure only happens when I use MatterSupport to initiate commissioning for Matter over Thread devices specifically.
Unfortunately, there are issues with how Thread is managed by HomeKit in iOS 18 that are making the MatterSupport flow extremely unreliable. Here is what I would recommend:
-
Install the latest beta of iOS 26 on a test device and test again. If you have a home hub as well, then that may need to be updated as well. If it's working there, then that proves the bug is on our side.
-
If it fails on iOS 26, then use the directions in this post to update your bug with all of the required data. Note that if you're using a home hub, you'll need that data from the home hub as well.
__
Kevin Elliott
DTS Engineer, CoreOS/Hardware