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
Related
I'm hoping to create a BLE advertisement on iOS where I can control the advertisement on a byte level.
One use case would be to mimic an iBeacon advertisement. What is the iBeacon Bluetooth Profile (I want to advertise while my app is in the background which is why I'm not using CoreLocation)
I do not see a way to do this with the Core Bluetooth API. Is this correct? Are there alternatives using private API's or jailbreaking?
As the others already pointed out, there is no API on iOS that allows you to do this.
You can advertise as an iBeacon, but only when your app is in the foreground. When in background, the advertisement is removed and therefore cannot be discovered anymore (except for other iOS devices which explicitly scan for that service UUID). Also see the documentation here: Core Bluetooth Background Processing
If you would share your use case and what you want to achieve, maybe there are other ways to realise it.
My experience with iOS is that if it is something is not exposed in the API, there is no way around, except jailbreaking. For Bluetooth low energy the API is at GAP/GATT level, and very little at the lower levels (if anything) is exposed. Advertising is a LL (link layer) feature.
To illustrate how restricted the access is: When scanning for BLE devices you will not have access to the advertiser's MAC address iOS. In Android you have it.
I do not see a way to do this with the Core Bluetooth API. Is this
correct?
Since you have to set Manufacture Specific Data in order to achieve this, if nothing has changed you will experience exactly the same issue that I did. Explained here:
The advertisement key 'Manufacturer Data' is not allowed in CoreBluetooth
It is not possible.
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!
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.
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.
I am currently writing an app using XCode that will allow the streaming of medical data to the app. Using the Alive Heart Monitor which streams live heartbeats over bluetooth spp, I want to be able to receive those live streams into my app.
Currently, I am not able to discover the AHM device and am not sure about how to go about receiving the live stream.
Is there any way to do this?
I've seen this article: http://www.devx.com/wireless/Article/43502/1954, however it seems to only work between 2 iPad/iPhones. I want to be able to just receive the live stream from a non-iOS device.
Any help would be appreciated!
I have consulted with developers on Apple forums and was made aware that this was not possible as iPad does not have support for the bluetooth SPP profile.