Difference between revisions of "HackRF One: Setup"
LPuehringer (talk | contribs) |
|||
(9 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
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. | 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. | |||
== Requirements == | == Requirements == | ||
Line 14: | Line 15: | ||
First, update your machine: | First, update your machine: | ||
sudo apt-get update | sudo apt-get update | ||
sudo apt upgrade | sudo apt upgrade | ||
Then install the hackrf tool and libraries: | Then install the hackrf tool and libraries: | ||
sudo apt install hackrf libhackrf-dev libhackrf0 | sudo apt install hackrf libhackrf-dev libhackrf0 | ||
Now install GQRX: | Now install GQRX: | ||
sudo apt install gqrx-sdr | sudo apt install gqrx-sdr | ||
If that does not work use: | If that does not work use: | ||
sudo aptitude install gqrx-sdr | sudo aptitude install gqrx-sdr | ||
We also must download the newest firmware from this Git repository: | We also must download the newest firmware from this Git repository: | ||
https://github.com/mossmann/hackrf/releases | https://github.com/mossmann/hackrf/releases | ||
Download the | |||
=== Installation under Windows using Zadig === | |||
Download the latest release from: | |||
https://zadig.akeo.ie/ | |||
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. | |||
[[File:ZadigHackRFOne.png]] | |||
=== Check HackRF One === | === Check HackRF One === | ||
Line 42: | Line 53: | ||
Now we can check if the HackRF one is recognized by the machine: | Now we can check if the HackRF one is recognized by the machine: | ||
hackrf_info | |||
When everything is correct you should see an output like this: | When everything is correct you should see an output like this: | ||
Line 49: | Line 62: | ||
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: | 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: | 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. | Now restart the HackRF One by simply unplugging and plugging back in. You can now check if the version was updated. | ||
Line 70: | Line 87: | ||
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. | 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 == | == Used Hardware == | ||
* HackRF One | * [[HackRF One Software Defined Radio (SDR)]] | ||
* Antenna (Antratek ANT500) | * Antenna (Antratek ANT500) | ||
Line 85: | Line 101: | ||
* https://miloserdov.org/?p=4370 | * https://miloserdov.org/?p=4370 | ||
* https://github.com/mossmann/hackrf/wiki/Getting-Started-with-HackRF-and-GNU-Radio | * https://github.com/mossmann/hackrf/wiki/Getting-Started-with-HackRF-and-GNU-Radio | ||
* https://hackrf.readthedocs.io/en/latest/index.html | |||
[[Category:Documentation]] | [[Category:Documentation]] |
Latest revision as of 09:01, 2 March 2023
Summary
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.
Requirements
- Operating system: Any Linux Distribution but preferably Kali or Pentoo
Description
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:
https://github.com/mossmann/hackrf/releases
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:
hackrf_info
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
- HackRF One Software Defined Radio (SDR)
- Antenna (Antratek ANT500)
Courses
- Wahlfach Projekt 1 (2021)