iOS sample to connect a Bluetooth with MFI - ios

I have an application for Android that communicates via Bluetooth with a hardware we develop. Now I need to develop an application for iOS that connects with the same hardware via bluetooth. This hardware makes serial communication via Bluetooth.
I've been researching quite recently and found two outputs:
- Bluetooth Low Energy (BLE).
- Bluetooth with "MFI Program".
Analyzing the smartphone today, both Android as iOS, the best option would be the MFI. Due to availability on older smartphones. Even already started the enrollment process over MFI program.
My question focuses on the development on iOS. And my question is:
Looking for Objective-C. Is there a difference between connecting to a Bluetooth Low Energy or MFI? Could someone show me an example of connecting via Bluetooth MFI?

As I understand it, devices enrolled in the MFi program use the EAAccessory framework, not CoreBluetooth. Documentation is here: External Accessory Programming Topics.
Sample code here.

MFI is for Bluetooth device Hardware.
Coming to connecting to BLE device from iOS devices, you have to use CoreBluetooth framework.
http://www.raywenderlich.com/52080/introduction-core-bluetooth-building-heart-rate-monitor
Check this link.

Related

How to scan and connect to Bluetooth classic for iOS in Xamarin forms?

I'm trying to implement Bluetooth for my project. I was able to implement BLE but I have to go with Bluetooth classic because of some hardware issue. So for Bluetooth classic implementation I have gone through this post and I used source code from this post. But in that they are trying to connect to already paired device. But my requirement is to scan and connect to available Bluetooth classic device not BLE device. And also there should not be any pairing dialogue appearing while connecting. I even tried to check if there is any Bluetooth classic scanner application in app store for reference but I didn't find any. There are only BLE scanner application in app store. I have no clue how to proceed forward any suggestions?
iOS apps can only connect to MFi enabled Bluetooth classic devices. This is why you can't find any classic BL scanner apps. Unless your hardware contains an MFi chip from Apple you will not be able to use classic Bluetooth profiles, such as SPP, to communicate with it.

Bluetooth vs BLE and proper usage of them

I am doing a project that uses BLE(CoreBluetooth).
In the mean time we use a mock in the form of android device.
My question is this:
Why does the CoreBluetooth doesn't recognise the android device? (i read about BLE GATT but still didn't understand it).
Also if i go in the iPhone to settings->bluetooth it recognises it and even connect to the android device ,how can i implement this in my app?
Programming with CoreBluetooth
IMHO, CoreBluetooth is quite cumbersome. I suggest using a library like RxBluetoothKit which takes away a lot of the boilerplating involved with handling the GATT profiles yourself.
Devices, mockups
Cool BLE devices are around 30$ nowadays. I use PuckJS - a JS supporting programmable BLE board.
Apple requires MFI certification for devices that connect to iOS devices via Bluetooth.
The exceptions are:
BLE devices.
Bluetooth devices which exclusively support either of these profiles.
So your Android mockup would have to advertise itself as one of these.

Can you obtain WiFi settings from iOS and pass it to a BLE device (similar to Withings)?

The Withings iOS app has the ability to obtain your wifi settings and pass it to the body scale via Classic Bluetooth (see screenshot below). From what I learnt it's a feature only available through the MFi program, which the Withings Scale is.
I'm building an app that talks to external BLE devices. Since MFi is not required for BLE devices, I'm wondering if there's a way to do the same thing with CoreBluetooth or other frameworks?
From Apple's MFi FAQ page:
"Accessories which connect to an Apple device using only Bluetooth Low
Energy/BTLE/Bluetooth 4.0 or standard Bluetooth profiles supported by
iOS are not part of the MFi Program."
Related question on ClassicBluetooth / MFi:
Can you pass WiFi settings from an iOS device to an ExternalAccessory object?

Arduino and iPhone connection with Bluetooth 3.0

I would like to build an app that requires bluetooth connection. The Bluetooth HC05 module is connected to Arduino. I want to know what framework (or other related things) that I need to build an app that can connect to this Bluetooth module.
Still have no idea how to start. Anyone could help?
Unfortunately the answer might be "you can't do that".
iOS only supports the following Bluetooth profiles: HFP, PBAP, A2DP, AVRCP, PAN, HID and MAP. None of those can be used inside an app to communicate to your Arduino.
For the useful profiles like Serial Port Profile (SPP) and all arbitrary bluetooth communication you have to add an authentication chip to your Arduino. Unfortunately you can't buy these chips unless you have a MFi membership. And you won't get into the MFi program unless you are a company with a concrete product (mass market scale) in mind.
Fortunately, we now have Bluetooth Low Energy. Bluetooth LE can easily be used in iOS apps, without all the MFi hassle. So you should get a Bluetooth 4.0 module for your Arduino.
The framework that is used for Bluetooth 4.0 communication is called CoreBluetooth. You will find documentation, sample code and WWDC videos in the iOS Developer Center. Start with the Core Bluetooth Programming Guide

Cost of Developing Bluetooth 4.0 BLE applications for iOS or OSX?

I have HW applications that uses BLE i.e. Bluetooth 4.0. I would like to get it working in Apple products such as iOS or OSX. My friend said that earlier developers had to be pay at least some 20k USD + margin of profits to get their hardware device accepted by Apple. The services have online frontend and specific hardware that are supposed be connected via BLE to phones/laptops.
What is the cost currently to develop BLE services for Apple?
BLE devices do not require Apple's MFi Program certification (which is apparently $20k+). Your only costs would be standard iOS Developer Program ($100) and the cost of developing the actual app to communicate with your BLE device.
From Apple's MFi FAQ:
I want to develop an accessory that communicates with an Apple device
using only Bluetooth Low Energy. Do I need to join the MFi Program?
No. Accessories which connect to an Apple device using only Bluetooth
Low Energy/BTLE/Bluetooth 4.0 or standard Bluetooth profiles supported
by iOS are not part of the MFi Program.

Resources