Hi,
I have done some tests in recent days and here is what I've found:
1) It takes a while to discover devices in background mode. Usually it takes 10-30 seconds till first discovery, but can be a more. If you allow duplicate peripherals (notification for each ad package), it interval between those notifications can be minutes. 2) I haven't tested this, but as far as I understand, you can only scan for specific services in background mode. If you scan for all devices, this might not work.
I did the tests with two iPhones 4s -- one as peripheral and on as central.
Also I noticed that events in background more might take a while to execute. I had timer to fire 10 seconds after the peripheral was found and the events in method took couple of minutes to execute (including making request to server).
Hope this helps somehow.
Sincerely, Arthur
Hi Andras, I have the same issues here.
In my app delegates method:
- (void)applicationDidEnterBackground:(UIApplication *)application
I'm calling:
- (void)scanForPeripheralsWithServices:(NSArray *)serviceUUIDs options:(NSDictionary *)options;
But the delegate method:
- (void)centralManager:(CBCentralManager *)central didDiscoverPeripheral:(CBPeripheral *)peripheral advertisementData:(NSDictionary *)advertisementData RSSI:(NSNumber *)RSSI;
Seems to be never called. "bluetooth-central" is in my UIBackgroundModes array as well.
I changed the ADV Interval of my peripherals to 20ms in order to meet the Apple BLE Peripheral recommendations but this changed nothing.
Kind Regards,
Do not post admin requests to the list. They will be ignored.
Bluetooth-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
|