Send image to third party hardware using bluetooth - ios

I am new to Bluetooth technology to connecting the third party devices.
I have googled a lot and found 2 options
using core Bluetooth
using External Accessory framework (but for this the device should be MFI)
I have some doubts for this
If I will use core Bluetooth then can I use my iOS app as Peripheral and Third party device as central?
Can we send large data like 5MB images using core Bluetooth i.e Bluetooth 4.0?
If I will use MFI program then I have below doubts
1. as we can enroll into MFI program so after enrolling what we will get from Apple by which we can be able to detect Bluetooth device? Do we get any hardware chip that will be added to third party hardware so that device will be discoverable by the external accessory framework?
2. Do we need to do anything else for MFI?
3. What it will cost for MFI program

Related

What's the difference between the CoreBluetooth and ExternalAccessory frameworks?

Apple provides the following two frameworks for communicating with nearby Bluetooth devices with iOS.
CoreBluetooth:
The Core Bluetooth framework provides the classes needed for your iOS and Mac apps to communicate with devices that are equipped with Bluetooth low energy wireless technology.
ExternalAccessory:
The External Accessory framework provides support for communicating with external hardware connected to an iOS-based device through either the Apple Lightning or 30-pin connector, or wirelessly using Bluetooth.
I have previously used the CoreBluetooth framework to successfully communicate with Bluetooth devices. However, I am now trying to communicate with a Bluetooth printer and it doesn't show up in the scan for nearby devices. Using the ExternalAccessory framework, it does.
How do these two frameworks differ as far as communicating with Bluetooth devices is concerned? Why do different Bluetooth devices require the use of different frameworks?
There are two kinds of Bluetooth, Bluetooth LE which is very limited in bandwidth but that doesn't require any user pairing in the settings app and Bluetooth Classic, which requires the user to pair the device but gives you more functionality and bandwidth. CoreBluetooth supports Bluetooth LE and you can use it with a developer account. Bluetooth Classic requires that you join the Apple MFi program.
Core Bluetooth only allows you to communicate with Bluetooth Low Energy devices using the GATT profile.
The External Accessory framework allows communication with 'legacy' Bluetooth devices using profiles such as the Serial Port Protocol (SPP). In order to communicate with devices using the External Accessory framework, the device must be certified under the MFi program.
I also believe that in order to get an app that can communicate with with an MFi device using the External Accessory Framework approved, the MFi licensee (i.e. the printer vendor) needs to provide some paperwork to authorise your app.

Connect to a Bluetooth Classic (Not LE) device on iOS, without using the External Accessory Framework

Is there a way to establish a connection from a bluetooth classic device (not LE), to an iPhone, for data exchange?
The device we are using has a bluetooth classic chip, therefore it is not possible for us to use the Core Bluetooth Framework to make the connection since Core Bluetooth supports only Bluetooth LE.
I would like to connect our device using the Hands Free Profile or the HID Profile. How would we do this in the iOS Code? What frameworks or APIs are to be used?
The external accessory framework supports only MFi compliant devices. Do we have to be a part of the MFi Program? Or is it possible to establish the connection in some other way, something that I may be missing out?
Also, jailbreaking is not an option since we wish to release the app to a larger user base while selling our hardware device. We want to enable the users to make a connection through the app to their device.

Use bluetooth in iOS application

I'm currently digging my through the nest of using Bluetooth in my iOS application and I find it quite hard to find the information I'm looking for.
Can I turn on Bluetooth from within my app or does the user have to do it manually?
Can I use the basic Bluetooth fetaures (such as Discovery, connecting and Sending Data) with other devices running Bluetooth < 4.0 (classic)
AFAIK CoreBluetooth Framework can only be used to communicate with devices running Bluetooth 4.0+. Which framework is used to communicate with Bluetooth < 4.0 devices?
Is it possible to use Bluetooth in such a way that Apple will reject my App on App Store? And which ways would that be?
Is there a difference between paired and unparied communication? Can one communicate with another device without being paried? Can pairing be initated from an app?
To give some Context to my question: I'm currently developing a part of a Home Automation Application where the App needs to communicate with an embedded device which does not yet have Wifi. It has not been decided which Bluetooth version will run on the embedded device. The same functionality will be implemented in an Android application.
Thankful for some input from some with Bluetooth experience for iOS.
you cannot turn on Bluetooth from your app. The user must do it using settings or the control center.
unless you device is MFi certified you can only communicate with Bluetooth Low Energy devices
the external accessory framework is used to communicate with MFi devices that use "classic" Bluetooth
I am not aware of any use of Core Bluetooth that will lead to app rejection. If your app supports an MFi accessory that isn't associated with your company then your app will be rejected.
you can initiate bonding (commonly known as pairing but it is actually different) by requiring encryption for an attribute. Once the bonding is complete there is no difference in how you transfer data, but the data will be encrypted over the air.

Do BTLE device created by SPP using core bluetooth framework still need MFi chip to communicate over bluetooth ios?

I am having non iOS device made from SPP which I want it to communicate with iOS device using core bluetooth framework without using MFI.Is it possible or not?? if not possible then what changes should I make?
You cannot use SPP without going through the MFi program. The Core Bluetooth framework allows you to communicate with BTLE devices using the GATT profile, without MFi certification.
There are a number of BTLE devices that use a pair of attributes - one for received data and one for transmitted data - to provide data on a serial port that can be connected to an embedded micro controller

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