A Very, Very Surface-Level Look At RTL-SDR

I Just Renewed My Ham Radio License!

Evan SooHoo
5 min readMar 21, 2023
SDR# running on Windows 11; I have an RTL-SDR plugged in and am picking up audio from a Ham radio

The original title for this was “A Very, Very Surface-Level Look At Ham Radios,” but it ended up having more to do with the RTL-SDR. You can read all about it here, but essentially an RTL-SDR is a $30 dongle you can use to listen to radio signals. As you can read on the link, the applications for RTL-SDR are numerous, ranging from police scanning, to aircraft tracking, to weather balloon tracking (insert tasteless balloon joke here), but software-defined radio is also valuable because it serves as a window into signal processing.

What I am going to write about in this post is simply using SDR# on Windows to listen in on a Ham radio — that’s it. The most interesting things, the I/Q data collection and demodulation, are handled by the RTL-SDR and SDR# software.

How It Worked

This is a Neoelec RTL-SDR set, costing about $30, and a BaoFeng UV-5R Ham radio that cost about $30 as well. Are both things necessary? Not really. If you have an RTL-SDR, you can download software like SDR# and listen in on FM radio, the way you would with a standard radio. The “coding potential” here is in the possibility of writing custom Python scripts to emulate the functionality of software like SDR#.

I just renewed my Ham license, which you can read about here. In essence, it’s a test (technician, not general, in my case) that requires the average person about ten hours to study for, and that grants the ability to transmit on certain frequencies.

I consider this the “hello world” of a Ham radio/RTL-SDR. Transmit something, listen in on the exact same frequency, observe how it spits out audio.

Steps:

  • I got SDR# from here. Ironically (or maybe not ironically) I had a much easier time doing this in the past on a Mac using GQRX — I simply plugged it in and it just worked. On this laptop running Windows 11, it required more steps
  • It said “no device selected,” so then I had to follow this tutorial
  • I had to download a second program, Zadig, and configure it like shown in the video above
  • I had to get the extra dll file, as shown in the video above, as the included bat file I found simply crashed
  • Finally, I was able to use SDR# normally

A Window Into Signal Processing

This person, Elvis, wrote Python scripts to listen to FM radio and documented his work here. The demodulation, for the time being, is taken care of behind the scenes…but to proceed I will need a better understanding of how it works. A radio band is moved or translated to low-frequency baseband. This is then converted to digital samples and delivered to software.

Here, in a Python script, Elvis writes what he characterizes as a “minimally viable FM receiver that ingests SDR samples and spits audio samples.”

Source: https://github.com/elvis-epx/sdr/blob/master/fm1.py

I can read the comments and the code above, but I wanted background. Someone recommended that I read this free book, but in a pinch I looked through this.

A software-defined radio captures I/Q samples. I/Q samples “provide an effective way to visualize and measure quality of modulation.” It takes advantage of sine and cosine signals being mathematically orthogonal to each other; sine and cosine waves are in quadrature. They are 90 degrees apart in phase.

Maybe one day I will have a more enlightened explanation than that. I do not want to write that I think of I/Q data simply as input, a form of data someone uses to represent a signal so that you, the receiver, can use a series of mathematical equations to translate the I/Q data into audio that you can actually listen to…but for the time being, that is how I think of it. I found this short, simple explanation describing it as something that gives you everything you need to know about a signal, but there is a lot that this explanation leaves out. Here you will find a brilliant article on Towards Data Science for visualizing I/Q data. A plethora of more comprehensive articles attempt to answer the question of why we chose to use it.

Why It Matters

You can spend a lifetime working on frontend development for websites— that’s all well and good. You can use markup to modify the layout, and you can use a programming language like JavaScript to define the behavior of various components that a user can interact with. The potential is virtually infinite, but sometimes it feels like this realm of programming is less scientific. Some things are just the way they are because a human defined it that way.

The same argument can be lodged against signal processing, I suppose, but you are constrained by the physics of the universe.

I will try to leave it at that, since the more I think about it the more flawed the argument becomes. A frontend web developer is still constrained by physics. There are still rules to follow, and it is not like they just magic their way into making components line up perfectly, or appear with just the right color scheme.

With signal processing, scientific concepts we were required to study in school start to become less academic, and more real. Because of these calculations, that signal I transmitted is able to get picked up by software and then read back to me in a way I understand. These formulas and calculations are not just mental exercises, they are real things that allow people to communicate in potentially dire future situations when infrastructure goes down and people need an alternative form of communication.

Closing Thoughts

…and it can tie to data science, which is neat. Data science is interesting, the only catch is that everyone else finds it interesting as well. Now that ChatGPT has been unleashed on the world, it is hard to navigate anywhere in social media without finding someone who drops AI and data science concepts, followed by how much money you can make.

This is an article someone wrote about using data science for signal classification. Almost everything I have read on Towards Data Science is well-written and thought-provoking — it completely changes the way I think about tech content on Medium.

Science consists of hypothesizing, of data collection, of analysis. It’s nice to think of coding as something done in the service of science, rather than just something that’s done a vacuum. I know it sounds obvious, but coding can feel like the act of self-contained creation — you build features, you serve users, you resolve bugs. Paired with another field, coding is of the universe. It models real-world phenomena, it collects and it alerts. It’s not just an abstract thing, it’s something of and for the world.

--

--

Evan SooHoo
Evan SooHoo

Written by Evan SooHoo

I never use paywalls (anymore) because I would get stuck behind them.

Responses (1)