app_main: enable SRP auto-host-address to fix Thread commissioning#41
Merged
app_main: enable SRP auto-host-address to fix Thread commissioning#41
Conversation
The SRP client gets stuck in "Updated" state and never sends its SRP Update to the OTBR. Without an SRP Update, the OTBR never proxies the _matter._tcp record to mDNS, HA's matter-server cannot locate the device for CASE, and the FailSafe timer expires (t=200.6s), rolling back the entire commissioning (Thread dataset + NOC). Root cause: on ESP32 with WiFi present in the build (even when disabled via CONFIG_ENABLE_WIFI_STATION=n), the CHIP SDK does not reliably call otSrpClientSetHostAddresses() after Thread attaches. The SRP client has the _matter._tcp service queued but its host object has zero addresses, so OpenThread never transmits the SRP Update. Fix: call otSrpClientEnableAutoHostAddress() once on the CHIP/OpenThread task immediately after esp_matter::start(). This puts the SRP client into auto-host-address mode: OpenThread itself watches the Thread netif for address changes and keeps the SRP host addresses current, removing the dependency on the CHIP SDK calling otSrpClientSetHostAddresses() at the right moment. https://claude.ai/code/session_01SxqAiQApiRTwXefk9aQ6bR
…nce() esp_openthread_get_instance() is declared in the ESP-IDF OpenThread component header <esp_openthread.h>, not in the CHIP SDK's OpenthreadLauncher.h. Fixes the build error introduced in the previous SRP workaround commit. https://claude.ai/code/session_01SxqAiQApiRTwXefk9aQ6bR
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The SRP client gets stuck in "Updated" state and never sends its SRP Update to the OTBR. Without an SRP Update, the OTBR never proxies the _matter._tcp record to mDNS, HA's matter-server cannot locate the device for CASE, and the FailSafe timer expires (t=200.6s), rolling back the entire commissioning (Thread dataset + NOC).
Root cause: on ESP32 with WiFi present in the build (even when disabled via CONFIG_ENABLE_WIFI_STATION=n), the CHIP SDK does not reliably call otSrpClientSetHostAddresses() after Thread attaches. The SRP client has the _matter._tcp service queued but its host object has zero addresses, so OpenThread never transmits the SRP Update.
Fix: call otSrpClientEnableAutoHostAddress() once on the CHIP/OpenThread task immediately after esp_matter::start(). This puts the SRP client into auto-host-address mode: OpenThread itself watches the Thread netif for address changes and keeps the SRP host addresses current, removing the dependency on the CHIP SDK calling otSrpClientSetHostAddresses() at the right moment.
https://claude.ai/code/session_01SxqAiQApiRTwXefk9aQ6bR