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
23
votes
1 answer

Background time issue for Bluetooth LE app for Iphone 4s

I am using core-bluetooth framework for my app in Iphone-4s. This is typically has to be a background app which can run as longer as possible. Now it is only running for 40 min - 1 hour max. I am hoping for at least 1 day or so. For this…
22
votes
5 answers

CoreBluetooth XPC connection invalid

public class BLE: NSObject, CBCentralManagerDelegate { var centralManager:CBCentralManager! public override init() { super.init() self.centralManager = CBCentralManager.init(delegate: self, queue: nil) } public…
Zeryx
  • 221
  • 1
  • 2
  • 4
22
votes
2 answers

Check Bluetooth status - Swift 4

I have a problem with the Bluetooth in Xcode. I can’t find a great solution on how to check if Bluetooth is on or not. I want just that. I searched around the web some solution, but nothing works for me. Any idea on how to check Bluetooth? I…
Francesco Laiti
  • 233
  • 1
  • 2
  • 5
22
votes
4 answers

Read data from BLE device

I am trying to read data from a bluetooth device (BR-LE4.0-S2). I was able to connect BLE device, but not able to read data from it.I don't have any specification about BLE services and it's characteristics. Here what my issue is -…
Ab'initio
  • 5,128
  • 4
  • 25
  • 40
22
votes
2 answers

How to use bluetooth classic instead of le

In reference to Dennis Mathews answer how do you specify bluetooth classic instead of LE on iOS? Is there a different api from Core Bluetooth Framework?
joels
  • 6,153
  • 10
  • 47
  • 83
19
votes
1 answer

Detecting beacons via iBeacon Monitoring & Ranging vs CoreBluetooth scanForPeripheralsWithServices

There is a lot of confusion regarding the restrictions that are applied by the iOS on apps that want to scan BLE beacons\peripherals. After reading several blogs and Stack Overflow answers, I want to see if I understand all the issues correctly.…
Oren
  • 2,647
  • 3
  • 22
  • 37
19
votes
1 answer

How to detect nearby devices with Bluetooth LE in iOS 7.1 both in background and foreground?

I have an app that needs to detect a nearby (in range for Bluetooth LE) devices running the same application and iOS 7.1. I've considered two alternatives for the detection: Having the devices act as iBeacons and detect iBeacons in range Using…
Markus Rautopuro
  • 7,357
  • 4
  • 41
  • 56
19
votes
3 answers

Core Bluetooth and backgrounding: Detection of a device and triggering an action, even after being days in background mode?

I've written an app that needs to get informed when a certain Bluetooth Low Energy device comes within range. If the BLE device gets noticed my app just stores a timestamp. As stated in the WWDC 2012 Core Bluetooth videos, there are two…
Norbert
  • 3,999
  • 6
  • 33
  • 57
19
votes
2 answers

How to correctly implement didReceiveWriteRequests? iOS6 CoreBluetooth

I implement iOS CoreBluetooth client & server for sending data client site [self.connectedPeripheral writeValue:mainData forCharacteristic:characteristic type:CBCharacteristicWriteWithResponse]; and - (void)peripheral:(CBPeripheral *)peripheral…
Ken
  • 191
  • 1
  • 3
18
votes
7 answers

CoreBluetooth XPC Connection Invalid on dismiss viewcontroller

After I have finished disconnecting from my bluetooth devices, seeing that they have disconnected in the didDisconnectPeripheral delegate, I attempt to dismiss my viewcontroller. When this happens I see the message: "[CoreBlueooth] XPC Connection…
Lou_257
  • 321
  • 1
  • 2
  • 7
18
votes
3 answers

What is the difference between ACL and SCO Link in Bluetooth?

ACL= Asynchronous Connection-Less. SCO = Synchronous Connection Oriented. SCO is Point to Point Connection between only one master and only one slave. ACL is multipoint connection between one master and many slaves. What are the other differences? …
Dipankar Nalui
  • 781
  • 1
  • 14
  • 27
18
votes
2 answers

ios CoreBluetooth[WARNING] Unknown error: 1309

I am sporadically getting the message "CoreBluetooth[WARNING] Unknown error: 1309” on the console when running a BlueTooth app I am developing. Even though the message states that it is a warning, it stops execution of the app. I have been able to…
James Lin
  • 715
  • 6
  • 18
18
votes
2 answers

iOS 6 CoreBluetooth Pairing / Forgetting (2 questions)

We have a bondable (when we connect we are asked to Pair, see question 2) Bluetooth 4.0 peripheral that we have manufactured and have written an iOS app for. Question 1 Is it possible in iOS 6 with CoreBluetooth to remove our peripheral from the iOS…
WrightsCS
  • 49,871
  • 22
  • 132
  • 180
17
votes
4 answers

locationManager:didEnterRegion not called when a beacon is detected

While testing with beacons (iOS devices) I found the listener beacon giving some unexpected behavior. locationManager:didEnterRegion method is not getting called even if a beacon enters a region. But the locationManager:didRangeBeacons:inRegion: is…
Dhanesh KM
  • 449
  • 2
  • 7
  • 18
17
votes
3 answers

Peripheral and central at the same time on iOS

I've looked everywhere and tried everything, but nothing seems to work :( On iOS, I'm making an app (for iOS 6 and above) in which iOS devices need to exchange data. Therefore, both devices need to be peripheral and central at the same time. I've…
Macro206
  • 2,093
  • 2
  • 16
  • 24