Skip to content

Only receive notifications from the first characteristic registered (Android only) #36

Description

@leemind

I have an ESP32 device which notifies on 2 different characteristics. I register both characteristics to notify

UniversalBle.setNotifiable(devices[deviceID]!.device!.deviceId, Uuids.mainService, Uuids.firmwareControlCharStr, BleInputProperty.notification); UniversalBle.setNotifiable(devices[deviceID]!.device!.deviceId, Uuids.mainService, Uuids.dataCharStr, BleInputProperty.notification);

and in the debug Gatt messages this appears to be ok:

D/BluetoothGatt(24436): setCharacteristicNotification() - uuid: f645686e-cee8-418b-971a-366c641544bc enable: true D/BluetoothGatt(24436): setCharacteristicNotification() - uuid: 66ca5b73-7c39-4a6b-8915-ca0621b31803 enable: true

However in my UniversalBle.onValueChanged I only ever receive notifications for the first registered characteristic. I have swapped the two lines around in the code and verified this.

On iOS it works perfectly as expected

Flutter Doctor:

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.2)
[✓] VS Code (version 1.88.1)
[✓] Connected device (4 available)
[✓] Network resources```

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions