0
votes

I have been testing Battery consumption of my Beacon detector app in Android using Android Beacon Library. The configurations I set are these -

1) Background Scan Rate - 110 ms 2) Background Between Scan Rate - 10000ms 3) Foreground Scan Rate - 110ms 4) Foreground Between Scan Rate - 10000ms 5) Advertising Rate of Beacon emission - Low Latency (10 Hz) 6) No power saving class used 7) Detecting Eddystone UID beacons

I have tested this configuration for 16 hours with other beacons(all emitting at same 10 Hz frequency) around.

The battery consumption is something I expected however the beacon detection frequency is something I don't understand. There are time periods when beacons are rarely detected at all. I observed 2 phases - 1) 1 hour period where there were around 400 detections 2) 2 hour period where there were around 12-15 detections

This happened in cycles. What can be the reason? Is it something related to Android 5.0 new scanning API's? Any thoughts?

Thanks

1

1 Answers

0
votes

With such a short scan cycle of 110ms, a huge factor of whether you detect a beacon transmitting at 10 Hz will be timing and luck.

Consider that:

  • It takes a finite amount of time to start scanning, so the effective scan period will probably be < 100ms
  • It takes a finite amount of time for a beacon packet to be transmitted over the air, and if scanning is not started (or stops) while it is in transit, you will not get a detection.
  • Beacon transmitters do not send out packets at regular intervals. They tend to be bunched together or spaced irregularly as the bluetooth transmitter hops channels.
  • Even under the best of circumstances with a scan left on constantly without being stopped, only ~90% of packets get received.

Add all of the factors up together, and I am not surprised to see large variations in the number of packets detected. There are just too many variables outside your control to make it predictable. If you want more predictability, I would extend the scan period to be at least 1 second.