How can we change BLE Scan Interval & Window in Android to scan the nearby BLE beacon?
The android app doesn't scans in low latency mode in some devices.
I need to set Scanning Interval & Window to lower rates.
Thanks.
How can we change BLE Scan Interval & Window in Android to scan the nearby BLE beacon?
The android app doesn't scans in low latency mode in some devices.
I need to set Scanning Interval & Window to lower rates.
Thanks.
Hello,
The android app doesn't scans in low latency mode in some devices.
Are you working with nRF connect mobile Application? If so, could you elaborate what you mean by "some devices"?
In the nRF connect mobile App if you go to the Settings-->Scanner you can see the Scanning mode.
If you are trying to develop your own App and want to implement the Low latency scanning mode then it's better to raise this question in an Android developer Forum, as an android Expert can comment on this. May be you can start by looking at the StartScan method.
Kind Regards,
Abhijith
Hello,
The android app doesn't scans in low latency mode in some devices.
Are you working with nRF connect mobile Application? If so, could you elaborate what you mean by "some devices"?
In the nRF connect mobile App if you go to the Settings-->Scanner you can see the Scanning mode.
If you are trying to develop your own App and want to implement the Low latency scanning mode then it's better to raise this question in an Android developer Forum, as an android Expert can comment on this. May be you can start by looking at the StartScan method.
Kind Regards,
Abhijith
Hi,
I have tested it in nRF Connect application.
The beacon (hardware) has very low scan interval and scan window, approx. 10ms.
The nRF Connect application on some devices (Mi, OnePlus) misses the beacon advertisement/packet during scan time in Low Latency Scanning Mode.
But works fine with Samsung, iPhone and other high-end devices in low latency mode. Same problem also arises with self-developed application too.
So is there a way that I can change scan interval and scan window of the mobile device? Or do I need to change the firmware of the beacon itself?
Thanks,
Kunal
Android API has 3 options to choose from: https://developer.android.com/reference/android/bluetooth/le/ScanSettings.Builder#setScanMode(int)
LOW_LATENCY - Android will try to scan constantly, but it doesn't guarantee 100%. It has most probably one chip for Bluetooth and Wi-Fi which share antenna and time.
BALANCED - scans for 2.5 sec every 5 seconds.
LOW_BATTERY - scans for 0.5 sec every 5 seconds.
There's a way also to get OPPORTUNISTIC scan, which means that your app would get result only if any other app is scanning with any of the 3 above settings.
nRF Connect by default uses LOW_LATENCY mode by you may change it in Settings -> Scanner to try other modes.
It may be possible to change the scan interval and scan window of the mobile devices, but this will depend on the specific device and operating system. In general, these settings are controlled by the Bluetooth Low Energy (BLE) stack on the device and may be configurable through the device's settings or developer options.