Skip to content

Commit 4984b6f

Browse files
committed
Updated hackrf library to v2023.01.1
hackrf library is now a submodule with patch applied to hackrf_sweep.c for easier future updates. Requires firmware on the hackrf to be updated as well to run now.
1 parent 257e737 commit 4984b6f

File tree

337 files changed

+428
-554301
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

337 files changed

+428
-554301
lines changed

.gitmodules

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[submodule "src/hackrf-sweep/lib/hackrf"]
2+
path = src/hackrf-sweep/lib/hackrf
3+
url = https://github.com/greatscottgadgets/hackrf.git
4+
ignore = dirty

Readme.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ Linux: read Installation section below
1717
- hackrf_sweep integrated as a shared library
1818

1919
### Requirements:
20-
* HackRF One with [Firmware 2017.02.1](https://github.com/mossmann/hackrf/releases/tag/v2017.02.1) or newer (use linux inside virtual machine to [update the firmware](https://github.com/mossmann/hackrf/wiki/Updating-Firmware))
20+
* HackRF One with [Firmware 2023.01.1](https://github.com/mossmann/hackrf/releases/tag/v2023.01.1) or newer
21+
(use linux inside VM and [update the firmware](https://hackrf.readthedocs.io/en/latest/updating_firmware.html))
2122

2223
### Installation:
2324
Make sure HackRF is using at least the minimum firmware version (see above)
@@ -27,7 +28,7 @@ Windows:
2728
1. Install Java JRE 64bit v1.8+
2829
1. [Download the latest version of Spectrum Analyzer](https://github.com/pavsa/hackrf-spectrum-analyzer/releases) and unzip
2930
1. Install HackRF as a libusb device
30-
1. [Download Zadig](src/hackrf-sweep/lib/zadig_2.2.exe) and run
31+
1. [Download Zadig](https://zadig.akeo.ie/) and install
3132
2. Goto Options and check List All Devices
3233
3. Find "HackRF One" and select Driver "WinUSB" and click install
3334
1. Install (if you don't have one installed) [Java JRE for Windows x64](http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html)

src/hackrf-sweep/.classpath

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<classpathentry kind="lib" path="miglayout15-swing.jar" sourcepath="miglayout-src.zip"/>
1010
<classpathentry kind="lib" path="lib/jcommon-1.0.17.jar"/>
1111
<classpathentry kind="lib" path="lib/jfreechart-1.0.14.jar"/>
12-
<classpathentry kind="lib" path="lib/jna/jna-4.5.1.jar"/>
1312
<classpathentry kind="lib" path="lib/hackrf-sweep-jna.jar"/>
13+
<classpathentry kind="lib" path="lib/jna/jna-5.13.0.jar"/>
1414
<classpathentry kind="output" path="bin"/>
1515
</classpath>

src/hackrf-sweep/Makefile

+6-2
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ ZIP_FILE_PATH = $(OUTPUT_DLL_DIR)/../../$(ZIP_FILE)
8181
.NOTPARALLEL: all
8282
.PHONY: all
8383

84-
all: prepare $(MAIN_JAR) $(DLL_LIB) $(ZIP_FILE_PATH)
84+
all: patch_hackrf prepare $(MAIN_JAR) $(DLL_LIB) $(ZIP_FILE_PATH)
8585

8686
.PHONY: dirs
8787
dirs:
@@ -99,6 +99,11 @@ $(ZIP_FILE_PATH): $(DLL_LIB) $(DLL_LIB_WIN)
9999
cd $(OUTPUT_DLL_DIR)/../../ && rm -rf $(ZIP_FILE) && zip -r $(ZIP_FILE) *
100100
yes | cp -rf $(ZIP_FILE_PATH) $(RELEASE_DIR)
101101

102+
.PHONY: patch_hackrf
103+
patch_hackrf:
104+
# format the src # clang-format --style=file:../../../.clang-format -i hackrf_sweep.c
105+
(cd lib/hackrf/ && git reset --hard v2023.01.1 && git apply < ../../src-c/0001-hackrf_sweep-to-library-conversion.patch)
106+
102107
.PHONY: prepare
103108
prepare: dirs $(OBJECTS) $(OBJECTS_WIN) $(DLL_LIB_FFTW)
104109
mkdir -p $(OUTPUT_DLL_DIR) $(OUTPUT_DLL_DIR_WIN)
@@ -107,7 +112,6 @@ prepare: dirs $(OBJECTS) $(OBJECTS_WIN) $(DLL_LIB_FFTW)
107112
cp lib/launchers/hackrf_sweep_spectrum_analyzer_windows.cmd $(OUTPUT_PATH)
108113
chmod +x $(OUTPUT_PATH)/hackrf_sweep_spectrum_analyzer_linux.sh #linux launcher
109114
cp -f $(DLL_LIB_FFTW) $(DLL_LIB_PTHREAD) $(DLL_LIB_USB) $(OUTPUT_DLL_DIR_WIN)
110-
cp -f lib/zadig-2.5.exe $(OUTPUT_DLL_DIR_WIN)/../
111115

112116
# if native header in hackrf lib changes, rebuild with "make jnabridge" - but openjdk-8 is required - jnaerator does not work with jdk9+
113117
.PHONY: jnabridge

src/hackrf-sweep/lib/hackrf

Submodule hackrf added at b42a185

src/hackrf-sweep/lib/hackrf/.gitignore

-70
This file was deleted.

src/hackrf-sweep/lib/hackrf/.travis.yml

-62
This file was deleted.

0 commit comments

Comments
 (0)