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
Working toward being able to manage multiple devices without connectivity loss under Bluez (#361) and developing locally on my Mac, I found that trying to create a BleakClient from a BLEDevice returned from a scan failed. I expected that the BLEDevice passed to the scanner callback is_skale(device: BLEDevice, adv: AdvertisementData) would be able to be used in skale = BleakClient(device). However, an error was reported under macOS (and not seen running Python 3.9.5 built for RPi Buster)
Traceback (most recent call last):
File "/Volumes/miniup-users/jeff/devel/pyDE1/scale_direct.py", line 164, in is_skale
skale = BleakClient(device)
File "/Volumes/miniup-users/jeff/devel/pyDE1/venv/lib/python3.9/site-packages/bleak/backends/corebluetooth/client.py", line 51, in __init__
self._central_manager_delegate = address_or_ble_device.metadata["delegate"]
KeyError: 'delegate'
What I Did
Examination of the device using a debugger suggests that the error is "correct" and that the device is of the proper class and at least partially populated
Running the same code remotely on the RPi does not trigger the error, though also has an empty metadata dict.
macOS 10.14.6
Description
Working toward being able to manage multiple devices without connectivity loss under Bluez (#361) and developing locally on my Mac, I found that trying to create a
BleakClient
from aBLEDevice
returned from a scan failed. I expected that theBLEDevice
passed to the scanner callbackis_skale(device: BLEDevice, adv: AdvertisementData)
would be able to be used inskale = BleakClient(device)
. However, an error was reported under macOS (and not seen running Python 3.9.5 built for RPi Buster)What I Did
Examination of the
device
using a debugger suggests that the error is "correct" and that thedevice
is of the proper class and at least partially populatedRunning the same code remotely on the RPi does not trigger the error, though also has an empty
metadata
dict.Code To Replicate
Though tied to a specific device, I am more than willing to work to provide additional information as needed.
In context:
scale_direct.py.gz
The text was updated successfully, but these errors were encountered: