iPhone: Paired Devices vs iBeacon Bluetooth Battery Consumption

I've 2 apps (1 that is registers and scans for iBeacons in the background, no ranging) and the other without. Both of these apps are essentially similar with the exception of 1st being enabled for iBeacons.


// location manager config

+ (CLLocationManager *)sharedLocationManager {

      static CLLocationManager *_locationManager;

      @synchronized(self) {

         if (_locationManager == nil) {

             _locationManager = [[CLLocationManager alloc] init];

             _locationManager.desiredAccuracy = kCLLocationAccuracyThreeKilometers;

             _locationManager.pausesLocationUpdatesAutomatically = NO;                     

             if ([_locationManager respondsToSelector:@selector(allowsBackgroundLocationUpdates)]){

                  _locationManager.allowsBackgroundLocationUpdates = YES;

             }       

         
}

}

return _locationManager;

}


- (void)startMonitoringItem:(Item *)item {

        CLBeaconRegion *beaconRegion = [self beaconRegionWithItem:item];

        CLLocationManager *locationManager = [LocationTracker sharedLocationManager];

        [locationManager startMonitoringForRegion:beaconRegion];


}


- (void)stopMonitoringItem:(Item *)item {

       CLBeaconRegion *beaconRegion = [self beaconRegionWithItem:item];

       CLLocationManager *locationManager = [LocationTracker sharedLocationManager];

       [locationManager stopMonitoringForRegion:beaconRegion];

}

I've registered about a 100 iBeacons within the 1st app, and ran both apps on an iPhone 6 and an iPhone 6 Plus, running the same OS version within the vicinity of the 100 plus iBeacons, both with blue tooth enabled.


I'm only interested in entry and exit events, and essentially just implemented both of these calls in the 1st app. I ran the tests for about 14 hours, by just leaving both iPhones with bluetooth enabled within the vicinity of the iBeacons.


When I checked my battery status in my settings menu, the 1st app consumed at most 1% more battery than the 2nd app (eg: 1st app: 25%, 2nd app: 24%), which is the same on both devices. This is expected behaviour, as the blue tooth scanning algorithm controlled by iOS should be optimised to preserve battery.


However, on my client's device, the 1st app consumes 5x more battery than the 2nd app (eg: 1st app: 10%, 2nd app: 2%). When I checked his bluetooth setting, I realized that his iPhone was paired with about 8 other devices.


So my question is this. Will pairing with other devices caused a much larger battery drain on my 1st app even though it is just scanning for iBeacons? If yes, is there any way I can optimized by algorithm to ignore paired devices and just scan for iBeacons.


I've read the iOS documentation extensively and consulting stackoverflow, but did not find a satisfactory answer so far.


I will greatly appreciate any advice!

Just as a further update, I've received some updates from iBeacon engineers that classic bluetooth pairing generally takes more battery usage than iBeacon scanning. If so, why is the additional battery usage from the paired devices counted towards my 1st app? If I delete the 1st app from my device, will the additional battery usage in the settings menu count towards another app that is also scanning for iBeacons? (Eg: Estimote App)

When there are other applications looking for bluetooth low energy peripherals, your app can piggy back off of the scanning even though you're in the background. I think the scanning rules only get deprioritized if all applications that want to scan are in background.


A little experiment you can run:

Make a central, scan for heart rate monitor as example, put app into background. Let it fully transition into background, advertise your HRM, open the settings app, go to bluetooth, your app will get the discovery much sooner.


Apps like the Apple Store use iBeacons, do you know what other beacon apps they might have installed? What kind of devices were showing up in the paired list? LE or Classic devices?


If you're using the estimote app, they do a bunch of junk. They use both CoreLocation and CoreBluetooth. The corebluetooth stuff would support my above experiment.

iPhone: Paired Devices vs iBeacon Bluetooth Battery Consumption
 
 
Q