Investigations

V.21 Modem

Go August 2025

A real V.21 FSK modem implementation in Go — bidirectional communication over USB audio between two machines.

This might be the nerdiest project in my portfolio. It's a real ITU-T V.21 modem in Go that sends data over USB audio hardware between two Ubuntu machines using Frequency-Shift Keying.

The protocol uses the standard V.21 frequency pairs: 1180/980Hz and 1850/1650Hz. Start/stop bit framing follows RS-232 conventions. The Goertzel algorithm handles frequency detection on the receiving end, with start bit edge detection and centred bit sampling.

It operates at 75 baud for maximum timing tolerance. The repo is massive (~262 MB) because it contains dozens of iterations showing the evolution from a broken script that generated random numbers to a working modem that successfully transfers 10+ valid bytes with clean protocol framing.

The lib/ structure has proper modules: audio (ALSA + PortAudio), dsp (filters, AGC, tone detection), modem, and framing. It's deeply satisfying to hear the modem tones and see bytes arrive on the other machine.

What this project demonstrates

Real ITU-T V.21 protocol: FSK modulation/demodulation
Bidirectional communication over USB audio hardware
Goertzel algorithm for frequency detection
RS-232 style start/stop bit framing
Evolution documented: broken script → working modem
Modules: audio, DSP, modem, framing

Technologies

GoDSPAudioHardwareProtocolSignal Processing

© 2026 Jonathan Leahy · v1.0.12