Setting up HackRF One

tested on ubuntu/artful/bionic and debian/stretch

Installation from Source

apt install build-essential cmake libfftw3-dev libusb-1.0-0-dev pkg-config

git clone
cd hackrf/
mkdir host/build/
cd host/build/
cmake ../
make install

cat /etc/
grep local /etc/*.conf

cat /etc/udev/rules.d/53-hackrf.rules
grep ^plugdev /etc/group
usermod -aG plugdev USERNAME


watch the kernel logs

tail -F /var/log/kern.log /var/log/syslog

and just in case the front-panel is not pushing enough power into the device, PLUG THE SHIT INTO A MOTHERBOARD USB PLUG.

then look at currently installed FW version

which hackrf_info

note: it is preferable to have all version at the same level: FW, CPLD and binaries.

Firmware and CPLD

apt install gcc-arm-none-eabi python3-pip
#apt install libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib gcc-arm-none-eabi binutils-arm-none-eabi

cd hackrf/
git submodule init
git submodule update
cd firmware/libopencm3

pip -V # python 3.8
pip install pyyaml
ls -lF /usr/bin/python # python3

cd ../hackrf_usb/
mkdir build/
cd build/
cmake ../

hackrf_spiflash -w hackrf_usb.bin

now restart the device by clicking on the first button on the left.

then check again


as for CPLD

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

check for write success, un-plug power from the device, wait a second and replug.

Ready to go

play with GQRX and tune the gain settings

apt install gqrx-sdr

as user


input rate 20000000
center freq 950 Mhz

RX (from the FAQ)

    RF "amp", 0 or 14 dB
    IF "lna", 0 to 40 dB in 8 dB steps
    BB "vga", 0 to 62 dB in 2 dB steps

we need no heavy gains and want to get only the strongest channels. eventually start with 0/16/18 and gradually level-up IF and BB gains to obtain the best SNR. theorically, there’s no need to enable the pre-amplifier there unless you’re in a desert with no BTS. good results are obtained here with 0/32/18.


    RF 0 or 14 dB
    IF 0 to 47 dB in 1 dB steps

Acceptance Testing

eventually validate RX and TX


HackRF One


How to build the host software on Linux

Operating System Tips

How we can Decide for set BB gain, IF gain, RF gain???


How we can Decide for set BB gain, IF gain, RF gain???

HackRF TX amplifier test, RF, IF, BB Gain to very high values




Updating Firmware

How to fix fatal GCC-ARM error: stdint.h: No such file or directory

no stdint.h file on Debian

stdint.h: No such file or directory


Tips and Tricks

USB(?) interference via antenna from the lowest frequencies to above 190 MHz #544

HackRF Sensitivity

I put my hackrf into a Hammond cast alum. box wrapped usb cord with choke/ferrit and have seen a big improvement. And with a discone ant. Just need to play with more when I’m not busy…

Calibration Troubles

kalibrate-hackrf not picking up GSM

Is it right (wildly inconsistent results on different channels, e.g. -33.570 ppm vs 38.369 ppm) #6

Wrong ARFCN and frequencies – is -E needed? #24

what’s accuracy of SDR oscillator in HackRF one? for example, the USRP1 to 20 parts per million (ppm) #379

SDR calibration via GSM FCCH using Kalibrate and LTE-Cell-Scanner on RTL-SDR and HackRF

LTE Calibration

SDR calibration via GSM FCCH using Kalibrate and LTE-Cell-Scanner on RTL-SDR and HackRF

Range of results from Kalibrate

rxseger/LTE-Cell-Scanner forked from JiaoXianjun/LTE-Cell-Scanner

JiaoXianjun/LTE-Cell-Scanner forked from Evrytania/LTE-Cell-Scanner



Copyright © 2022 Pierre-Philipp Braun