Post
Topic
Board Project Development
Re: [BOUNTY - 25 BTC] Audio/Modem-based communication library
by
roman.z
on 09/07/2014, 05:54:53 UTC
Good news, every one Smiley

I have used today a proper audio cable (instead of a headset) to connect between my PC's audio output and input, so the noise went down dramatically.
This way I was able to achieve 36kbps (after ECC) to successfully transmit 64kB.

Note that there is an overhead of ~2 seconds for the training sequence of the modem, so the effective transfer time is ~15 seconds.

Quote
$ ./test.sh
+ set -e
+ dd if=/dev/urandom of=data.send bs=1024 count=64
64+0 records in
64+0 records out
65536 bytes (66 kB) copied, 0.00955402 s, 6.9 MB/s
+ python send.py
Running MODEM @ 40.0 kbps
Encoded 65536 bytes
$ arecord rx.int16 -q -f S16_LE -c 1 -r 32000
$ aplay tx.int16 -q -f S16_LE -c 1 -r 32000
Took 17.27 seconds
+ python recv.py
2014-07-09 08:38:23,480 INFO         Carrier detected at ~58.0 ms @ 1.0 kHz: coherence=100.000%, amplitude=0.402
2014-07-09 08:38:23,483 INFO         Carrier starts at 57.500 ms
2014-07-09 08:38:24,058 INFO         Prefix OK
2014-07-09 08:38:24,058 INFO         Frequency error: -0.02 ppm
2014-07-09 08:38:24,146 INFO                1.0 kHz: Noise sigma=0.0040, SNR=47.9 dB
2014-07-09 08:38:24,235 INFO                2.0 kHz: Noise sigma=0.0034, SNR=49.5 dB
2014-07-09 08:38:24,323 INFO                3.0 kHz: Noise sigma=0.0026, SNR=51.8 dB
2014-07-09 08:38:24,411 INFO                4.0 kHz: Noise sigma=0.0027, SNR=51.4 dB
2014-07-09 08:38:24,500 INFO                5.0 kHz: Noise sigma=0.0032, SNR=50.0 dB
2014-07-09 08:38:24,588 INFO                6.0 kHz: Noise sigma=0.0025, SNR=52.0 dB
2014-07-09 08:38:24,676 INFO                7.0 kHz: Noise sigma=0.0034, SNR=49.4 dB
2014-07-09 08:38:24,765 INFO                8.0 kHz: Noise sigma=0.0042, SNR=47.6 dB
2014-07-09 08:38:24,853 INFO                9.0 kHz: Noise sigma=0.0075, SNR=42.5 dB
2014-07-09 08:38:24,941 INFO               10.0 kHz: Noise sigma=0.0197, SNR=34.1 dB
2014-07-09 08:38:24,941 INFO         Demodulation started
2014-07-09 08:38:36,076 INFO         Demodulated 616560 bits : 77.070 kB @ 11.134 seconds
2014-07-09 08:38:37,469 INFO         Decoded 65.536 kB
+ python errors.py data.recv data.send
0/524288 bit error rate: 0.000%

The constellations are here: http://i.imgur.com/7kRtJb9.png

Using 36kpbs MODEM throughput, we can transmit 5MB = 40Mb in ~1111 seconds = 18.5 minutes.