Last week I shared the basics of what a software-defined radio (SDR) can do, and a few things that separate them from conventional radio. Basically, an SDR is a radio that processes radio transmissions using software rather than dedicated electric components. And while some components are required (such as an antenna and tuner), the capabilities of an SDR are really left up to the associated software.
So what are people doing with SDRs today? Among other things, you can use them to:
- Listen to emergency services (police, fire, medical, etc.)
- Hunt radio transmitters using time difference of arrival
- Receive digital telemetry from aircraft, boats, and satellites
Recently, I purchased an SDR called the HackRF One. This device has been on my watchlist for quite some time, as it is one of the few devices in its price range that can both receive and transmit radio messages. Naturally, I had to try one out for myself.
According to the official site [1], the HackRF supports:
- 1 MHz to 6 GHz operating frequency;
- up to 20 million samples per second;
- 8-bit quadrature samples (8-bit I and 8-bit Q);
- Compatibility with GNU Radio, SDR# (SDR Sharp), and more
Just to name a few features. The first thing I wanted to test was how the unit performed with just the stock (default) antenna. Ultimately, a radio receiver or transmitter is only as good as its antenna, so I was eager to test how well it would perform at receiving local emergency services.
Unboxing the HackRF One
The unit shipped in a clearly marked box with plenty of packing material to protect the transceiver from mishandling.
Inside the box, the HackRF radio and the stock antenna are packed in a foam material. The HackRF itself included dust filters for its 3 SMA connectors to protect them from contamination. This unit also included the requisite USB 2.0 micro cable and 4 adapters for interfacing with other antenna and cable types.
The adapters and the antenna were individually packaged, which is something I always like to see since this helps avoid early damage in transit. The stock antenna is compatible with the SMA antenna connector and has an adjustable swivel that I adjusted to 90 °. It is also a telescopic antenna that can be extended to about 1 meter in total length.
I should note that the kit works perfectly fine using just the HackRF and the stock antenna. But the adapters will be a useful addition if you already have radio equipment or test equipment that uses the other connector systems available through the included adapters. To keep things basic, I will stick to relying on the stock antenna for today.
Preparing Software to Use with the HackRF
The HackRF can be used in Windows, Mac, and Linux. For this unboxing, I decided to try decoding local public safety services such as police and fire from a Windows environment. Here in the state of Illinois, most of these services have migrated to a trunked, digital system known as STARCOM21 [2] [3]. STARCOM21 implements its radio communications using the Project 25 format (also called P25 or APCO 25). In fact, many other states also use P25-compliant radios, especially in metropolitan areas.
But before I get to decoding digital voice, I will first need to connect the HackRF One to my desktop computer and verify a few things—including the HackRF driver. I will also do a brief test by receiving commercial frequency modulation (FM) radio stations, just to make sure things have loaded correctly.
The software I will use include:
- Operating System: Windows 10, 64-bit
- General-Purpose SDR: SDRSharp (Airspy) version 1.0.0.1525 (https://airspy.com/download/)
- Digital Speech Decoder: DSDPlus (https://www.dsdplus.com/)
- Audio Cable: VB-Audio Virtual Cable (https://www.vb-audio.com/Cable/)
SDRSharp is a free graphical SDR application [4] that is very useful for viewing the tunable radio spectrum, as we will see below. This program works with the HackRF system by default, and it also works with other popular SDRs such as the RTL-SDR chipset. Additionally, it can pipe any received audio straight to your speakers, to an audio file, or to a virtual audio device such as the VB-Audio cable input.
DSDPlus is a general-purpose voice decoder. This application runs from the windows command line, and it will decode the digital messages into audible sound. Like SDRSharp, it can also log any successfully-decoded audio to a file.
VB-Audio Virtual Cable will be our mechanism for transferring audio from SDRSharp to DSDPlus in real-time. When installed successfully, it will create 2 new audio devices on your Windows system:
- CABLE Input will show up as an output device, along with your speakers or headphones.
- CABLE Output will show up as an input device, along with your microphones.
With the HackRF One system fully assembled, I booted up Windows 10 and plugged in the HackRF. Surprisingly, the digitally-signed USB drivers were already on my system by way of the WinUSB generic drivers from Microsoft, and no further installation was needed.
Next, I loaded the SDRSharp application, which I already had installed. For the official binaries and installation instructions, visit the Airspy website at https://airspy.com/.
When SDRSharp first loads, you will need to select “HackRF” as the Source in the collapsible menu on the left side of the interface. Next, click the gear-shaped “configure source” icon.
For this test, I set the sample rate initially to 16 MSPS (16 mega samples per second).
Next, click close and then press the play/start button back at the main screen.
So far so good. The first thing to note is the HackRF has substantially more bandwidth than many entry-level SDRs. As a result, nearly all of the FM broadcast band is visible at once.
Depending on your SDRSharp settings, you may see a large and persistent spike in the center of your display. Without going into detail, you can remove this artifact by navigating to: Radio –> Correct IQ = checked.
By default, the HackRF amplifiers were disabled. So I navigated back to Configure Source (Gear icon), and then set:
- LNA Gain = 16 dB
- Amp = Checked
Figure 11 and Figure 10 above show the distinct difference the amplifiers will make, so adjust as needed.
Decoding Digital Voice with the HackRF One and DSDPlus
Now that the software toolchain is working, we can try to decode digital voice. Keep in mind, the steps below require SDRSharp, DSDPlus, and the Virtual Audio Cable.
First, (with SDRSharp still running) I tuned SDRSharp to around 852 MHz. This is where most of the P25 radio traffic in my region occurs, and there are a couple of control stations that transmit continuously. These radios operate at much shorter bandwidths than broadcast FM, so the peaks are much narrower here.
There appeared to be 2 control signals; which are shown as peaks topped with a yellow circle in Figure 13. There was a third smaller peak between, which seems to be an artifact and not a real transmission.
Second, I adjusted amplifier gains until I started seeing temporary peaks appearing and disappearing on the display. These peaks are created usually by voice transmissions and some occasion non-voice data.
I then navigated to Audio and set the following settings:
- Output = [MME] CABLE Input (VB-Audio Virtual C)
- Unity Gain = Disabled
- Filter Audio = Disabled
Next, I navigated to Radio and set the following settings:
- NFM = Selected
- Bandwidth = 8000
- Squelch = Disabled
This tells SDRSharp to pipe raw, unfiltered audio to the virtual cable, where DSDPlus will do the rest of the processing.
Next, I opened the Windows command prompt by pressing the Windows Key and searching for “cmd.” This launched the cmd.exe command prompt. Using cd (change directory), I navigated to the directory where I knew dsdplus.exe was installed and I entered:
dsdplus
Note that by default, dsdplus says the audio input device #1 is my microphone, which is not what I want. Instead, I needed to select audio input device #2 (CABLE Output) as the preferred input device. So I exited by pressing the Esc key. I then launched dsdplus again by entering:
dsdplus -i2
With the correct input device set, I simply had to wait for another voice transmission to appear on SDRSharp, and then manually adjust the tuner to receive it. Normally, you would use a scanning or trunking application to do this instead, but for test purposes, this is fine for now. It may help to adjust the Zoom level in SDRSharp to help you perfectly center the tuner over one of these narrowband transmissions, as shown in Figure 17.
When you successfully tune into a P25 transmission, the DSDPlus application will come to life and begin posting various messages to the command prompt. By default, any unencrypted voice packets will also be pushed to a file called dsdplus.wav.
As you can see from the timestamps in the DSDPlus event log, radio transmissions on this band tend to be very short in duration. Typically they are under 10 seconds.
Bonus: Shortwave and Medium Wave Radio
Toward the end of the day, while I was concluding this article, I decided to try extending the telescopic antenna to see what was audible in the lower part of the radio spectrum. This took me to bands nearer 9 MHz (shortwave radio) and 1MHz (broadcast AM radio) beyond where some of the more common SDRs are able to tune without extra equipment. To my surprise, the stock antenna did an okay good job of picking up a few shortwave stations in Spanish near 9 MHz and 11 MHz. These bands (including the 30-meter ham radio band) really came to life around sunset due to nightly variations in Earth’s ionosphere.
Conclusions
In summary, this was a limited test basically utilizing just three radio bands (near 10 MHz, 100 MHz, and 850 MHz). But overall, the HackRF One worked just as expected.
The use of default WinUSB drivers simplified the installation process, and the unit was basically ready to connect and start using straight out of the box.
While the stock antenna did a satisfactory job at receiving the 800 MHz, the inclusion of adapters that allow the use of more specialized antennas was a smart move. The adapter choices seemed to do a good job of anticipating the type of connector systems most commonly used for the SDR in North America.
References
[1] | Great Scott vGadgets, “HackRF One,” [Online]. Available: https://greatscottgadgets.com/hackrf/one/. [Accessed 12 Nov. 2019]. |
[2] | Illinois Department of Innovation & Technology, “Radio Communications- STARCOM21,” [Online]. Available: https://www2.illinois.gov/sites/doit/services/catalog/network/Pages/starcom21.aspx. [Accessed 16 Nov 2019]. |
[3] | B. R. Mayes, “Unboxing the RTL-SDR.com Software Defined Radio,” Voxidyne Media LLC, 10 Nov 2019. [Online]. Available: https://unboxing-tomorrow.com/index.php/2019/11/10/unboxing-the-rtl-sdr-com-software-defined-radio/. [Accessed 16 Nov 2019]. |
[4] | Airspy.com, “SDR Software Download,” Airspy.com, [Online]. Available: https://airspy.com/download/. [Accessed 16 Nov. 2019]. |
Important Notice: This article and its contents (the “Information”) belong to Unboxing-tomorrow.com and Voxidyne Media LLC. No license is granted for the use of it other than for information purposes. No license of any intellectual property rights is granted. The Information is subject to change without notice. The Information supplied is believed to be accurate, but Voxidyne Media LLC assumes no responsibility for its accuracy or completeness, any error in or omission from it or for any use made of it. Liability for loss or damage resulting from any reliance on the Information or use of it (including liability resulting from negligence or where Voxidyne Media LLC was aware of the possibility of such loss or damage arising) is excluded.