Only scan for BLE devices in BlueZ backend
Add a D-Bus method call to set the scan filter to only scan for BLE devices. Some adapters have trouble detecting BLE devices when scanning for both BLE and classic.
@@ -144,6 +144,14 @@ async def discover(timeout=5.0, loop=None, **kwargs):
# 'signature': '', 'body': (), 'expectReply': True, 'autoStart': True,
# 'timeout': None, 'returnSignature': ''}
# Running Discovery loop.
+ await bus.callRemote(
+ adapter_path,
+ "SetDiscoveryFilter",
+ interface="org.bluez.Adapter1",
+ destination="org.bluez",
+ signature="a{sv}",
+ body=[{"Transport": "le"}]
+ ).asFuture(loop)
await bus.callRemote(
adapter_path,
"StartDiscovery",
