336a62a795
BLEAK Is by far the best/most effective library I have seen for it so far.
9 lines
261 B
Python
9 lines
261 B
Python
import gatt
|
|
|
|
class AnyDeviceManager(gatt.DeviceManager):
|
|
def device_discovered(self, device):
|
|
print("Discovered [%s] %s" % (device.mac_address, device.alias()))
|
|
|
|
manager = AnyDeviceManager(adapter_name='hci0')
|
|
manager.start_discovery()
|
|
manager.run() |