This issue was discussed in October here . This is a new question, since CoreBluetooth is fairly new, and some changes may occur since then.
I have a BLE device ad every 2 seconds. Scanning starts with:
[self.CM scanForPeripheralsWithServices:nil options:0]
Which most often returns (via centralManager didDiscoverPeripheral callback) after about 2-4 seconds. (CM is my CentralManger)
However, in approximately 30% of cases, scanning takes 10 to 18 seconds. WiFi and BT in neighboring devices were turned off to clear the spectrum as much as possible. Scan time is not related to RSSI. Which is -40 dB when next to the iPAd3, -70dB, about 5 meters in another room.
[self.CM stopScan]
called before scanWithPeripherals, as this reduces the occurrence of really long wait times.
No connection is made. No feature or service data is requested. There is enough advertising data.
There is a useful TI demo application . This gives similar results (actually a bit worse, since it doesn't cause any stopScan calls)
The CBCentralManagerScanOptionAllowDuplicatesKey parameter, as shown in this https://stackoverflow.com/a/4646/2/2/2/2/2/5/01/2/2/2/2/2/5/01/9/01/... , if something seems to lengthen the detection time.
Obviously, the next step will be to use some of the more advanced BT noise / advertising reduction tools to further describe this CoreBluetooth answer.
This is another useful SO question , but not enough time to answer.
Nick t
source share