MFi , CoreBluetooth or External Accesory framework? - ipad

I am trying to build an iOS app which would communicate with another non-apple device via bluetooth. It would be a  Bluetooth Stereo Transmitter which uses the bluetooth A2DP-profile which is supported by apple :
http://support.apple.com/kb/HT3647?viewlocale=en_US&locale=en_US
I have read tons of articles and pages. I have many unanswered questions and hope to recieve some answers and write something that will help me and others in future work with iOS and bluetooth.
Evaluating the available bluetooth connection options
Here's a list with possible approaches and informations I found. Please feel free to answer/edit anything that is not correct.
Edited from http://www.pocketmagic.net/2012/07/bluetooth-and-ios-use-bluetooth-in-your-iphone-apps/ :
A) Enroll in the made for iPhone/iPod/iPad (MFi) program. Details on costs are not available, but this is not for the small development companies, barely selling a few licenses.indicate costs depending on project, and starting numbers somewhere at 10K USD. Not really an option IMO, as the costs involved and trouble getting certified are ridiculously high, for something so basic and simple such as building a Bluetooth application. I have found a Bluetooth stereo transmitter with bluetooth version 2.1 (Class II). I can not find if the device is MFi compliant.
Based on this article :
Existing bluetooth device and Apple MFI
Q1: How can I be sure or find out if the device is Mfi compliant?
Q2: If the device is Mfi compliant will I be able to pair it with the device in the settings option?
B) CoreBluetooth framework, currently usable only with Low Energy Bluetooth 4 devices. Since these are not largely spread this is not really an option. You won't be able to connect to standard headsets, keyboards, or other non-Bluetooth 4 devices.
Q3: Will I need to pair the non-apple bluetooth device with my iPad (in settings) to use the CoreBluetooth framework?
I am asking beacuse I have no experience with iOS and bluetooth and beacuse my budget is low, so I dont want to waste money buying stuff I will not be able to use for development.
C) GameKit framework, this allows some basic Bluetooth functionality, such as finding nearby devices and establishing a serial communication link, but it only intended for use between iOS devices. So Android plus iPhone via GameKit is a no go.
D) Private APIs. There is a BluetoothManager framework, in the private APIs, inside the SDK. This can be used to achieve the proposed task, but you won't get your App approved on Appstore, as private API's is not allowed by Apple. Since this is so convenient, and working so nice, almost like the real thing Apple didn't want to include.
Q4: Can I use private APIs within the iOS Eneteprise program and distribute my apps since there is no App store approval process?
Q5: Does anyone know some more private APIs I could use beside bluetoothManager framework?
E)Jailbreaking and using Ringwald's BTStack. Jailbreaking = rooting = freedom, probably the best way to go . But this places you so far away from Apple's guidelines, and the Appstore itself. So better decide what your project is all about, and who your users will be.
Q6: For bluetooth I need CoreBluetooth Framework. What framework do I need to import if I want to use wifi communication?
Thanks for any help :).

Related

how to make iOS app connecting with bluetooth?

