iOS and CoreBluetooth Low Energy Required? - ios

We are making MFi hardware and an iOS app. We will want to have the BT device notify our app even if we are not running periodically when certain events happen.
I know the CoreBluetooth API is the one to use, but can't tell for sure if that API only works with BT Low Energy devices or if it will also work with regular (MFi of course) BT 2.1 and higher devices.
So my question is: Does the CoreBluetooth API only work with Bluetooth Low Energy devices or will it also work with 2.1 devices?

Core Bluetooth is designed specifically for Bluetooth LE, a.k.a. BLE, Bluetooth 4.0 and Smart Bluetooth.
Core Bluetooth does not work with the older, classic Bluetooth devices. Those require special APIs and hardware available through Apple's MFi program.

Related

Core Bluetooth with Bluetooth 2.1

Can I connect iPhone and bluetooth 2.1 device and work with them via Core Bluetooth? I just need to send and receive some NSString data from/to iPhone.
No, Core Bluetooth only supports Bluetooth Low Energy/Bluetooth 4.0 devices. You can only connect to Bluetooth 2.1 devices via the MFI program and the external accessory framework.
The only exception is "standard" devices such as keyboards and audio devices (hands free etc). However in these cases you can't access any underlying Bluetooth information - you can simply send audio or receive keyboard input.
The only way your own device talk to your iPhone is Bluetooth Low energy if you can not apply MFI program(Most of cases). You need some Bluetooth Low Energy DevKit like TI2540/TI2541 or Nordic or Dialog, they are equipped with rich interface like UART, button, LED and simple speaker. The cheapest chip on market is TI2540(also oldest), but it is MCS51 based core MCU, not very friendly. Other arm based dev kits are more friendly.
The core bluetooth in iOS is not very easy to use, I will recommend you try https://github.com/kickingvegas/YmsCoreBluetooth , it is awesome.
Not possible to work with 2.1 bluetooth in core bluetooth library.
Core bluetooth support Bluetooth Low Energy(BLE) support.Ex. Bluetooth 4 or greater version of BLE devices.
Bluetooth 2.1 is classic bluetooth device.

Is there any framework for bluetooth communication for iOS?

I need a library or framework for bluetooth communication for iOS but not for Bluetooth LE.
I want to communicate a device that cast bluetooth package, but my device not support LE. I have iPhone 4, iPhone 4s and newer support Bluetooth LE.
for this iPhone 4s and newer version there ne problem lots of example I can find and also CoreBluetooth library support this.
So I want proper library or framework for this.
Any Idea or Suggestion would be highly welcome.
Core Bluetooth is designed specifically for Bluetooth LE, a.k.a. BLE, Bluetooth 4.0 and Smart Bluetooth.
Core Bluetooth does not work with the older, classic Bluetooth devices. Those require special APIs and hardware available through Apple's MFi program. Already answered

Bluetooth framework for older iOS devices

