Skip to content Skip to sidebar Skip to footer

Altbeacon Is Stopping The Beacon Scan. But Keep Scanning

It is designed to scan every 4 seconds. However, beacons may not be detected from the start to the stop of scanning. After that, the beacon is detected after stopping the scan. The

Solution 1:

In the case you show in the log, the command to the underlying Android APIs to stop the scan failed:

08:54:22.813 D/CycledLeScannerForLollipop(21211): Stopping LE scan on scan handler
08:54:22.814 D/BluetoothAdapter(21211): STATE_ON
08:54:22.814 D/BluetoothLeScanner(21211): could not find callback wrapper
08:54:23.430 E/ CycledLeScannerForLollipop(21211): Scan failed: app cannot be registered

The last line above where it says "Scan failed", this actually refers to the attempt to stop the scan.

This is most certainly a problem inside the bluetooth stack on the test device. Since the interface between the Android bluetooth stack and the underlying bluetooth chip always involve some proprietary customizations by the OEM, it is likely that this is due to some bug in that implementation.

Since you can't fix the bluetooth stack, your best bet is to try to find some kind of workaround to regain control of scans. This will undoubtedly require trial and error. You might try disabling the Android Beacon Library's scanning service then restarting it, by stopping all monitoring (and ranging if being done), waiting 30 seconds and then restarting monitoring (and ranging if desired).

Post a Comment for "Altbeacon Is Stopping The Beacon Scan. But Keep Scanning"