how to make iOS app with bluetooth?
I need an app which connects and exchange data via bluetooth with other devices, laptop for example.
Many packages for BLE and cant find for classic bluetooth
If you want to use the classic Bluetooth interface of an Apple iOS device, you have to comply with/accept Apple's MFi licensing programme (Made for iPhone/iPod/iPad), which is a major hurdle and the reason for the lack of corresponding libraries.
Short answer: you don't want classic Bluetooth for this. You want BLE. It supports everything you want for this kind of use case. See Core Bluetooth.
Much too long answer about classic Bluetooth and iPhones from my years building earbuds:
Continuing from Risto's answer, even with MFi certification (which requires adding an extra chip to your device, not just licensing), you still don't get general access to the BR/EDR ("classic") interface. You only get access to iAP2, which is an SPP-like serial protocol, but is not SPP. If you're porting from Android, you probably are using SPP, and sorry, that's just not available. You're going to need to switch to BLE.
MFi certification is a useful if you build an audio device that also needs a non-audio control channel. It makes it easy to ensure that both the audio connection and control connection are connected to the same device. This is extremely difficult to do with BLE. But iAP2 isn't a particularly nice protocol, and has weird corner cases. You should not go through the cost and trouble of MFi just to get a SPP-like serial protocol.
On iPhones, access to BR/EDR non-audio profiles is limited to the proprietary iAP2 and GATT over BR/EDR (which is less useful than it sounds since most chips don't support it). Classic audio profiles are limited to what Apple's audio frameworks support, which is not very flexible.
If you make a Bluetooth audio device, have a little extra room on your board, enough margin to add a chip to your BOM, and your SoC supports it, MFi is definitely worth exploring. You can improve the pairing experience marginally and it makes it a bit easier to manage an extra control channel. Plus, you get to add that "Made for iPhone" logo to your packaging. For hearing aids (which I have less experience with), I expect that MFi is a must-have today. From my casual investigation, it looks like it adds some really nice capabilities.
For everyone else, you want BLE.

How to find wifi/cellular signal strength in ios [duplicate]

As far as I know it's not possible to scan for hotspots in range and read their bssid and signal strengths. This was possible on iOS 4 by using private APIs and not longer possible on iOS 5 without jailbreak. Even if it were possible, the app would be rejected on the App Store. Is that right?
One company that has an indoor positioning system is claiming they can develop this system in iOS. I know for a fact they are scanning for hotspots and signal strengths and then triangulating the signal on their current Android app.
Are there any alternatives I am missing? Their claiming sounds impossible to me but I would love to hear from the people here. I would like to be ready when they demo (although I am expecting a jailbreak or some kind of mock up)
As far as i know this can still be done (using private APIs, of course) by MobileApple80211 framework.
Stumbler code is a good source of information on how to use this framework.
For iOS 5 you'll need a jailbroken iPhone. Guvener Gokce has a very educational blog post on this: iPhone Wireless Scanner iOS5
Just to update the answer: The MobileApple80211 framework has been replaced by MobileWifi.framework. You will need a jailbroken device (supposedly it can't be done using just private API's, hence on a development/enterprise non-jailbroken device).

CBPeripheralManager limitations

What are the limitations of the new CBPeripheralManager in iOS 6? If I were crazy enough to implement the FTP (service identifier 0x1106) profile, would I be able to? Or does Apple limit which Bluetooth services an app can expose?
https://github.com/KhaosT/CBPeripheralManager-Demo seems to be a good example of the new types, but I'm not clear on how much is supported at this time, especially since CBPeripheralManager is not even available in the public docs.
#BradLarson was a key helping out with this answer. Kudos to him for all the help in the comments. I'm answering this question just to document what was said for posterity in what I would consider an answer to my perhaps poorly worded question.
The CoreBluetooth iOS framework allows an app developer to use Bluetooth LE, the low energy version of Bluetooth. BLE includes a different set of profiles so services like FTP are not available for it, although some others are. The library should be sufficient to implement these profiles. For example, it should be possible to implement HID over GATT.
For jailbroken devices, the BTStack library can be used to interface with Bluetooth.
A reference I found quite useful to learning about Bluetooth is An introduction to Bluetooth programming.

iOS wifi scan, signal strength

As far as I know it's not possible to scan for hotspots in range and read their bssid and signal strengths. This was possible on iOS 4 by using private APIs and not longer possible on iOS 5 without jailbreak. Even if it were possible, the app would be rejected on the App Store. Is that right?
One company that has an indoor positioning system is claiming they can develop this system in iOS. I know for a fact they are scanning for hotspots and signal strengths and then triangulating the signal on their current Android app.
Are there any alternatives I am missing? Their claiming sounds impossible to me but I would love to hear from the people here. I would like to be ready when they demo (although I am expecting a jailbreak or some kind of mock up)
As far as i know this can still be done (using private APIs, of course) by MobileApple80211 framework.
Stumbler code is a good source of information on how to use this framework.
For iOS 5 you'll need a jailbroken iPhone. Guvener Gokce has a very educational blog post on this: iPhone Wireless Scanner iOS5
Just to update the answer: The MobileApple80211 framework has been replaced by MobileWifi.framework. You will need a jailbroken device (supposedly it can't be done using just private API's, hence on a development/enterprise non-jailbroken device).

Transfer pictures from external camera circuit within my iOS app programmatically

I'm working on my senior engineering design project and I need your help! For this I have my iPhone app receiving images from a external camera circuit, which I built.
To interface my iPhone app to the camera circuit, I have looked into the following approaches:
Build a bluetooth module on the camera circuit, to transfer images to the iPhone
Use Eye-Fi SD card to transfer images to my app somehow! link:http://www.eye.fi/products/iphone
Build a circuit, to make a wired connection to the iPhone with the 30-Pin dock connector
Here are the problems I'm facing with each of these. My actual questions for you guys are highlighted in BOLD:
The iOS BlueTooth framework (4S only), only supports Low Energy Devices. Looking at the the modules out there like this one, I'm doubting it will work for image transfer, which seems to be a bulky task for low energy bluetooth. I know there are jailbreak apps on the cydia store, which do regular bluetooth transfers, but I was unable to find those private APIs for such a task. (NOTE: I'm making this app for my purposes, so feel free to suggest any private/unofficial APIs). Question#1: How can I interface to a regular bluetooth device (not another iPhone) and transfer data?
EYE-FI card sounded amazing as a consumer because the company has their proprietary iPhone app to transfer the images from the EYE-FI SD card. Problem is I can't figure out how to easily interface with the EYE-Fi card in my code. I researched the iOS CFNetwork framework, but haven't had any luck. Question#2:How can I interface with the EYE-FI card in my app?
Building a circuit seems simple enough with this development board, but I read somewhere that the iPhone may not recognize an "un-registered" accessory. I have a developer license but not a MFi licence. Question#3: Do I need to be registered as a MFi developer to create and use this external accessory in my App for my own purposes???
You might try setting something up through a serial port since joining the MPi program is prohibited for individuals. You could possible use a connector like this one http://www.amazon.com/neXplug-Ultra-Small-Micro-Adapter/dp/B0055PCVDO/ref=sr_1_1?ie=UTF8&qid=1339309918&sr=8-1
The Apple website recommends individuals/hobbyists to use " recommend that you use a third-party solution which will allow you to connect iOS devices to serial devices and to write iOS apps that communicate with these serial devices" (from mfi.apple.com/faq).
I am also working on an external camera that can hook to the iphone/ipad. I will be using a serial port in order to get around the MFi requirement for external iphone/pad devices. Trying to use bluetooth is too complicated and the data stream isn't big enough for pictures. the wired version will work much better.
I hope this helps and that your college term and project are not already finished. Best of luck.
As T Reddy has already mentioned, if you want to create hardware the interfaces with external hardware framework, you have to sign up with the Apple MFi program which you, as an individual, can not do.
I'm not sure of how the Eye-Fi system works but it sounds to me that it basically syncs the images to their server and once you download their Apple App, the app can sync the photos for you.
Whether you are using Bluetooth or the 30-pin connector, there is no way to interface to an external device unless that device is MFi compliant and a part of the MFi program. I suggest you try the following options to solve this delimma--
If this is a "Senior Project" at some University, see if your University is part of MFi. Apple will not let individuals join the program, so if you are going to gain access, you have to access it through another organization or, possibly, an educational institution. I don't know if Apple has worked with schools in this regard, but you never know. It might be possible.
If your school isn't in the MFi program then you may want to consider re-writing your application for an Android device. Android devices are not locked down like iOS devices, so that may be a more reasonable approach.
I hate to bring bad news but circumventing these hardware restrictions on an iOS device is excessively prohibited. Your options are quite limited and none of them are probably what you either want or need to hear.

Resources