core-bluetooth

Scan for peripherals when device is locked

我的未来我决定 提交于 2019-12-22 17:41:16
问题 My central manager can detect new peripherals in the foreground and background - I know this because I trigger a UNNotification when it finds a new peripheral. However, when the device is locked it does not seem to keep scanning for new peripherals. In my capabilities I have enabled background mode for Using LE accessories, as well as remote notifications. Am I missing something with BLE that can allow me to detect new peripherals when the device is locked? Update w/ more info: Here's how I

How can I control UISlider Value Changed-events frequency?

跟風遠走 提交于 2019-12-22 08:42:47
问题 I'm writing an iPhone app that is using two uisliders to control values that are sent using coreBluetooth. If I move the sliders quickly one value freezes at the receiver, presumably because the Value Changed events trigger so often that the write-commands stack up and eventually get thrown away. How can I make sure the events don't trigger too often? Edit: Here is a clarification of the problem; the bluetooth connection sends commands every 105ms. If the user generates a bunch of events

Bluetooth 4.0 with older Bluetooth

心不动则不痛 提交于 2019-12-22 05:24:06
问题 i'm trying to implement an application using a Bluetooth 4.0 module, and I wonder if using this application with an Iphone 3GS containing a simple Bluetooth 2.1 EDR module is going to enable me take advantage of the the low energy in my 4.0 module. Thank you for your answers 回答1: Bluetooth 4.0 is the standard, which includes both classical Bluetooth Basic Rate/Enhanced Data Rate (BR/EDR) and Bluetooth Low Energy (BLE, or Bluetooth Smart, which is a marketing name). Compatibility depends on

In CBCentralManager delegate method didDiscoverPeripheral: never called

只愿长相守 提交于 2019-12-22 01:15:24
问题 I initialize the CBCenteralManager in viewdidload on main queue. First time update state method is called and start scanning for bluetooth devices but didDiscoverPeripheral: delegate method never get called. Code is : - (void)viewDidLoad { [super viewDidLoad]; self.CM = [[CBCentralManager alloc]initWithDelegate:self queue:nil]; } -(void)centralManagerDidUpdateState:(CBCentralManager *)central{ if (central.state == CBCentralManagerStatePoweredOn) { [self.CM scanForPeripheralsWithServices:nil

How to reboot CoreBluetooth manager instance at fixed interval in background

六眼飞鱼酱① 提交于 2019-12-22 00:29:34
问题 I'm developing a iOS application of using CoreBluetooth and i have one problem in application BackGround. Generally, iOS application can't run long-term in Background. (e.g. pushing HomeButton. switching other application) But my application is set "Uses Bluetooth LE accessories" as BackGroundMode, so i can monitor region in Background. And i implemented startRangingBeaconsInRegion in didEnterRegion. When enter a region, Ranging region will be started and will be stopped after about 10 sec by

What profile can I use with CoreBluetooth?

…衆ロ難τιáo~ 提交于 2019-12-21 21:27:12
问题 I looking for informations about CoreBluetooth , I see iPhone4s/5 support Bluetooth 4.0 and Bluetooth LE . Also, according to this note, I can use these profiles : Hands-Free Profile (HFP 1.6) Phone Book Access Profile (PBAP) Advanced Audio Distribution Profile (A2DP) Audio/Video Remote Control Profile (AVRCP 1.4) Personal Area Network Profile (PAN) Human Interface Device Profile (HID) Message Access Profile (MAP) Can I have access to them using CoreBluetooth and, if so, how could I access to

CoreBluetooth and Wifi interference

我们两清 提交于 2019-12-21 20:05:37
问题 I'm really stuck with a problem, thus, needless to say, I need your help. I'm using CoreBluetooth to communicate between two iDevices, it is the same app, running as a central on one device and as a peripheral on the other device. In some cases the central loses connection to the peripheral with the following error: Error Domain=CBErrorDomain Code=10 "The connection has failed unexpectedly." UserInfo=0x14ee8fe0 {NSLocalizedDescription=The connection has failed unexpectedly.} In this

Scanning for BLE Devices from C/C++

孤街醉人 提交于 2019-12-21 12:56:02
问题 from the "Bluetooth Device Access Guide", I've read that the Bluetooth API should be accessable from C or from C++. I've found some C-headers (IOBluetoothUserLib.h, Bluetooth.h) in the IOBluetooth framework that are related to Bluetooth and contain enumerations and data structured to define search creteria but I fail to find any function that takes such enumeration or data structure as parameter. According to the documentation I would have to create a CBCentralManager but I fail to find a way

Scanning for BLE Devices from C/C++

本小妞迷上赌 提交于 2019-12-21 12:54:58
问题 from the "Bluetooth Device Access Guide", I've read that the Bluetooth API should be accessable from C or from C++. I've found some C-headers (IOBluetoothUserLib.h, Bluetooth.h) in the IOBluetooth framework that are related to Bluetooth and contain enumerations and data structured to define search creteria but I fail to find any function that takes such enumeration or data structure as parameter. According to the documentation I would have to create a CBCentralManager but I fail to find a way

CoreBluetooth[WARNING] Unknown error: 14 on iPhone 5

寵の児 提交于 2019-12-21 09:24:49
问题 I am able to connect to a peripheral device using BLE, but shortly after reading some characteristics, the framework returns: CoreBluetooth[WARNING] Unknown error: 14 and the peripheral is disconnected. Looking at the BT Core_V4.0 spec, I am not sure what the error means. Is the 14 a hex value? does it mean the following error according to the spec: (Part D Section 2 - Error Codes) 2.20 REMOTE DEVICE TERMINATED CONNECTION DUE TO LOW RESOURCES (0X14) The Remote Device Terminated Connection due