diff --git a/CHANGELOG.rst b/CHANGELOG.rst index b811c574..fb25f57f 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -19,6 +19,7 @@ Fixed ----- * Fixed ``discovered_devices_and_advertisement_data`` returning devices that should be filtered out by service UUIDs. Fixes #1576. +* Fixed a ``Descriptor None was not found!`` exception occurring in ``start_notify()`` on Android. Fixes #823. `0.22.1`_ (2024-05-07) ====================== diff --git a/bleak/backends/p4android/defs.py b/bleak/backends/p4android/defs.py index f5245450..832f92bc 100644 --- a/bleak/backends/p4android/defs.py +++ b/bleak/backends/p4android/defs.py @@ -5,6 +5,7 @@ from jnius import autoclass, cast import bleak.exc +from bleak.uuids import normalize_uuid_16 # caching constants avoids unnecessary extra use of the jni-python interface, which can be slow @@ -87,4 +88,4 @@ class ScanFailed(enum.IntEnum): BluetoothGattCharacteristic.PROPERTY_WRITE_NO_RESPONSE: "write-without-response", } -CLIENT_CHARACTERISTIC_CONFIGURATION_UUID = "2902" +CLIENT_CHARACTERISTIC_CONFIGURATION_UUID = normalize_uuid_16(0x2902)