Ready to Start Your Career?

Tutorial: An Introduction to Software Defined Radio

The Rapture's profile image

By: The Rapture

June 6, 2016

Tutorial: Introduction to Software Defined Radio - CybraryIntroduction:Hey Cybrarians!  I bought a USB Software Defined Radio (SDR) dongle last year at DerbyCon and hadn't really had the chance to play with it until the other day. It was a lot of fun to explore all of the different signals that you can pick up with one of these dongles, so I thought I'd write up a little tutorial on how I set up my stuff.Disclaimer: I have no idea what's legal in your part of the world, and I'd recommend you check what you undertake is legal. In my area (Midwest USA), everything I'm doing is legal to the best of my knowledge, as I am not interfering with anything. I'm also not an expert in anything related to radio signals, so take it easy guys/gals who know a lot about the subject.  I'm learning this stuff as I go along. It's completely new to me, so it's like an adventure that you get to join me on - if you want.  =)Also, as for the method I use in this tutorial- there may be better ways to do this, but this is what I personally set up and it works great for me. A few notes for this guide:I'm using a specific SDR device (RTL2832U), so I'll only be covering how to set up this particular device in this tutorial. Yet, I imagine it wouldn’t be too much different to set this all up with a different device.I'm also using Ubuntu 16.04 LTS on a VM in VMware Workstation Player. You could run Ubuntu 16.04LTS on your machine natively or perhaps via a USB dongle. For for this guide, I'll be running it in a VM.  Devices:
  • There are all kinds of devices out there to choose from. From the cheap 10-20 dollar ones up to the expensive 1000+ dollar ones.
  • There are multiple reasons for this, but the main one is the device's ability to receive (RX) and its ability to transmit (TX) signals.
  • Some devices can only receive signals (like the one that I'll be using in this tutorial), while others can both receive and transmit signals.
  • The devices that can do both can be further broken down into full or half duplex devices (This may sound familiar to some of you Network+ peeps). Full duplex devices can transmit and receive signals at the same time, while half duplex can only do one or the other at a time.  I am sure there are more kinds of devices out there, but so far, these are the ones I have learned about.
  • The device that I am using for this tutorial is the RTL2832U.  The cheapest I was able to find it was $10.29 (USD) on Amazon, as shown in the screenshot below.SDR Dongle
  • If you want another source, you can pick it up at the Hak.5 shop here:
  Download Ubuntu 16.04 LTS:If you need it, here's a link to the latest Ubuntu Desktop (16.04 LTS) Download: Download  Download VMWare:Now, if we want to run this Ubuntu image, we're going to need Vmware to get it going. Go to the VMware site and download the free version of VMware Workstation Player for whatever OS you have.I've conveniently posted a link to the VMware Workstation Player (Personal Use) Free version download page here: Install VMware and set it up the way you prefer (I won't be going into this because this article is about setting up GQRX on Ubuntu).SDR Tutorial 0008  Getting Started:
  • Once you have Ubuntu installed and ready to go, follow the directions below (Source: <> )
  • For Ubuntu 14.04 – 16.04, you can choose to use packages from our own personal package archive (PPA) where you can get the latest version of Gqrx for Ubuntu and derivatives. This PPA depends on a few other third party package archives to provide the latest SDR drivers and GNU Radio packages.
  • To start using the PPA, first make sure that you don't have any other source or binary installation of gqrx, gnuradio or the SDR driver libraries installed:

sudo apt-get purge --auto-remove gqrxsudo apt-get purge --auto-remove gqrx-sdr

  • You should now remove the gqrx/releases or gqrx/snapshots PPA from the list of repositories/package source if you've been using these.
  • Then, add the new repositories to the package manager by typing the following in a terminal – one line at a time (note the version-specific line):

sudo add-apt-repository -y ppa:bladerf/bladerf        (for Ubuntu 14.04 - 15.10 only)sudo add-apt-repository -y ppa:ettusresearch/uhdsudo add-apt-repository -y ppa:myriadrf/driverssudo add-apt-repository -y ppa:myriadrf/gnuradiosudo add-apt-repository -y ppa:gqrx/gqrx-sdrsudo apt-get update

  • If that went well without errors, continue with installing gqrx:

sudo apt-get install gqrx-sdr

  • You can now find gqrx in the desktop menu, or start it from a terminal, by typing gqrx.
  • Once you have installed Gqrx from the PPA, updates will be available through the package manager.
  • It's recommended that users also install the libvolk1-bin package and run the volk_profile tool to optimize GNU Radio performance on the specific computer it's being used on.

sudo apt-get install libvolk1-binvolk_profile

  • Wait for it to finish, then enjoy the performance boost :-)
  Learning a little about GQRX and exploring the airwaves:Make sure to connect the device to your Ubuntu VM, so it can be used.SDR Tutorial 0001 Now, we need to start up GQRX, so just type in "GQRX" in the terminalSDR Tutorial 0002 You'll likely be prompted to configure I/O Devices:SDR Tutorial 0003 Once that's been done, you can press the power button at the top left corner of Gqrx to start receiving signal.SDR Tutorial 0004 At the top of the window above the black area, there's a place you can manually set the frequency that you'd like to listen in on. You can also manually slide the red line around to select the frequency within the current range you're in. In this case, I'm within the FM radio spectrum, and that bump in the waves is a FM Radio station.I can slide the red line over to that bump and change the mode at the top left from Narrow FM to WFM (Stereo) to hear the channel:SDR Tutorial 0005 In my experience, it seems I need to adjust the filter width and mode to match the base of the peaks in the visualizer.SDR Tutorial 0006 Obviously, you will want to play with the narrowness of the filter and try to get the best sound. I suggest is the use of the squelch adjustment.SDR Tutorial 0007 In this case, you can see that the static noise comes up to about the -43dBFS level, which means if I change the squelch to about -43dBFS, the static will go away and I'll only hear signals that are peaking out over that level as I adjust the frequency. This will have to be constantly modified of course, but it's sure nice not having to listen to static when waiting for a transmission from a police scanner to raise the signal strength above that filter. Now that we have some of the controls down, I'd suggest you have fun exploring the airwaves for communication signals. If you are in the US, this PDF has documentation for what frequencies are used for what. can also look up your city's known radio frequencies in Google to find out all kinds of information about what frequencies police/fire/ambulance/airports/etc. use in your area. That’s all I have for now, but this should get you started at looking through all of the airwaves for traffic. Go have fun, and let me know what you find!If you enjoyed this article, feel free to tip a couple of Cybytes and know that I appreciate it very much!Save
Schedule Demo