The USB dongles we passed out in class can directly digitize a 2.4 MHz segment of the RF spectrum, from 27 MHz up to 1.7 GHz. This can capture a large part of the RF spectrum, which we can then process in using public domain software or matlab, and extract the signals we want.
In this lab we will install the USB software for your computer, and then use a real time spectral display to look at some of the different signals that are all around you.
This lab is mostly about getting your software working, and starting to look around at all of the signals that you are constantly being bombarded with. Find an interesting frequency, and try to identify what is happening there. Next week there will be more to do.
There are two parts to the software you need. The first is the device driver to control the SDR. The second is the spectrum visualization software. For mac users, you can download all of this in one package. For windows users, you need to download the drivers and the visualization software as a package, and then install them separately.
We will primarily use the gqrx program. This is a graphical interface that is built on top of gnu radio, an open source software defined radio project. When you download gqrx, you will also get the gnu radio libraries.
(If you are experienced, you can install gqrx via homebrew or macports. In that case, you can skip the installer instructions below. )
The Gqrx installer can be found here.
Download the version for architecture: Gqrx-x.xx.x-arm64.dmg for apple silicon and Gqrx-x.xx.x-x86_64.dmg for intel macs.
Plug the SDR into your computer. You may need an adapter if your computer only has USB-C ports
MacOS is now very careful about what apps you can run. First, find the “Security and Privacy” control panel in “Settings”. Click the lock symbol, and type in your password to allow changes. Click on “Allow downloaded apps from the app store and identified developers”. Then double click gqrx to try to run it. In the “Secururity and Privacy” panel it will warn you about gqrx. Click the “Open Anyway” button. Then click the "open button in the smaller pop-up window.
The description of this process is on the apple support page: Safely open apps on your Mac
You only have to do this once, gqrx will work like any other app from now on.
We will primarily use the gqrx program. This is a graphical interface that is built on top of gnu radio, an open source software defined radio project. When you download gqrx, you will also get the gnu radio libraries.
Windows requires a few (somewhat delicate) steps to go through. I wish you Good luck! The instructions are taken from https://www.rtl-sdr.com/rtl-sdr-quick-start-guide/ (skip to the Alternative Software part). PLEASE FOLLOW THE INSTRUCTIONS SLOWLY and CAREFULLY!!!!!
Plug in your SDR and do not install any of the software that it came with, but ensure you let plug and play finish trying to install it. If you've already installed the software drivers it came with previously, uninstall them first.
Go to http://zadig.akeo.ie/ and download Zadig driver.
Open Zadig with administrator priviledges
4. In Zadig, go to Options->List All Devices and make sure this option is checked If you are using Windows 10 or 11, in some cases you may need to also uncheck "Ignore Hubs or Composite Parents"
5. Select "Bulk-In, Interface (Interface 0)" from the drop down list. Make sure it is Interface 0 (ZERO), and not "1". Note on some PCs you may see something like RTL2832UHIDIR or RTL2832U or Blog V4 instead of the bulk in interface. This is also a valid selection. Double check that USB ID shows "0BDA 2838 00" as this indicates that the dongle is selected.
WARNING: DO NOT select anything else or you will overwrite that device's driver! DO NOT click around randomly in Zadig. If you do you are likely to overwrite your mouse, keyboard, printer, soundcard etc drivers. Many bad reviews rtl-sdr.com get are due to people clicking around randomly in Zadig, so PLEASE check what you are doing first.
6. Make sure the box to the right of the arrow shows WinUSB. The box to the left of the green arrow is not important, and it may show (NONE) or (RTL...). This left hand box indicates the currently installed driver, and the box to the right the driver that will be installed after clicking Replace/Install Driver.
7. Click Replace/Install Driver. On some PC's you might get a warning that the publisher cannot be verified, but just accept it by clicking on "Install this driver software anyway". This will install the drivers necessary to run the dongle as a software defined radio.
First, plug the antenna into your sdr, and the sdr into a USB socket on your computer. Then, start your gqrx program.
When you start gqrx, it will pop up a window for the device configuration
Set the sample rate to 2400000 (i.e. 2.4 MHz). Your computer and the sdr should keep up with this easily. After clicking OK, gqrx will pop up:
Initial Display:
This is a previous version of gqrx, but it should look similar. Set the frequency offset in the upper right to 0.000 kHz, and then set the receiver frequency in the upper left to
88.500. 000 MHz. If you are in the Bay Area, this is KQED, which is a nice clean signal.
Change the “Mode” pulldown on the right side of the screen to “Wide FM (Stereo)”.
Also, press on the input controls tab and set the LNA gain slider to 18.0dB. This is a conservative value. Too much gain will create non-linearities and amplify noise. Too little gain will reduce your ability to receive. The Hardware Auto Gain Control (AGC) is too agressive often, so don't check it. In Berkeley, the RF signals from many stations can be strong, so 18.0dB can be too much sometimes, and you may need to lower it further.
The display should look like this:
Tuned to KQED:
Now click the big button in the upper left corner. It looks like an on/off power button. With any luck, you should be listening to KQED! If you are not in the Bay Area, there may not be a station at 88.5. Find the biggest signal on the display and clip on it in the upper window. That will tune in that station.
Tuned to KQED
The plot in the upper panel is the live spectrum that is being received, and has a range +/- 1.2 MHz, since you set the sampling rate to 2.4 MHz.
The lower panel is a waterfall plot. Each line in the image is the spectrum from the top panel, displayed with color encoding amplitude. It slowly scrolls down as you acquire longer. This plot is a great way to recognize different types of signals.
One useful setting is the receiver gain. To change this click on “Input Controls”, which will bring up a panel for controlling the SDR. The slider at the top adjusts the gain. If it is too low (to the left), the signal will be all noise. If it is too high (to the right) the receiver saturates, and the signal is distorted. The “A” button sets the gain automatically, which you generally don't want to do when you are looking for signals, since it will constantly be changing.
Go back to the “Receiver Options”. The top “Filter” pulldown sets how wide a bandwidth we are listening to. This is the shaded region on the live spectrum plot. On “Normal” it chooses something reasonable for whatever modulation we are receiving, so generally leave it there. The middle “Mode” pulldown selects how the receiver decodes the signal. Common choice are “AM”, used for aircraft and air traffic control, “Narrow FM” used for police and fire radio, and “Wide FM” used for commercial FM radio. We will talk about the other options later. The bottom “AGC” pulldown sets how rapidly the receiver adjusts for amplitude variations in the signal.
Try setting the center frequency to other stations that you know (such as 99.7, or 94.1 KPFA). Often you will see several stations in the plot. Select any of them by clicking on them in the top panel. That will set the receiver offset.
Tuned to 99.7:
Note that you may need to find the right environment to be able to see lots of signals. Lots of devices spew RF. Campus buildings, like Cory, have a tremendous amount of interference. Also, buildings can screen signals. You may need to put your antenna in a window, or take your receiver outside, in order to improve your reception.
First, set your receive “Mode” pulldown to “Narrow FM”. This uses much less spectrum than commercial FM, and is commonly used for handheld communications such as police and fire. Click on any of the peaks in the upper plot. That will shift your receiver offset to that frequency. About half of the signals are digital, and will sound like dial-up modems. We'll talk about how these signals are encoded later in the class. The other half will be narrowband FM, and should be easy for you to decode. An example of narrow FM is the NOAA weather service. It's located at 162.40MHz. Tuning there, Your screen should look something like this:
Note, that there are probably more signals in the spectrum in the above figure, since its captured at my home in Moraga using a nice antenna. Here the receiver frequency is 162 MHz, and the receiver offset is +399.2 KHz, so that we are monitoring the frequency 162.3992 MHz. The frequencies won't be exactly those shown in the table, because the crystal in your SDR drifts with frequency. In fact, the frequency for NOAA weather off San Francisco should be 162.4. So this receiver has an offset of 800Hz, which is almost 5ppm. Yours might have a larger offset.
The assignment this week is to get your sdr set up and running, and find some signals.
Tune to each of these signals, and capture a screenshot of the display. Set the decoder (the “mode” from the pulldown from above) as specified, and try to figure out what that signal is doing.
127-129MHz or 134-136 MHz with AM
144-148 MHz with narrow band FM
144.2-144.4 with USB or narrow FM
161-163 MHz with narrow band FM
461-463 MHz
929-930 MHz
Tips:
In the FFT Settings tab there's also a Frequency zoom slider that you can zoom the spectrum. You can also click and drag the spectrum close to the interface between the spectrum and the waterfall. You can also drag the amplitude bar on the left to push the spectrum lower or higher. Finally, you can also change the FFT size to get higher spectral resolution at a tradeoff of reduced temporal resolution.
When watching the spectrum, slide the gain bar from low to high. When it is low -- you will see very little signal and noise... as you increase you will see signals more clearly, but at some point, the noise floor and interference/non-linearity will rise and you will see the signals worse... finding the sweet spot of good enough gain will help you find signals better
Looking at frequencies is like fishing... wait a bit and see what comes up. If you see stuff changing-- zoom to that frequency and wait.
The last two ranges of frequencies above are digital so you won't be able to decode them. Use narrow band FM and describe what you hear.
For the 144-148 MHz band, you'll have most luck on Monday to Wednesday evenings from 7-9 PM, and any morning from 9-11 AM. You may also have some luck when an hour changes and at intervals of 10min after that.
There are at least two subtle signals in the 144.2-144.4 band. Try to find them!!!!
The 161-163 band has some clear strong signals, and some more subtle ones... try to find them too!
Note that gqrx labels the name of the band you are receiving, along with the type of modulation (narrow FM, AM, etc). This is not always right!
You can try the different built in decoders (AM, USB, FM, WBFM) to see if they make sense. Use RadioRefenence.com, Google, or Chat GPT to look for who uses that frequency. Finally, there is a a great web site Signal ID Wiki that has examples of almost any signal you might find, along with waterfall plots and audio clips. Some of them are pretty interesting sounding.
Make a document in your favorite word processing app. Collect are least 1 signal in each of the bands, and a minimum of 10 signals. For each of the signals include
The frequency band
The screen shot
Your assessment of what is the signal!
Based on Lab developed by John Pauly