This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Android-BLE-Library scanner stops scanning after many hours

Nordic team:

We are developing a proprietary application for Android tablets using the Android-BLE-Library and have been experiencing issues with scanning after a long period (> 12 hours) of successful operation.

Here is a brief overview of the problem:

(1)  The application is designed to interact and collect measurement data from a number of third-party BLE-connected devices (pulse-oximeters, HR / RR monitors, blood pressure cuffs, etc.).  The application may be configured to pair and connect with one to several of these devices at a time.  When at least one device is configured to connect, the application uses the BLE scanner to continuously scan for the device(s) and connect with any / all devices in the list.  Then measurements are collected periodically or on demand from each connected device according to its function.

(2)  Following boot-up of the Android tablet, BLE connectivity and measurements collection proceed as expected for several hours (usually at least 12 to 24) without issues.

(3)  At some time after that, the scanner just seems to stop, and no nearby devices are visible or can be connected with.

(4)  A re-boot of the tablet clears the problem.

(5)  It seems like turning off Bluetooth for several seconds and then re-enabling it does not clear the problem.

(6)  When the problem occurs, other BLE devices not configured to interact with the application are not visible either (i.e. Bluetooth scanning seems to be not working at all).

(7)  We are using version 2.0.5 of the Android-BLE-Library:

https://github.com/NordicSemiconductor/Android-BLE-Library

(8)  This problem has been observed to occur with a number of Android versions (can provide a list).

We are trying to narrow down the source of the problem.  As we see it, problem could be due to (1) the tablet hardware or manufacturer configuration; (2) the Android Bluetooth stack and / or its interoperation with the library; (3) the application itself (but in that case we are puzzled as to why the system Bluetooth scanning also stops).

Here are our questions:

(a)  Has this problem, or one similar to it, been described before?  If so, is it an issue with the library?  Is there a work-around?

(b)  Does Nordic make available a licensed commercial version of this library, with increased level of support and reliability?  If so, please contact us with details.

(c)  Are there any suggestions you may have to help us diagnose and resolve this problem?

Thanks.

--ken

  • Hi Ken

    I've asked our Android BLE library expert to take a look at this case, so please be patient and know that a reply is on its way.

    Best regards,

    Simon

  • Hi Ken

    Sorry about the delayed reply. I've talked to one of our Android experts regarding your issue, and here are some notes we have:

    • First, we assume you're using the Android Scanner Compat Library for the scanning purposes, as the "regular" Android BLE Library doesn't support scanning.
    • The scanner compat library for Android just forwards requests to the native API, so if you're seeing issues, this might be the Bluetooth stack that's having issues.

    To your questions:

    a) We're not familiar with this issue I'm afraid, as we generally do tests for ~1 minute, not 24 hours.

    b) We do not have a commercial version of this library I'm afraid.

    c) As stated above, we assume this might be the BLE stack's interoperation with the library that's causing this issue.

    Best regards,

    Simon

Related