Is there iPhone authentication by MFI external accessories? - iphone

I am doing preliminary design of an iPhone app and I'm trying to find the answer to the following question: Does the MFI system allow an external accessory to restrict which particular iPhones are plugged into it?
I presume that I can add something to the external accessory protocol to do authentication/authorization. My question is, do I have to bother--does the MFI system already provide that?
I'm led to believe that if I register with the MFI program, I can get the answer, but I do not intend to ever do so. I will eventually work with a developer that is an MFI registeree. I suppose I could wait until I've established a relationship with such a developer and then ask them to find out, but I was hoping to get an answer to this one specific question prior to that point.
I'm hoping that as I am just looking for user level info, and not implementation details, that the answer is not hidden behind the MFI NDA.
Thanks.

Does the MFI system allow an external accessory to restrict which particular iPhones are plugged into it?
This is handled in the following manner:
The App must initiate a session using a protocol that the Accessory supports.
The App must know how to talk to the Accessory (i.e. how to encode/decode communication data).
There is nothing preventing any random iOS Device with the proper App installed from connecting to an External Accessory so long as the App meets the above requirements.
The External Accessory could implement some additional form of security (like sending a password maybe?) before opening up its full capabilities to the App. Obviously, this would require the Accessory developer and App developer to both know this extra procedure.

Related

Control Bluetooth audio device with iPhone

I am looking to write application for iPhone which will be able to control radio and CD player in car. Radio and player have Bluetooth connection available.
I started this question in order to obtain all informations I need for this one one place. I have few questions, but if you find anything I didn't ask important for me to start developing this application, please, let me know.
I have read about AVRCP profile and Bluetooth device in car supports AVRCP 1.3, which is good enough for me, having in mind controls which can be performed in that protocol version.
I read a lot about people saying "Apple device can only interact with each other", "Apple device can't be connected via Bluetooth to non-Apple device", "MFi program is obligatory if you want to do that", "MFi is not needed", etc. My first question is:
1)Is it even possible to pair iPhone (4, 4S) with radio and CD player in car via Bluetooth and control radio stations and music with any iPhone version? If yes, what are the limitations for making this kind of successful Bluetooth connection?
There is also very few informations about roles in which iPhone can work. For AVRCP there are two kind of roles: controller and target role. By reading this paper: https://developer.apple.com/hardwaredrivers/BluetoothDesignGuidelines.pdf I didn't find answer to my second question:
2) Can iPhone act as a controller and issue all available commands stated in AVRCP 1.3 to target device (radio and CD player)?
I would also like to know about available frameworks for this particular problem. I know there are several of them, but if anyone recognizes the right one for my problem, I'd like to know:
3) Which framework for interacting with target device should I use?
From developer point of view, I am also interested in available APIs for interacting with connected Bluetooth device. Since I am making my own application and assigning actions to buttons, inside of methods assigned to buttons I need to perform message sending to target device. So my next question is:
4) Does anyone know how if there's a way to send commands to target device (start/stop/pause/forward/backward, etc) as part of some API provided in XCode, or each message which I attend to send via Bluetooth to target device I need to make according to protocol documentation (make entire message (header, body, command part, etc) by myself)?
AVRCP was my thought for accomplishing this application. If I am wrong, please let me know.
Bluetooth has different profiles and when message is sent from one device, as far as I understand, profile itself handles message and interprets it and delivers to target device so target device can understand it. I do not understand how a message sent from iPhone to target Bluetooth device is handled from the moment I send it from my Objective-C (or C) code. That's the main doubt I have and it is related with question 4 - do I need to make raw messages in correct format in order to send AVRCP commands to device or I can use some API which will recognize those messages as AVRCP (or any other kind) and deliver it to target device?
This last question (if I suppose there is any kind of positive answer to all previous) concerns me the most from developer point of view. So, if anyone had maybe experience with this specific problem, I would appreciate any kind of answer or advice.
I am really looking forward to your answers. I hope that constructive and useful discussion will start on this topic and that lots of useful informations will be written.
Best regards.
You can do it using CoreBluetooth if your device (CD Player) is Bluetooth 4.0 LE compliant
Most likely you shall not be able to do it even if your car CD player has BLE 4.0.
With Core Bluetooth devices act as "Central" (client) or "Peripheral" (server), the peripheral "has data" and expose services with characteristics (variables). The central (client) reads data from the peripheral or subscribe for notifications.
Your only chance is to connect to the CD player as peripheral (server) and your iPhone being the central (client). In this case the CD player must expose services that allow you to control it. To be honest I do not know how this can be done, since the central (the iPhone) will read data and receive notifications from the peripheral, not vice versa.
Reversing roles, implementing iPhone as peripheral makes sense, but there is no predefined Bluetooth LE service for remote control, so your car CD player does not know what service to expect from you. It might work using HID service (Human Interface Device), used in general for keyboards and mouse, but according to this post the HID is forbidden by Apple on iOS.

Make use of external hardware Music controls in my custom App

I'm looking for a way to detect the buttons pressed of external music control buttons, I have integrated in my car via bluetooth. Is it possible to make use of them in my App for something else that playing and stoping music?
Thanks a lot!
Markus
Those controls are probably talking to your iPhone using the remote control lingo, part of iAP (iPod Accessory Protocol). For documentation on this, you need to join Apple's MFi program, which is a separate account to a normal developer account and quite a bit more difficult to get approved for.
I'm not certain whether it's possible to get your application to talk to those devices, as you need to specifically enable application communication on the device itself and there's an authentication scheme you need to handle.

Submit iOS app to apple store that interact with third party hardware over wifi

I would like to know what all possibilities are there to submit an iOS app that interact with third party hardware over wifi.
Do I need to go for MiFi certification for the hardware?
I have seen STB (Set Top Bbox) application which does similar things and STB are not Mifi certified
If apple allows such application then Do I need to send my hardware to apple while submitting application?
Regards,
You don't need certification. You only need certification when your device communicates via bluetooth or the 30-pin connector.
Exactly.
No, you don't need to send your hardware. You do, however, need to make sure your code properly handles the case when your hardware isn't available. You should also provide detailed notes to the reviewers explaining what your hardware does etc.
Edit (see comments): In some cases Apple has requested access to hardware in order to review apps.
a far as i know, only bluethooth hardware need to be apple certified, not wifi hardware...

How to launch an iphone app when an external accessory is either paired over BT or plugged into dock connector

I have researched this to death online and cannot find anything regarding auto launching an iphone app when an external accessory is either paired using BT or plugged into the dock connector.
We are an MFi developer with a BT accessory and application that we would like to launch when paired. We have the Info.plist containing our protocols and the device containing the correct protocol all working and communicating. The application works well with our BT device, however I would like to see the app launch when paired.
I have seen this before with accessories plugged into the connector and would live to know how that is accomplished.
http://www.metacafe.com/watch/5772611/ces_2011_withings/
Check at 3:15 in the video.
Does iPhone just have that ability for dock connected items to auto start?
I know that the External Accessory framework registers the protocol with the iPhone when the app is installed. This is how the iPhone/iPod knows to take you to the apple store when you connect a BT (or connector) device and you don't have an app for your connected devices protocol.
I don't understand why the app does not launch when paired, I would think this would be a no brainer. Can someone please shed some light on this topic. The best I found is from Apples docs:
Applications that are able to communicate with an external accessory should declare the ?protocols they support in their Info.plist file. Declaring support for specific protocols lets the system know that your application can be launched when that accessory is connected. If no application supports the connected accessory, the system may choose to launch the App Store and point out applications that do."
I cannot understand the meaning by "may choose to launch", does this mean is also chooses to launch? Please help.
The manufacturer of the device needs to include support for this feature at the firmware level. The details of this process are currently confidential by way of the MFi (Made For iPhone/iPod) non disclosure agreement, so unfortunately that is all the detail I can provide. Good luck!

What's needed to use the Apple Accessory Protocol?

I'm in the process of planning out a personal project that will be a media player and one of the things I would like to do is be able to dock my iPod touch (or any iPod or iPhone) and control it and play music off it like the speaker docs do that you can buy.
I found some information while searching around online for this but my question is can I make up a cable and use the serial protocol from any device or does Apple have this locked down so only certified/approved devices can communicate this way?
If you are looking to do this for yourself, I would recommend jailbreaking and the following resources on the web. These describe some methods of the Apple Accessory Protocol, and include some parts (at sparkfun) to execute. To get approved for the Apple method you need a corporation (or similar structure) and even legal counsel before you can get approved to even see the agreement you have to agree to in order to join.
http://nuxx.net/wiki/Apple_Accessory_Protocol
http://www.sparkfun.com/categories/101
There are even some great articles out there such as:
http://courses.cit.cornell.edu/ee476/FinalProjects/s2007/awr8_asl45/awr8_asl45/index.html
Good luck!
EDIT:
Since this is a relatively popular post, keep in mind that you can now use Bluetooth 4.0 LE for serial communication without approval from Apple (other than AppStore approval).
https://developer.apple.com/library/ios/documentation/NetworkingInternetWeb/Conceptual/CoreBluetooth_concepts/AboutCoreBluetooth/Introduction.html
Only devices in the Made for iPod program which use Apple's proprietary authentication chip can communicate with the External Accessory framework on the iPhone or iPod touch. Such devices must also expose a protocol that iPhone applications can use.
It is a reasonably involved process to be approved as a Made for iPod vendor of products (similar to the App Store approval process, but for hardware), but it has become a lot easier than it used to be. With iPhone OS 3.0, Apple has opened up the program to many more third parties than just the usual large accessory providers.
In your case, I'd actually wait and use another vendor's iPhone-controllable stereo. Manufacturers are just starting to come out with hardware controllable via iPhone applications, so it's only a matter of time before one of the larger accessory providers creates something like what you want. If they expose a protocol for controlling the device, all you'll have to do is write your application to control the device via that protocol.