Showing posts with label Coding. Show all posts
Showing posts with label Coding. Show all posts

Thursday, May 28, 2026

ADS-B flight tracking with Raspberry Pi, FlightAware, and ChatGPT

Friends of mine and readers of The Cubical Ruins will know that one of my interests is using software defined radio (SDR) to scan radio frequencies, connect to satellites and track flights. Back in the spring of 2024, I documented my first flight tracking system, which used an RTL-SDR Blog V4 dongle to collect Automatic Dependent Surveillance Broadcast (ADS-B) data from aircraft overhead. It was a simple set-up that used RTL1090, PlanePlotter and Virtual Radar Server to show flight data, and an air traffic control (ATC) map on whichever laptop I had connected to my SDR dongle and antenna. It was a fun experiment in SDR applications and flight tracking, and I even took my system airborne, tracking flights on my ThinkPad when I traveled to Europe last spring. 

Flight Tracking at Charles de Gaulle Airport
However, that setup left a bit to be desired. For one, I only had one SDR dongle that could receive the radio data from 1090 MHz, so I could only run flight tracking on one device at a time. Additionally, that device only pulled data when powered on and the appropriate applications were running. This made it difficult to use my laptop for other things, since the tracking software always needed to run continuously in the background. Since, I typically power my device down while not in use, this pretty much made it impossible to to be an ADS-B client for FlightAware, FlightRadar24 or any other crowd-sourced flight tracking organizations, as my laptop was only actively tracking whenever I decided to open the laptop and look at it. 

What I needed was a stand-alone computer, SDR dongle and antenna that could be dedicated to flight tracking 24/7. Enter the Raspberry Pi 3B+, a tiny, inexpensive single-board computer that can run a variety Debian-Linux based operating systems on 32 and 64 bit architectures. To go with the Raspberry Pi, I also purchased a FlightAware Pro-Stick Plus, which is similar to the RTL-SDR Blog V4 dongle, except it is specifically designed to collect flight data, instead of all-purpose SDR data. Those two pieces of hardware, along with an antenna, power and USB cables, are really the only pieces of hardware necessary to set-up a stand-alone ADS-B client that works in perpetuity, rather than only when my laptop is in-use. With this setup, I could use any computer on my local network to retrieve the flight data, and view flights on a map by connecting to my Raspberry Pi's IP address. I even went a step further by adding two LCD displays, so I could check out overhead air traffic anytime at my desk or at the kitchen table.  

Raspberry Pi 3B+ running PiAware
In 2024, when I started my flight tracking hobby, I used The Hobbyist's Guide to the RTL-SDR as well as online tutorials for set-up instructions, and GitHub to download and edit source code for applications like Dump1090 and RTL1090. This time, I would take advantage of Artificial Intelligence (AI) to create and edit the code for my Raspberry Pi-based flight tracker. 

At first I wasn't sure my AI assistant, ChatGPT, GPT model 5.5, was up to the task. I typed "How do I setup ADS-B flight tracking on my Raspberry Pi 3B+?", and got fairly straight-forward step-by-step instructions for installing and running Dump1090, a popular data translator for ADS-B radio signals. I followed the instructions, but ultimately kept hitting various snags. However, I consistently reported each issue I ran into, and ChatGPT continued to troubleshoot. Our ultimate conclusion was the Raspberry Pi's newest 64 bit "Trixie" operating system was interfering with Dump1090 in some way. ChatGPT determined this by indexing web results and finding that other users had the same problem with Trixie. What ultimately solved the issue was re-flashing the Pi with the older, simpler 32-bit "Bookworm" operating system. This solved the main issue, and Dump1090 began running successfully bringing in raw flight data and displaying it in the SSH (secure shell) terminal.  


