DIY Networking with No Strings Attached

Hobbyist Mike Kohn networked a laptop to a Raspberry Pi at 2400 baud using lasers and phototransistors, because why not?

Nick Bild
3 days agoCommunication
The full communication system (banana for scale) (📷: Mike Kohn)

Nothing moves faster than light, so it is no wonder why this medium is used for the fastest forms of digital communication. Light-based data transfers are most commonly associated with fiber optics, but there are many other technologies that have been developed as well, such as free-space optical communications systems and Li-Fi.

Mike Kohn has been experimenting with light-based communication recently, not so much to create something better than what is already out there, but for fun and education. What he came up with is a fun — if not entirely practical — way to get two computers communicating wirelessly with lasers. With a transfer rate of 2400 baud it would have been pretty fast 40 years ago, but today it is more of a toy.

Kohn’s project networks a laptop to a Raspberry Pi 5 using low-power red pointer lasers and phototransistors. Each machine is connected via a USB-to-UART adapter to a small ATtiny85 microcontroller. The ATtiny85 is responsible for converting the incoming UART data into a modulated laser beam, while its phototransistor counterpart detects the beam from the opposite system. The two lasers are aimed directly at the other machine's phototransistors, allowing the computers to transmit and receive data as flashes of light.

To handle the networking side, Kohn used Linux’s built-in support for tun (tunnel) devices. These virtual network adapters act like real Ethernet cards, complete with their own IP addresses. A custom “relay” program reads packets arriving at the tun device and sends them across the laser link. Likewise, data coming from the UART is reassembled and delivered back into the network stack. The result is that the computers see each other as if they were linked by a traditional wired connection, even though their data is traveling through beams of light.

In practice, the connection is not fast or reliable enough for real-world use. While text can be sent through terminal software like Minicom at 4800 baud, higher speeds result in corrupted data. Even at the slower 2400 baud setting, ping times are sluggish and initiating an SSH session takes over a minute. Still, the fact that full IP packets can make the round trip over such a rudimentary setup is impressive.

The complete project, including source code and diagrams, is available on GitHub. While it may not be the future of networking, it serves as a creative demonstration of how digital communication can be built from the ground up.

Nick Bild
R&D, creativity, and building the next big thing you never knew you wanted are my specialties.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles