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 https://github.com/mossmann/hackrf.git
cd hackrf/
mkdir host/build/
cd host/build/
cmake ../
echo $MAKEFLAGS
make
make install

cat /etc/ld.so.conf
grep local /etc/ld.so.conf.d/*.conf
ldconfig

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

Identification

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
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
make

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

hackrf_spiflash -w hackrf_usb.bin

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

then check again

hackrf_info

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

gqrx

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.

TX

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

Acceptance Testing

eventually validate RX and TX

Resources

https://hackrf.readthedocs.io/en/latest/updating_firmware.html

https://github.com/mossmann/hackrf/tree/master/docs

https://github.com/mossmann/hackrf/releases


HackRF One https://github.com/mossmann/hackrf/wiki/HackRF-One

FAQ https://github.com/mossmann/hackrf/wiki/FAQ

How to build the host software on Linux https://github.com/mossmann/hackrf/tree/master/host

Operating System Tips https://github.com/mossmann/hackrf/wiki/Operating-System-Tips

How we can Decide for set BB gain, IF gain, RF gain??? https://www.edaboard.com/showthread.php?364402-How-we-can-Decide-for-set-BB-gain-IF-gain-RF-gain

Gains

How we can Decide for set BB gain, IF gain, RF gain??? https://www.edaboard.com/showthread.php?364402-How-we-can-Decide-for-set-BB-gain-IF-gain-RF-gain

HackRF TX amplifier test, RF, IF, BB Gain to very high values https://www.reddit.com/r/hackrf/comments/8g0uh6/hackrf_tx_amplifier_test_rf_if_bb_gain_to_very/

FAQ https://github.com/mossmann/hackrf/wiki/FAQ

Firmware

mossmann/hackrf https://github.com/mossmann/hackrf/tree/master/firmware

Updating Firmware https://github.com/mossmann/hackrf/wiki/Updating-Firmware

How to fix fatal GCC-ARM error: stdint.h: No such file or directory https://www.youtube.com/watch?v=G8UoYFKD4no

no stdint.h file on Debian https://stackoverflow.com/questions/23973971/no-stdint-h-file-on-debian

stdint.h: No such file or directory https://devzone.nordicsemi.com/f/nordic-q-a/16584/stdint-h-no-such-file-or-directory

Hardware

Tips and Tricks https://github.com/mossmann/hackrf/wiki/Tips-and-Tricks

USB(?) interference via antenna from the lowest frequencies to above 190 MHz #544 https://github.com/mossmann/hackrf/issues/544

HackRF Sensitivity https://forums.radioreference.com/threads/hackrf-sensitivity.316834/

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 https://www.reddit.com/r/hackrf/comments/9ht7ef/kalibratehackrf_not_picking_up_gsm/

Is it right (wildly inconsistent results on different channels, e.g. -33.570 ppm vs 38.369 ppm) #6 https://github.com/scateu/kalibrate-hackrf/issues/6

Wrong ARFCN and frequencies – is -E needed? #24 https://github.com/scateu/kalibrate-hackrf/issues/24

what’s accuracy of SDR oscillator in HackRF one? for example, the USRP1 to 20 parts per million (ppm) #379 https://github.com/mossmann/hackrf/issues/379

SDR calibration via GSM FCCH using Kalibrate and LTE-Cell-Scanner on RTL-SDR and HackRF https://medium.com/@rxseger/sdr-calibration-via-gsm-fcch-using-kalibrate-and-lte-cell-scanner-on-rtl-sdr-and-hackrf-193a7fb8a3eb

LTE Calibration

SDR calibration via GSM FCCH using Kalibrate and LTE-Cell-Scanner on RTL-SDR and HackRF https://medium.com/@rxseger/sdr-calibration-via-gsm-fcch-using-kalibrate-and-lte-cell-scanner-on-rtl-sdr-and-hackrf-193a7fb8a3eb

Range of results from Kalibrate https://www.reddit.com/r/RTLSDR/comments/3sj650/range_of_results_from_kalibrate/

rxseger/LTE-Cell-Scanner forked from JiaoXianjun/LTE-Cell-Scanner https://github.com/rxseger/LTE-Cell-Scanner

JiaoXianjun/LTE-Cell-Scanner forked from Evrytania/LTE-Cell-Scanner https://github.com/JiaoXianjun/LTE-Cell-Scanner

Evrytania/LTE-Cell-Scanner https://github.com/Evrytania/LTE-Cell-Scanner

troubles

https://stackoverflow.com/questions/50868322/importerror-no-module-named-yaml/50868994


HOME | GUIDES | LECTURES | LAB | SMTP HEALTH | HTML5 | CONTACT
Copyright © 2024 Pierre-Philipp Braun