-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Fix the commissiong mode of "commissioning for on-network" usecases #8763
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,6 +69,9 @@ void DeviceCallbacks::DeviceEventCallback(const ChipDeviceEvent * event, intptr_ | |
// connectivity. MDNS still wants to refresh its listening interfaces to include the | ||
// newly selected address. | ||
chip::app::Mdns::StartServer(); | ||
#ifdef RENDEZVOUS_WAIT_FOR_COMMISSIONING_COMPLETE | ||
chip::app::Mdns::AdvertiseCommissionableNode(); | ||
#endif | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Better to do this though a CLI or shell command (similar to option present on M5stack through a button) instead of adding it here? Something like: |
||
} | ||
break; | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -920,6 +920,7 @@ bool GenericConfigurationManagerImpl<ImplClass>::_IsFullyProvisioned() | |
#if CHIP_DEVICE_CONFIG_ENABLE_JUST_IN_TIME_PROVISIONING | ||
(!UseManufacturerCredentialsAsOperational() && _OperationalDeviceCredentialsProvisioned()) && | ||
#endif | ||
(mFlags.Has(Flags::kIsServiceProvisioned) && mFlags.Has(Flags::kOperationalDeviceCredentialsProvisioned)) && | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can someone check if this is the correct thing to do and won't break any other platform? cc @cecille @bzbarsky-apple There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this change still needed now that #8454 has merged? In any case, this does not look right because outside of TestConfigurationMgr it looks to me like There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @bzbarsky-apple , actually this change was added because in the case of On-Network commissioning There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would pretty much assume that any use of Does There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, You are right.. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right. So fundamentally:
|
||
// TODO: Add checks regarding fabric membership (IsMemberOfFabric()) and account pairing (IsPairedToAccount()), | ||
// when functionalities will be implemented. | ||
true; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the actual intent of this change? Why do we want to:
RENDEZVOUS_WAIT_FOR_COMMISSIONING_COMPLETE
, which is generally false?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bzbarsky-apple Intent of this change was to advertise the device as a commissionable node for On-Network Commissioning where
RENDEZVOUS_WAIT_FOR_COMMISSIONING_COMPLETE
is set.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know what the code is doing. The question is why we want to advertise the device in that way exactly when that compile-time constant is set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IsServiceProvisioned is legacy from OpenWeave data and the "service" provisioning data should not be touched/used.
RENDEZVOUS_WAIT_FOR_COMMISSIONING_COMPLETE
should not be the gate. It's very clear what should cause commissionable for "already on network": an uncommissioned device but already connected to an IP network (e.g. Thread, Wifi, Ethernet) through non-Matter means, or a device already commissioned after receiving a request to open a commissioning window.An commissioned device should not be advertising commissionable unless it can be be put into commissioning mode (e.g. some TV usecases).