Re: Scanning for specific service IDs in the background
Re: Scanning for specific service IDs in the background
- Subject: Re: Scanning for specific service IDs in the background
- From: Andras Kovi <email@hidden>
- Date: Wed, 17 Oct 2012 22:09:26 +0200
Hi Zsombor,
I described this issue a few weeks ago and haven't got any response yet. Here's my observation and I think you bumped in this issue:
Begin forwarded message:
>
> On 2012.09.28., at 22:14, Andras Kovi <email@hidden> wrote:
>
>> Hi Joakim,
>>
>> I just helped debugging an issue for Frederic and found a really interesting behavior. Please confirm or correct me.
>>
>> Observation: if the app is sent to background, the advertising continues but the advertisement data is not sent in the packages
>>
>> Effect 1: Backgrounded apps cannot be discovered by clients that filter for services. When a client uses scanForPeripheralsWithServices, the peripheral will be found but callback not happens in the app as the service filtering criteria will not be satisfied
>>
>> Effect 2: Backgrounded apps will never be discovered by clients that started scanning while the app was in background. If a client starts scanning while the app is in the background, CoreBluetooth finds the peripheral but callback does not happen. Then when the app comes to foreground and advertisement data is sent again, CoreBluetooth will not invoke the callback as it thinks it already provided the callback for that. (Discovery may happen only when the BLE address is changed (every 15 minutes or so))
>>
>> I think this phenomenon can explain many recently reported issues too.
>>
>> Your help is much appreciated.
>>
>> Regards,
>> Andras
>
On 2012.10.17., at 21:25, Zsombor Papp <email@hidden> wrote:
> Hi,
>
> I am finding that if I invoke scanForPeripheralsWithServices with a nil parameter for services, it works fine in the background, but if I specify a service UUID then it won't discover the service. This same behavior is mentioned here:
>
> http://stackoverflow.com/questions/9896562/what-exactly-can-corebluetooth-applications-do-whilst-in-the-background
>
> although that post is more than 6 months old now and describes iOS 5.0.1 behavior. Can anyone confirm that the same behavior/limitation still applies to iOS6?
>
> Thanks,
> Zsombor
> _______________________________________________
> 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