You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Also encountered this. Seems to be because the connect method uses the static find_device_by_address method which does not take the adapter as an argument.
You might be able to work around this by doing the scan yourself:
scanner = BleakScanner()
devices = await scanner.discover(device=adapter_name)
found = None
for device in devices:
if (device.address == mac_address):
found = device
if not found:
print('not found')
os._exit(1)
client = BleakClient(found, device=adapter_name)
You can initialise BleakScanner with the device kwarg but this is also seems to be ignored when you run scanner.discover.
bluetoothctl -v
) in case of Linux: 5.50Description
Setting the adapter parameter seems to be ignored by BleakClient.
What I Did
In my python script I am probing some GATT characteristics and I am trying to use the second BT adapter (hci1).
Running
hciconfig
I can see both adapters are enabled:In my python script, I initate the BleakClient like so:
After the script runs I rerun the
hciconfig
command and I see that the TX/RX has only increased forhic0
, see below:The text was updated successfully, but these errors were encountered: