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

Service UUID filter does not apply to dict of discovered devices. #1576

Closed
dlech opened this issue May 21, 2024 · 1 comment · Fixed by #1577
Closed

Service UUID filter does not apply to dict of discovered devices. #1576

dlech opened this issue May 21, 2024 · 1 comment · Fixed by #1577
Labels
bug Something isn't working

Comments

@dlech
Copy link
Collaborator

dlech commented May 21, 2024

So, service_uuid filtering does work in Windows?
I try to filter on:
service_uuids = ['0000fef3-0000-1000-8000-00805f9b34fb']
like this:

...
service_uuids = ['0000fef3-0000-1000-8000-00805f9b34fb']
# Without filter
async with Scanner(service_uuids=None) as scanner:
    await asyncio.sleep(10)
    self.show_scan_result(
        scanner.discovered_devices_and_advertisement_data
    )
# With filter
async with Scanner(service_uuids=service_uuids) as scanner:
    await asyncio.sleep(10)
    self.show_scan_result(
        scanner.discovered_devices_and_advertisement_data
    )
...

(where show_scan_results is a method to display the results).
However, I can't see a difference in the devices beeing found, and some of them don't have the service uuid in their AdvertisementData.
Tested with 0.21.1 and 0.22.1 on Windows 10.

Am I doing something wrong or do I misunderstand the concept of service UUID filtering?

Originally posted by @MarkusPiotrowski in #1534 (comment)

@dlech dlech added the bug Something isn't working label May 21, 2024
@dlech
Copy link
Collaborator Author

dlech commented May 21, 2024

In #1559, we missed that the filter should also apply to the list of discovered devices. Currently, it only applies to the detection callback.

dlech added a commit that referenced this issue May 21, 2024
This is a follow-up to a818521 ("backends/scanner: always filter by
service_uuids") to also filter discovered devices by the service UUIDs.

This was overlooked in that change and on Windows actually caused a
regression.

Fixes: #1576
dlech added a commit that referenced this issue May 23, 2024
This is a follow-up to a818521 ("backends/scanner: always filter by
service_uuids") to also filter discovered devices by the service UUIDs.

This was overlooked in that change and on Windows actually caused a
regression.

Fixes: #1576
@dlech dlech mentioned this issue Jun 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant