Linux Format - UK (2020-03)

(Antfer) #1
http://www.techradar.com/pro/linux March 2020 LXF260 81

Process radio signals TUTORIALS


TALE OF TWO DONGLES


Understand what frequency range you want to operate
in and the variables that impact the range, and then
make a purchase to reflect those specifications. Like
receiving TV signal in the 1960s, no one likes standing
up holding the receiving antenna high above their head
to receive a clearer picture. The cheaper SDR kit we
used proved a challenge to get it to process a signal. If
getting a cheap SDR to work is a user’s first experience,
we can see why future exploration would be rather
discouraged, so bear this in mind.
A quick note on the connectors for antennas and the
SDR dongles themselves. They are not all the same.
Make note of the connector requirements if you are
sourcing antennas separately from the dongle. It is
frustrating to discover that the connector on the
antenna doesn’t mate with the dongle. There are
adaptors available to enable the connection. This adds
complexity and also impacts signal levels, so avoid them
where possible.
A computer capable of running SDR software is the
final piece. The SDR shifts the signal processing from
electronic circuits to digital manipulation. For this
project we are using a Raspberry Pi to run the software.
Without a heat sink on the Pi chips or a fan circulating
air around, you may receive warning signals of excessive
CPU temperatures. Digital signal processing can require
extensive CPU investment, generating heat.
SDR software is supported on a variety of operating
systems. Linux was primarily used to develop this
tutorial. A short foray into Microsoft Windows 10 was
also needed to eliminate the suggestion that the
problems in the cheaper SDR dongle were related to
the OS software.
In this tutorial we are going to examine two software
applications that are supported by the Pi. The first, gqrx
(http://gqrx.dk), is software powered by GNU Radio
and the Qt graphical toolkit. The software receiver
enables you to demodulate received RF signals. The
second, CubicSDR (https://cubicsdr.com), is an SDR
application that can be used to navigate the RF
spectrum and demodulate any signals. It supports
several common analogue demodulation schemes, such
as AM and FM, and is continually being developed to
support more digital modes into the future.

Enough with the theory
Our assumption is that the reader has sufficient
knowledge to prepare a Raspberry Pi with the Raspbian
operating system supporting the GUI. Before starting
the exercises in this tutorial let’s refresh the Raspbian
OS to ensure that all the repositories and software loads
are current. Log in to the Pi and open a terminal
command line interface (CLI) window, and then enter
the following command:
sudo apt-get update -y;sudo apt-get upgrade -y
Keeping our eye on the prize of using SDR, bang out
the commands to support RTL-SDR on the Pi and install
the two software applications. Finish up with a reboot to
ensure the Pi comes back ready to receive. Ensure your
SDR dongle is installed before the reboot:
sudo apt-get install rtl-sdr gqrx-sdr cubicsdr
sudo reboot
From the command line do a test to confirm the Pi is
software-driver ready and detecting the SDR:
sudo rtl_test -t
The following is contained in the text output, depending
on the SDR installed:
Found Rafael Micro R820T tuner
or
Found Fiti power FC0012 tuner
The objective is to play audio from an FM
broadcasted signal. In ourr rural area, we managed to
get a reasonable signal level in a basement lab with the
FM radio station on frequency 92.1MHz. You will need to
use an FM radio station frequency in your area.
Using the Raspberry PI GUI Menu > Internet > Gqrx,
start the application. Set up a consistent screen display
by opening the view menu and selecting input controls,
receiver options, audio, FFT settings. This enables tabs
on the right side of the display, middle of the screen.
There are extensive resources for the gqrx application.
Use the annotated pictorials (see left) to establish the
settings for the FM broadcasted signal 92.1MHz.

Two SDR dongles were used in the project. One was a plastic-cased
dongle with a fixed-length antenna, purchased from http://www.banggood.
com. The other was a metal-case device with two adjustable antennas
purchased from http://www.rtl-sdr.com.
Both units were used successfully. The former was CA$15, while the
latter was CA$40. Both units can plug directly into a Pi USB port. The
physical size of the SDR-RTL unit restricted access to the remaining
USB ports. The banggood unit restricted access to the USB port
directly below, but not the others. In order to plug into the unused ports
the USB connector must be very thin or it won’t get by the dongle.
The performance of the RTL_SDR unit exceeded the banggood
unit. The signal strength unit was higher and had greater stability
in not drifting from the assigned frequency. The banggood unit
signal strength was weaker, making it appear like it wasn’t working.
After confirming the setup with the RTL-SDR unit, the dongles were
swapped and the banggood unit worked.
The details are not a recommendation of a products. The
information is provided to assist you in understanding that there are
pluses and minuses when purchasing SDR dongles.

RECEIVE US EACH MONTH! Subscribe now at http://bit.ly/LinuxFormat


Carl Laufer’s
The Hobbist
Guide to the
RTL-SDR is
comparable
to the ARRL
Handbook
for Radio
Communications.

Signal strength is in red, radiating out from the antenna in green.

7778March 2 h8r0povh0oidesn March 2020 LXF260 81


Process radio signals TUTORIALS


TALEOFTWODONGLES


Understand what frequency range you want to operate
in and the variables that impact the range, and then
make a purchase to reflect those specifications. Like
receiving TV signal in the 1960s, no one likes standing
up holding the receiving antenna high above their head
to receive a clearer picture. The cheaper SDR kit we
used proved a challenge to get it to process a signal. If
getting a cheap SDR to work is a user’s first experience,
we can see why future exploration would be rather
discouraged, so bear this in mind.
A quick note on the connectors for antennas and the
SDR dongles themselves. They are not all the same.
Make note of the connector requirements if you are
sourcing antennas separately from the dongle. It is
frustrating to discover that the connector on the
antenna doesn’t mate with the dongle. There are
adaptors available to enable the connection. This adds
complexity and also impacts signal levels, so avoid them
where possible.
A computer capable of running SDR software is the
final piece. The SDR shifts the signal processing from
electronic circuits to digital manipulation. For this
project we are using a Raspberry Pi to run the software.
Without a heat sink on the Pi chips or a fan circulating
air around, you may receive warning signals of excessive
CPU temperatures. Digital signal processing can require
extensive CPU investment, generating heat.
SDR software is supported on a variety of operating
systems. Linux was primarily used to develop this
tutorial. A short foray into Microsoft Windows 10 was
also needed to eliminate the suggestion that the
problems in the cheaper SDR dongle were related to
the OS software.
In this tutorial we are going to examine two software
applications that are supported by the Pi. The first, gqrx
(http://gqrx.dk), is software powered by GNU Radio
and the Qt graphical toolkit. The software receiver
enables you to demodulate received RF signals. The
second, CubicSDR (https://cubicsdr.com), is an SDR
application that can be used to navigate the RF
spectrum and demodulate any signals. It supports
several common analogue demodulation schemes, such
as AM and FM, and is continually being developed to
support more digital modes into the future.


Enough with the theory
Our assumption is that the reader has sufficient
knowledge to prepare a Raspberry Pi with the Raspbian
operating system supporting the GUI. Before starting
the exercises in this tutorial let’s refresh the Raspbian
OS to ensure that all the repositories and software loads
are current. Log in to the Pi and open a terminal
command line interface (CLI) window, and then enter
the following command:
sudo apt-get update -y;sudo apt-get upgrade -y
Keeping our eye on the prize of using SDR, bang out
the commands to support RTL-SDR on the Pi and install
the two software applications. Finish up with a reboot to
ensure the Pi comes back ready to receive. Ensure your
SDR dongle is installed before the reboot:
sudo apt-get install rtl-sdr gqrx-sdr cubicsdr
sudo reboot
From the command line do a test to confirm the Pi is
software-driver ready and detecting the SDR:
sudo rtl_test -t
The following is contained in the text output, depending
on the SDR installed:
Found Rafael Micro R820T tuner
or
Found Fiti power FC0012 tuner
The objective is to play audio from an FM
broadcasted signal. In ourr rural area, we managed to
get a reasonable signal level in a basement lab with the
FM radio station on frequency 92.1MHz. You will need to
use an FM radio station frequency in your area.
Using the Raspberry PI GUI Menu > Internet > Gqrx,
start the application. Set up a consistent screen display
by opening the view menu and selecting input controls,
receiver options, audio, FFT settings. This enables tabs
on the right side of the display, middle of the screen.
There are extensive resources for the gqrx application.
Use the annotated pictorials (see left) to establish the
settings for the FM broadcasted signal 92.1MHz.

Two SDR dongles were used in the project. One was a plastic-cased
dongle with a fixed-length antenna, purchased from http://www.banggood.
com. The other was a metal-case device with two adjustable antennas
purchased from http://www.rtl-sdr.com.
Both units were used successfully. The former was CA$15, while the
latter was CA$40. Both units can plug directly into a Pi USB port. The
physical size of the SDR-RTL unit restricted access to the remaining
USB ports. The banggood unit restricted access to the USB port
directly below, but not the others. In order to plug into the unused ports
the USB connector must be very thin or it won’t get by the dongle.
The performance of the RTL_SDR unit exceeded the banggood
unit. The signal strength unit was higher and had greater stability
in not drifting from the assigned frequency. The banggood unit
signal strength was weaker, making it appear like it wasn’t working.
After confirming the setup with the RTL-SDR unit, the dongles were
swapped and the banggood unit worked.
The details are not a recommendation of a products. The
information is provided to assist you in understanding that there are
pluses and minuses when purchasing SDR dongles.

RECEIVE US EACH MONTH! Subscribe now at http://bit.ly/LinuxFormat


CarlLaufer’s
TheHobbist
Guidetothe
RTL-SDRis
comparable
totheARRL
Handbook
forRadio
Communications.

Signal strength is in red, radiating out from the antenna in green.
Free download pdf