问题
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?
回答1:
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
回答2:
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.
来源:https://stackoverflow.com/questions/1720568/whats-needed-to-use-the-apple-accessory-protocol