
TCP/IP over audio  - deutronium
http://www.anfractuosity.com/projects/ultrasound-networking/
======
rahimnathwani
Remember the BBC micro and other computers of that era, which used audio tapes
to save programs? I recall a BBC TV programme about technology from when I was
a kid. In at least one episode, they played such a tape on the air, so that we
could record it (by holding the cassette recorder near the TV speaker), and
then load the program ourselves.

Is this a false memory or can someone else confirm seeing this?

~~~
bane
It's probably true. The rate of data on the tapes was probably slow enough
that even over a lossy TV broadcast signal it would still survive.

I think the Commodore Cassette drive was 50 bytes/sec?

~~~
antimagic
I was able to copy Commodore cassettes using my father's high end audio setup.
A friend with a standard two-tape deck ended up with corrupted tapes though,
so the bit rate must have been close to the limit of the medium.

~~~
rahimnathwani
Your friend probably had a problem with azimuth (head alignment), which can
usually be fixed with a small screwdriver:

[http://www.endino.com/archive/cassettes.html](http://www.endino.com/archive/cassettes.html)

------
erjiang
As an aside, the tun/tap interface in Linux is a fantastic way to muck around
with lower-level networking without getting into the kernel or hardware.
Essentially, it creates a virtual network interface, except instead of
hardware, data goes to your userspace program. You can then just do a read()
to grab packets and do whatever you want with them, using Python, Ruby, or
anything other programming language.

I wrote a prototype proxy in Go that can split network traffic over two
Internet connections using some hacked-together tun code[0] and everything
happens in userspace.

[0]
[https://github.com/erjiang/tuntuntun](https://github.com/erjiang/tuntuntun)

~~~
matiasb
Yeah, I'm trying to tunnel TCP packets over Facebook chat[0] (to get some free
Internet when using "social media" mobile plans).

[0] [https://github.com/matiasinsaurralde/facebook-
tunnel](https://github.com/matiasinsaurralde/facebook-tunnel)

~~~
rahimnathwani
Interesting. Have you tried using a DNS tunnel? It would be similarly slow if
it worked over your connection.

~~~
matiasb
Yes, both ICMP and DNS tunnels work on most of the mobile plans here (I'm from
Paraguay, South America). We had an interesting experience with the
Internet.org campaign, they signed an alliance with the biggest telco (Tigo -
Telecel, Millicom International), so all the users are getting free Facebook
access. This small project I'm trying to code involves a critique to the
Internet.org campaign ("free Internet for poor countries"), Internet !=
Facebook.

------
WestCoastJustin
There have been several threads on HN about ultrasonic networking in recent
months. One was a simple chat client, called Quietnet [1]. The other was
malware called BadBIOS, which has the ability to communicate over hi-def audio
[2].

[1]
[https://news.ycombinator.com/item?id=7024615](https://news.ycombinator.com/item?id=7024615)

[2]
[https://news.ycombinator.com/item?id=6654663](https://news.ycombinator.com/item?id=6654663)

~~~
jff
The alleged ability to communicate over audio, since its very existence is
questionable.

~~~
logicallee
Does nobody here remember modems? You take an old 2400 baud modem that's
supposed to work over a crackly telephone line -
www.engadget.com/media/2009/05/090527-300baud-01.jpg

that's literally how TCP/IP was invented. This stuff - pure, analog audio -
went all the way up to 28.8kbps, which was the limit of the line bandwidth.
Why not just take those protocols and put them into a speaker and microphone.
Why bother writing new protocols? Just start with modem protocols and play
with the frequencies.

Home Internet connectivity was literally born out of TCP/IP over audio...

~~~
mbell
Communicating through copper wires using electrical signaling at audio
frequencies is _very_ different from communicating through air using acoustic
waves. Even assuming 'perfect' speakers and microphones you have completely
different transmission effects than you have with low frequency electrical
signals in copper.

~~~
stedaniels
Please do thorough research. Modems were originally, more often than not, used
with acoustic couplers.

~~~
mbell
It's unclear what difference that makes in the context of my post. The fact
remains that the modulation and signaling protocols developed for use in
modems were designed within the constraints of electrical transmission across
miles of copper wire, not through sounds waves in an unknown acoustical
environment. The constraints for the two situations are entirely different.
Acoustic couplers are designed to minimize any acoustical impact of their use
to avoid the exact acoustical problems you'd have transmitting across a room.

~~~
smithian
Yes. Also, the upper limit on the dynamic range of the telephone network is
somewhere around 3400 Hz, well within the range of human hearing. This
protocol is designed to send data in a frequency range that most people can't
hear, or at least can't hear very well.

------
mistercow
This is neat, but for a teenager, 18kHz is more "instant headache" than
"ultrasonic".

------
chrissnell
Amateur radio folks have been doing this for a long time, since the early
1990s at least.

~~~
Aqwis
Radio is electromagnetic waves, not sound waves.

~~~
VLM
He's more correct than you think. Since the 90s there's been an explosion of
sound card based digital modulation schemes. Usually you see a waterfall
spectrum from 0 to "whatever" and you click where you want to operate.
Essentially the attached SSB transceiver is a linear transverter from audio to
some RF.

So instead of tuning your radio to 7.070 MHz and clicking on the computer
waterfall at 1200 Hz (aka operating at 7.0712 MHz) you just unplug the radio
from the computer, use speaker and mic instead of something plugged into
speaker and mic jacks and click on 18 KHz or whatever.

In the early days of PSK-31 and other modes you did demos at radio club
meetings and whatever by just letting it rip over the speakers. Loud and
annoying but works pretty well across a room or further.

The main limitation is most SSB communications radios cut out around 3400 Hz
at the high end so the software that is written for sound card digital modes
cuts out somewhere above that, but sometimes not as high as 25 KHz or
whatever, because 99% of the users and devs will never fool around with
ultrasound.

Because I like to use a HF modulation mode called Olivia I mostly use an old
version of DM780 software (from when it was free) and multipsk (free) although
I could use FLDIGI (which is also free). In my infinite spare time I'll see
what unnatural limits have been built into the software. This topic of
ultrasound networking comes up on HN like clockwork every week or so, so I'll
report back next time.

(Edited to add, one thing I like about multipsk is the, um, innovative UI. Go
to images.google.com and take a look.)

------
yeukhon
Side question: UDP seems to be the preferred protocol for VoIP-type of
services. While the size of a UDP message is generally much larger than that
of TCP, and some missed UDP messages are acceptable (analogous to cellular
communication some signal weakness/loss is acceptable), any other strong
reasons people prefer UDP over TCP in VoIP?

~~~
IvyMike
What happens when packets are dropped in UDP? A bit of audio corruption.

What happens when packets are dropped in TCP? A hard-to-predict amount of
delay. And retransmission of audio data that you might just throw out anyway.
(There are alternatives to discarding the data that should have already been
heard, like temporal compression, but that's hard to do right, too.)

------
jijji
In the old days, they used to call this a "modem". Long live the Hayes 1200
baud modem of the early 1980's.

------
lucb1e
Is there any step-by-step setup guide for dummies? I'm entirely new to
gnuradio and have no idea how this is supposed to work. It seems very
interesting though!

By the way, I'm using Linux Mint 15 and fairly experienced with Debian-based
Linux systems.

------
Cogito
I couldn't see any information on the linked page - anyone know what the
latency and throughput characteristics of this set up are?

Would be very interesting to understand how audio attenuation impacts the
TCP/IP connection.

~~~
deutronium
I haven't done proper throughput tests with it yet.

I'll see if I can dig out a pcap file I took using it, which should give you
an idea of the latencies involved.

[Edit] I've just updated the page with a wireshark screenshot which shows the
latencies and also a link to the pcap file.

Something which I'm keen to look at doing is extending it beyond 2-FSK, to
improve the throughput.

~~~
ChuckMcM
Definitely, to QQAM encoding and you should be able to get a decent baud rate
out of it. I believe both QAM and QQAM are built into gnuradio as encoding
options.

------
rafavega
How is it that they receive and transmit ultrasonic frequencies with a
computer sound card? Is there not a low-pass filter at around 22KHz on inputs
and outputs of all sound cards?

~~~
nitrogen
The built-in audio on most PCs these days supports 96kHz or even 192kHz sample
rates.

~~~
whoopdedo
The DAC may sample at that resolution, but it's another matter if the driver
will pass an ultrasonic frequency. Looking at a few datasheets from various
manufacturers, I don't see any mention of bandpass filters. So either they
don't have them or they don't think it's worth mentioning.

------
flibertgibit
This to me is incredibly awesome. The question is, could you use radio
frequencies meant for speech/music for it? I think so, since morse code is
sent on these same frequencies. What about streaming video over short wave
radio?

~~~
lutusp
> What about streaming video over short wave radio?

That's what TV broadcasting does. But it's radio (electromagnetic) waves, not
sound waves.

