core-bluetooth

iOS to Mac OS X [core] bluetooth data transfer

半城伤御伤魂 提交于 2019-12-04 11:04:54
My objective here is to create a connection between a device running iOS to a device running Mac OS X , via bluetooth. I know that I might be able to use CoreBluetooth for this but I don't understand how since I don't see a method to setup a service on the iOS device and broadcast it as an available service for a device running Mac OS X . In other words, I simply want to setup a connection to get the iOS device to send data to the Mac OS X device . Also, how would I go about to specify how to setup properties of the service. I've tried researching this stuff but most of the documentation makes

Reconnect a CBPeripheral faster

眉间皱痕 提交于 2019-12-04 10:03:13
问题 I'm developing an app which connects and disconnects several times to different bluetooth low energy peripherals. After a lot of research on the internet, I didn't have found a way to store already discovered services and characteristics, so that I can reconnect faster. At the moment I'm discovering the required services and characteristics after each reconnection, which costs me between 1.5 and 2 seconds. Does someone have experience or a solution to store/cache a CBService or a

Communicate with BTLE device from backgrounded iOS app

浪尽此生 提交于 2019-12-04 10:02:55
问题 How can one communicate with BTLE enabled devices in the background of iOS 5? 回答1: I had the same question (issue) last week and someone gave me the answer. It is possible, and to do so, you need to add the following setting to you info.plist file: UIBackgroundModes (or Required background modes) -> "bluetooth-central" 回答2: This is not really an answer to your question per see, but I was thinking of doing the same and found out the following requirements ( which drove me away from using it):

Swift: Choose queue for Bluetooth Central manager

一曲冷凌霜 提交于 2019-12-04 09:56:28
I'm working on the app that will connect with a smart device via BLE and communicate with it. The question is: In what queue is the best practice to handle bluetooth events? I've read a lot of tutorials and in all of them I found this: centralManager = CBCentralManager(delegate: self, queue: nil) They choose to handle bluetooth events in main queue ( queue: nil ), but I suppose that it's not good practice. Because it could be a lot of queries send to peripheral device from central and a lot of answers send from peripheral to central. I assume this might be the reason of the app working slowly

iOS 7 Bluetooth - app that handles events in background even after phone restart

偶尔善良 提交于 2019-12-04 09:19:40
I want to write a tracking application, which reacts/record when users get in a car and phone automatically pair with Bluetooth hands free. I need also Id of the hands free device. On Android it is easy, using Broadcast Receiver your app listen to broadcasts that device had been paired with phone. It is working even after phone had been restarted and App did not run after restart. Is it possible on iOS(7+) ? You can do it by reading the "Performing Long-Term Actions in the Background" part of this docs Essentially, using state restoration, the system takes note of what your app was doing when

Is it possible to programmatically access the error codes logged by CoreBluetooth?

匆匆过客 提交于 2019-12-04 07:16:47
I am implementing a BLE central device on the iPhone, using as peripheral a custom BLE device developed (whose firmware has been written by a colleague). The peripheral for some operation will return a BLE error code, conforming to the standard Bluetooth ATT error codes as defined in BLE specifications. On the iPhone side, where I'm using the CoreBluetooth stack to develop the central device, I am notified of such errors on the debugger output window of xCode as: CoreBluetooth[WARNING] Unknown error: XX and then I receive in the callbacks a CBError* object. My problem is that the CBError*

BLE takes too much time while sending data from iOS 7.1 to iOS 8

浪尽此生 提交于 2019-12-04 06:47:09
I have a strange issue. I am developing an app in which I am sending Chunks in 20-20 bytes. . Everything is working fine. When I am sending Bytes data from iOS 8 to iOS 8 device it take around 4-5 second to transfer from one device to another, but my problem is when I am sending Bytes data from iOs 7.1 to iOs 8 or reverse, It take around 17-20 seconds to transfer the data from one device to any device. Why it's taking too much time in iOS 7.1 to iOS 8 or reverse? Manthan Try to look at some of the links below. That might help you. Link1 Link2 This is just a reference of links that might help

Take pictures on other iOS devices using bluetooth

微笑、不失礼 提交于 2019-12-04 06:38:27
问题 I'd appreciate if someone with iOS bluetooth experience could show me how to take pictures on other iOS devices using bluetooth classes. This app lets users login/register and afterwards take and upload pics. http://www.raywenderlich.com/13511/how-to-create-an-app-like-instagram-with-a-web-service-backend-part-12 My goal is to, on tap of a user photo in the apps uiscrollview (which displays all uploaded photos), activate the snapStillImage method of AVFoundation below. //this code takes a

BT of Device “A” is auto disconnected with iPhone when Device “A” try to connect to Device “B”

前提是你 提交于 2019-12-04 06:01:02
问题 My Device "A" is connected with my iPhone through BT and then by using nRF Connect BLE is also connected with Device "A". Through nRF Connect I am initiating the pillion connection between Device "A" and Device "B". So finally Pillion is activited and working properly for 10 Second and then Device "A" is disconnected with iPhone (Only BT). But Pillion is working fine. So the problem in why BT of Device "A" is disconnected when Device "A" try to connect with Device "B". In case of android this

CoreBluetooth API MISUSE - Issues with CBCentralManager in iOS 13 features like Siri Shortcuts

▼魔方 西西 提交于 2019-12-04 05:49:18
问题 I added Siri Shortcuts to my application and to utilize voice commands The error Im getting in the debugger is: [CoreBluetooth] API MISUSE: can only accept this command while in the powered on state I have looked at a vast number of duplicates of this for issue on here and the consensus is that CBCentralManager needs to be a class level variable, which I have. I still cannot get UpdatedState delegate method to execute more than one time in the context of Siri Voice Commands or the new iOS 13