The iPhone has a modem. Did you know that? Well, not quite, but we managed to build a device that interfaces with an iPhone via the headphone/microphone jack and can send bidirectional serial data.
Though there are a number of ways to get data into and out of the iPhone – the dock connector, Bluetooth, Wi-Fi, etc. – none of these are well-suited for simple, low-speed bidirectional communication with inexpensive components. Plus, many of these were inaccessible via Apple’s 2.0 SDK. The audio port, however, is accessible from the SDK – both for playing audio and recording it.
iPhone Hacks has the schematic for the circuit you see below.
The core of this solution is a souped up microcontroller, which has a serial port on one side and talks to the iPhone using FSK (frequency shift keying), the same technique used by some of the first modems. (Frequency shift keying uses a sequence of analog signals with alternating frequencies to send information. For example, in binary FSK a tone of 8kHz might represent ‘1’, and 4kHz might represent ‘0’.)
For less than $20, we built a circuit that accomplished this, and wrote a corresponding iPhone application. Serial devices plugged into our circuit can communicate with any iPhone running our 2.0 code.
We will be releasing schematics and source code with the release of iPhone hacks.