We’ve seen networks built over some interesting mediums, but QR codes has to be a new one. [Eric Seifert] decided to try to use QR codes to make an IP connection. He used these visual codes to create a bi-directional connection between two camera-equipped computers. He’s a persistent chap, because it works: in one of his videos, he shows an SSH connection between two devices.
He faced a number of challenges on the way. Although there is plenty of code to read QR codes, the data that can be encoded and read from them is limited. There is a binary mode that can be used with QR codes, but it is really inefficient. [Eric] decided to use base32 coding instead, packing the data into each frame as alphanumeric text. Each QR code image that is created and received is numbered, so the system can keep track and request any lost images. He also had some problems with keeping the data consistent between the encoded and decoded versions, so he had to add some packing to the data before it would work. It uses Python-pytun to create a TUN/TAP device that carries the data.
The speed of the connection is rather slow: in his demo video, the two computers take over a minute to exchange keys for an SSH connection, and [Eric] measured the speed of the connection at about 100 bits per second. But even getting something like this working at all is a significant achievement. He has published his code on GitHub.
We’ve featured the work of [Eric] before: he created a data connection using an iPod FM transmitter.
41 thoughts on “IP Over QR Codes”
That being said: Have you tried adding printers and cameras to the system, so that it can be even more complicated and overhead-ish? :-)
This is why I come here…
and you need to snail-mail every QR code/packet to the other client.
Amateurs… you need to machine the QR code into slabs of granite and use a depth camera to read them back.
Eh, depth detection depending on quality and resolution can be far more dense than a mere QR code.
Perhaps he’s bipolar.
Mirco QR codes etched by acid into substrate then read them via Micron X Ray
QRs printed as a jigsaw puzzle. (Data compression)
I bet that would cause data fragmentation ;-)
QR codes use Reed-Solomon error correction, so you can resist fragmentation or hide side-channel info in them.
I’ll just leave this here: http://www.blug.linux.no/rfc1149
see, then we can print out whole stacks of them to move place to place, and we are kind of rounding about back to punch cards…
Finally: digital clacks. now build a tower in Ank Morpork with this setup…
\o/ ___( +1 )
The imps can’t draw fast enough and igor on the street of cunning artificers mumbled something about lentheth with no chromatic aberration being exthpenthiff.
Oh he thuppothed he could arrange a quantity dithcount, but that he’d need another pair of handth… and did we know of any going thpare.
Only to be destroyed by the postman seems wasteful.
Khm … Time (money) for nothing …
They’ve already had a speedup of 10x https://youtu.be/_BUlrzEvwEE
Check out their latest video. They’ve already gotten a 10x increase in speed. 2kbs is almost a usable speed.
Get some lenses and you can inexpensively implement a line of sight optical linkup.
Perhaps the multicoloured triangular type “barcode” to take advantage of the camera a bit more and squeeze in more data.
Smart board sends out a packet and updates multiple devices in one hit. Like the infoburst at the end of tv shows. Record at 30fps change image at say 10fps and play back in slow motion.
^^^ use the three frames to remove errors/blurr.
Feeling adventurous… Got too.much time in the day…
Maybe use the Web cam to view the number/scroll/caps lock leds… Send the message three bits at a time via a script… :D
Use 2 color channels for data, third for a pre-shared coded aperture. That way you can reconstruct the 2 data channels from a single blurred still.
Awesome! Somebody actually did this!
Quite a while back, I started on something with exactly the same concept. Never published it, but I did end up getting serial-over-QR working and figured I’d use an IP-over-serial system over the top of it.
Glad to see someone got this absurd concept working!
Cool project I do wish I got a little further when I played around with the same idea. I quickly realized with some test scripts and not without drastic changes to the qr code library it was going to be slow(single thread never got into buffering frames to distribute to more cores). Qr codes are overly complex when a 4bit grey scale bitmap(pgm) and header for calibration and maybe a few bit Reed-Solomon error correction would suffice and opencv or c program to change to image back to pgm and deskew. The libraries I used took to long to decode the qr code even if it was a perfect image and turned off checking for skew.
Reminds me a bit of those SLIP or PPP over terminal session utils.
Amazing hack. But for god’s sake: use the phone in landscape mode….
I loled at vertical recording of horizontally oriented screens.
Great job though! I kept hearing the ‘dialup handshake not-static’ sound while watching it. ;)
I wrote a program a while back that would take an input file and output it to qr code, embedding the data in rather smallish qr codes. The idea was you could then print it out, rescan them later and the program would reassemble from the data.
Never finished the reassembly part but I should… fun little BS project.
http://ollydbg.de/Paperbak/ I would print the code aswell.
Finally a way to use Youtube to make backups of large files :-)
If LEGO can have a movie, why not QR CODE: The Movie? Pirate sites will eat it up.
although not relavant to “large” files by today’s standards, you could upload an old datacassette or data-vhs to youtube and see if the data is there or if dropped/interoplated frames screws it up, if the data is not re-playable, then take that protocol and slow it the heck down,instant youtube-data protocol without needing to re-code anything.
Perhaps this would be an interesting amendment to RFC 1149.
Looks like there’s plenty of space to increase the frame rate. I wonder what the delay is now? Is he using interpreted PERL or something for it? Maybe command-line called graphics tools to extract the QR and rotate it to the correct angle, etc?
I bet if he got right down to it, and coded something fast, that got straight to the point and didn’t mess about, he could get it much faster.
Whatever the point of that would be…
OK so there’s no point in transmitting data over QR codes over video, and never will be. So I suppose the speed doesn’t matter, but don’t take the speed of this chap’s creation as authoritative, it could probably do a lot faster if you needed it to. Which you never would. So really there’s only so much point in my even speculating, really.
So… 4296 characters per frame (for 40L), at 160% overhead: 2685 bytes
I did try using QR codes to store an OpenPGP public key… with the view of trying to get it small enough to print on a business card… but even using ECC keys, couldn’t get something that would scan reliably.
We had this 24 hour competition at out university where we had to build a system like this, only for one direction. It was fun.
There’s an Android app for file transfer using QR code. It’s called ThruGlassXfer.
This hack has real potential for Independent Network Security. Yes, it is slow – but in general it has potential.
Why do I think of Matrix? On a serious note this has close similarities to this http://www.buffalo.edu/news/releases/2016/07/034.html
Please be kind and respectful to help make the comments section excellent. (Comment Policy)