Open yeshen4328 opened 2 years ago
from bluepy.btle import Scanner,DefaultDelegate
class ScanDelegate(DefaultDelegate): def init(self): DefaultDelegate.init(self)
scanner = Scanner().withDelegate(ScanDelegate()) timeout=3 devices = scanner.scan(timeout) print('Found %d devices in %d seconds' % (len(devices), timeout)) for dev in devices: print('Name: ',dev.getValueText(9)) print('Address: ', dev.addr)
when I run the demo, it shows error:
code: