Skip to content

Instantly share code, notes, and snippets.

What would you like to do?

CoreBluetooth not discovering peripherals



Bluetooth LE devices are never detected by a CBCentralManager when scanning for all devices.

Steps to Reproduce:

  1. Clone and run a Bluetooth LE peripheral, e.g. git clone
  2. Clone this example on an Apple TV: git clone
  3. Run the example on a tvOS device

Expected Results:

The CBCentralManagerDelegate discovery functions called with Bluetooth LE peripherals nearby

Actual Results:

None of the CBCentralManagerDelegate functions are called


tvOS 9.0



Apple TV



This comment has been minimized.

Copy link

@rcarlsen rcarlsen commented Nov 11, 2015

I believe that you are calling the centralManager too soon in the referenced example project. You must wait until the centralManager calls the delegate method centralManagerDidUpdateState() with a state parameter of .PoweredOn or higher before calling methods on the centralManager.

When I moved the call to scanForPerihperalsWithServices() into the .PoweredOn case in ..didUpdateState() then nearby peripherals were discovered as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.