Installing RTL SDR Software
NB: I’ve just updated these instructions to work with the new Raspbian Jessie release.
The instructions listed below show you how to set up a Raspberry Pi for use as an RTL-SDR dongle server. If you would like a ready made solution, I have pre-configured and tested SD cards complete with printed instructions available via my Web Shop here.
The first step is to install a few packages that are required by the dongle 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 cmake pkg-config libusb-1.0
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 ldconfig
Blacklist the RTL Drivers
The later versions of Raspbian include drivers for using the RTL dongles in their original role as a USB TV device. This causes the operating system to automatically load drivers when the dongle is plugged in. These drivers prevent use of the dongle as an SDR receiver so need to be blacklisted. Here’s the process:
From the command line enter the following:
sudo nano /etc/modprobe.d/raspi-blacklist.conf
NB: In the latest Raspbian and kernel update this file has changed name to fbdev-blacklist.conf so the above line changes to:
sudo nano /etc/modprobe.d/fbdev-blacklist.conf
Don’t be alarmed if the file is empty, just go ahead and add the following lines to this file:
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