PhilipsHue / flutter_reactive_ble

Flutter library that handles BLE operations for multiple devices.
https://developers.meethue.com/
Other
667 stars 334 forks source link

BLE characteristic notifications are disabled: (D/BluetoothGatt(27497): setCharacteristicNotification() - uuid: xxxx enable: false)` #781

Open oyren opened 1 year ago

oyren commented 1 year ago

Describe the bug Thanks for this lib. I am building a small app based on ubiqueIoT/flutter-reactive-ble-example. I have 16 characteristics to which i subscribe. However, for some (sometimes all) setCharacteristicNotifcation reports enable: false, while i expect it to be enabled. And the subscription callback is no longer called. It seems a bit random which subscription works ¯_(ツ)_/¯.

I am also getting the following related error: E/flutter (27497): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Exception: GenericFailure(code: CharacteristicValueUpdateError.unknown, message: “Cannot write client characteristic config descriptor (code 3) with characteristic UUID ec7fa572-a7d2-4dbc-82da-a4632154dd18”)

The app connects to an ESP32 (NimBLE), all subscribed characteristics have the descriptor Client Characteristic Configuration (CCCD) with UUID 0x2902.

https://github.com/PhilipsHue/flutter_reactive_ble/issues/774 could be related, but i experience the described behavior without a disconnect (instead, the issue persists at the first app start).

Expected behavior CharacteristicNotifcation is enabled (true) and no Exception: GenericFailure(code: CharacteristicValueUpdateError.unknown.

Smartphone / tablet

Peripheral device