Hi, I'm working on a complex problem which demands to know that how many number of packets received from one beacon?
Like if some one configure beacon "Advertising interval" to 500ms, so it means 2 packets should be received in 1 Sec.
But in iBeacon while ranging the beacon it scan and give the results after every one second.
Is there any way to know how many number of packets received per second? If not then what is the need to have this "Advertising interval" property which we couldn't use.
Hey there—sorry for late response.
You got it right, advertising interval is inversely proportional to the number of packets received in 1 second. 500 ms = 2 packets, 333 ms = 3 packets, 250 ms = 4 packets etc.
iOS will always deliver ranging results every second—the only thing the number of packets affect here is, the more packets iOS hears within that second, the better the distance estimation to the beacon, as there are more data points to work with.
That's the main reason for the adv. interval to be configurable—you can basically choose how accurate you want the distance estimation to be. Maybe you need it to be as accurate as possible, and then set the adv. interval to 100 ms at the expense of a shorter battery life. Or maybe you don't care about the distance at all, you just need to know you're somewhere near the beacon—then you can leave the default 950 ms adv. interval and save the battery life.
There's one more thing: even though it's not possible to change the Core Location's ranging frequency (it's always 1 second), our SDK provides a Core Bluetooth scanning method with configurable scanning interval. Feel free to take a look at it.
So u mean to say that, The less advertising interval the more accurate distance we can get ?
Second i tried the startEstimoteBeaconDiscoveryForRegion: with "updateInterval" as 0.1f
But didRangeBeacons methods calls after every 1 sec instead calling after every 0.1 sec. "Am i right or am i right"? and it return only one beacon.
Sorry, I forgot to mention: startEstimoteBeaconDiscoveryForRegion delivers its updates to didDiscoverBeacons instead of didRangeBeacons.
For anyone reading this and realising that those SDK links are dead, the method call and class has changed, now in the ESTUtilityManager
class:
https://github.com/Estimote/iOS-SDK/blob/master/EstimoteSDK/EstimoteSDK.framework/Headers/ESTUtilityManager.h