Re: Not receiving BLE events in background
Re: Not receiving BLE events in background
- Subject: Re: Not receiving BLE events in background
- From: Joakim Linde <email@hidden>
- Date: Thu, 16 Aug 2012 14:12:52 -0700
Hi Andras,
Please file bug at bugreport.apple.com If you think there is an issue with iOS. Send me the bug number and We'll take a look at it.
Thanks,
Joakim
On Aug 16, 2012, at 2:32 AM, András Kövi wrote:
> Hi Arthur,
>
> thank you for the response. I'll try what you suggest. However, it
> seems to be odd that my app does not (or with significant delay)
> receive attribute write requests while connected in the background.
> This would not be good at all. A few hundred milliseconds delay is ok
> but 10s is intolerable.
>
> The reason why I think something is still missing from the whole
> picture is that heart rate monitors and similar are also target
> applications. Those devices send the data at a constant pace and I
> can't think that the framework would buffer it for my app.
>
> Anyway, it would be good to hear the official Apple opinion as well.
>
> Best regards,
> Andras
>
> 2012/8/16 Arturs Vonda <email@hidden>:
>> 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
>>
>> On Aug 16, 2012, at 10:41, "m.kroll" <email@hidden> wrote:
>>
>> 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,
>> Dr. Michael Kroll.
>>
>>
>> On Aug 16, 2012, at 09:24 AM, Andras Kovi <email@hidden> wrote:
>>
>> Hi!
>>
>> Do I have to add anything to the app to indicate iOS that BLE events must be
>> delivered to it while backgrounded? I declared the UIBackgroundModes /
>> bluetooth-central in the info.plist file, so in theory I should be able to
>> receive the events.
>>
>> 1. The app scans for the BLE accessory and connects to it. Connection is
>> reestablished automatically if the didDisconnect is received.
>> 2. Go back to the home screen.
>> 3. No callbacks while the app is in the background.
>> 4. Bring the app back to foreground, and the didConnect, didDiscover and
>> other callbacks are immediately called.
>>
>> Thanks in advance,
>> Andras
>> _______________________________________________
>> 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
>>
>> _______________________________________________
>> 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
>>
>>
> _______________________________________________
> 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
_______________________________________________
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