HackRF One: Setup

From Embedded Lab Vienna for IoT & Security
Jump to navigation Jump to search


We want to get started with the HackRF One Software Defined Radio. At the end of the setup, the HackRF One will be ready to use and we will be able to see the first incoming radio signals. This Setup shows mostly the installation and usage under Linux, this device can also be used under Windows however the software options are limited.


  • Operating system: Any Linux Distribution but preferably Kali or Pentoo


Installation of Packages

The following commands are for Debian/Ubuntu based Linux Distributions. First, update your machine:

 sudo apt-get update
 sudo apt upgrade

Then install the hackrf tool and libraries:

 sudo apt install hackrf libhackrf-dev libhackrf0

Now install GQRX:

 sudo apt install gqrx-sdr

If that does not work use:

 sudo aptitude install gqrx-sdr

We also must download the newest firmware from this Git repository:


Installation under Windows using Zadig

Download the latest release from:


Start the program. Under Options select List All Devices. Select HackRF One from the available devices and install the driver. Now you can use HackRF with Windows and for example Universal Radio Hacker.


Check HackRF One

Now, that we have installed the necessary software we can finally connect the HackRF One to our computer. IMPORTANT: Before you connect it to the computer, make sure you have attached the antenna. If you do not do this the HackRF One might get broken.


Now we must activate the USB port in the virtual machine. In Oracle Virtual Box you can do that by right-clicking the VM -> select options -> click USB -> add USB drive -> choose the HackRF One -> Restart the machine.

Now we can check if the HackRF one is recognized by the machine:


When everything is correct you should see an output like this:


Here you can see the HackRF One was found and some more things. Important now is the firmware version. If it is not the newest, we have to do the following: Unpack the folder we downloaded before from https://github.com/mossmann/hackrf/releases and navigate into the firmware-bin subdirectory. Then use this command to update the firmware:

 hackrf_spiflash -w hackrf_one_usb.bin

Older versions of HackRF firmware (prior to release 2021.03.1) require an additional step to program a bitstream into the CPLD:

 hackrf_cpldjtag -x ./cpld/sgpio_if/default.xsvf

Now restart the HackRF One by simply unplugging and plugging back in. You can now check if the version was updated.

Receiving Radio Waves

To validate that the HackRF One is properly working we want to test it by simply listening to Radio. To do that, we must start the previous downloaded program GQRX. You will be prompted a configuration window which you should edit like that:


Now the program window will open. We must do some configuration here though:


  • Change the Mode to ‘WFM(stereo)’
  • Increase the Gain (otherwise you will not hear anything)
  • Click the ‘Start DSP processing’ button
  • Change the Frequency (you can google for radio channel frequencies in your area or try to move the red bar inside one of the white curves)

If you can listen to the radio channel now your HackRF One is set up properly and you can move on to do other, more interesting things with it.

Used Hardware


  • Wahlfach Projekt 1 (2021)