Installing RTL SDR Software
NB: UPDATED 20 July 2018
- Added copy command for udev rules
- Amended required packages to include git and libusb-1.0.0-dev
The first step is to install a few packages that are required by the RTL-SDR server. You may already have some of these so don’t worry if you see a message that you already have the latest version.
To install these packages, type the following at the LXTerminal command line.
sudo apt-get install -y git cmake pkg-config libusb-1.0-0-dev
Now you can download the RTL-SDR code from osmocom by typing the following at the command line:
git clone git://git.osmocom.org/rtl-sdr.git
The next step is to build RTL-SDR using the following commands. NB: Some of these may take a while so it’s probably time for a beer!
- cd rtl-sdr
- mkdir build
- cd build
- cmake ../ -DINSTALL_UDEV_RULES=ON
- sudo make install
- sudo cp ../rtl-sdr.rules /etc/udev/rules.d/
- sudo ldconfig
Blacklist the DVB-T Drivers
The later versions of Raspbian include standard drivers so that the Dongles can operate in their original role as a USB Radio/TV device. Unfortunately, these drivers prevent access to the dongle by the rtl-sdr software. The solution is to create a dedicated blacklist file to prevent the unwanted drivers from loading. Here’s the process:
From the command line enter the following:
sudo nano /etc/modprobe.d/blacklist-rtl.conf
This creates a new file so enter the following lines:
Press control-X followed by Y to exit and save the modified file.
Now reboot the Pi: sudo reboot
That completes the build and you can run a quick test by making sure your dongle is connected and typing: rtl_test -t
To start the server you need to access the Pi command line and type: rtl_tcp -a ‘your Pi’s IP address’. As a practical example, the start command for my setup is:
rtl_tcp -a 192.168.1.100
It is very easy to configure the Pi to automatically run the SDR server when it powers-up. This is done by modifying the rc.local file that automatically runs on boot. We need to include two new lines in the file. The first delays execution for 10 seconds whilst the network starts and the second runs the command to start the server. The delay is necessary because the new Jessie release runs rc.local before the network is up so we won’t have the vital IP address. Here’s the updated rc.local file with the additions in red:
_IP=$(hostname -I) || true
if [“$_IP”]; then
printf”My IP address is %s\n” “$_IP”
/usr/local/bin/rtl_tcp -a $_IP &
To open the rc.local file for editing type:
sudo nano /etc/rc.local
Now update the content as shown above.
Type control X followed by Y and Enter to save the changes.
That’s it – you should have an RTL-Server that auto-boots. I don’t recommend using a Wi-Fi dongle but if you do you will need to increase the sleep time as the network setup will take longer.
Mike – G4WNC