Airgap — Optical Data Transfer
Send a file between two devices with no network at all — a color-flicker pattern on one screen, read by another device's camera.
Why I built this
I wanted to build something genuinely different — not another app, but a real demonstration of problem-solving: sending a file between two devices using nothing but light. No Wi-Fi, no Bluetooth, no network at all.
This isn't a brand-new idea — sending data through light or sound has shown up in research and specialty products for years. The point wasn't to invent something new. It was to take on a real, tricky problem and build a solid, working solution to a standard I'd actually stand behind — with Claude Code as my building partner the whole way, the same way I'd use any good tool.
What it is
Two devices, no network between them. One screen flickers a pattern of colors; a camera on another device watches that screen and rebuilds the original file from what it sees — purely from light, no wireless connection involved.
Why this is tricky
Screens and cameras aren't really built to "talk" to each other this way. Lighting shifts, a camera is never held perfectly still or straight, and there's no way for the receiving device to ask the sender to repeat anything it missed. Solving that came down to a few key ideas:
- Keeping the picture straight — the receiving camera works out how the screen is angled from where it's sitting and corrects for it automatically, so the pattern still reads correctly even when the camera isn't held perfectly straight-on.
- Adjusting for lighting — since lighting and camera settings drift over the course of a transfer, the system keeps checking a few known reference colors on screen and adjusts what it expects to see, rather than assuming the lighting stays constant.
- No "please repeat that" option — since there's no way to ask the sender to resend anything, the file is broken into small pieces and sent so the receiver can rebuild the whole thing from any large-enough set of pieces it manages to catch — not necessarily all of them, and not in any particular order.
- Not trusting a single glance — a camera can accidentally catch a blurry, in-between frame. Rather than trust any single frame, the system waits until it sees the exact same thing twice in a row before accepting it as real.
What's next
Right now this works with light only. The plan is to eventually add a second version that uses sound instead — a speaker and a microphone, built on the same underlying idea. Because of how this kind of transfer works, it's best suited to small files: think a text file or a small image, not a movie.
Honest limitation
The full process — uploading a real file, displaying it on screen, and reading it back through an actual camera in a browser — has been tested and verified from end to end, including a case where the file was fully rebuilt without ever catching the "first" pieces of the transfer. What hasn't been tested yet is a real camera and screen in an ordinary, imperfect room: real lighting, a shaky hand, and unpredictable camera behavior are the open questions. The receiving screen shows its own status live — whether it's found the sender's screen, how well-aligned it is — specifically so any problems show up clearly instead of failing silently once it's tried in the real world.