My question is related with Bluetooth technology around iOS.
I've watched WWDC about Bluetooth Low Energy 101, what's new, the basics etc, and about using the CoreBluetooth framework available in iOS 5 and later.
I've looked through different sites and documentations trying to find more information about Bluetooth 2.1 and 4, but there is so few.
GameKIt is not an answer, I am developing an app to work with an non-iOS device.
Some of the topics I've went through:
Connecting to a Bluetooth device from iOS, no MFi
iOS - How to integrate bluetooth devices in my app
http://www.bluegiga.com/files/bluegiga/Presentations/BT4_0_for_Apple.pdf
Bluetooth 4.0 with older Bluetooth
IPhone Bluetooth Connectivity to Non IOS Devices
But the supported devices are just 4S and up and latests iPads...
1) will the latest CoreBluetooth framework just fail on older devices?
2) Did apple have any frameworks for BT 2.1 or something? What to do, there are still so many ipad2 and iphone4 users, I can't just ignore them.. So what framework actually to use?
Any help, advice, idea,link will be highly appreciated!
Well...
You need to understand one thing: CoreBluetooth framework is used for Bluetooth Low Energy and ExternalAccessory framework for the "Classic" Bluetooth. It is really two kind of different approchs of what we usually call Bluetooth (as a simple user/consumer).
Only recent iDevices support Bluetooth Low Energy (iPhone from 4S, MacBook Air from 2011, etc.). That's why it doesn't support iOS4 for example.
For your information, Bluetooth Low Energy is kind of a fork of Bluetooth which appears only in Bluetooth 4.0. Even if having a Bluetooth 4.0 device does not ensure that it supports Bluetooth Low Energy (as I said, it's a fork which is not always include).
As a simplistic vision, Bluetooth Low Energy works like a NSDictionnary with a NSDictionnary in it. You get a Peripheral, which as one of more Services which has one or more Characteristics. Quite different from a common device, right ?
Did apple have any frameworks for BT 2.1 or something? What to do, there are still so many ipad2 and iphone4 users, I can't just ignore them.. So what framework actually to use?
To talk to a Bluetooth 2.1 device, you need to be in the Made for iPhone accessory program. The details of it are under NDA, but you should expect things like Apple reviewing your manufacturing processes and auditing your accounts, and putting a custom chip into the accessory. If you don't make the accessory yourself, you're probably out of luck.
The only exceptions are the classes of device that iOS supports natively: keyboards, audio output, car stereos, other iPhones etc. However, you still can't send and receive arbitrary data, you're limited to using whatever APIs exist for the specific functions (e.g. for audio output, Core Audio lets you set a few properties for how Bluetooth devices behave).

iOS and Bluetooth Low Energy

I know that there are a lot of restrictions on bluetooth when it comes to iOS. I wanted some more information on Bluetooth Low Energy (LE) and the CoreBluetooth Framework apple provides from iOS 5.0 and greater.
Can i connect ANY Bluetooth LE device to an iOS device using the Core Bluetooth Framework?
Is there any Bluetooth LE device in production,that comes with a three axis accelerometer and a gyro that i could use like a Human Interface device?
Sagar, Maybe you can explain more about what you want to do.
Any BT4.0 LE device can connect and communicate with a iOS app using the CoreBluetooth Framework.
The CC2540 dev kit does contain a fob that has accelerometer, it does not have a gyro.
The USB dongle that comes with the kit is for communicating with the fob from a PC/Mac, you do not need it for communicating with the iOS device.

Is it possible to develop an iOS app with bluetooth capabilities?

Would the following be possible?
Let's say I have a scale with Bluetooth capabilities, when I turn it on, it sends the weight via BT.
Is it technically possible to develop an iOS app which pairs with the scale and receives the data from it?
According to Apple:
Technical Q&A QA1657: Using External
Accessory framework with Bluetooth
devices.
Q: I understand that the External Accessory framework in iOS 3.0 and later will allow my application to communicate with Bluetooth devices. So why doesn't my application see the Bluetooth accessory sitting next to my iPhone?
A: The External Accessory framework is designed to allow iOS applications to communicate only with hardware accessories that are developed under Apple's MFi licensee program. MFi compliant accessories can be implemented as wired devices, meaning they plug in to the Apple device's 30-pin or Lightning connector, or as wireless devices, whereby they use Bluetooth as the communication channel. Either way, an application that uses the External Accessory framework will not be notified of an accessory's presence unless the accessory identifies itself as being MFi compliant, i.e., it was specifically designed to interface with an iOS application.
Yes, we can connect Bluetooth devices with iOS application through Core bluetooth framework. This framework is supported on the iPhone 4s, iPhone5,iPhone 5S ,iPad3. We can use BLE 4.0 for the communication between scale and iOS application. Here, iOS application become the client and scale become the peripheral. You Can set as well as get data from the weighing scale.
While the External Accessory Framework with Bluetooth is one of the possible solutions, it has additional requirements to be built as per Apple MFi, here Bluetooth reference is to the Classic Bluetooth (Version 3.x and below)
The best solution for the use case you have defined is to use the Bluetooth Low Energy (LE) (aka Bluetooth Smart) technology (Bluetooth 4.0) and it is available to applications as part of the Core Bluetooth Frameworks
Here are the APIs for Core Bluetooth that applications can use.
While currently Bluetooth Low Energy is supported on the latest iPhone 4S, New Mac Mini & Macbook Air - its expected most new Apple & Others hardware will have this standard.

Resources