Show HN: TCP over sound on Android
github.com
github.com
Might increase that bandwidth from 7kbps to something more comfortable.
To be clear, the 7kbps is the raw frame throughput, not the effective rate with TCP. There are two ways I can see to boost this number. One would be to pack more bits into each symbol, e.g. to use a wider QAM mode. I find that in practice the degradation from using speaker/mic makes this somewhat impractical. The other would be to use a more broadband signal (the width of the the main audible channel is a few kHz). But this is also kind of undesirable since it has to compete with more interference across the spectrum and can also be a less pleasing sound.
http://www.labs.hpe.com/personal/Jean_Tourrilhes/Linux/Linux...
I'm old enough to know all about those old school modems. I think this is stuff is cool for those niche type applications.
Some phones do proprietary audio filtering and noise reduction at hardware or driver level--you don't get access to the raw recorded audio data. On the upside, all phones these days are plenty fast to do CPU intensive audio processing.
At some point I'd like to try it on an RPi across a piezo and a cheap mic
In fact, the Android library is just a wrapper on this, although a fairly non-trivial one.
libquiet's tests actually run exactly as you describe on a loopback alsa device
Or, well, WLAN or 6LoWPAN, it is IoT after all.
(I work at Canary.)
a) This is real-time and could potentially be disrupted by GC pauses
b) JNI means you get to use OpenSL, the best and lowest latency sound engine on Android
c) This builds on top of libquiet, a C library, which itself builds on liquid dsp, another C library. Rewriting these in Java would be significantly more work than building the JNI wrapper. Especially true for liquid which is a mature library with lots of code
If you want to see quiet's configuration flexibility try this in Chrome https://quiet.github.io/quiet-profile-lab/
Years ago I was playing around to learn some DSP and made a simple modem for speakers and microphone to send text messages via sound. I used "continuous-phase frequency shift keying" on a couple of different frequency pairs, and the receiver used FFT for decoding...
Never managed to get it working reliably above 300 bps. It would probably be much better to use the Goertzel algorithm tuned to the specific frequencies instead of using chunked FFT.
I'm curious about why some modulation schemes are better than others in this situation, but it seems like a lot of tricky math and information theory is needed to get it.
OK, some Wikipedia articles later: so OFDM basically means you send relatively long pulses of many parallel bit streams on many "orthogonally" spaced frequencies, each stream itself being modulated by some other scheme (in your case QAM, which uses four amplitude levels to encode two bits). The frequency spacing is chosen to avoid spectral interference, and the pulses are spaced to avoid temporal interference. With the relatively long pulse times and the many frequencies, FFT is probably the best method.
[1] https://msdn.microsoft.com/en-us/library/aa940293(v=winembed...
Lasted around 6 months of near 24/7 use before Orange started detecting data and charging contract customers to call 0800 numbers.
Link reproduced for clarity:
[2] Demo of above: https://www.youtube.com/watch?v=2_8GlFdlb0Y
[3] Same idea, some hackable code: https://github.com/Neohapsis/QRCode-Video-Data-Exfiltration