Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>From my understanding of and experience with modems, achieving efficiency (as in, decent data rate with acceptable <a href="http://en.wikipedia.org/wiki/Bit_error_rate" rel="nofollow noreferrer">BER</a>) and having low algorithmic complexity/cost is nothing more than a pipe dream.</p> <p>Here are a few things that you're going to face in one way or another when transmitting data:</p> <ul> <li>The channel (e.g. room) noise. It will distort the signal and contribute to decoding errors. Information encoded with amplitude modulation is the most affected here.</li> <li>Multiple signal paths. The receiver (microphone) will pick up signal reflections from objects in the room. The signal will further degrade.</li> <li>Changing communication channel/signal paths. If the devices aren't stationary and/or other things move around in the room, the signal will be changing its properties over time and will be further hard to decode (at times, impossible).</li> <li>The oscillators used in the transmitter and receiver are going to work at slightly different rates. What's more, their frequencies are going to fluctuate over time. This necessitates additional synchronization at high data rates/long data packets.</li> <li>Distortions, especially non-linear, in the hardware and software, especially on the iPhone's side, seriously hampering any high-speed data communication over its audio channel. iPhone was not designed to function as a modem and did not have to meet all the typical requirements for a modem. You may encounter that the microphone is very non-linear and its frequency range is quite narrow, that from time to time audio samples get lost or appear out of thin air, that there are noticeable gaps in the audio between blocks of sent or received samples, etc etc.</li> </ul> <p>I personally recommend looking into implementing something extremely simple and low-speed. Implement a 2-FSK modem similar to that described in the ITU-T recommendations V.21 and V.23. Use one frequency to transmit 0's and another to transmit 1's.</p> <p>First get it to work at rates not more than 1200 bits/second in software before integrating into the devices. Get it to fully work in software with added white noise and when the encoder's and decoder's sample rates are somewhat different (hint: you'll need a sample rate converter here, but some audio editors are able to resample wave files and you can do that by hand).</p> <p>Unless the iPhone is terribly screwed up, you should be able to implement a modem on it, but it's not an easy task and I don't think you can find any code online that you can take as-is and almost instantaneously make work.</p> <p>Btw, it may be a good idea to ask this question at <a href="https://dsp.stackexchange.com/">dsp.stackexchange.com</a>.</p> <p><strong>EDIT</strong>: See <a href="https://stackoverflow.com/a/11026006/968261">my answer to a different question and code in it</a>. Though not spectacularly fast, a simple V.23-like 1200 bits/second modem might work here. With some tweaks it can be made to support higher data rates. The FSK transmitter code is simple enough to port to a microcontroller.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload