HackRF One Guide: Specs, Setup, Gain Settings, Tools and First Projects

Software Defined Radio4 min read
HackRF One guide: hackrf_info and hackrf_sweep in a terminal
On this page

The HackRF One is an open-source software defined radio made by Great Scott Gadgets. It covers about 1 MHz to 6 GHz, samples up to 20 million samples per second, and, unlike an RTL-SDR, it can transmit as well as receive. That makes it a favourite tool for radio and security research: analysing and replaying signals in a lab, testing wireless devices, and learning how real radio protocols work.

It is half-duplex: it receives or transmits, not both at the same time.

Specifications

FeatureHackRF One
Frequency rangeAbout 1 MHz to 6 GHz
Sample rateUp to 20 MS/s (20 MHz of spectrum)
Resolution8 bits
TransmitYes, low power (milliwatts, depends on frequency)
DuplexHalf-duplex
InterfaceUSB 2.0
Open sourceHardware and software

HackRF One vs RTL-SDR

RTL-SDRHackRF One
PriceAbout 30 to 50 USDAbout 300 to 350 USD (genuine)
Range24 MHz to 1.7 GHz1 MHz to 6 GHz
BandwidthAbout 2.4 MHzUp to 20 MHz
TransmitNoYes
SensitivityGood for the priceSimilar or lower, needs good gain settings

Start with an RTL-SDR if you only want to listen. Choose the HackRF when you need wide bandwidth, frequencies above 1.7 GHz such as 2.4 GHz and 5.8 GHz, or transmit for lab work. Our HackRF vs Flipper Zero comparison explains how it differs from the Flipper.

Installation

Linux

sudo apt install hackrf
hackrf_info

hackrf_info shows the board ID, serial and firmware version. Update the firmware with hackrf_spiflash from the official release if it is old.

Windows: install the WinUSB driver with Zadig or use a software package that includes it (SDR++, SDR# with the HackRF plugin, or the PothosSDR bundle).

Gain settings that matter

The HackRF has three receive gain stages. Getting them right makes a bigger difference than on most radios.

StageRangeTip
RF amp0 or about 14 dBLeave off unless signals are very weak. Never on with a strong nearby transmitter
LNA (IF) gain0 to 40 dB in 8 dB stepsStart at 16 to 24 dB
VGA (baseband) gain0 to 62 dB in 2 dB stepsStart at 20 to 30 dB

Raise LNA first, then VGA, until the noise floor lifts slightly. If strong signals appear in many places, you are overloading the front end. Never connect a transmitter directly to the antenna port: the input is easily damaged by strong signals.

The command-line tools

hackrf_transfer -r capture.iq -f 433920000 -s 2000000 -l 24 -g 20
hackrf_sweep -f 2400:2500 -l 24 -g 20 > wifi_band.csv
  • hackrf_transfer records raw IQ samples to a file (and can transmit a file in a lab).
  • hackrf_sweep scans a wide range very quickly, from tens of MHz to the full 6 GHz, useful to find where devices transmit.

Recorded IQ files can be opened in Inspectrum, Universal Radio Hacker or GNU Radio to analyse the modulation and decode the data.

Software that works with HackRF

ProgramUse
SDR++General receiving, waterfall. See our SDR++ tutorial
GNU RadioBuild receivers and transmitters
Universal Radio HackerRecord, demodulate and decode unknown protocols
InspectrumAnalyse recorded signals visually
PortaPack with Mayhem firmwareUse the HackRF without a computer

PortaPack

A PortaPack adds a screen, buttons, audio and a battery to the HackRF so it works as a handheld device. The community Mayhem firmware includes receivers, spectrum views and many tools. It is convenient for field work, but for learning how signals work a computer with GNU Radio teaches far more.

Receiving is legal in most countries. Transmitting is regulated: you may only transmit on frequencies and powers your licence allows, for example amateur bands with an amateur licence, or into a shielded box or a cable with an attenuator in a lab. Never transmit on GPS, aviation, mobile or emergency frequencies, and never replay signals to devices you do not own.

Frequently asked questions

Is the HackRF One good for beginners?

It is a great second radio. Beginners who only want to listen get more for their money with an RTL-SDR; the HackRF makes sense once you need transmit, 20 MHz bandwidth or frequencies above 1.7 GHz.

Can the HackRF One transmit and receive at the same time?

No, it is half-duplex. It switches between receive and transmit.

What is the maximum sample rate of the HackRF One?

20 MS/s. Many computers drop samples at the top rate, so 8 or 10 MS/s is often more reliable.

Are cheap HackRF clones worth it?

Some work, but quality varies, and clones often have worse clocks, filters and shielding. A genuine unit supports the project and has known performance.

Can the HackRF open car doors?

Modern cars use rolling codes, so simply replaying a recorded key fob signal does not work. Researchers study these systems in labs with their own vehicles and permission.

Learn what the samples mean

A HackRF gives you raw IQ samples. Our Software-Defined Radio and Signal Processing course teaches how to turn them into information: sampling, filters, modulation and demodulation, and building your own receivers and analysers in GNU Radio.

Written by

Taifun Mamedov

Taifun Mamedov, founder and lead instructor of Ocsaly Academy. 570,000+ students, 26 courses on Udemy, published Packt author. Working hands-on with car electronics, car hacking, digital forensics and software defined radio since 2017.

Courses by Taifun Mamedov

Share this article