flutter_reactive_ble icon indicating copy to clipboard operation
flutter_reactive_ble copied to clipboard

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

Open oyren opened this issue 2 years ago • 2 comments
trafficstars

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

oyren avatar Aug 07 '23 17:08 oyren

Hi, @oyren !

Did you resolve the issue? I was faced with the same one and do not understand how to fix it.

chplALEX avatar May 14 '25 13:05 chplALEX

Nope, I didn't find a solution. In the end I switched to polling (so I removed all subscriptions).

oyren avatar May 14 '25 21:05 oyren