0

If I were to use the ALTBeacon library in Android, what is the fastest scan rate for individual bluetooth low energy (BLE) beacon packets that can be captured and recorded into memory?

George Ou
  • 103
  • 1
  • 7

1 Answers1

0

This is defined by the underlying Android Bluetooth LE scanning APIs. I am unaware of a limit, but 10 Hz is typical, and I have tested up to 40 Hz from a single device.

davidgyoung
  • 63,876
  • 14
  • 121
  • 204
  • This page says 100 ms between scans using low latency mode. http://developer.radiusnetworks.com/2014/10/28/android-5.0-scanning.html That indicates 10 Hz max. How are you getting 40 Hz? – George Ou Aug 14 '15 at 23:19
  • I wrote that page. :) The 100ms on that page was for a beacon transmitting at 10 Hz, yes. Those were simply the conditions under that test. It is possible to make a device transmit more frequently, and at 40 Hz that number would change to 25 ms. – davidgyoung Aug 15 '15 at 11:54
  • 1
    We were using mBluetoothLeScanner.startScan(mScanCallback); That allowed us to catch around 7 packets per second even though we were transmitting 200. There seems to be a lot of overhead with that function. What do you think the upper limit for ALTBeacon would be? – George Ou Aug 16 '15 at 22:05
  • Getting only 7 out of 200 packets is not normal. Something else must be wrong. The Android Beacon Library uses the same call internally. So whatever the problem is, you may experience the same thing. – davidgyoung Aug 17 '15 at 03:06
  • We're thinking/hoping it's because the example code we used was trying to print each result as it captures it and that can be slowing it down by at least an order of magnitude. – George Ou Aug 17 '15 at 18:02
  • OK, we're getting around 40 PPS now in the first second but it's slowing with each second. 40 PPS seems to be the limit using the mBluetoothLeScanner.startScan(mScanCallback) method. I'm wondering if the only way to go faster is to write lower level code or use a different stack like BlueZ. – George Ou Aug 28 '15 at 08:44
  • I just tested on a Nexus 5 and got 173 advertisements per second. It is probably hardware dependent. – davidgyoung Aug 28 '15 at 16:51
  • We're testing on a Samsung S4 so the processor shouldn't be that much slower. Much of it probably has to do with the source code. – George Ou Aug 28 '15 at 19:06
  • Also, I have no doubt that your Altbeacon library is much more mature code. We'll need to try using your Altbeacon library. Are you using the low latency code from here? http://developer.radiusnetworks.com/2014/10/28/android-5.0-scanning.html – George Ou Aug 28 '15 at 19:08
  • yes, it is using the low latency code. My point about hardware dependency is less about processor speed and more about bluetooth chip hardware. – davidgyoung Aug 28 '15 at 21:01
  • Ah, turns out we were using low power mode and not low latency mode. Now we're getting 175 packets per second. Thanks! – George Ou Aug 28 '15 at 21:26