Bluetooth 2-way message exchange between Ubuntu and iOS - ios

I am working on a project where I need a two-way communication channel between iOS and a Ubuntu server for exchanging string messages.
Question
Is there a single Bluetooth profile for accomplishing this? I think Object Push Profile allows for this kind of interaction. But looking at iOS: Supported Bluetooth profiles it seems that iOS does not support this profile.
How else can I accomplish this? Any supporting links to sample code or doc for implementing the services and characteristics on either sides much appreciated.
Literature survey
I found two tutorials - Arduino Tutorial: Integrating Bluetooth LE and iOS with Swift and Using Bluetooth.
The first one provides sample code for creating a BT service for transferring small amounts of data from iOS to Arduino. The second link describes how to implement the Headset Profile (HSP). However, these only address 1-way communication.

Related

BLE Out of band (OOB) pairing on iOS (13+)

I'm working on an iOS application (for iOS 13+), that should use the most secure BLE pairing method, Out of Band pairing (OOB) (which usually uses an NFC tag for BLE address/temporary key (TK) storage).
Unfortunately, either my Google skills suck, or there is literally no useful information on Google for OOB pairing in iOS..
From my understanding, Apple is already using some OOB technique to pair with the Apple watch (through an image rather than NFC, with fallback to passkey).
During my Google research I've found one single link to StackOverflow,
Bluetooth “out of band” (OOB) pairing on iOS?,
which raises the same question, but it's from September 2015, so the answer there is (hopefully) outdated!
Also, having had a look at CoreBluetooth API, it seems like there is no information in there on OOB pairing..
> Does anyone have more (up-to-date) information on this topic?
Any link/clue/explanation is much appreciated!
(I can't believe really, that this hasn't been implemented in iOS as of today..)

Controlling a device with CoreBluetooth

I was looking at a couple CoreBluetooth tutorials for iOS. Based on the tutorials, it looks like one device is transmitting data and the other device is receiving. Like in this example: http://www.raywenderlich.com/52080/introduction-core-bluetooth-building-heart-rate-monitor the heart rate monitor is transmitting and the iphone is receiving. Is there a way to just connect to device to control it?
For example, I have a soundbar that is Bluetooth and can I write an app to do the same thing the remote it comes with does (volume up, volume down, input source change, power off)?
Adafruit proposes a lot of tutorials / material to learn how to use BLE (Bluetooth low energy)
tutorial about their BLE module (that could run with an Arduino): https://learn.adafruit.com/getting-started-with-the-nrf8001-bluefruit-le-breakout
tutorial about their iOS app (to connect to the previous module): https://learn.adafruit.com/bluefruit-le-connect-for-ios
iOS app source code to connect to BLE devices or play with previous module: https://github.com/adafruit/Bluefruit_LE_Connect
If you need one way transmission with the maximun data rate you need to read this article:
http://www.tbideas.com/blog/2013/04/Optimizing-Bluetooth-Low-Energy-Performance/
it talks about CBCharacteristicWriteWithoutResponse
Stackoverflow thread about the same one way communication subject:
iOS. BLE. CBCharacteristicWriteWithoutResponse - How to make it work?
Hope this helps!

How to Send Live Sensor Data to iOS with BLE

I am looking for a BLE that could send live sensor data from arduino to iOS custom apps, not the app that is already in the app store. I would like to create my own apps to receive the sensor data.
Or are there any other ways to achieve it?
Please help. Thank you.
You want to use Core Bluetooth. It's a fairly low-level API that lets you set up one device as a "central" and another device as a "peripheral". You can then transfer data back and forth. Do a search on "Core Bluetooth Overview" in the Xcode docs to get started.
As Computer_ACE suggested you should also check out the Arduino Stack Exchange, or you might want to go to the Arduio forums at https://www.arduino.cc.
EDIT
A quick google search on "iOS Arduino BLE example" found this link:
https://www.google.com/search?client=safari&rls=en&q=ios+arduino+BLE+example&ie=UTF-8&oe=UTF-8

Communicating using Core Bluetooth

I am new to Objective c and I want to send simple strings from an iPhone to an arduino an vice versa with Bluetooth. I have read apples information about Core Bluetooth, but I am having trouble understanding it. As I said, all I need the iPhone to do is: 1) connect to the BLE device of the arduino. 2) Send instructions (in the form of strings) 3)get a response from the arduino when the instructions have been carried out, so that the next set of instructions can be sent. I would be very happy if somebody is able to help me with this project
Thanks
You should follow the wwdc presentation on core bluetooth.
You should probably start here
I suggest operate your device with YMSCoreBluetooth.
The basic step to operation bluetooth device is:
Search all nearby device by blue tooth scan, you will find all nearby device.
Stop your scan. Connect one of the devices found in response.
Discover all services on the device.
Discover all character in service found by service discover action.
Write your content into character found in 4.
You can read character value from device.
YMSCoreBluetooth let you write your logic in one code block instead of separate delegate.

Working with bluetooth in Objective-C

I was trying to make a connection between two devices initially using bluetooth ( To send messages and files ) , the first framework I found to do this kind of thing was the GameKit but unfortunately it was discontinued and I was forced to use the MultipeerConnectivity framework.
Recently I learned of the Core-Bluetooth framework that can communicate with other peripherals , performing an internet search I realized that most of the tutorials related to it, are temperature peripherals and heart monitor. Unfortunately I do not know if it is possible to connect two devices with this framework and hold an exchange of information ( messages and files ) the same way you do with MultipeerConnectivity framework, it is possible?
In this case there are only these three frameworks that can connect via bluetooth or are there others?
Core Bluetooth is all that you need to connect two devices. There is no need for third-party frameworks. Even though most tutorials and examples are related to temperature and heart monitors, they demonstrate the basic concepts of connecting to peripherals and transferring data between the two. Also, if you are using a third party Bluetooth or BLE chip, reference the API that came along with it.
This tutorial should be enough to get you going. It demonstrates basic broadcasting, connecting the transferring data:
Practical Core Bluetooth Tutorial
And if you want to learn about the more inner-workings of Core Bluetooth, check out Apple's Docs:
About Core Bluetooth
Checkout LGBluetooth. It is a lightweight library for interacting with CoreBluetooth. It lets you send serial data to connected devices and peripherals.

Resources