Still, each time I ran Dump1090, a new issue surfaced. It was mostly due to driver issues related to using the RTL-SDR Blog V4 as well as missing directory files. Ultimately data stopped coming through Dump 1090 entirely, and I only found out after using an alternate RTL-SDR V3 that my V4 had probably broken at some point during installation and testing. So, I ended up purchasing both a general purpose Nooelec "Nesdr Smart" SDR dongle as well as the FlightAware Pro-Stick Plus. In my experience both the Nooelec and FlightAware sticks worked more easily than the RTL-SDR Blog V4, and I no longer had to worry about updating or installing drivers and directory files to get them to work. Once Dump1090 was installed successfully on the Pi, the Nooelec and FlightAware sticks were plug-and-play! 

SDR sticks I used

The final step was to set-up a flight map to display on my household LCD screens, so I could look at my local overhead flights anytime I wanted. I used one Chinese-made iPistBit 7 inch LCD screen and connected it to my Raspberry Pi board with an HDMI cable. Once the operating system was visible on the LCD screen, I used an iPazzPort Bluetooth Keyboard and Trackpad to navigate to the Chromium browser, and connect to the PiAware URL provided by FlightAware to see my data converted to a map with images of all planes flying overhead in real time. I then cloned the same operating system, applications and settings onto a second Pi and connected it to the other LCD screen so I could have two displays, one for upstairs and downstairs. Additionally, any browser on any device connected to my home Wifi network will be able to pull up my PiAware URL and display the same maps and data. I included more comprehensive step-by-step instructions below, so you can follow my process, If you'd like... 

Building an ADS-B Flight Tracker with a Raspberry Pi 3B+ on Debian Bookworm

I recently built a working ADS-B aircraft tracker using a Raspberry Pi 3B+, a USB RTL-SDR receiver, and FlightAware’s PiAware software. After a few false starts with outdated repository links, I got the setup working on Raspberry Pi OS / Debian Bookworm.

This guide walks through the successful setup.

Hardware Used

For this project I used:

  • Raspberry Pi 3B+

  • MicroSD card with Raspberry Pi OS / Debian Bookworm

  • RTL-SDR USB dongle

  • 1090 MHz ADS-B antenna

  • Internet connection

  • SSH access or a keyboard and monitor connected to the Pi

Step 1: Confirm the OS Version

On the Raspberry Pi, open a terminal and run:

cat /etc/os-release

The successful setup was done on Bookworm. You should see something similar to:

PRETTY_NAME="Raspbian GNU/Linux 12 (bookworm)"

Step 2: Update the Raspberry Pi

Before installing anything, update the system:

sudo apt update
sudo apt full-upgrade -y
sudo reboot

After the reboot, reconnect by SSH or open the terminal again.

Step 3: Install the FlightAware Repository

Download the current FlightAware APT repository package:

wget https://www.flightaware.com/adsb/piaware/files/
packages/pool/piaware/f/flightaware-apt-repository/
flightaware-apt-repository_1.3_all.deb

Install it:

sudo dpkg -i flightaware-apt-repository_1.3_all.deb

Then refresh the package list:

sudo apt update

This step is important. Earlier attempts using older package names failed with 404 errors or “file not found” messages. The key was using the current FlightAware repository package.

Step 4: Install PiAware

Install PiAware:

sudo apt install piaware -y

Then enable automatic and manual updates:

sudo piaware-config allow-auto-updates yes
sudo piaware-config allow-manual-updates yes

Step 5: Install dump1090-fa

PiAware sends data to FlightAware, but dump1090-fa is the software that actually receives and decodes 1090 MHz ADS-B signals from aircraft.

Install it with:

sudo apt install dump1090-fa -y

Then reboot:

sudo reboot

Step 6: Check That the RTL-SDR Dongle Is Detected

After rebooting, plug in the RTL-SDR dongle and run:

lsusb

You should see a device related to RTL-SDR, RTL2832U, Nooelec, or RTLSDR Blog, depending on your dongle.

You can also test with:

rtl_test

If you see a “device busy” error, that may actually mean dump1090-fa is already using the dongle, which is good. Only one program can use the SDR at a time.

Step 7: Check the Services

Run:

sudo systemctl status piaware
sudo systemctl status dump1090-fa

