Bluetooth-Devices / led-ble

Control a wide range of LED BLE devices
Apache License 2.0
12 stars 9 forks source link

Characteristic None not found! #35

Open RayBytes opened 1 year ago

RayBytes commented 1 year ago
Traceback (most recent call last):
  File "/Users/name/Projects/RGB/main.py", line 54, in <module>
    asyncio.run(run())
  File "/opt/homebrew/Cellar/python@3.10/3.10.10/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/opt/homebrew/Cellar/python@3.10/3.10.10/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/Users/name/Projects/RGB/main.py", line 36, in run
    await led.update()
  File "/opt/homebrew/lib/python3.10/site-packages/led_ble/led_ble.py", line 150, in update
    await self._ensure_connected()
  File "/opt/homebrew/lib/python3.10/site-packages/led_ble/led_ble.py", line 355, in _ensure_connected
    await client.start_notify(self._read_char, self._notification_handler)
  File "/opt/homebrew/lib/python3.10/site-packages/bleak/__init__.py", line 639, in start_notify
    raise BleakError(f"Characteristic {char_specifier} not found!")
bleak.exc.BleakError: Characteristic None not found!

I've gotten the above error when running the example code.

Screenshot 2023-03-17 at 12 43 47 PM

I had found this address and set it to the ADDRESS variable and it connected then gave that error

Here are the logs before the error:

INFO:__main__:Detected: 32544AB4-2034-EB5D-85B8-E59AF0BBD3C1: ELK-BLEDOM
INFO:__main__:Found device: 32544AB4-2034-EB5D-85B8-E59AF0BBD3C1
DEBUG:led_ble.led_ble:ELK-BLEDOM: Connecting; RSSI: None
DEBUG:led_ble.led_ble:ELK-BLEDOM: Connected; RSSI: None
/opt/homebrew/lib/python3.10/site-packages/led_ble/led_ble.py:347: FutureWarning: This method will be removed future version, use the services property instead.
  resolved = self._resolve_characteristics(await client.get_services())
DEBUG:led_ble.led_ble:ELK-BLEDOM: Subscribe to notifications; RSSI: None