flutter_reactive_ble
flutter_reactive_ble copied to clipboard
BLE characteristic notifications are disabled: (D/BluetoothGatt(27497): setCharacteristicNotification() - uuid: xxxx enable: false)`
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.
- [x] I have tested the characteristic notification via nRF Connect for Mobile & nRF Connect for Dekstop, without any unexpected behavior.
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
- Device: OnePlus 7 Pro and Samsung Galaxy Tab A7 Lite
- OS: Android 13
- Package version: 5.1.1
Peripheral device
- Vendor, model: ESP32
- custom firmware
Hi, @oyren !
Did you resolve the issue? I was faced with the same one and do not understand how to fix it.
Nope, I didn't find a solution. In the end I switched to polling (so I removed all subscriptions).