Monitoring Multiple AM channels with RTL-SDR Airband

A new command line program for the RTL-SDR called RTL-SDR Airband has recently been released. The program can be used to simultaneously monitor multiple AM channels per dongle. It is intended to be used with online streaming services like liveatc.net which provide live audio streams of air traffic control communications around the world.

Its features include

  • Decode multiple AM channels per dongle (within bandwidth frequency range)
  • Auto squelch and Automatic Gain Control
  • MP3 encoding
  • Stream to Icecast or SHOUTcast server
  • Low CPU usage on Windows (<4% on i5-2430m) thanks to SSE and AVX instructions
  • FFT using GPU on Raspberry Pi (50-55% CPU with default clock)
Monitoring Multiple AM Channels with RTL-SDR Airband.
Monitoring Multiple AM Channels with RTL-SDR Airband.
Subscribe
Notify of
guest

31 Comments
Inline Feedbacks
View all comments
TA2OM

And if I want it use locally on my PC?

Rodney Yeo

# — Compile RTL-Airband for V3D GPU mode —
#!/bin/bash
clear
cd ~
apt-get install build-essential libmp3lame-dev libshout3-dev libconfig++-dev libraspberrypi-dev librtlsdr-dev git cmake libfftw3-dev -y
cd RTLSDR-Airband-3.1.0
make help
sleep 10
rm /usr/local/etc/rtl_airband.conf -R -f
make clean
make PLATFORM=rpiv2
make install

Rodney Yeo

# — Compile RTL-Aorband for non V3D GPU mode —
#!/bin/bash
clear
cd ~
apt-get install build-essential libmp3lame-dev libshout3-dev libconfig++-dev libraspberrypi-dev librtlsdr-dev git cmake libfftw3-dev -y
cd RTLSDR-Airband-3.1.0
make help
sleep 10
rm /usr/local/etc/rtl_airband.conf -R -f
make clean
make PLATFORM=armv7-generic
make install

FungSH

I wish there is a page that can guide newbie how to install the RTL-Airband to work on Any Pi (Raspberry Pi, Orange Pi, Nano Pi, Banana Pi etc) with step by step guide. How to configure the frequency with how many USB RTL Dongle to be used. I tried to install the RTL-SDR Airband and at last nothing success, always have error on this and that.
I really hope that author or the experts can write it down step by step for us to try on this.
Thank you & Regards.

yarmarmidale

I’m with you on that. Not everyone is a geek, some of us are actually people that have a keen interest, but struggle – why not just have a step-by-step explanation…..

SH Fung

Hi yarmarmidale,

Below are the steps to install in Raspberry Pi 3B/3B+. Hoping that you can get it work.

Step 1.
sudo apt-get install -y build-essential libmp3lame-dev libshout3-dev libconfig++-dev libfftw3-dev librtlsdr-dev

Step 2.
cd
wget -O RTLSDR-Airband-3.0.1.tar.gz https://github.com/szpajder/RTLSDR-Airband/archive/v3.0.1.tar.gz
tar xvfz RTLSDR-Airband-3.0.1.tar.gz
cd RTLSDR-Airband-3.0.1
make PLATFORM=rpiv2
make install

Step 3.
apt-get install icecast2 -y

Step 4.
sudo nano /usr/local/etc/rtl_airband.conf

devices = (
{
index = 0;
gain = 25.4;
mode = “scan”;
correction = 1;
channels = (
{
freqs = ( 118.3, 119.1, 121.6, 126.1, 128.3, 132.45 );
outputs = (
{
type = “icecast”;
server = “127.0.0.1”;
port = 8000;
mountpoint = “ATC.mp3”;
name = “ATC”;
genre = “ATC”;
username = “source”;
password = “your own password during icecast2 installation”;
description = “Your local Airport – LiveATC”;
}
);
}
);
}
);

Step 5.
systemctl restart icecast2

Step 6.
/usr/local/bin/rtl_airband -f

#**To test your scanned frequencies with waterfall look. If star is shown in front of the frequency means airband signal is received.

Step 7. ( To run auto after boot)

Starting RTLSDR-Airband on system boot
If you wish to start the program automatically at boot, you can use example startup scripts from init.d subdirectory in the source tree. These scripts assume default installation paths (ie. the program in /usr/local/bin/rtl_airband and the config in /usr/local/etc/rtl_airband.conf).

Debian / Raspbian Jessie or newer
(or any other distribution based on systemd):

sudo cp init.d/rtl_airband.service /etc/systemd/system
sudo chown root.root /etc/systemd/system/rtl_airband.service
sudo systemctl daemon-reload
sudo systemctl enable rtl_airband
You can then start, stop and restart RTLSDR-Airband manually, using systemctl commands:

sudo systemctl start rtl_airband
sudo systemctl stop rtl_airband
sudo systemctl restart rtl_airband

SH Fung

Sorry. Please ignore the step 1 above. The above step 1 is for other Single Board (Not Raspberry Pi).

Step 1.
sudo apt-get install -y build-essential libmp3lame-dev libshout3-dev libconfig++-dev libraspberrypi-dev librtlsdr-dev

