Search code examples
pythonbluetoothbluez

Define multiple bluetooth dongles in python-bluez (scan from specific device)


I'm building a bluetooth application in Python, using python-bluez (under linux)

But my computer has 2 bluetooth adapters (one built in, one usb dongle) How can I choose which one to scan from, because now it randomly picks one.

The code right now is pretty basic ;)

nearby_devices = bluetooth.discover_devices()

Solution

  • I found that you have to modify the python-bluez file itself.