chipweinberger / flutter_blue_plus

Flutter plugin for connecting and communicationg with Bluetooth Low Energy devices, on Android, iOS, macOS
Other
788 stars 475 forks source link

Queued data not showing. #284

Closed XlashDev closed 1 year ago

XlashDev commented 1 year ago

I created an app based on this code. Using stream to receive new notifications on data.

https://github.com/0015/ThatProject/blob/master/Esp32_dust_sensor_ble_FLUTTER/flutter_app_esp32_dust_sensor/lib/sensor_page.dart

My ble device send successive ble notifications using the nordic uart service, its working on an android app based on java but I'm creating a new one that is flutter based. I think the notifications are very fast that it was not able to process the first 3 data sent.

  1. Do you think this is an issue with the library? Screenshot from 2023-05-13 12-15-25

  2. If this is not an issue with the library is their an example on how to implement subscribing the values without using stream?

EDIT: I added a delay of 100ms to ble write function on the ble device end and all 4 data sent are received by the flutter app. I suspect its from the min connection interval of Android. When data is sent faster than min connection interval data is queued instead. Queued data should be process automatically at the android app side but as you can see from debug screenshot only the last one is processed..

TIA

chipweinberger commented 1 year ago

please open a PR if you fix the problem

chipweinberger commented 1 year ago

please try 1.7.6+, reopen a new issue if you still have problems.