Questions tagged [cbcentralmanager]

CBCentralManager is an object used by CoreBluetooth on OS X and iOS to manage peripheral devices.

CBCentralManager is an object used by CoreBluetooth on OS X and iOS to manage peripheral devices. On CBCentralManager, you can find the following methods:

Initializing a Central Manager

– initWithDelegate:queue:

– initWithDelegate:queue:options:

Establishing or Canceling Connections with Peripherals

– connectPeripheral:options:

– cancelPeripheralConnection:

Retrieving Lists of Peripherals

– retrieveConnectedPeripheralsWithServices:

– retrievePeripheralsWithIdentifiers:

– retrieveConnectedPeripherals Deprecated in iOS 7.0

– retrievePeripherals: Deprecated in iOS 7.0

Scanning or Stopping Scans of Peripherals

– scanForPeripheralsWithServices:options:

– stopScan

Monitoring Properties

state property

delegate property

235 questions
1
vote
1 answer

CoreBluetooth peripheral service becomes empty while reconnecting/restoring

In my iOS app I am able to successfully connect to BLE peripherals, discover service and subscribe to characteristics so that app gets notified whenever there is a change in characteristic value. All these happens with no issues as long as app runs…
1
vote
1 answer

Objective-c bluetooth says it's connected but CBCentralManager does not discover it

In my app, I search for previously connected devices with the delegate method retrieveConnectedPeripheralsWithServices first, then scan for nearby devices if nothing is found. Here is the code - (void)searchForPeripherals { NSLog(@"*** scanning…
GoreDefex
  • 1,461
  • 2
  • 17
  • 41
1
vote
3 answers

Not able to recognize the beacon using CBPeripheral in iOS

Edited: Removed iBeacon code. Since there is not issue with iBeacon code. -> Once we recognize our beacons, we have to communicate with the first beacon using BLE. We are using Bleno framework on Respberry PI. //Passing my service…
Praveen
  • 126
  • 1
  • 6
1
vote
0 answers

Not able to search my BLE Device which is providing service ID in scan Response iOS

I am developing an iOS application which works both in background and foreground. Everything works fine when the application is in foreground state but whenever the application is in background state and central manager is scanning for peripherals…
Himanshu
  • 2,832
  • 4
  • 23
  • 51
1
vote
0 answers

BLE disconnection issues and reasons

I’m new to bluetooth development and I’m working on a project that require connecting to a BLE. Currently I have multiple problem that I will list them: The app (some times) keep disconnecting from Peripheral with three different reasons: The…
1
vote
1 answer

How to convert value of Type 'CBManagerState' to expected type 'CBCentralManagerState' after conversion to Swift 3.0 syntax?

I am working on an iOS App which uses the CoreBluetooth Central Manager. The app was working as expected, until I updated to xCode 8. This update somehow forced me to convert the code from Swift 2.3 to Swift 3.0 with the conversion manager. After…
iiiiirev
  • 11
  • 1
  • 4
1
vote
1 answer

Core Bluetooth setNotifyValue isn't setting CBCharacteristics notifying property to true

Hey guys I'm trying to get this bluetooth LE device to connect to the app and grab the values out. I'm using Core Bluetooth which is supposed to get the values out. I had it working but all the sudden it stopped notifying the values when it updates.…
yhozumi
  • 81
  • 5
1
vote
2 answers

CBPeripheral always connects to CBCentralManager even Pairing Request was unsuccessful

I am new to Core Bluetooth programming in iOS. Recently I encountered this problem that when connecting to a peripheral, "Bluetooth Pairing Request" alert will pop up on screen. But regardless if I cancelled the request, entered an invalid pin, or…
1
vote
0 answers

cannot connect to BLE peripheral

I cannot seem to connect to a BLE peripheral from OSX. I can scan just fine, but connection never happens. I am saving a local copy of the CBPeripheral* object - in fact, I can query it and the connection state is CBPeripheralStateConnecting, and if…
kitti
  • 14,663
  • 31
  • 49
1
vote
1 answer

CBCentralManager to get dynamic list of advertising Bluetooth LE devices in iOS

I am working on a project to display the list of all Bluetooth LE devises with services with specific UUIDs. In method didDiscoverPeripheral, I save the discovered peripherals that are advertising. I use the option…
Alina
  • 61
  • 5
1
vote
0 answers

CBCentralManager:didDiscoverPeripheral, is there the concept of the discovered item not being seen?

working on a bluetooth implementation and am using didDiscoverPeripheral to populate a list. But, if the device is turned off or is moved away want to be able to remove the device from my list. Anyone know of a delegate or way to track items no…
Rob Bonner
  • 9,276
  • 8
  • 35
  • 55
1
vote
1 answer

Transfer Data to multiple peripheral simultaneously ios BLE

Able to connect to multiple iOS devices via Bluetooth, working as 1 master and 4 slave devices. Data transfers from central to peripheral through the following code [peripheral.peripheral writeValue:currentData…
1
vote
3 answers

How to wait until delegate method is called?

I want to create a method startCentralManager that waits until the delegate method centralManagerDidUpdateState is called and returns a boolean value depending on the central state. I want to use the method like this: let centralManager =…
neugebap
  • 19
  • 3
1
vote
0 answers

cancelPeripheralConnection invokes didFailToConnectPeripheral

I'm writing the app which uses CoreBluetooth framework. Everything is fine except one thing. According to Apple documentation for CBCentralManager, calling cancelPeripheralConnection: method causes invoking of…
Wieczorny
  • 171
  • 1
  • 10
1
vote
0 answers

Data missing while sending data from central to peripheral - CoreBluetooth ios

In CoreBluetooth, am trying to transfer data from central to peripheral using writevalue: with type:CBCharacteristicWriteWithoutResponse which makes the data transfer faster. but datas getting missed in between. i dont want to use writevalue: with…