NordicSemiconductor / Android-BLE-Library

A library that makes working with Bluetooth LE on Android a pleasure. Seriously.
BSD 3-Clause "New" or "Revised" License
2.04k stars 419 forks source link

Data loss in some specific cases #400

Closed crb-anhtuan-m closed 2 years ago

crb-anhtuan-m commented 2 years ago

Hello Nordic team, Yesterday we has found a bug : BLE frame is loss in some specific cases.

When it happens: Ble version : 2.3.1 Until now, it occurred in at least 2 phone models : Samsung J7 2015 Android 9 and Samsung J5 2015 Android 9. It seems to be that the bug produced on low performant devices but we are investigating.

For the context of our application: We do streaming data from our BLE devices.The configuration: MTU = 47; 250 frames by sec.

How we know this bug comes from Android BLE Library: We did a test: we compare the data loss when we use Android BLE Library and when we use native Android functions.

Do you have any ideas how this can happen ? May it be a performant problem ? At the moment, I do not see any log of Garbage Collector appears while running the test app. To be specific, we did test 2 cases : handle all the frames on worker thread or main thread but the result is the same. Are there any case where the library drop the package without telling us ? Thanks.

crb-anhtuan-m commented 2 years ago

It does not come from the library. If you ever have data loss, try to unbond the device. It works for me even I dont know why.