I am experimenting with a iPad app (iPad Air, app running in foreground, not background) and a couple of beacons (from Estimote and Bluecat) to develop an indoor and outdoor game where people have to scan beacons in proper order. Beacons are placed inside area of like 5 x 5m and participants have to approach them (in immediate range).
However, discovering that beacon is in CLProximityImmediate
range can take from few seconds (which is fine) to something like 30-60 seconds (which is too long) even in cases when iPad is actually physically touching the beacon. From my experiments beacons are ranged like once per second, but report immediate range with delays and frequently report CLProximityUnknown
.
My ranging setup is as follows (I am in always ranging mode, no turning on/off for enter/exit region):
CLBeaconRegion *estimoteRegion = [[CLBeaconRegion alloc] initWithProximityUUID:estimoteUUID identifier:estimoteIdentifier];
CLBeaconRegion *bluecatRegion = [[CLBeaconRegion alloc] initWithProximityUUID:bluecatUUID identifier:bluecatIdentifier];
self.locationManager = [[CLLocationManager alloc] init];
self.locationManager.delegate = self;
[self.locationManager startRangingBeaconsInRegion:estimoteRegion];
[self.locationManager startRangingBeaconsInRegion:bluecatRegion];
And ranging event handler is similar to below one:
- (void)locationManager:(CLLocationManager *)manager didRangeBeacons:(NSArray *)beacons inRegion:(CLBeaconRegion *)region {
for(CLBeacon *beacon in beacons) {
if (beacon.proximity == CLProximityImmediate) {
// Handle it
break;
}
}
I've tried both Core Location and Estimote SDK, but they give very similar results.
Do you have any practical tips how to speed beacon immediate range sensing? Should going way deeper to Core Bluetooth promises any serious improvements?