You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently trying to implement low-power background scanning using hardware batching, but on my device I sometimes get 0 ScanResults back after starting particular scan. Restarting the scan with identical settings fixes the issue and I get results normally.
I am also able to reproduce the issue without using any scan filter, so it is not an issue in filter configuration. The issue is present with both SCAN_MODE_BALANCED and SCAN_MODE_LOW_POWER (seems to be an issue even with SCAN_MODE_LOW_LATENCY, but I wasn't able to reproduce it at least twice).
I managed to start a scan which returns no ScanResults even with report delay 0.
EDIT: After a few minutes of scanning I managed to receive 1 ScanResult out of 5 I should've been able to receive, but I'm getting no further advertisements.
I got standard onScannerRegistered() log message, so the scan itself should've started correctly: D/BluetoothLeScanner( 4390): onScannerRegistered() - status=0 scannerId=27 mScannerId=0
Any ideas on what I should try to be able to scan reliably?
Android has a limitation of only few scans per 30 second. If you start and stop scanning number of times in short period of time it will not return and scan results until you wait a bit.
Can it be related?
Cannot rule it out entirely, but it's very unlikely, as the scanner got registered successfully (the onScannerRegistered() log message would indicate status=6 and scannerId=-1 otherwise AFAIK).
I am currently trying to implement low-power background scanning using hardware batching, but on my device I sometimes get 0
ScanResult
s back after starting particular scan. Restarting the scan with identical settings fixes the issue and I get results normally.Here's how I configure and start the scan:
I am also able to reproduce the issue without using any scan filter, so it is not an issue in filter configuration. The issue is present with both
SCAN_MODE_BALANCED
andSCAN_MODE_LOW_POWER
(seems to be an issue even withSCAN_MODE_LOW_LATENCY
, but I wasn't able to reproduce it at least twice).Full example can be seen here.
Device used:
Model: Xiaomi Mi 9T Pro
Android: 11
I personally think this issue is going to be hardware-related, but I'm looking for any possible clues.
The text was updated successfully, but these errors were encountered: