We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bbc048d commit f1b64e2Copy full SHA for f1b64e2
pybricksdev/cli/lwp3/repl.py
@@ -99,9 +99,15 @@ def callback(dev: BLEDevice, adv: AdvertisementData) -> None:
99
100
queue.put_nowait(dev)
101
102
- async with BleakScanner(detection_callback=callback):
+ async with BleakScanner(detection_callback=callback) as scanner:
103
logger.info("scanning...")
104
device = await queue.get()
105
+
106
+ # monkey patch for bleak bug
107
+ # https://github.com/hbldh/bleak/pull/534
108
+ if hasattr(scanner, "_manager"):
109
+ device.metadata["delegate"] = scanner._manager.central_manager.delegate()
110
111
logger.info("found device")
112
113
def handle_disconnect(client: BleakClient):
0 commit comments