Both should show as active or running.

If needed, restart them:

sudo systemctl restart piaware
sudo systemctl restart dump1090-fa

Step 8: Open the Local SkyAware Map

Find your Raspberry Pi’s IP address:

hostname -I

Then open this in a browser on the same network:

http://YOUR-PI-IP/skyaware/

For example:

http://XXX.XXX.X.XXX/skyaware/

If everything is working, the SkyAware map should load. Aircraft will appear when your antenna receives ADS-B messages from nearby planes.

Step 9: Claim the Receiver on FlightAware

After PiAware has been running for a few minutes, go to FlightAware’s ADS-B stats page and claim the receiver while logged into your FlightAware account.

Once claimed, FlightAware will associate your Raspberry Pi receiver with your account and begin showing site statistics.

Troubleshooting Notes

Problem: Old repository package gives a 404 error

If a command tries to download an older package such as:

piaware-repo_10_all.deb
piaware-repository_10_all.deb
piaware-repo_9.0_all.deb

and it fails, use the current flightaware-apt-repository_1.3_all.deb package instead.

Problem: “Unable to locate package piaware”

This usually means the FlightAware repository was not installed correctly, or sudo apt update was not run after installing it.

Fix:

sudo dpkg -i flightaware-apt-repository_1.3_all.deb
sudo apt update
sudo apt install piaware -y

Problem: “Device or resource busy”

This can happen when another service is already using the SDR dongle. Stop competing services if needed:

sudo systemctl stop fr24feed
sudo systemctl stop readsb
sudo systemctl stop piaware
sudo systemctl stop dump1090-fa

Then test the dongle again, or restart the FlightAware services:

sudo systemctl restart dump1090-fa
sudo systemctl restart piaware

Problem: Map loads but no aircraft appear

This can happen if:

  • No aircraft are nearby

  • The antenna is indoors or poorly placed

  • The SDR is not connected properly

  • The antenna is not tuned for 1090 MHz

  • dump1090-fa is not running

Check with:

sudo systemctl status dump1090-fa

Final Result

Once everything was installed correctly, the SkyAware map loaded and aircraft appeared on the local map. The Raspberry Pi 3B+ was successfully receiving ADS-B data through the RTL-SDR dongle and feeding the data to FlightAware through PiAware.

This turned the Raspberry Pi into a small, low-cost aircraft tracking station.

One of the most helpful steps ChatGPT included was the command code lines "sudo systemctl status dump1090-fa", which tested the Dump1090 software to make sure it was running, and "sudo systemctl restart dump1090-fa" which would re-start tracking in case the process was stopped. 

Once my system was up and running, and I had my own personal ADS-B flight tracking system. I set-up a FlightAware account and linked my feed. So, now I am officially an ADS-B client for FlightAware, meaning my data is being used to fill in up-to-date flight data for thousands of users who use flight tracking apps worldwide. So, if you're ever tracking a flight over Northeast Ohio, it might be my system that is collecting information from that plane! 

If you're interested in reading more, check out my March 2024 article, "RTL-SDR: Home-Made Air Traffic Control" about my early ADS-B systems, and how I set them up. Additionally, check out The Cubical Ruins' new-and-improved "What's Up There?" flight tracking widget on the right. This will give you a live feed of the airplanes my system tracks daily. Just click any plane for it's callsign, avionics and flight data.   

Tuesday, July 11, 2023

The Joys of Music Continued: One of the Orginal Coding Systems

As I continue to write and practice on my trumpet, I wanted to provide yet another "random thought." I had learned to read music as a teen in the wonderful Theodore Roosevelt marching band and symphony, but I didn't think about it much -I simply learned and played... and then all the band members got to hang-out and have a fun time together. 

Image of New York sheet music makers. 

But, as an adult, I now realize that music is a bit like computer code! And it was invented and produced centuries ago. Have you heard of Bach, Mozart?... Those guys put their music on paper, so we, in the Twenty-First century could still hear it, and it could still be played by expert musicians. 

