iPhones and iPods have a serial port on the dock connector, used to communicate with accessories at 3.3V levels and with no flow control. Using a MAX3232 and some capacitors, you can convert the signals to RS-232 levels used by most hardware.
The serial port is accessible to software under iPhone OS on
/dev/tty.iap, as a character device. Probably only to jailbroken apps.
To build an adapter, the following components are needed:
- iPod Dock Connector (male)
- DE-9 Connector (male)
- MAX3232 IC
- Five 0.1µF capacitors
We'll use these pins on the dock connector :
This is what mine looks like, I cut the IC's pins a bit and managed to put it all inside the connectors:
To connect to a Macintosh or Newton with a MiniDIN 8 serial, you'll also need the following cable:
|MiniDIN 8 Pin||Mac Signal||RS232 Signal||DE-9 Pin|
If you're just going to use it for an iPhone, you only need the connections on pins 2, 3 and 5 of the DE-9 connector, since the others are used for hardware flow control, and aren't connected on the iPhone side.