Skip to main content

2026-11-29 · 5 min read

Build your own ADS-B flight tracker: Raspberry Pi + RTL-SDR dongle, from zero decoded messages to a live site

Radar

Translated from the Chinese original: read it in Chinese

Aircraft broadcast their position, altitude and flight ID on 1090 MHz every second. This is called ADS-B. The signal is not encrypted, and a USB TV stick of a few dollars plus a Raspberry Pi is enough to receive it. I set one up at home, decode the data, share it with Flightradar24 (FR24), and feed it to the /radar page of this site (in Chinese), and now even to a YouTube live stream.

This post follows what I actually built: what I used, how I set it up, and where I got stuck. The time-consuming part was not the assembly but three small traps that are hard to look up, which I put further down.

What you need

ItemWhat I used
ComputerRaspberry Pi 3 Model B (4 cores at 1.2 GHz, 1 GB RAM)
ReceiverUSB TV stick with an RTL2832U + R820T2 chip (a DVB-T stick used as an SDR)
Storage16 GB microSD card
PowerThe official Raspberry Pi power supply (see the second trap)
NetworkWi-Fi (I did not plug in a cable)
SoftwareFR24's Pi24 image (Debian 12), with fr24feed and the dump1090 decoder built in

Why can a TV stick act as an SDR? The RTL2832U chip hands the raw sampled signal straight to the computer, and the R820T2 is the tuner, covering 1090 MHz. It was designed for watching digital TV, and using it as a cheap software-defined radio turned out to be an unexpectedly good second life.

Steps

  1. Write the system: flash the Pi24 image to the microSD card (with Raspberry Pi Imager or balenaEtcher), and set up Wi-Fi and SSH.
  2. Plug in the TV stick and boot, then SSH in.
  3. Sign up for an FR24 sharing account: follow FR24's official Pi24 setup steps. Along the way you get a sharing key, which is your account's credential; do not paste it anywhere public (not GitHub, not screenshots, not forums).
  4. Check that the stick is detected:
lsusb
# you should see a line with RTL2838UHIDIR
  1. Log in to FR24 and check whether your receiver shows up under your account and whether its status is connected.

In theory that is the end. Mine was not.

First trap: gain too high, not one message decoded

When I first set it up, the receiver was connected to FR24 and the software was running, but:

  • about 1 million "suspected signals" per minute, and not one message decoded
  • noise floor at -31 dBFS

The cause was gain. The receiver's gain defaults to the maximum, which amplified the noise too and drowned out the aircraft's weak signals. This is a common situation with RTL-SDR: more is not better.

I set the decoder's gain to 40 (--gain 40), and the noise dropped to -37 dBFS. After a restart:

  • 6,663 messages and 21 aircraft decoded in 41 minutes
  • 1,021 position decodes with 0 failures

From "not a single message" to "data" took this one number. If your FR24 shows connected but you are hardly receiving any aircraft, check the gain first.

Second trap: not enough power, the whole thing drops off

At first I used an ordinary micro-USB charger. When the current is not enough, the system first logs "under-voltage", and then the whole board disappears from the network.

How to confirm:

vcgencmd get_throttled

The output is a bit-flag value; anything other than 0x0, such as 0x50005, means the voltage was low or the CPU was throttled at some point. Switching to the official Raspberry Pi power supply is the first step.

After switching, my Pi still vanished in the middle of the night once, which is another story; the full investigation is in "Even with a new power supply, the Raspberry Pi kept vanishing at night: let it leave a last message first" (in English).

Third trap: a reboot stuck "half way through shutting down"

After changing a setting I restarted, and the software got stuck "half way through shutting down" for half an hour without recovering. The sneaky part was:

  • FR24 still showed "connected"
  • the restart button on the Pi's web page did not respond either

The only way out was pulling the power. It taught me: "connected" does not mean "receiving data". I later added this case to the automatic monitoring: an email goes out if it is offline for over 15 minutes, or if no aircraft were received for 2 hours during the day.

Hooking it into your own site (optional)

Inside the LAN, the receiver exposes two JSON files: the receiver status and the list of aircraft currently received. My site's server reads them every 2 seconds and keeps only a summary (how many aircraft now, how many today, airlines, aircraft types), shown at /radar (in Chinese). Aircraft types that have been received are collected into the aircraft encyclopedia (in Chinese).

Two things worth noting:

  • The status data contains your FR24 sharing key and internal IP, so the site must not spit out the whole thing as is; keep only the numbers you need.
  • Before publishing what the receiver sees, think about location: if you draw aircraft positions as a map, the center of the circle is where the receiver is. I chose not to mark the receiver and not to draw distance rings.

The design trade-offs of the whole project are here.

Summary

ProblemSymptomFix
Gain too highconnected, but not one message decodedset gain to around 40 (you have to experiment)
Weak powerunder-voltage warning, board drops offofficial Raspberry Pi power supply; check with vcgencmd get_throttled
Stuck reboot"connected" but no datapull the power, and add a "no data received" monitor

The parts are cheap; the real cost is the time spent debugging. I hope this post saves you a few evenings.

If you build one too, take a look at the live radar (in Chinese), or write to me and tell me where you got stuck.

Type to search projects and posts too