fix(cluster_select): gate Thread clusters on OPENTHREAD_ENABLED (CON-1993)#1726
Merged
espressif-bot merged 1 commit intoMar 3, 2026
Conversation
The three Thread-related clusters (Thread Network Diagnostics, Thread Border Router Management, Thread Network Directory) default to enabled regardless of whether OpenThread is present. On WiFi-only devices this causes the clusters to be registered on the root node endpoint, but read requests fail with CHIP_ERROR_NOT_IMPLEMENTED because CHIP_DEVICE_CONFIG_ENABLE_THREAD is disabled, producing noisy DMG errors like: E chip[DMG]: Fail to retrieve data ... clusterId: 0x0000_0035 err = 2d Add `depends on OPENTHREAD_ENABLED` so these clusters are only available when the Thread stack is actually present.
wqx6
approved these changes
Feb 25, 2026
shubhamdp
approved these changes
Feb 26, 2026
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.
Summary
depends on OPENTHREAD_ENABLEDto the three Thread-related cluster Kconfig entries (Thread Network Diagnostics, Thread Border Router Management, Thread Network Directory) so they are only enabled when OpenThread is presentgenerate_cluster_select_files.pyto emit the dependency for Thread clusters when regeneratingProblem
On WiFi-only devices (e.g. ESP32-S3),
CONFIG_SUPPORT_THREAD_NETWORK_DIAGNOSTICS_CLUSTERand the other two Thread cluster configs default toyunconditionally. This causes the clusters to be created on the root node endpoint, but sinceCHIP_DEVICE_CONFIG_ENABLE_THREADis disabled, attribute reads fail withCHIP_ERROR_NOT_IMPLEMENTED(error 0x2d). This produces noisy errors during Matter subscription:The errors are harmless (controllers handle the status responses), but they indicate unnecessary cluster registration and produce ~17 error lines on every subscription.
Fix
The generated
Kconfig.inentries for the three Thread clusters now includedepends on OPENTHREAD_ENABLED, so they can only be enabled when the OpenThread stack is actually available. On WiFi-only targets, the clusters won't be registered and controllers won't attempt to read their attributes.Test plan
0x0035DMG errors appearCONFIG_OPENTHREAD_ENABLED=y) — confirm Thread clusters are still created and functional