didDiscoverPeripheral seems to called after stopScan
didDiscoverPeripheral seems to called after stopScan
- Subject: didDiscoverPeripheral seems to called after stopScan
- From: Pierre Bouchet <email@hidden>
- Date: Fri, 20 Apr 2012 14:57:52 +0200
Hi,
I'm running [CBCentralManager scanForPeripheralsWithServices:nil options:nil].
In my implementation of didDiscoverPeripheral I call printf("%s\n", [peripheral.name UTF8String]) and [CBCentralManager stopScan].
However didDiscoverPeripheral sometimes gets called a second time, with a peripheral that has the same name and UUID as the first one, even though the system is not supposed to be scanning anymore.
This happens even with CBCentralManagerScanOptionAllowDuplicatesKey set to NO.
Also the device name printed to the console is always (null) the first time a device is discovered after launching the app.
Am I misunderstanding how scanning works?
I'm using Xcode 4.3 to run my app on an iPhone 4S with iOS 5.1 - the BLE peripheral comes from the TI CC2540 dev kit and it's the only BLE device in range when I run my tests.
Regards,
Pierre
_______________________________________________
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