core-bluetooth

ios CoreBluetooth[WARNING] Unknown error: 1309

一笑奈何 提交于 2019-12-02 20:37:10
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 work around this problem by turning the Bluetooth setting off and then back on. Can anyone tell me what is causing this and what I should do to avoid it? That's a known issue, It's caused due to deadlock in CoreBluetooth (Apple's bug), 1309 error is mostly appears when your app operates as a Central and Peripheral, and when the operations are

Which point to start with BLE technology on iOS

扶醉桌前 提交于 2019-12-02 19:43:33
I need to develop with BLE technology. I found some introductions and source code: http://processors.wiki.ti.com/index.php/Category:IPhone4SBLEDemo but I didn't find any tutorial to start from scratch with this technology (CoreBluetooth framework) from choose the sensor for testing, also WWDC 2011 Is there any tutorial to start with BLE technology on iOS? Many Thanks! Unfortunately there isn't much out there for the core bluetooth framework as it is relatively new. I would suggest acquiring a very solid understand of how bluetooth low energy works before writing any code. A couple of decent

iPhone corebluetooth central Manager send data to peripheral

好久不见. 提交于 2019-12-02 19:32:21
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 framework. I am using iPhone5 as it has Bluetooth 4.0 In Core Bluetooth you need to use the characteristics for communication. There is no standard stream based API like in the External Accessory Framework and I don't know of any open source libraries that implement something like that. Basic operation Peripheral -> Central: Central subscribes to

iOS 7 Core Bluetooth Peripheral running in background

好久不见. 提交于 2019-12-02 17:42:48
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 here: https://developer.apple.com/library/ios/documentation/NetworkingInternetWeb/Conceptual/CoreBluetooth_concepts/PerformingCommonPeripheralRoleTasks/PerformingCommonPeripheralRoleTasks.html#//apple_ref/doc/uid/TP40013257-CH4-SW1 . I can get it to advertise in the foreground ok and sometimes in the background but it doesn't stay advertising all the time. If you

Bluetooth “out of band” (OOB) pairing on iOS?

邮差的信 提交于 2019-12-02 15:17:42
问题 I need to securely paired a bluetooth device to an iOS device, I know that in Bluetooth 4.0 and 4.1 there is three way to do the pairing : Just Works, Passkey Entry and Out Of Band (OOB). We need to use the highest security paring protocol, which it found to be the Out Of Band (OOB) method. I know that apple used the OOB method for pairing the apple watch to an iPhone, at least they say so in the iOS Security Guide (at the end of the page 22). So I'm wondering is there any API from apple that

didDiscover peripheral not called

十年热恋 提交于 2019-12-02 13:51:26
I want to use the CBCentralManager in order to find the bluetooth low energy peripherals around me. The centralManager is getting initiated, it starts correctly and it is scanning. But the didDiscover function is never called. I read all the other posts to this and similar problem and am 99% sure that my problem has not the same cause. Still, I cannot find what I did wrong. import Foundation import CoreBluetooth @objc(SmallerBeaconServiceImpl) class SmallerBeaconServiceImpl : NSObject, CBCentralManagerDelegate, CBPeripheralDelegate { private let centralManager : CBCentralManager func

How can I increase the throughput of my BLE application?

戏子无情 提交于 2019-12-02 13:23:24
问题 I have an android client that functions as a central and have an app on my MAC (peripheral) that this central connects to and sends data. At this point, I need to wait almost 100ms after I call writeCharacteristic(..) to receive the onCharacteristicWrite(..) callback. I am sending strings. If I send smaller strings, the throughput is great (understandably). When the string contains about 200 characters and I send 20 byte chunks, it takes almost a second before the entire string is seen at the

iOS CoreBluetooth state unsupported when using in iOS custom keyboard

自古美人都是妖i 提交于 2019-12-02 12:10:51
问题 I want to use CoreBluetooth API within iOS keyboard extension (custom keyboard). However, the state for the CBCentralManager is unsupported. The device I use is iPhone 6. It works fine inside the container app. Does this mean that the CoreBluetooth API cannot be used inside the keyboard extension? 回答1: You will need to set RequestOpenAccess to YES in your extension's plist under NSExtension > NSExtensionAttributes. Setting this to YES allows the extension to access network resources.

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

余生长醉 提交于 2019-12-02 10:27:26
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 shortcuts app. This means my application cannot do consecutive functions. Keep in mind, it works ONCE,

Get binary data from UIImage

五迷三道 提交于 2019-12-02 09:07:49
I have a requirement in which i have to send an image from ios device to another device corebluetooth, other device is BLE device. Basic needs are: 1) Image should be of size 128X160 2) 8-Bit i.e 8 bits per color 3) 3 channels 4) 24 bit per pixel 5) Image should have 61440 byes i.e (3X128X160) To get 3 channel and 24bit per pixcel i am using below code of OpenCV as in native ios i dint find option to convert UIImage into 24bit bitmap //uiimg is 128X160 size cv::Mat image; cv::Mat convertedImage; UIImageToMat(uiimg, image); cvtColor(image, convertedImage, CV_RGBA2BGR); if i check number of byts