Anonymous

librtlsdr-dev doesnt come up.

Anonymous

I did install rtl-sdr airband this morning and no problem at all on Raspbian Buster.

SH Fung

This is the result:-

pi@raspberrypi:~ $ sudo apt-get install build-essential libmp3lame-dev libshout3-dev libconfig++-dev libraspberrypi-dev librtlsdr-dev libpulse-dev -y
Reading package lists… Done
Building dependency tree
Reading state information… Done
build-essential is already the newest version (12.6).
libconfig++-dev is already the newest version (1.5-0.4).
libmp3lame-dev is already the newest version (3.100-2).
libpulse-dev is already the newest version (12.2-4).
libshout3-dev is already the newest version (2.4.1-2).
libraspberrypi-dev is already the newest version (1.20190709-1).
librtlsdr-dev is already the newest version (0.6-1+rpt1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
pi@raspberrypi:~ $

Jordan Peterson

I think part of the problem is that librtlsdr-dev doesn’t exist?? Today I made a fresh installation and configured the wifi etc so it is very basic. After spending some time reading through threads it appears that many people recommend starting out with a FRESH installation. It seems that if one balks an installation attempt of the SDR packages (rtl_airband or rtl_fm, etc.), it makes it very difficult to clean up the mess.
Here is what I get when trying to follow your July 19th comment: (note the bottom line)

sudo apt-get install build-essential libmp3lame-dev libshout3-dev libconfig++-dev libraspberrypi-dev librtlsdr-dev libpulse-dev -y

Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package librtlsdr-dev

SH Fung

Hi Jordan Peterson,

May I know which Single Board Computer you are using and also the OS version.

Regards.

Jordan Peterson

I’m using a Raspberry Pi 3, Model B. OS Debian version 7.8,
cat /proc/cpuinfo
processor : 0
model name : ARMv6-compatible processor rev 7 (v6l)
BogoMIPS : 697.95
Features : half thumb fastmult vfp edsp java tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xb76
CPU revision : 7
Hardware : BCM2835
Revision : 0010

SH Fung

Hello,

I understand you are using RPi 3B, and why you not using the Raspbian Stretch (9) or Raspbian Buster (10)? Still using the old version wheezy?

SH Fung

No librtlsdr-dev Raspbian Wheezy package available. · Issue #1 …
https://github.com/jprochazka/adsb-receiver/issues/1
Nov 3, 2015 – There is no librtlsdr-dev package available in the official Raspbian Wheezy package repositories … Done E: Unable to locate package rtl-sdr.

Jordan Peterson

SH Fung – Wow I didn’t realize how old Wheezy is! I am downloading Buster Lite right now.

Jordan Peterson

Okay I installed Buster. This is where I am at now, when I try Step 6 I get this:

/usr/local/bin/rtl_airband -f
Illegal instruction

I have sifted through the .conf and cannot see any problems:

# Scanning mode example
# Single dongle, three frequencies, output to Icecast server and to a file.
# Settings are described in reference.conf
# Refer to https://github.com/szpajder/RTLSDR-Airband/wiki
# for description of keywords and config syntax.

devices:
({
type = “rtlsdr”;
index = 0;
gain = 25;
correction = 1;
mode = “scan”;
channels:
(
{
freqs = ( 118.375, 119.975, 121.65 );
labels = ( “AWOS”, “Tower”, “Ground” );
outputs: (
{
type = “icecast”;
server = “audio9.broadcastify.com”;
port = 80;
mountpoint = “/XXXXXXXXX”;
name = “Tower + Ground + Approach”;
genre = “ATC”;
description = “Saywer International Airport”;
username = “source”;
password = “XXXXXXXX”;
send_scan_freq_tags = false;
},
{
type = “file”;
directory = “/home/pi/recordings”;
filename_template = “TWR+GND+APP”;
}
);
}
);
}
);

Jordan Peterson

I get this for Step 2:
g++ -O3 -g -Wall -DSYSCONFDIR=\”/usr/local/etc\” -DDEBUG=0 -DUSE_BCM_VC -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard -ffast-math -DWITH_RTLSDR -c -o rtl_airband.o rtl_airband.cpp
rtl_airband.cpp:61:25: fatal error: libconfig.h++: No such file or directory
compilation terminated.
: recipe for target ‘rtl_airband.o’ failed
make: *** [rtl_airband.o] Error 1

SH Fung

Hi Jordan Peterson,

I assumed you install rtlsdr-airband on Raspberry Pi.

Step 2.
cd
wget -O RTLSDR-Airband-3.0.1.tar.gz https://github.com/szpajder/RTLSDR-Airband/archive/v3.0.1.tar.gz
tar xvfz RTLSDR-Airband-3.0.1.tar.gz
cd RTLSDR-Airband-3.0.1
make PLATFORM=rpiv2
sudo make install (sudo missing in the previous reply). Try this and see can it be fixed?

Jordan Peterson

SH Fung, thank you for the prompt reply! I am having so much trouble. Here is what I just tried:
###Step 1:

pi@bcfypi1 ~ $ sudo apt-get install -y build-essential libmp3lame-dev libshout3-dev libconfig++-dev libraspberrypi-dev librtlsdr-dev
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package librtlsdr-dev

###If I run that without “librtlsdr-dev” I get this:

pi@bcfypi1 ~ $ sudo apt-get install -y build-essential libmp3lame-dev libshout3-dev libconfig++-dev libraspberrypi-dev
Reading package lists… Done
Building dependency tree
Reading state information… Done
build-essential is already the newest version.
libmp3lame-dev is already the newest version.
libshout3-dev is already the newest version.
libraspberrypi-dev is already the newest version.
The following NEW packages will be installed:
libconfig++-dev libconfig++9 libconfig-dev libconfig-doc libconfig9
0 upgraded, 5 newly installed, 0 to remove and 1 not upgraded.
Need to get 602 kB of archives.
After this operation, 1,176 kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
libconfig++9 libconfig9 libconfig-dev libconfig++-dev libconfig-doc
E: There are problems and -y was used without –force-yes

###Step 2: (after download the tar.gz and running the tar xvfz…)

pi@bcfypi1 ~/RTLSDR-Airband-3.0.1 $ sudo make PLATFORM=rpiv2
g++ -O3 -g -Wall -DSYSCONFDIR=\”/usr/local/etc\” -DDEBUG=0 -DUSE_BCM_VC -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux -march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard -ffast-math -DWITH_RTLSDR -c -o rtl_airband.o rtl_airband.cpp
rtl_airband.cpp:61:25: fatal error: libconfig.h++: No such file or directory
compilation terminated.
: recipe for target ‘rtl_airband.o’ failed
make: *** [rtl_airband.o] Error 1

Eder

There’s a fork that works: https://github.com/szpajder/RTLSDR-Airband

Pete

Does the Icecast support include ID3 tags/metadata, so that when you’re listening to a stream, you’re aware of what frequency the RTL-USB is tuned too?

szpajder

Yes, this is supported from version 2.2.0 onwards. When enabled, it outputs numeric frequency in MHz as a song title. Alternatively, you may define textual label for each frequency.

Shockwave

Update, I have it working. When I went to set the center frequency towards something closer to the average of my selected frequencies it’d bomb out. I’m at 2 currently and working my way back up. I don’t know if the Pi can’t actually handle 8 frequencies, or if my range of frequencies was too great. I’ll keep experimenting with this.

The major downside for me is each channel has to be it’s own stream, which makes it a bit useless as a scanner. There might be a way to do this server side, but there doesn’t look to be anything built in by default other than a failover option.

Shockwave

I’m getting very close to getting this working (I think) so I’ll share what I’ve done.

First, I have the dongle running on a raspberry pi. The instructions given for that were fine. You will need to edit config.txt in /home/pi/RTLSDR-Airband-master as follows.
Line 1 lists the number of dongles you’re using. (probably 1)
Line 2, first number is the dongle number, starting from 0. The second number is the number of channels defined to scan, up to 8. The third number is the bitrate I think. Fourth number is the center frequency or something to that effect. I’m not sure what it does. Fifth number I really don’t remember, I just left it default for now.
Line 3 begins your streams. If you are running an icecast2 server on linux.. (maybe others but this what worked for me) First is your destination icecast server. I put my test server’s name in (it’s already in /etc/hosts).

After the server name is the port. Default is 8000. Next is the stream name. It doesn’t crash if you put the same name for each stream which is what I’d think you’d do to listen to them all at once. After that is the frequency you want to listen to. Next is the username and password for your server’s SOURCE connections. Default I think is source and password.
With that saved, start up rtl_airband. You should get a console screen of numbers.
Now it’s time to get your icecast2 server configured..
I found my icecast.xml in /etc/icecast2.
You can also bring up the admin console with http://:8000/admin/stats.xsl
If your icecast and raspberry pi config’s match, you should see 1 source, and a mount point. At this point, you should be able to bring up a webpage to http://:8000/ (or whatever you named your stream in your config.txt)

And that’s where I’m at. I don’t have any sound yet and I haven’t seen any astericks in the rtl_sdr window which I’m guessing is a lock or receive flag.

lumpur atc

succesfully installed on windw. also able to mount/connect to icecast.but output only a quiet..

Jaime

Good evening , I can not install on windows , you could help me.
Thank you

amane

Can you please guide me how you installed it on windows?

Mac

I managed to build this on RasPi, but nothing seems to work. I’ve tried several different servers (icecast/2, Shoutcast, windows and linux) but was not able to connect even all the config files seems to be OK and other streamers connect without any problems.

All I get when starting rtl_airband is:

Cannot connect -4Cannot connect -4Cannot connect -4Cannot connect -4Cannot connect -4Cannot connect -4Starting RTLSDR…
Found 7 device(s).
Segmentation fault

Ashok

Several files are missing from GIT I guess.
Can any body help?

peter

I wish these excellent dudes would write install instructions for the layman more often on things like this.