-
Notifications
You must be signed in to change notification settings - Fork 137
Installation
RTLSDR-Airband can be built locally or run from a pre-built Docker container
The following third-party software is required to compile RTLSDR-Airband, regardless of used hardware platform:
- C++11-capable compiler (GCC, clang, AppleClang...)
- CMake
- GNU make
- pkg-config
- LAME MP3 encoding library
- libshout library
- libconfig library
- One of:
- Broadcom VideoCore GPU development headers
- FFTW library
To install these dependencies on an apt
-based Linux distribution (Debian,
Raspbian, Ubuntu, etc), execute the following (NOTE: single quotes around libconfig++-dev so it isn't treated as a regular expression):
sudo apt-get install build-essential cmake pkg-config libmp3lame-dev libshout3-dev 'libconfig++-dev'
When compiling support for the Broadcom VideoCore GPU the following development headers and libraries:
sudo apt-get install libraspberrypi-dev
Otherwise the FFTW library is required:
sudo apt-get install libfftw3-dev
To install these dependencies on a Mac running homebrew, execute:
brew install pkg-config lame libshout libconfig fftw
You don't need all of these. Install only what's needed for the hardware you have and features you want to use.
NOTE: If you are using the "RTL-SDR Blog V4" dongle you may need a custom version of librtlsdr, for more information see the user guide
These are handled by rtl-sdr library, which is packaged in most Linux distributions. On a Raspbian/Debian/Ubuntu install it with:
apt-get install librtlsdr-dev
or on a Mac running homebrew:
brew install librtlsdr
These are handled by libmirisdr-4. If you have this type of hardware, you need to build it from source, as follows:
cd
git clone https://github.com/f4exb/libmirisdr-4
cd libmirisdr-4
mkdir build
cd build
sudo make install
sudo ldconfig
You need SoapySDR and a Soapy plugin (driver) for your SDR. To install these, follow the instructions in SoapySDR wiki.
You need PulseAudio (of course):
sudo apt-get install libpulse-dev
or
brew install pulseaudio
The recommendation is to checkout the latest version of source on the main
branch.
git clone https://github.com/szpajder/RTLSDR-Airband.git
cd RTLSDR-Airband
git checkout main && git pull
A release artifact is created for each major or minor (not patch) version. These artifacts
will not be as up to date as main
but and can be found here https://github.com/szpajder/RTLSDR-Airband/releases
First create the build directory and configure the build with CMake. The basic command sequence is:
mkdir build
cd build
cmake ../
CMake attempts to find all required libraries and SDR drivers. If a mandatory dependency is not installed, it will throw out an error. Missing optional dependencies cause relevant features to be disabled. At the end of the process CMake displays a short configuration summary, like this:
-- RTLSDR-Airband configuration summary:
-- - Version string: 5.0.6
-- - Build type: Release
-- - Operating system: Linux
-- - SDR drivers:
-- - librtlsdr: requested: ON, enabled: TRUE
-- - mirisdr: requested: ON, enabled: FALSE
-- - soapysdr: requested: ON, enabled: TRUE
-- - Other options:
-- - Platform: native
-- - Build Unit Tests: FALSE
-- - Broadcom VideoCore GPU: FALSE
-- - NFM support: OFF
-- - PulseAudio: requested: ON, enabled: TRUE
-- - Profiling: requested: OFF, enabled: FALSE
-- - Icecast TLS support: TRUE
-- Configuring done
-- Generating done
Here you can verify whether all the optional components that you need were properly detected and enabled. Then compile and install the program:
make
sudo make install
This will install the compiled binary named rtl_airband
to the default binary
directory (on Linux this is usually /usr/local/bin
).
Build options can be given to CMake with -D
command line switch. The most
important option is PLATFORM
:
cmake -DPLATFORM=<platform_name>
This option is used to optimize the program for the given hardware platform.
<platform_name>
might be one of:
-
native
(default) - causes the compiler to figure out the CPU type automatically and pick the most appropriate set of optimizations for it. This will NOT autodetect the presence of VideoCode GPU! -
rpiv2
- Raspberry Pi version 2 or 3 (ARMv7 CPU, Broadcom VideoCore IV GPU) -
generic
- generic build with no platform-specific optimizations. Use this in case when you want a portable binary or if your compiler does not support-march=native
option.
Other build options can be used to enable or disable optional features, for example:
cmake -DRTLSDR=OFF ../
causes RTLSDR dongle support in the program to be disabled. It will not be compiled in, even if librtlsdr library is installed.
Here is a full list of options:
-
-DNFM=ON
- enables narrow FM demodulation support (default: off). -
-DPLATFORM=generic
- compiler optimization (default: native). -
-DRTLSDR=OFF -DMIRISDR=OFF -DSOAPYSDR=OFF
- disable respective SDR driver. They are all on by default and will be built if necessary dependencies are detected (default: on). -
-DPULSEAUDIO=OFF
- disables PulseAudio support (default: on) -
-DPROFILING=ON
- enable profiling support with Google Perftools (default: off) -
-DBUILD_UNITTESTS
- build unit tests -
-DDEBUG_SQUELCH
- generate output files with squelch debugging info
Setting build type:
-
-DCMAKE_BUILD_TYPE=Debug
- builds the program without optimizations and adds--debug
command line option for enabling debug messages (useful for troubleshooting, not recommended for general use) -
-DCMAKE_BUILD_TYPE=Release
- debugging output disabled (the default)
Example:
cmake -DPLATFORM=rpiv2 -DSOAPYSDR=OFF -DNFM=ON ../
Note: Always recompile the program with make
command after changing CMake
build options.
Note: CMake stores build option values in its cache. Subsequent runs of
CMake will cause values set during previous runs to be preserved, unless they
are explicitly overriden with -D
option. So if you disable a feature with,
eg. -DRTLSDR=OFF
and you want to re-enable it later, you have to explicitly
use -DRTLSDR=ON
option. Just omitting -DRTLSDR=OFF
will not revert the
option value to the default.
The binary will be installed to /usr/local/bin/rtl_airband
. To get the
program running you now need to prepare a configuration file. As there is no
default configuration which works for everyone, you have to customize it first,
so head on to Configuration essentials.
As of v5.0.x docker containers are built for every Pull Request and merge to main
. Pre-built
containers are published to GitHub Packages here and are available for the following architectures:
- linux/386
- linux/amd64
- linux/arm/v6
- linux/arm/v7
- linux/arm64
NOTE: Container builds use the generic
build platform to avoid hardware-specific optimizations,
meaning they should be compatible with any host with the corresponding architecture, but may
not be as performant as a native
build.
To pull the latest docker container run:
docker pull ghcr.io/charlie-foxtrot/rtlsdr-airband:latest
- Overview
- Installation
-
Configuration essentials
- Grammar basics
- General configuration file structure
- Configuring devices
- Configuring channels
- Configuring outputs
-
Configuring optional features
- Disabling configuration sections
- Changing PID file location
- Manual squelch setting
- CTCSS
- NFM deemphasis
- Audio filters in MP3 outputs
- Notch filter
- Limiting channel bandwidth
- Icecast metadata updates in scan mode
- Logging activity of scanned frequencies
- Channel usage statistics
- Tweaking sampling rate and FFT size
- Mixers
- Multithreaded operation
- Running
- Troubleshooting
- Configuring auxiliary software to work with RTLSDR-Airband