-
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
Controller: Add other mdns filters #7659
Conversation
Mdns exposes serveral subtypes that can be used to narrow the dnssd search parameters. Previously, the only exposed parameter was the long discriminator, because it was used in the QR code. Adding others. Also changes the controller API function to take the filter structure directly, and uses the python script binding to set the filters as required. Test: Tested with M5 in commissionable mode / chip-device-ctrl - discover usage (discover with no args) - discover -all - discover -qr with good and bad qr - all variants with good and bad values verified all args with correct values return data, all args with bad arguments return no results.
(cecille): I suppose we could make this a command line arg. Or Add a callback whenconnectedhomeip/src/controller/python/chip-device-ctrl.py Lines 531 to 541 in 6852fed
This comment was generated by todo based on a
|
# x number of responses are received. For now, just 2 seconds. We can all wait that long. | ||
print("Waiting for device responses...") | ||
time.sleep(2) | ||
|
||
def do_discover(self, line): |
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.
Although not merged, #7432 has introduced use of argparse to remove the need for all this boilerplate just to define the args interface.
This PR is expanding the number of arguments for do_discover from 2 to 8, so is nearly a complete refactor. Given this, would you consider using argparse as well here? It's just a whole lot 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.
Changed over in next commit. I'm not going to tackle any other refactors in this PR. I suppose this is ok - it's a bit longer, but does essentially the same thing.
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.
Thanks!
/rebase |
/rebase |
79f922f
to
d40417f
Compare
/rebase |
d40417f
to
941c58a
Compare
/rebase |
* Controller: Add other mdns filters Mdns exposes serveral subtypes that can be used to narrow the dnssd search parameters. Previously, the only exposed parameter was the long discriminator, because it was used in the QR code. Adding others. Also changes the controller API function to take the filter structure directly, and uses the python script binding to set the filters as required. Test: Tested with M5 in commissionable mode / chip-device-ctrl - discover usage (discover with no args) - discover -all - discover -qr with good and bad qr - all variants with good and bad values verified all args with correct values return data, all args with bad arguments return no results. * Fix function name in connect qr * use argparse.
Problem
Mdns exposes serveral subtypes that can be used to narrow the dnssd
search parameters. Previously, the only exposed parameter was the
long discriminator, because it was used in the QR code.
Fixes #6691
Change overview
Adding remaining commisisonable nodes discovery filters.
Also changes the controller API function to take the filter structure
directly, and uses the python script binding to set the filters
as required.
Testing
Tested with M5 in commissionable mode / chip-device-ctrl
verified all args with correct values return data, all args with bad arguments return no results.