Re: BLE scan under simulator finds service twice
Re: BLE scan under simulator finds service twice
- Subject: Re: BLE scan under simulator finds service twice
- From: Etan Kissling <email@hidden>
- Date: Fri, 19 Apr 2013 19:26:03 +0000
- Thread-topic: BLE scan under simulator finds service twice
Rick,
name discovery happens through active scanning, which means that an additional packet is sent
to the peripheral in order to retrieve its name. Therefore, the name is not available immediately,
and CoreBluetooth raises an additional didDiscover event in order to pass you the updated
information, because it has no other callback method to notify you of the full information.
I'm not sure why the delay is only 3ms in your case. Maybe the first request somehow gets delayed
when it goes through all the layers of CoreBluetooth.
Etan
On 19.04.2013, at 21:03, Rick Mann <email@hidden>
wrote:
> I've been building my app and running it on an iPad for a while, and things behaved the way I expected.
>
> Just now I finally got around to trying an external BLE HCI and getting the simulator to see it. That worked well, and the app now runs in the simulator, but it discovers my BLE service twice.
>
> The first time, it has a null CBAdvertisementDataLocalNameKey value. The second time, it gets the value. In the scan, I have CBCentralManagerScanOptionAllowDuplicatesKey set to false:
>
> 2013-04-19 12:00:00.779 MatterScan[64624:c07] <FindCamerasViewController.m:250>: service: Unknown (<75d51f1b 4b2a431c 88af055e 4839b9be>)
> 2013-04-19 12:00:00.780 MatterScan[64624:c07] <FindCamerasViewController.m:253>: Found service: (null)
> 2013-04-19 12:00:00.782 MatterScan[64624:c07] <FindCamerasViewController.m:250>: service: Unknown (<75d51f1b 4b2a431c 88af055e 4839b9be>)
> 2013-04-19 12:00:00.782 MatterScan[64624:c07] <FindCamerasViewController.m:253>: Found service: Souffle Girl
>
> Any ideas?
>
> --
> Rick
>
>
>
>
> _______________________________________________
> 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