简体   繁体   中英

Is there a list of BLE advertising period preferred values to be used with Android devices?

I am developing a firmware change on a system in order to save current drain by using a quite large advertising interval value. By default SDK uses a 187.5ms (system made on basis of NRF52840 chip) ADVERTISING INTERVAL (ADV_INTERVAL=300 in header file).

I would want to use higher values (from 1.5s to 2s) but I saw that on iPhones for example Apple recommends a preset of some particular "compatible" advertising interval values so that Iphones can be able to discover the device.

Is it the same thing on Android side?

BTW, do we have noticeable performances differences on BLE scan accross different Android versions?

My trials are only on Android 5.1, this is not very consistent for the moment. I have obviously better results when using 1s rather than 2s but with some intermediate values (1.5s for example) sometimes the device is never seen.

I have not tons of tablets on my side. I tried also Android 11 based tablet. I seems it have also variable performances compared to the other Android 5.1 tablet so for now I cannot conclude... Also I am facing sometimes some GATT connections issues on Android 11 API....

No there is not a such list. Different Android versions use different scan parameters and vendors can also customize these.

Whenever a peripheral is advertising, it uses the advertising interval plus a random value between 0 and 10 ms.

The worst value a central can use as scan interval is thus the advertising interval plus 5 ms, since that could make them always out of sync.

The scan interval and scan window Android will use depends on if you're performing a scan or a connection attempt (initiation). Also the scan mode https://developer.android.com/reference/android/bluetooth/le/ScanSettings.Builder#setScanMode(int) controls the interval/window parameters. If the app is in foreground or background also impacts the parameters.

The Bluetooth controller can also modify the parameters supplied by the host (Android). You can use the hci log in Android to see what parameters it sends to the controller.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM