# What is a Software Defined Radio (SDR)

I recently got my hands on a RTL-SDR which is a software defined radio (SDR). A software-defined radio (SDR) is a radio communication system where components that have been traditionally implemented in hardware (e.g. mixers, filters, amplifiers, modulators/demodulators, detectors, etc.) are instead implemented by a means of software on a personal computer or embedded system.

In recent years SDRs have become very affordable using commedy hardware. SDRs used to only be available to academics and industrial applications in the past. I have chosen the RTL-SDR which is a very modest $20 dollars for just the SDR and$30 including extension cables and multiple different antennas.

SDRs can be used to decode a miriad of protocols. Here’s a short list of the possibilities.

• Iridium satallite tracking
• Aircraft tracking beacons
• lighting detection

# Driver Setup

In order to use the RTL-SDR on your system the drivers must be installed. These instructions assume the suer is running a flavor of Linux. Make sure the following applications are installed.

git, cmake, build-essential, and libusb-1-0-0-dev

# Clone SDR-RTL linux drivers.
git clone git://git.osmocom.org/rtl-sdr.git
cd rtl-sdr/
mkdir build
cd build
cmake ../ -DINSTALL_UDUV_RULES=ON
make
sudo make install

# On my Manjaro system /usr/local/lib is not in the ldconfig path, so the following command fixed the issue
echo "/usr/local/lib" | sudo tee -a /etc/ld.so.conf

# Add the shared libraries into the system cache.
sudo ldconfig

# Copy the udev rules which are used to recognized the RTL-SDR USB device.
sudo cp ../rtl-sdr.rules /etc/udev/rules.d/

# This command allows the device to be recognized without restarting your computer.
# Although if it doesn't work restarting may be required to get the device to be recognized.


These instructions allow the SDR-RTL to be accessed from the system using the library that was just installed. This allows other applications to access the SDR.

There is one more step required to get the RTL-SDR to work properly on the system. Currently the original drivers are being used for the RTL-SDR dongle which will conflict with the new drivers that were just installed. To fix this the original drivers need to be blacklisted, so that our new correct drivers are used for the RTL-SDR.

# Blacklist instructions
# Navigate to the /etc/modprobe.d directory
cd /etc/modprobe.d
# Create new file called blacklist-rtl.conf
# blacklist dvb_usb_rtl28xxu
echo "blacklist dvb_usb_rtl28xxu" | sudo tee -a /etc/modprobe.d/blacklist-rtl.conf



The RTL-SDR dongle can now be tested by the rtl_test executable. The prompt below shows the expected output of the test executable. The system may have to be restarted after blacklisting the drivers in order to get the correct drivers loaded.


jhamberg@falcon /e/ld.so.conf.d> rtl_test -t
Found 1 device(s):
0:  Realtek, RTL2838UHIDIR, SN: 00000001

Using device 0: Generic RTL2832U OEM
Found Rafael Micro R820T tuner
Supported gain values (29): 0.0 0.9 1.4 2.7 3.7 7.7 8.7 12.5 14.4 15.7 16.6 19.7 20.7 22.9 25.4 28.0 29.7 32.8 33.8 36.4 37.2 38.6 40.2 42.1 43.4 43.9 44.5 48.0 49.6
[R82XX] PLL not locked!
Sampling at 2048000 S/s.
No E4000 tuner found, aborting.