Is there a way to fix a BLE advertising interval in Android?

Viewed 152

I'm making an Android application and I'd need to send advertising data at a fixed advertising interval.

I've tried setting an advertising interval value using the setInterval() function from AdvertisingSetParameters class, but when I check the advertising interval in a scanner device using nRF Connect or BLE Scanner applications, it shows a lot of variance between advertising intervals.

To sum up, I'd like to know if it's possible to fix an advertising interval in an Android application.

Thank you in advance for your time!

1 Answers

According to documentation, you can set the advertising interval using the setInterval() function of the AdvertisingSetParameters class, as you said. The advertising interval set is fixed.

The phenomena you are experiencing could be due of two possible causes:

  • Your smartphone is broadcasting another set of advertising packet with different advertising interval
  • the scan of BLE advertising messages it fails to capture all packets as often as they were emitted, maybe you are making test in an enviroment crowned of BLE devices
Related