Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] chip-tool commissioning ICD device then commissioning non-ICD device will fail #33517

Closed
wilbur-se opened this issue May 19, 2024 · 2 comments · Fixed by #33574
Closed
Assignees
Labels
bug Something isn't working needs triage

Comments

@wilbur-se
Copy link
Contributor

wilbur-se commented May 19, 2024

Reproduction steps

1.run chip-tool under interactive mode
2.pair a ICD device -> OK
3.then pair a non-ICD device -> FAIL

Bug prevalence

always

GitHub hash of the SDK that was being used

matter 1.3

Platform

core

Platform Version(s)

all platform that implement commissioner

Anything else?

From my anaysis, the root cause is no chance to set mNeedIcdRegistration to false (controller/AutoCommissioner.cpp)
When commissioning a ICD device, because ICD cluster exists, mNeedIcdRegistration will be set to true. Following a non-ICD device, mNeedIcdRegistration is still true, then commissioner will go to ICD registration stage. But the regisitration will fail for status UNSUPPORTED_CLUSTER.

One changes to fix maybe:

--- a/src/controller/AutoCommissioner.cpp
+++ b/src/controller/AutoCommissioner.cpp
@@ -752,6 +752,7 @@ CHIP_ERROR AutoCommissioner::CommissioningStepFinished(CHIP_ERROR err, Commissio
 
             if (mParams.GetICDRegistrationStrategy() != ICDRegistrationStrategy::kIgnore)
             {
+                mNeedIcdRegistration = false;
                 if (mDeviceCommissioningInfo.icd.isLIT && mDeviceCommissioningInfo.icd.checkInProtocolSupport)
                 {
                     mNeedIcdRegistration = true;
@wilbur-se wilbur-se added bug Something isn't working needs triage labels May 19, 2024
@yunhanw-google
Copy link
Contributor

#33574

@yunhanw-google
Copy link
Contributor

Thanks for reporting this issue, the above is the PR for issue fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage
Projects
None yet
3 participants