Transferring Data Using CoreBluetooth

I am developing an iOS application with a companion Bluetooth LE peripheral device. The only step that I seem to be unable to solve is how to actually transfer data from my application to the periphery or vice versa.

What I have created so far is a test application that can connect to my sample Bluetooth peripherals and read all of its services / features / descriptors. It can switch notifications for this feature and record data. This is just the last step "transfer n bytes to the periphery and get m bytes from the periphery", which I cannot understand.

Looking at the external structure of accessories (what would I use if Apple actually gave me MFI permission for this project), they give you input and output streams in this session for communication with an accessory, but such an object does not exist for CoreBluetooth.

Is it just oversight of Apple’s CoreBluetooth functionality? Or do I just need to develop my own Bluetooth service profile to handle the inflow / outflow of data to and from the peripheral device?

+5
source share
3 answers

LE GATT, , . LE L2CAP , Apple CoreBluetooth .

+2

bluetooth.org uuid = 1802 uuid = 2A06 = write_no_response iPhone. , . , iPhone , . , , . , . . write_no_response , .

IOS TemperatureSensor.xproj . OSX HealthThermometerClient.xproj , . IOS TI-BLE-Demo.xproj TIBLECBKeyfob.m , .

+2

SSP; BLE . , (Microchip RN-4020), , MLDP (Microchip Low-energy Data Profile).

The way I get data in my iOS application is a subscription to a private characteristic, so it is notified when the values ​​are updated. While it works fine, and the data transfer rate can reach 20 kbps according to Microchip (I have not tested its limits, since I do not need a lot of speed). Here's a link to the Microchip product page: http://www.microchip.com/wwwproducts/Devices.aspx?product=RN4020

Good luck

+2
source

All Articles