hbldh / bleak

A cross platform Bluetooth Low Energy Client for Python using asyncio
MIT License
1.56k stars 275 forks source link

backends/scanner: always filter by service_uuids #1559

Closed dlech closed 2 weeks ago

dlech commented 2 weeks ago

It was noted that on Linux, if another app was scanning at the same time, BlueZ would trigger RSSI changes for all devices, even if they they didn't match the service_uuids filter.

This change ensures that we always filter by service_uuids, even if the OS isn't doing it for us.

On Windows, the OS wasn't filtering for us anyway, so we can just move that code to the shared call_detection_callbacks() so that all backends will make use of it.

Fixes: https://github.com/hbldh/bleak/issues/1534