I’m trying to build an application that will detect the motion uuid of various objects that the user might interact with. Unfortunately, it seems that the iPhone BLE polling rate goes down dramatically when the phone is asleep, so the application doesn’t see most of these interactions. Is there any published data about how often it polls when asleep. It seems like the phone is only polling every 10 or 15 seconds. Can anyone confirm this behavior? If this is true, is it possible to change the motion uuid broadcast time? Any other ideas on how to pick up more of these interactions during different phone states?
Confirmed, iPhone slows down Bluetooth scans when there are no apps actively using Bluetooth. (iBeacon monitoring uses “passive” scanning)
One idea, if you have our Location Beacons or the next-generation Proximity Beacons, then instead of Motion UUID it’s better to use the Estimote Telemetry packet. Estimote Telemetry contains data from all beacon sensors, including the accelerometer. Combined with iOS’s “Uses Bluetooth LE accessories” background mode + Core Bluetooth scanning (although you don’t need to write it yourself, we have a high-level API for that in the SDK: https://github.com/estimote/ios-sdk#telemetry), it should yield better results (from our experience, something between 1 and 6 seconds). The only caveat is, you’ll need to defend your app during the App Store review, explain why you need it to be running BLE scanning in the background.
Thanks for the quick response.
So you’re saying that if we use some low-level Core Bluetooth improvements along with more aggressive permissions, that it’ll allow the phone to scan every 1-6 seconds? Doesn’t that imply that we would miss some of the Motion UUID events, because those are only active every 2 seconds? Or are there other adjustments we can make?
We realized the problem was that we weren’t triggering didExit because the beacon was staying in range of the phone. I guess I have one specific follow up question. Is there any way to get didExit to trigger faster than 30 seconds? We need it to be around 10-15 seconds for our application.
Is there another way to use didStopMonitoring or similar function to simulate a didExit? Any tips or tricks to help us achieve this?
Sadly, on iOS, the 30-second delay comes from the operating system itself, and there’s no way to adjust it on the Core Location layer. On Android for example, our SDK supports changing this interval, since we have full control over the BLE stack, but on iOS we simply can’t do it with iBeacon, since iBeacon is restricted to Core Location, and Core Location doesn’t have such an option.