Questions tagged [core-bluetooth]

CoreBluetooth is a framework for iOS and Mac OS X to interact with Bluetooth Low Energy ("BLE") accessories.

The and Mac OS X CoreBluetooth allows developers to interact specifically with Bluetooth Low-Energy ("LE") accessories. The interfaces of this framework allow you to scan for LE accessories, connect and disconnect to ones you find, read and write attributes within a service, register for service and attribute change notifications, and much more.

The CoreBluetooth framework for iOS can work in central role (iOS 5.0+) or in peripheral role (iOS 6.0+).

2350 questions
14
votes
3 answers

iOS Bluetooth dual-mode; connect BLE (GATT) to an already connected BR/EDR (A2DP/HFP) stereo headset simultaneously

I'm developing a stereo headset with Bluetooth using the classic profiles (HFP, A2DP, AVRCP) as one would expect Ina stereo headset. However, I want to deploy a remote control app for iOS, and use it simultaneously to the other classic links, but…
14
votes
2 answers

iOS 7 Core Bluetooth Peripheral running in background

What I want is for my iOS device to be advertising a Bluetooth LE service all the time, even when the app isn't running, so that I can have another iOS device scan for it and find it. I have followed Apple's backgrounding instructions…
jpcoder
  • 1,129
  • 2
  • 9
  • 14
14
votes
3 answers

iPhone corebluetooth central Manager send data to peripheral

I want to send data from iPhone to a bluetooth device which get discovered and connects. I am referring this tutorial to connect. I am not able to send data to external bluetooth device which is connected as we do with External Accessory…
TechFanatic
  • 1,188
  • 4
  • 11
  • 31
14
votes
1 answer

When would CBCentralManager's state ever be powered on but still give me a "not powered on" warning?

I keep getting this error when I run my app that uses CoreBluetooth on an iPhone 5: is not powered on But when I call state on my program's one and only CBCentralManager object, it returns 5, which is…
sudo
  • 4,510
  • 4
  • 32
  • 66
14
votes
2 answers

iOS CoreBluetooth passively check if Bluetooth is enabled without prompting user to turn Bluetooth on

The scenario is as follows. I have an already deployed app being used by people. I am considering implementing some experimental Bluetooth Low Energy features, but before I do, I want to conduct an "in the wild" survey of the number of users who…
Bryce Thomas
  • 9,405
  • 21
  • 69
  • 117
13
votes
3 answers

Is there a way to access Bluetooth 4.0 Low Energy devices in iOS?

The new iPhone 4S has support for Bluetooth 4.0 Low Energy devices. Is there an API for communicating with these devices in iOS?
Michael Trend
  • 487
  • 1
  • 5
  • 19
13
votes
2 answers

Can't connect to AirPods via BLE

I am trying to connect automatically to my AirPods with a simple app using BLE. I get the name of the device and the status to "connecting", but for some reason I can't connect to it. Function 'didConnect peripheral' is never triggered. I tried all…
Ruxel
  • 141
  • 8
13
votes
1 answer

How to pass self to initializer during initialization of an object in Swift?

I have the following code: import CoreBluetooth class BrowserSample: NSObject, CBCentralManagerDelegate { let central : CBCentralManager init() { central = CBCentralManager(delegate: self, queue: nil, options: nil) …
Ana
  • 11,726
  • 5
  • 49
  • 101
13
votes
3 answers

Core Bluetooth State Preservation and Restoration Not Working, Can't relaunch app into background

I'm trying to make core bluetooth wake up the app even when it's not running. As Apple stated, "Because state preservation and restoration is built in to Core Bluetooth, your app can opt in to this feature to ask the system to preserve the state of…
13
votes
2 answers

Sending image file over Bluetooth 4.0 LE

I am trying to send an .png image file from one iOS Device to another over Bluetooth 4.0 LE. I am able to simple pieces of data like strings, but unable to successfully send and utilize image files. In the Peripheral device, I start out with…
tagabek
  • 1,958
  • 4
  • 15
  • 22
13
votes
1 answer

CoreBluetooth: What is the lifetime of unique UUIDs

Following off of this question: Corebluetooth, How to get a unique UUID? After connecting to a peripheral, I can retrieve its CFUUIDRef, which is unique, and can use it to reconnect via retrievePeripherals. However, I have found that I can not use…
loadedion
  • 2,111
  • 17
  • 36
13
votes
1 answer

iOS6: CBPeripheral is being dealloc'ed while connecting

I'm trying to connect to a bluetooth BTLE device. I have no problem discovering the peripheral. However, when I attempt to connect to the peripheral, I received the following warning. 2013-04-05 22:10:36.110 CoreBluetooth[WARNING] …
mikeholp
  • 925
  • 3
  • 11
  • 14
13
votes
1 answer

Maximum number of peripherals on CoreBluetooth?

I am interested in working with BLE proximity sensor on iOS and have been looking up for a few answers to my query but could not find any solid ones. 1) Is there a maximum number of BLE slaves the CoreBluetooth can handle? 2) Will the slaves…
Cheng
  • 239
  • 3
  • 13
12
votes
1 answer

CoreBluetooth pairing feedback / callback

It feels like I'm missing something here, but how can I get feedback on whether pairing a passcode protected peripheral failed or succeeded? When I to connect a peripheral which is password protected the password UIAlertView pops up and the…
Mathijs
  • 1,168
  • 1
  • 9
  • 27
12
votes
5 answers

Maximum data size when sending data via BTLE on iOS

I am currently implementing an iOS application that uses CoreBluetooth to transfer data between 2 devices. For example, to send data from the central to the peripheral, I use this code: NSData *data = [NSJSONSerialization…