Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
leemind opened this issue Apr 15, 2024 · 2 comments

Comments

@leemind
Copy link

leemind commented Apr 15, 2024

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```
@rohitsangwan01
Copy link
Contributor

@leemind i tried multiple android characteristic together in android, and getting events from all properly
can you try with another app like NrfConnect to cross check

@sonvu1969
Copy link

Ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants