ADS-B Telemetry Gateway
Live aircraft traffic from an antenna to a network topic, encrypted in hardware along the way.
A hardware-in-the-loop telemetry gateway that carries real ADS-B aircraft traffic across every layer of an embedded stack: an SDR feeds raw Mode-S frames to an STM32H753, which parses, encrypts and puts them on a CAN bus, and a NixOS host on the other end decrypts them and republishes them to the network.
Ingest on the microcontroller
An SDR running dump1090 floods an STM32H753 with raw Mode-S frames over UART. Taking an interrupt per byte at that rate would spend the CPU on bookkeeping, so the firmware ingests through a DMA ring buffer instead and the ingest task blocks on a thread flag until there is real work to do.
The buffer lives in an MPU-designated non-cacheable region. On the H7 that is not optional — the cache and the DMA engine have different views of memory, and a buffer that is cached is a buffer that will eventually hand you stale frames.
Encryption and transport
Parsed positions go onto a FreeRTOS queue, where the H7’s hardware AES block encrypts them before they leave the chip over FDCAN. Doing it in the peripheral rather than in software keeps the cost off the critical path.
The host
A RockPro64 running NixOS receives the frames through an MCP2515 CAN controller on SPI. A C++20 daemon decrypts, deserializes and republishes them over Zenoh, which is where the rest of the network picks them up.
The host is fully declarative: cross-compiled from x86, secrets managed with sops-nix, and an ephemeral tmpfs root. That last part is the one that matters on a vehicle — power gets cut without warning, and a root filesystem that is rebuilt from configuration on every boot cannot be left in a half-written state by it.
Stack
- C
- C++20
- FreeRTOS
- STM32H7
- Nix
- SocketCAN
- Zenoh
- Protobuf
Links
- DMA ring buffer in a non-cacheable MPU region: no interrupt per byte.
- Hardware AES on the H7 encrypts every frame before it hits the bus.
- Fully declarative NixOS host, cross-compiled from x86.
- Ephemeral tmpfs root, so pulling power can’t corrupt the system.