create hardware for iphone to connect with external device. arduino?

前端 未结 4 1583
灰色年华
灰色年华 2021-02-01 10:47

hi i need to create a simple connector. I think i may need to create an arduino board that will take data from the application and then transmit them to an external device.

相关标签:
4条回答
  • 2021-02-01 11:06

    You can communicate with MFi-sanctioned devices using the External Accessory framework included in iOS. It is laughably simple (standard stream processing) to interface with these devices.

    The trouble is building an MFi-sanctioned device. For both regulatory reasons (inescapable) and Apple's own policies (QA, don't want to associate with shonky hardware) the MFi Program isn't nearly as easy to get into as the iOS Developer Program. What's more, people/businesses operating in the program are under NDAs.

    Building iPhone OS Accessories by Ken Maskrey is a good read and probably the most detailed account of the MFi program you'll get outside of the NDA. It answers most of the questions you've posed.


    That said, there's an alternative. If you don't mind jailbreaking your iOS device, a few of the pins in the 30-pin connector (available from Sparkfun, including a break-out board) are standard RS-232. The other pins are documented too, if that's of interest.

    The serial port is available at /dev/tty.iap, a character device. There are also a few tutorials available. That all said and done, it's considerably simpler (and App Store-safe) to use 802.11 -- hopefully your device doesn't mind the extra power draw!

    0 讨论(0)
  • 2021-02-01 11:10

    In order get get access to the APIs necessary to develop apps that use the dock connector to talk to external hardware, you have become a member of Apple's Made for iPhone program. It's not a particularly simple process.

    You're better off designing a device that can use WiFi to talk to the iPhone, then you can use the standard networking APIs and don't need any special permission from Apple.

    EDIT: This answer is 5+ years old now. It's still true that you need to be in the MFi program to use the dock connector. However, at this point, most of the time Bluetooth 4.0 is the easiest way to make hardware that can communicate with a custom iPhone app.

    0 讨论(0)
  • 2021-02-01 11:28

    The other answers are good, but there is one final alternative - you can use phase-shift keying (or similar methods) to connect a device to the iPhone via the headphone/microphone socket and communicate with the device via audio tones.

    Someone has done a library for this already, however I can't currently seem to find the link. They did claim they'd got apps into the appstore that use this method.

    Update

    Found a good collection of links about this here:

    http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1274970878

    0 讨论(0)
  • 2021-02-01 11:29

    A company called Redpark make a serial cable for old and new style iPhone connectors. They also supply and SDk. This would not be for App Store Apps, however!

    Redpark's iPhone/iPad/iPod serial cables

    0 讨论(0)
提交回复
热议问题