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.
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
Check descriptor clusters during commissioning #14410
Check descriptor clusters during commissioning #14410
Changes from 3 commits
c569a80
9e8f49a
eb8b946
8afd91b
69a9284
9556c90
420142b
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
This is a lot of round-trips.... Do we actually want to read these attributes one at a time? Why do we want to walk the list of all endpoints starting from the end looking for network commissioning things, instead of starting at the front and stopping when we find the first network commissioning thing which supports a network technology we support?
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.
No, but as far as I can tell, we don't have support for bulk reading attributes right now.
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.
They're all checked in order to address the request for supporting network commissioning clusters on other endpoints (multiple radios). There is always a NetworkCommissioning cluster on EP0, but you had a request in the network tecnology PR (#13829) to support network commissioning clusters that could be present on endpoints with manufacturer specific device types.
see #14412
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.
We certainly do. You just have to use a slightly lower-level API to do it, because the results of such a read can't be expressed as a single C++ value.... Doing this can be a followup, though.
This just seems like an odd approach to addressing that request. What I would have expected is we start with the network commissioning on EP0. If we can't commission using that (rare case), we look for another one.
It feels like this is something where people are going to want to do a variety of things and UX flows, and reading all endpoints can be quite costly (latency) for devices with lots of endpoints....
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.
There's always going to be a network commissioning cluster on EP0, so if we're starting there, we're ending there. If we want to allow devices to specify more than one networking technology, we have to read them all.
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'm not following. If what's on EP0 is a WiFi cluster but we don't have any WiFi credentials, but do have Thread ones, then we would want to look for other network commissioning clusters to see if the device supports Thread. But if EP0 has a network technology we're happy to commission with, why would we spend time looking at the other endpoints?
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'd actually argue that dual network commissioning clusters is dubiously supported anyway and unlikely to happen in a real device. The only place where this would be really beneficial would be for a border router, and the network commissioning clusters are insufficient there anyway because we there aren't sufficient commands to support creating a thread network.
The alternate is to assume EP0 for the networking cluster allow devices that require a more complicated setup use a custom commissioning flow. If we want to be able to commission border routers, the network commissioning cluster needs some additional commands, and we could then add a parts list to make the endpoint walk easier.
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.
How would you know to send in only thread credentials if you didn't know what the device supported in the first place? That assumes that the commissioning parameters are the source of truth, whereas what we really want is for the device to be the source of truth.
I suppose we could cut out some of the back and forth if we only have one set of credentials and it happens to match the feature map for the network cluster on EP0.
I wrote it this way originally because I was going to double-purpose this for a convenience function to allow devs to get device information before calling the commission command. Let me see if I can maybe disentangle this use case and short-circut the full walk during commissioning if we only get one set of network credentials that matches EP0.
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.
OK, I've updated the PR to just go with the first networking cluster it finds. Working with jerry on a follow up to just query all the network cluster feature maps using wild card - I didn't realize that was implemented now, but it's a bit more of a change.