Building an RTL SDR Linux Box
Introduction
Here are the instructions on installing RTL-SDR on a Linux Box
Assumption
I am going to assume that you know a bit about Linux like building a CentOS box, adding accounts, and setting IP addresses. These tasks are out of scope for this document.
Build the CentOS box
We need to start somewhere, so we will start with a CentOS 7.6.1810 Linux box with at least 4GB of RAM with a GNOME desktop and Development tools.
More packages will be added later
Set preferences
After you build your box configure it as needed per your personal preferences and procedures. Couple things you should do though
- User accounts – make sure to add the users who will access the RTL-SDR device to the dialout group
sudo usermod -G wheel,dialout larry
- You should not have to disable the firewall or SELinux to go through these procedures
- Patch your system
sudo yum -y update
- Make sure your system has the proper drivers and has Internet access.
At this point you have CentOS 7 basic GUI/dev install with update to date patches
After a reboot your system , we will begin the actual install.
Install Additional CentOS packages
Install these additional packages from the base centos repository
sudo yum install libusb-devel git automake pulseaudio-libs-devel gtk3 gtk3-devel freeglut freeglut-devel gcc-c++ \
gcc kernel-devel qt5-qtsvg fftw libstdc++ systemd-devel libusb1-devel
Install Packages from EPEL
The of the rtl software come from epel repository, although audicity is not required, it does help when analyzing some recorded files, cmake3 and the rtl-sdr dev files are need to compile some of the code we use.
sudo yum install epel-release
sudo yum install rtl-sdr.x86_64 rtl-sdr-devel audacity cmake3
Configure Drivers/Modules for RTL
File tweaks load and give proper permissions for the RTL device and prevent the wrong module from installing
After installing rtl-sdr copy the rtl-sdr rules to the udev folder
sudo cp /usr/lib/udev/rules.d/10-rtl-sdr.rules /etc/udev/rules.d/
Edit the file using sudo
sudo vi /etc/udev/rules.d/10-rtl-sdr.rules
Use the following command in vi to add the dialout group before the ENV section on the file
:%s/, ENV/, GROUP="dialout", ENV/g
Now you have to make sure the dvb driver does not load, failure to do this will cause your system to reboot when accessing the RTL device
Create a blacklist file in modprobe.d
sudo vi /etc/modprobe.d/blacklist-rtl.conf
The only thing needed in that file is the following single line
blacklist dvb_usb_rtl28xxu
Shared Library Locations
As we add these software packages, the will write libraries to a pair of directories. You will need to specify where libraries are, you can do that now so you won’t have to do it later.
Create a local.conf file
sudo vi /etc/ld.so.conf.d/local.conf
And add these two simple lines to it
/usr/local/lib64
/usr/local/lib
Reboot and Validate
Reboot to enable the rtl drives and permissions
At this point, the rtl-sdr should be working via command line. Test it by using the following command
rtl_test -t
If your system reboots inadvertently, check “Configure Drivers/Modules for RTL” section in this document
Also make sure the account you are using is in the dialout group and the rtl-sdr.rules file has the ialout group in it.
If the test passes, at this point you can do command line rtl_sdr stuff lice recording FM stations
Download the sources
Now we can use wget and git to download the source code we need
Go to your home directory and create a folder called src, we are going to use this folder to do all are work. Then download all of the files and source code
cd
mkdir src
cd src
git clone https://github.com/pothosware/SoapySDR.git
git clone https://github.com/jgaeddert/liquid-dsp
wget https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.2/wxWidgets-3.1.2.tar.bz2
git clone https://github.com/cjcliffe/CubicSDR.git
git clone https://github.com/pothosware/SoapyRTLSDR.git
git clone https://github.com/pothosware/SoapySDRPlay.git
git clone https://github.com/myriadrf/LimeSuite.git
Install CubicSDR
This section is pretty long, but this is the meat of the install. But most of these have a similar install process, you should be able to copy and paste each section
Install SoapySDR
Here are the steps
cd ~/src/SoapySDR
mkdir build
cd build
cmake3 ../ -DCMAKE_BUILD_TYPE=Release
make -j4
sudo make install
sudo ldconfig
The following command tests it
SoapySDRUtil --info
Install liquid-dsp
Here are the steps
cd ~/src/liquid-dsp
./bootstrap.sh
CFLAGS="-march=native -O3" ./configure --enable-fftoverride
make -j4
sudo make install
sudo ldconfig
Install wxWidgets
This is probably the one component that takes the longest to compile
cd ~/src
tar -xvjf wxWidgets-3.1.2.tar.bz2
cd wxWidgets-3.1.2/
mkdir -p ~/Develop/wxWidgets-staticlib
./autogen.sh
./configure --with-opengl --disable-shared --enable-monolithic --with-libjpeg --with-libtiff --with-libpng \
--with-zlib --disable-sdltest --enable-unicode --enable-display --enable-propgrid --disable-webkit --disable-webview \
--disable-webviewwebkit --prefix=/home/user/Develop/wxWidgets-staticlib
CXXFLAGS="-std=c++0x"
make -j4
sudo make install
Install the SDRplay API
Using a browser, download the following and install
http://www.sdrplay.com/linuxdl.php
Assuming you downloaded it into the src directory change perms and run
cd ~/src
chmod +x SDRplay_RSP_API-Linux-2.13.1.run
sudo ./SDRplay_RSP_API-Linux-2.13.1.run
Unfortunately you have to reinstall SoapySDR because some files were overwritten when installing the SDRplay API
cd ~/src/SoapySDR/build
sudo make install
Test Again
SoapySDRUtil --info
Here are some support modules for the SoapSDR. Test each module after install to validate your are on the right track
Install the SoapyRTLSDR module
Here are the steps
cd ~/src/SoapyRTLSDR
mkdir build
cd build
cmake3 .. -DCMAKE_BUILD_TYPE=Release
make
sudo make install
sudo ldconfig
Test
SoapySDRUtil --info
Install the SoapySDRPlay module
Here are the steps
cd ~/src/SoapySDRPlay
mkdir build
cd build
cmake3 .. -DCMAKE_BUILD_TYPE=Release
make
sudo make install
sudo ldconfig
Test
SoapySDRUtil --info
Install the Limesuite Module
Here are the Steps
cd ~/src/LimeSuite
mkdir builddir
cd builddir
cmake3 .. -DENABLE_EXAMPLES=off -DENABLE_GUI=off -DCMAKE_BUILD_TYPE=Release
make
RESULT=SoapySDRUtil --sparse --info | grep "Search path:"
; MODULEPATH=${RESULT:12}; sudo cp SoapyLMS7/libLMS7Support.so $MODULEPATH
sudo ldconfig
Test
SoapySDRUtil --info
Finally install CubeSDR
This is the actual software package itself
cd ~/src/CubicSDR
mkdir build
cd build
cmake3 ../ -DCMAKE_BUILD_TYPE=Release -DwxWidgets_CONFIG_EXECUTABLE=~/Develop/wxWidgets-staticlib/bin/wx-config
make
sudo make instal
At this point you can run CubeSDR to view radio waves
Other Packages
Here are some reliatively easy to install packages
Download
cd src
git clone https://github.com/merbanan/rtl_433.git
git clone git://github.com/tedsluis/dump1090.git
git clone https://github.com/gat3way/rtl_acars_ng.git
Install
Install the rtl_433 package to view transmissions from 433Mhz devices around you
cd ~/src/rtl_433
mkdir build
cd build
cmake3 .. -DCMAKE_BUILD_TYPE=Release
make
sudo make install
sudo ldconfig
Install dump1090 to view airplanes around you
cd ~/src/dump1090/
make
sudo cp dump1090 /usr/local/bin/
More information planes transmit
cd ~/src/rtl_acars_ng
make
sudo cp rtl_acars_ng /usr/local/bin/
Sample run
rtl_acars_ng -f 131550000
Thank you for your talk at LinuxFest today! This is a great resource.
Hi,
I receive “No supported devices found.” if I run rtl_test command.
The lsusb command output:
Bus 002 Device 002: ID 8087:8000 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8008 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 003: ID 17ef:608d Lenovo Optical Mouse
Bus 003 Device 002: ID 0403:6001 Future Technology Devices International, Ltd FT232 Serial (UART) IC
Bus 003 Device 004: ID 04b3:3025 IBM Corp. NetVista Full Width Keyboard
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Thank you.
Mal
I see a UART what device do you have can you post a link to what it looks like?
BEAST Mode-S receiver
https://emaddc.com/participate/data+suppliers/data+through+local+receivers/default.aspx
Link to the product:
https://webshop.jetvision.de/en/mode-s-beast/