As I wrote in a previous post, I recently went to a workshop at Google Cloud to play around with their codes and programing. Also, I took a linguistics course in grad school at DePaul. And, now, I'm re-learning to read sheet music. All of these forms of communication are meant to assist us humans in making something happen: maybe it's playing a fun song on your instrument, perhaps it's speaking to a lovely Italian woman you just met, maybe it's something as simple as programing your software system to know there is going be an outage today at 5 PM sharp, and you better log-out and save your work before then!

Glen Miller's, "In the Mood".

But, either way, music is like code. It's a language we read and understand to make cool, and fun, music! In fact, before most people even knew what a computer was, there was a big "coding" industry in New York City, and likely other cities across the United States. The most famous sellers of sheet music were in Manhattan, in a neighborhood called "Tin-Pan Alley." People waited in lines to get sheet music. With the middle-class growing, and the ability for normal (non-millionaires) to buy instruments, such as violins, trumpets, pianos, etc... Everyone needed sheet music to play from. Everyone wanted fun music!

This is something fun, and helpful, that all Americans took part in. Whites, Blacks, Native Americans, and everyone else took part in making the US a very musical place! And, they basically memorized code, because sheet music is basically code for a song. And other countries, outside of the US, were making music themselves! 

I'll end by saying on quick anecdote... I signed-up a talented young woman for medical school at the Pritzker School of Medicine at the University of Chicago. This is one of the best-of-the-best institutions in the world for science and medicine. Her undergraduate degree was in music... and, I know she went on to the best doctor and scientist! And knowing music helped ;)   

Saturday, May 27, 2023

Hobbies: Coding with Arduino IDE

So, I graduated with a humanities degree. But I suppose it wasn't a total loss, because shortly after my short-lived teaching career, I was hired by a big-boy tech company to do support for their SAAS products. I didn't need to know code, I didn't need an engineering degree, and I didn't need to know (exactly) how our computers worked. But the job introduced me to XML and SLQ language. And I started, emphasis on started, to learn a bit how those languages worked. Now, this wasn't me being cool, and hacking behind a dark-screened computer like I was in some Jerry Bruckheimer & Don Simpson movie. It was more like copying and pasting strips of code into my browser -super boring stuff, actually. 

An LED system with a photoresistor sensor. 

Since then, I've been obsessed by computers, and how they work. I really want to get into the "guts" of those things and figure out how they actually work. So, in a way, I was an Arduino natural before I even knew it!  I stepped into the void and purchased the "30 Days Lost in Space" (3) electronics set with a "Hero" board, technical equipment and 30 lessons accessible via a website. This is something a middle school child could do. The lessons are meant for learners, and start at the very basic level. But, importantly, the Hero board uses Arduino IDE as it's language.  

In addition to the programming language, I've also got to order and work with the hardware; resistors, pin-headers, LCD screens, engines, fans, motors etc. Arduino programming really closes the gap between software and hardware, between the coding and the fantastic machines. And, you'd sh*t yourself when you see just how inexpensive this stuff is. The Arduino board retails for about 30 to 40 bucks (USD) (4), and other similar boards are even less expensive! This is stuff that would have been restricted to a lab or a company office only 20 to 30 years ago. Now it's available to all of us!

A rudimentary range-finder.
Arduino IDE introduced me to coding again, like a novice. In short, I was a kid. What do I need to type to make that red light turn blue?, can I make a stop watch?, etc. Not only that, but Arduino has its own board that you can make just about anything with. Need a robot friend? Wanna Spy on your Neighbors? Send a Satellite into space? The Arduino can do it all. It's the brain that makes your hardware wake up. Then, It's ALIVE!

Right now, I'm just working on simple projects more-or-less to learn. Nothing too exciting, but I can't help but think how great the Arduino board and Arduino IDE would be for children. It's an exceptional educational technology that is perfect for training our youth for the 21st century future. It integrates the machines, we all take for granted, with the programming that makes those machines think.

Popular Items