This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

iOS BLE scan

Hi All,

I'm using "scanForPeripheralsWithServices" of iOS to the BLE devices. "scanForPeripheralsWithServices" sometimes never return anything. I have to stop scan or turn Bluetooth off to get return from "scanForPeripheralsWithServices".

I don't know why "scanForPeripheralsWithServices" doesn't return anything. Is there anyway to get return result?

Please advise.

Thanks,

  • A little more information may be helpful. Can you answer some of the following questions:

    1. Do you mean the delegate's centralManager:didDiscoverPeripheral:advertisementData:RSSI: isn't being called?

    2. Are you sure you have the delegate object properly configured and retained (i.e., that it hasn't been released due to lack of references to it)? The Manager's delegate property is a weak reference, so you need a strong reference to it somewhere.

    3. Are you using any particular options with scanForPeripheralsWithServices? Or are you just calling it with nil?

    4. Have you tried rebooting your iOS device to ensure there isn't a quirk with the Bluetooth stack?

    5. Are you using an additional scanner App, like LightBlue? If so, the device may already be connected to a background App. Be sure all apps that may have connected to the device have been terminated before testing.

Related