8 ms·
TCP/IP over audio
- WestCoastJustin 13y agoThere 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 13y agoThe alleged ability to communicate over audio, since its very existence is questionable.
- ParadisoShlee 13y ago#BadBIOS might be vapor but #RadBIOS is coming! https://pbs.twimg.com/media/BZpjjcyCUAI48nH.png https://pbs.twimg.com/media/BZpjjcyCUAI48nH.png
- logicallee 13y agoDoes 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...
- jff 13y agoThe question is not "can you transmit digital information over audio". That's an obvious yes. The question is, can laptop speakers transmit at ultrasonic frequencies, and can a laptop microphone pick those frequencies up sufficiently to actually communicate. This guy used 17 and 18 kHz as carriers. That is within the hearing range of young people, but a quick experiment shows that either my desktop speakers cannot reproduce 17 kHz, or I have recently become too old to hear 17 kHz.
- acdha 13y ago> The question is, can laptop speakers transmit at ultrasonic frequencies, and can a laptop microphone pick those frequencies up sufficiently to actually communicate. Given two separate examples of running code, the question is really what percentage of laptops can do this. It's possible that some systems have filters but so far I haven't found one.
- lutusp 13y ago> This guy used 17 and 18 kHz as carriers. That is within the hearing range of young people, but a quick experiment shows that either my desktop speakers cannot reproduce 17 kHz, or I have recently become too old to hear 17 kHz. It's easy to find out -- go here: http://arachnoid.com/JSigGen http://arachnoid.com/JSigGen Enter any frequency you want. Chances are if you're over 40, you can't hear 17 KHz. I'm 68 and I can't hear anything over 6 KHz. > ... or I have recently become too old ... It usually takes longer than that. :)
- guiambros 13y ago> Enter any frequency you want. Chances are if you're over 40, you can't hear 17 KHz. (Maybe I should get better speakers...)
- lutusp 13y ago> (Maybe I should get better speakers...) Maybe, but you can test your hearing range more easily by putting on a set of headphones and experimenting with the linked signal generator -- reasonable quality audio headphones should easily be able to exceed your own hearing range on the high end. And chances are typical computer speakers should also be able to exceed a normal hearing range.
- mistercow 13y ago>or I have recently become too old to hear 17 kHz. If you're in your mid-20s (and you're on HN, so you probably are), it's not terribly unlikely that you've recently lost that part of your range. In my experience (back when I was young enough to hear those frequencies), even crappy speakers can usually go up to 20kHz easily. Very low frequencies are another story.
- dfc 13y agoAt the end of its service I had flashed my USRobotics Courier modem from 9600k to 56.6k. That was still audio over POTS.
- mbell 13y ago56.6k speeds required a digital POTS, it transmitted PCM through the digital portions of the network only to become analog at the last moment, from the nearest pole switch to your house. In other words, the modem you were calling had to be 'all digital' and plugged into the telecom network. There wasn't a lot of connection left to 'audio' for these modems, other than their baseband frequency range (0-4khz).
- dfc 13y agoI swear that I used to call another friends BBS that also had a Courier modem hooked up to a POTS line and connect at 56.6k.
- mbell 13y agoThat is unlikely, the relevant standard is V.90: http://en.wikipedia.org/wiki/V.90_(recommendation) http://en.wikipedia.org/wiki/V.90_(recommendation) Only downstream was 56.6k PCM, upstream was 33.6k analog-modulated, so two consumer modems hooked together would only be capable of 33.6k. There was a later V.92 standard that improved upstream speed, but is was a bit wonky as it sacrificed download speed to do it, I'm not sure how much it was really used.
- ChuckMcM 13y agoYou are mistaken. 56K baud was the 'last' of the POTS modems, and it worked over an unimproved POTS line. Work beyond 56K was not pursued because ISDN was 64K and "imminent" (only to be DSLAMed :-) by ADSL.)
- mbell 13y agoNo need to take my word for it, here is the spec: https://www.itu.int/rec/dologin_pub.asp?lang=e&id=T-REC-V.90-199809-I!!PDF-E&type=items https://www.itu.int/rec/dologin_pub.asp?lang=e&id=T-REC-V.90...
- mbell 13y agoCommunicating 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.
- rahimnathwani 13y agoDidn't some old modems use an acoustic coupler (i.e. a cradle which held the handset)?
- prof_hobart 13y agoYes, they did. I've still got an old one in a cupboard somewhere.
- stedaniels 13y agoPlease do thorough research. Modems were originally, more often than not, used with acoustic couplers.
- cnvogel 13y agoExactly! And the DIY version of it looked like this: http://commons.wikimedia.org/wiki/File:Akustikkoppler_CCC_Datenklo.jpg http://commons.wikimedia.org/wiki/File:Akustikkoppler_CCC_Da... And it supports 300bps and 1200bps speeds.
- mbell 13y agoIt'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.
- bnegreve 13y ago> Why bother writing new protocols? Just start with modem protocols and play with the frequencies. Technically PPP is a point to point protocol which makes everything easier (no real addressing, no routing and so on). This protocol would be more comparable to wifi.
- gscott 13y agoFurbys have been there, done that. http://robotzsf.blogspot.com/2012/11/furby-2012-hacking.html http://robotzsf.blogspot.com/2012/11/furby-2012-hacking.html
- erjiang 13y agoAs 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
- IbJacked 13y agoNeat project, I like the way I say tuntuntun in my head. Your abbreviation of "ttt" makes me think of Technojock's Turbo Toolkit... ya, I'm old :)
- noonespecial 13y agoOpenvpn is the king of all tun/tap applications. A gander at its code is a good way to get a serious look at implementing your own networking with tun/tap interfaces.
- matiasb 13y agoYeah, 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 13y agoInteresting. Have you tried using a DNS tunnel? It would be similarly slow if it worked over your connection.
- matiasb 13y agoYes, 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.
- rafavega 13y agoHow 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?
- deutronium 13y agoI was able to transmit at up to around 23kHz which you may be able to make out the spike on the FFT graph on the video I made for some previous work: http://www.youtube.com/watch?v=H0DKRl8XIcU http://www.youtube.com/watch?v=H0DKRl8XIcU To get up to 23kHz I used a sample rate of 48kHz.
- nitrogen 13y agoThe built-in audio on most PCs these days supports 96kHz or even 192kHz sample rates.
- whoopdedo 13y agoThe 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.
- ackydoodles 13y agoNo.
- lutusp 13y ago> Is there not a low-pass filter at around 22KHz on inputs and outputs of all sound cards? It's not a low-pass filter per se, the limit is imposed by the Nyquist–Shannon sampling theorem (http://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem http://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_samplin...), which essentially limits the frequency spectrum to 1/2 the clock rate. Good-quality audio from a sound card is clocked at 44 KHz, which means the audio range extends only to 22 KHz. But you can clock a modern sound card at a rate much faster than 44 KHz, so the above might be only the normal limit, not the extreme.
- Cogito 13y agoI 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 13y agoI 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 13y agoDefinitely, 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.
- chrissnell 13y agoAmateur radio folks have been doing this for a long time, since the early 1990s at least.
- Aqwis 13y agoRadio is electromagnetic waves, not sound waves.
- VLM 13y agoHe'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.)
- flibertgibit 13y agoThis 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 13y ago> What about streaming video over short wave radio? That's what TV broadcasting does. But it's radio (electromagnetic) waves, not sound waves.
- yeukhon 13y agoSide 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 13y agoWhat 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.)
- delluminatus 13y agoUDP is used in a lot of environments where a few dropped packets aren't an issue, because the package guarantees in TCP slow things down, and TCP is generally a heavier protocol so it's slower... because... ? I think that I actually don't know any more than you about it.
- MichaelGG 13y agoWith TCP, when you drop a packet, you wait for it to requeue, and the application gets no data. You can see the effects in some poorly implemented video conferencing systems. You'll see someone speaking, then it'll pause for a few seconds, then the system will play the recovered video really fast to catch up. It's quite annoying. Instead, for realtime applications, you make sure each packet is usable by itself, and make your system gracefully degrade in face of packet loss. (Or, if you're from the insane world that designed Fax-over-IP, you transmit 2 or 3 packets for each packet, and hope that staves off packet loss.)
- awalton 13y agoTCP gives you two guarantees over UDP: * All packets arrive. (Reliable transport). * All packets that arrive are in order. (Sequential transport). Unfortunately, both of these aren't so necessary for real time audio (and somewhat less so, video). In fact, they get in the way. Missing packets can often be replaced in VoIP settings with various kinds of interpolation. And out of order data can be buffered and used to build the interpolated data before playback. Interestingly enough, even packets that have been damaged still often are usable to VoIP applications, since they still contain some payload that can be used to improve the signal.
- deleted 13y ago[deleted]
- jijji 13y agoIn the old days, they used to call this a "modem". Long live the Hayes 1200 baud modem of the early 1980's.
- rahimnathwani 13y agoRemember 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 13y agoIt'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 13y agoI 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 13y agoYour 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
- pgeorgi 13y agoSomething similar was provided via radio (not TV): https://en.wikipedia.org/wiki/BASICODE https://en.wikipedia.org/wiki/BASICODE It's possible that the BBC broadcasted data in the same way (conceptually, even if not in format) on their TV programme.
- easytiger 13y agoYea that is correct. I'm pretty Sure Micro Live did this.
- lucb1e 13y agoIs 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.
- mistercow 13y agoThis is neat, but for a teenager, 18kHz is more "instant headache" than "ultrasonic".