core-bluetooth

Communicating between iOS and Android with Bluetooth LE

限于喜欢 提交于 2019-11-26 17:55:30
问题 I've got a working app using CoreBluetooth to communicate between an iPad (central) and iPhone (peripheral). I have one service that has two characteristics. I have a Nexus 7 running the latest Android 4.3 with BTLE support. Android is a bit late to jump on the BTLE bandwagon but it appears they are approaching it similarly to how iOS did, where initially they only support acting as a central with the peripheral mode coming in a later version. I can load the sample Android BTLE app and browse

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

给你一囗甜甜゛ 提交于 2019-11-26 16:44:38
问题 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 already have Bluetooth turned on/leave Bluetooth on all the time. So, I would just like to check this in the background and send back to a server statistics on number of users with Bluetooth already on, without ever actually using Bluetooth

Reading long characteristic values using CoreBluetooth

妖精的绣舞 提交于 2019-11-26 15:34:33
问题 I have a characteristic value which contains the data for an image. In the peripheral I setup the value like this: _photoUUID = [CBUUID UUIDWithString:bPhotoCharacteristicUUID]; _photoCharacteristic = [[CBMutableCharacteristic alloc] initWithType:_photoUUID properties:CBCharacteristicPropertyRead value:Nil permissions:CBAttributePermissionsReadable]; My understanding is that when this value is requested, the didRecieveRequest callback will be called: -(void) peripheralManager:

Core Bluetooth advertise and scan in the background

故事扮演 提交于 2019-11-26 11:57:42
问题 I have been trying to setup an app to make the device both scan for peripherals and advertise as a peripheral. The goal is for two devices to be woken up in the background when they become near each other via bluetooth discovery. From the Apple Documentation, it seems that you should be able to run BLE in the background (with bluetooth-central and bluetooth-peripheral background modes enabled), and my application works when one device is in the foreground. First, I advertise data like so:

how to find Bluetooth audio devices in iOS

我只是一个虾纸丫 提交于 2019-11-26 10:36:23
问题 Okay, I\'m working on a fun project that has a hurdle where I need to enable Bluetooth audio support for my iOS app. The hurdle I\'m at is that I simply can\'t even begin to get a list of connected Bluetooth audio devices. Even though my iPhone 5S recognizes my earpiece (a ~3 - 4 year old LG HBM-230, to be precise) and plays audio through it for phone calls, BOTH External Accessory and CoreBluetooth are giving me nothing useful when I query both. I\'m basing my own code off questions &

What exactly can CoreBluetooth applications do whilst in the background?

两盒软妹~` 提交于 2019-11-26 10:06:21
问题 The subject says it all, really. Documentation, insofar as it exists at all, suggests that apps written against the CoreBluetooth framework running on iOS devices can add \"bluetooth-central\" to their background privilege list and so process some kind of Bluetooth events whilst inactive, but which exact events do and do not get delivered? For example: Can I carry on communications with a device I already established a pairing with? Can I issue periodic discovery requests to find devices

How to use bluetooth classic instead of le

久未见 提交于 2019-11-26 09:47:52
问题 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? 回答1: Joels there is a very clear way to use Bluetooth classic on iOS. It is with the External Accessory framework (it also includes direct hardware connections in addition to Bluetooth classic however). You need to add the ExternalAccessory.framework and specify " App communicates with an accessory " in the required background modes inside

iBeacon Notification when the app is not running

别说谁变了你拦得住时间么 提交于 2019-11-26 07:53:20
问题 I managed to make an iBeacon which triggers a local push notification on my iPhone when the beacon is in range. It\'s perfectly working when the app is in background mode. My question is: Can I trigger the notification even when the app is not running, not even in the background? I thought this was possible but I\'m not sure. If so, how can I accomplish this? Thanks! 回答1: Yes, it's possible and should be automatic. After you have created a CLBeaconRegion and started monitoring on it, Location

Use BlueZ Stack As A Peripheral (Advertiser)

一个人想着一个人 提交于 2019-11-26 06:57:21
问题 Goal : Use BlueZ and an Bluetooth 4LE dongle to create a peripheral that advertises the bluetooth equivalent of \"Hello World\". Where I\'m At : I\'ve currently got the BlueZ stack setup and downloaded, I can use the hci tool to recognize and see the Bluetooth dongle. I\'ve tinkered with hciconfig leadv but I\'m just not quite getting it/understanding what\'s going on. What Help I Think I Need : I need to get it to the next step. If anyone can either point me towards a good resource, walk me

Does the iPhone simulator in Xcode support Bluetooth Low Energy?

回眸只為那壹抹淺笑 提交于 2019-11-26 06:35:45
问题 I\'m trying some iOS test applications on the new Mac mini, that supports Bluetooth Low Energy. The CoreBluetooth framework is used in those. However, I\'m not able to get Bluetooth working in the iPhone simulator, that is part of Xcode. When I allocate a new CBCentralManager, centralManagerDidUpdateState: receives CBCentralManagerStatePoweredOff which stands for Bluetooth is currently powered off. The first time I ran the text application, a box was then opened up that looked pretty bugged