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
On your iOS device go into "Settings-> Bluetooth" and turn on your BLE device. You should see the device listed in your available devices. Initially it might be described as simply "Keyboard" but eventually it will switch over to "Adafruit EZ-Key" followed by a four character identifier.
A universally unique identifier, as defined by Bluetooth standards.
Overview. The CBPeripheral class represents remote peripheral devices that your app discovers with a central manager (an instance of CBCentralManager ). Peripherals use universally unique identifiers (UUIDs), represented by NSUUID objects, to identify themselves.
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 -> Peripheral:
The actual speed you can achieve depends on various factors. With indications the data is never lost (like TCP) but notifications don't have such guarantees (like UDP).
More info
I suggest you check out the official Core Bluetooth Programming Guide and concentrate on the
sections. But better would be studying the whole guide as is. For a working example, check out the BTLE Transfer example from Apple, as well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With