-
Couldn't load subscription status.
- Fork 330
BleakScanner: Add async iterator scanning capability #1361
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
Conversation
7e5b4a1 to
4148a1d
Compare
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 for this. This is something that I have been wanting to add for a while.
I have made some suggestions on how we could simplify the implementation and usage a bit.
d3fc836 to
4646aea
Compare
4646aea to
caa2484
Compare
|
We also need to expand the "Getting discovered devices and advertisement data" section in |
caa2484 to
32b30e8
Compare
32b30e8 to
01c6657
Compare
01c6657 to
f1c8af1
Compare
|
The last two comments are here so you can see the alternative implementations - I can add any of them back if desired. |
2cb1bb0 to
b8d7a38
Compare
Add `advertisement_data()` async iterator method to the `BleakScanner` which yields results of the ongoing scan.
b8d7a38 to
883892e
Compare
|
Thanks for all of the work on this! It was more complicated than I expected. |
I noticed that almost every time I use
bleak, one of the first things is to create scanner method which combinesdiscover()andfind_device_by_filter()functionality "in concurrent fashion", without the need of using callbacks and queue. This enables reporting scanned devices immediately while giving all the filtering flexibility, even when scanning for multiple devices with different filters.