Build a Aircraft scanner from a Pi 3 and an RTL-SDR radio dongle and external audio PC speaker.
Full details are available at https://github.com/szpajder/RTLSDR-Airband/wiki
- Raspberry Pi 3 with at least 2 USB slots
- RTL-SDR Dongle V3 (typical one, not ADS-B!)
- USB powered speaker with stereo audio plug
- Antenna with connecting cable for RTL-SDR dongle
Plug the RTLSDR dongle into one of the USB ports and the USB powered speaker into another. Plug the audio plug into the audio mini jack on the Pi. Then connect the antenna to the dongle. That's it for hardware.
If you use TWO RTL-SDR dongles, such as the NooElec NESDR then you can run FlightAware AND Airband Scanner on one Pi. NOTE: This does block the other two USB ports! So you have to plug the USB audio power somewhere else.
To change FlightAware to use the second RTLSDR dongle, you need to edit:
sudo nano /etc/default/dump1090-fa
# Change the device-index from 0 to 1
RECEIVER_OPTIONS="--device-index 1 --gain -10 --ppm 0 --net-bo-port 30005"
sudo systemctl restart piaware
You could alternately edit /usr/local/etc/rtl_airband.conf (below) and change it's index to 1 for the second dongle.
# Install Raspbian Stretch Lite (no GUI)
# Access via SSH
sudo apt update
sudo apt upgrade
sudo raspi-config
Change password
Change Network>hostname
Change Localization>Timezone
Change Advanced>Audio to jack
sudo apt-get install build-essential libmp3lame-dev libshout3-dev libconfig++-dev libraspberrypi-dev
sudo apt-get install librtlsdr-dev
sudo apt-get install libpulse-dev
Reboot
cd
wget -O RTLSDR-Airband.tar.gz https://github.com/szpajder/RTLSDR-Airband/archive/v3.0.1.tar.gz
tar xvfz RTLSDR-Airband.tar.gz
cd RTLSDR-Airband
make PLATFORM=rpiv2 PULSE=1
sudo make install
sudo nano /usr/local/etc/rtl_airband.conf
devices:
({
type = "rtlsdr";
index = 0;
gain = 25;
centerfreq = 127.0;
correction = 0;
channels:
(
{
freq = 126.125;
outputs: (
{
type = "pulse";
}
);
},
{
freq = 127.475;
outputs: (
{
type = "pulse";
}
);
},
{
freq = 126.350;
outputs: (
{
type = "pulse";
}
);
},
{
freq = 127.000;
outputs: (
{
type = "pulse";
}
);
},
{
freq = 132.825;
outputs: (
{
type = "pulse";
}
);
},
{
freq = 133.700;
outputs: (
{
type = "pulse";
}
);
},
{
freq = 130.975;
outputs: (
{
type = "pulse";
}
);
},
{
freq = 133.875;
outputs: (
{
type = "pulse";
}
);
},
{
freq = 134.975;
outputs: (
{
type = "pulse";
}
);
},
{
freq = 133.325;
outputs: (
{
type = "pulse";
}
);
},
{
freq = 127.775;
outputs: (
{
type = "pulse";
}
);
}
);
}
);
sudo apt install pulseaudio pulseaudio-module-zeroconf avahi-daemon
sudo vi /etc/pulse/system.conf
# Find and edit this line:
# ORIG
#load-module module-native-protocol-unix
# NEW
load-module module-native-protocol-unix auth-anonymous=1
# Set Volume Use arrow keys and ESC to exit
alsamixer
# Test Volume
aplay /usr/share/sounds/alsa/Front_Right.wav
# Manually run Pulse Audio server using:
sudo /usr/bin/pulseaudio --system --realtime
sudo /usr/local/bin/rtl_airband -f
You should now start hearing radio calls from nearby aircraft! If not, google the error message(s) and/or look at the full details at the GitHub wiki, above.
sudo nano /etc/systemd/system/pulseaudio.service
[Unit]
Description=PulseAudio system-wide server
[Service]
Type=forking
PIDFile=/var/run/pulse/pid
ExecStart=/usr/bin/pulseaudio --daemonize --system --realtime --log-target=journal
ExecStop=/usr/bin/pulseaudio -k
Restart=on-failure
LimitRTPRIO=1000
LimitNICE=-20
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable pulseaudio.service
sudo systemctl start pulseaudio.service
sudo systemctl status pulseaudio.service
You should see the pulseaudio service running in the background now. You can check the status by either of the following:
pacmd list-sinks
tail -f /var/log/daemon.log
crontab -e
# Add the following to the end of the file
@reboot sudo /usr/local/bin/rtl_airband
Reboot your Pi and after a few minutes, you should start hearing aircraft voice audio.
Add this to an aircraft tracker like FlightAware
https://flightaware.com/adsb/piaware/build
And you have a complete Air Traffic system!