Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone headphone jack - read in data?

I have a small device which connects to a battery powered monitor. When I turn the wheel on the device, the monitor displays information such as when you started turning the wheel and how fast the wheel is turning. I believe the device is sending some sort of magnetic pulse or something through the 3.5 mm audio jack.

Instead of connecting the device to its original monitor, I want to connect it to my iPhone and read in the same data. The cord has a 3.5 mm audio jack at the end and fits in the iPhone normally like a headphone.

I have looked into projects like HiJack but am unsure of how to use the data I receive (or where the data is actually coming from when I do receive it), or if I can even use it in this circumstance.

Can I read data in (to the iPhone) from an external device through the iPhone's audio jack?

If yes, what frameworks/libraries do you suggest I look into?

I have looked into AurioTouch by Apple, but it seems rather complicated and isn't very straightforward.

like image 573
james Avatar asked Aug 25 '11 14:08

james


People also ask

Can a 3.5 mm jack transmit data?

Of course you can. You can send data through any communications channel.

Why won't my iPhone read my headphones?

Check for debris in the headphone port on your iPhone, iPad or iPod touch. Check your headphone cable, connector, remote, and earbuds for damage, like wear or breakage. Look for debris on the meshes in each earbud. To remove debris, gently brush all openings with a small, soft-bristled brush that's clean and dry.


2 Answers

Yes, it is possible to use the iPhone 3.5 mm (1/8") headphone/mic jack as a data input, as has been demonstrated by the HiJack project - which also powers the input device.

The key, as Dominik Selbold has pointed out, is that the incoming data must be modulated at frequencies within the passband of the iPhone microphone input. Although many have suggested that this limits the data rate, in fact 19 kHz audio is a very wideband signal, capable of dozens of kilobits per second.

For example, in 2008, Jonti Olds demonstrated how using Quadrature Amplitude Modulation at audio frequencies could stream TV sound and picture between two computers,using their audio cards. What would be needed on the iPhone would be to develop a QAM demodulator for the audio input - using the FFT library - to demodulate QAM audio modulated video back into digital video - like H.264 - probably at 1/4 VGA resolution. NTSC Composite video is already QAM, but at a much higher bandwidth; about 5 MHz.

If you search the web for JQAM, you can find Mr. Olds project and code. IMHO, this would be a very cool project to tackle on iPhone or Android.

like image 162
DWmFrancis Avatar answered Sep 21 '22 01:09

DWmFrancis


You can read any data through the iPhone's headjack, if the bandwidth of the signal fits into the bandwidth of the iPhone's A/D-converter, which is about 20Hz to 20kHz.

like image 43
Dominik Seibold Avatar answered Sep 23 '22 01:09

Dominik Seibold