Compare commits

...
Sign in to create a new pull request.

847 commits

Author SHA1 Message Date
antoinevg
7593b15dbd
Merge pull request #1801 from greatscottgadgets/antoinevg/fpga-control-timeout
Some checks failed
Build / firmware (UNIVERSAL, latest, ubuntu) (push) Failing after 5s
Check code style / clang-format (push) Failing after 5s
Check code style / clang-format-1 (push) Failing after 5s
Check code style / clang-format-2 (push) Failing after 4s
Check code style / clang-format-3 (push) Failing after 4s
Check includes / includes-check (JAWBREAKER, 3.12.0) (push) Failing after 6s
Check includes / includes-check (HACKRF_ONE, 3.12.0) (push) Failing after 8s
Check includes / includes-check (HACKRF_ONE, latest) (push) Failing after 10s
Check includes / includes-check (JAWBREAKER, latest) (push) Failing after 5s
Check includes / includes-check (PRALINE, 3.12.0) (push) Failing after 4s
Check includes / includes-check (PRALINE, latest) (push) Failing after 3s
Check includes / includes-check (RAD1O, 3.12.0) (push) Failing after 3s
Check includes / includes-check (UNIVERSAL, 3.12.0) (push) Failing after 3s
Check includes / includes-check (RAD1O, latest) (push) Failing after 3s
Check includes / includes-check (UNIVERSAL, latest) (push) Failing after 4s
Build / host (3.21.7, -DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake --install-prefix=$env:GITHUB_WORKSPACE/install, msvc, Visual Studio 17 2022, --install, 17.1… (push) Has been cancelled
Build / host (4.2.6, -DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake --install-prefix=$env:GITHUB_WORKSPACE/install, msvc, Visual Studio 18 2026, --install, lates… (push) Has been cancelled
Build / host (latest, --install-prefix=/usr/local, gcc, MSYS Makefiles, --install, latest, windows, msys2) (push) Has been cancelled
Build / firmware (HACKRF_ONE, latest, windows) (push) Has been cancelled
Build / firmware (JAWBREAKER, latest, windows) (push) Has been cancelled
Build / host (3.10.0, gcc, Unix Makefiles, --target install, --build, macos, bash, sudo) (push) Has been cancelled
Build / host (latest, -DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake --install-prefix=$env:GITHUB_WORKSPACE/install, msvc, Visual Studio 18 2026, --install, late… (push) Has been cancelled
Build / host (latest, gcc, Unix Makefiles, --install, latest, macos, bash, sudo) (push) Has been cancelled
Build / firmware (UNIVERSAL, latest, macos) (push) Has been cancelled
Build / firmware (UNIVERSAL, latest, windows) (push) Has been cancelled
Build / firmware (PRALINE, 3.12.0, macos) (push) Has been cancelled
Build / firmware (PRALINE, latest, macos) (push) Has been cancelled
Build / firmware (PRALINE, latest, windows) (push) Has been cancelled
Build / firmware (RAD1O, latest, windows) (push) Has been cancelled
Build / firmware (UNIVERSAL, 3.12.0, macos) (push) Has been cancelled
libhackrf: Set a 500ms timeout for changing fpga bitstream
2026-07-22 17:58:57 +02:00
antoinevg
912c0fd20a
Merge pull request #1798 from greatscottgadgets/antoinevg/rename-radio-bank-active
Rename RADIO_BANK_ACTIVE to RADIO_BANK_REQUESTED
2026-07-22 17:58:51 +02:00
Antoine van Gelder
6259086c96
libhackrf: set a 500ms timeout for changing fpga bitstream 2026-07-21 11:44:26 +02:00
Antoine van Gelder
2b7ba8d7ab
radio: rename RADIO_BANK_ACTIVE to RADIO_BANK_REQUESTED 2026-07-16 12:31:31 +02:00
Michael Ossmann
5da69aa411
Merge pull request #1790 from martinling/radio-clock-correction
Add radio clock correction register
2026-07-09 12:10:40 -04:00
Martin Ling
8bfbd716da Add RADIO_CLOCK_CORRECTION register, bump USB API to 1.13. 2026-06-30 14:20:31 +01:00
Martin Ling
dda161cb1f Add multiply & divide implementations for 128-bit unsigned integers. 2026-06-30 12:00:52 +01:00
Martin Ling
74c3b730fa Add 1.63 fixed point type. 2026-06-30 08:44:40 +01:00
Michael Ossmann
8dbb3475da
Merge pull request #1760 from greatscottgadgets/hil-locks
HIL resource locks
2026-06-26 14:14:43 -04:00
Jacob Graves
d6548b1f46
Merge pull request #1784 from greatscottgadgets/win-ci-fix
CI: Adjust CMake generators to supported Visual Studio versions
2026-06-25 11:34:40 -07:00
Martin Ling
95a30a9840
Merge pull request #1781 from martinling/portapack-detection
Simplify PortaPack detection and init API
2026-06-17 19:07:53 +01:00
Martin Ling
57fc841ddb
Merge pull request #1783 from martinling/i2c-khz
Make I2C startup & clock speed consistent
2026-06-17 10:26:55 +01:00
Michael Ossmann
be669ce370
Merge pull request #1776 from mndza/cic-default-factor
gateware: CIC defaults to the minimum resampling factor
2026-06-16 10:02:49 -04:00
Martin Ling
1dfa0742d6
Merge pull request #1780 from martinling/r9-mcu-clk
Fix management of CLKOUT/MCU_CLK synth sharing on H1R9
2026-06-16 12:54:56 +01:00
Martin Ling
eb8bc546a8 CI: Build with more CMake and Visual Studio versions. 2026-06-15 18:21:29 +01:00
Martin Ling
3e274a881d CI: Simplify install steps. 2026-06-15 16:40:55 +01:00
Martin Ling
73562ded31 CI: Simplify host build matrix and specify CMake generators. 2026-06-15 14:45:04 +01:00
Martin Ling
aa76109b6a CI: Bump actions/checkout to v6. 2026-06-15 13:31:22 +01:00
Martin Ling
d6913807a6 Specify I2C clock in kHz, and adjust for CPU clock changes. 2026-06-15 11:58:33 +01:00
Martin Ling
3afd5d2acd Move i2c_bus_start calls out of clock_gen_init and clock_gen_shutdown. 2026-06-15 11:56:10 +01:00
Martin Ling
092d034d80 Simplify PortaPack detection and init API.
Some checks failed
Check code style / clang-format-2 (push) Failing after 12s
Check code style / clang-format-3 (push) Failing after 10s
Check includes / includes-check (HACKRF_ONE, latest) (push) Failing after 7s
Check includes / includes-check (JAWBREAKER, 3.12.0) (push) Failing after 7s
Check includes / includes-check (JAWBREAKER, latest) (push) Failing after 6s
Check includes / includes-check (HACKRF_ONE, 3.12.0) (push) Failing after 5s
Check includes / includes-check (PRALINE, 3.12.0) (push) Failing after 7s
Check includes / includes-check (PRALINE, latest) (push) Failing after 7s
Check includes / includes-check (RAD1O, 3.12.0) (push) Failing after 8s
Check includes / includes-check (RAD1O, latest) (push) Failing after 6s
Check includes / includes-check (UNIVERSAL, 3.12.0) (push) Failing after 7s
Check includes / includes-check (UNIVERSAL, latest) (push) Failing after 4s
Build / host (3.10.0, map[os:macos shell:bash]) (push) Has been cancelled
Build / host (3.16.0, map[os:macos shell:bash]) (push) Has been cancelled
Build / host (3.21.0, -DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake --install-prefix=$env:GITHUB_WORKSPACE/install, map[os:windows shell:pwsh]) (push) Has been cancelled
Build / host (3.21.0, map[os:macos shell:bash]) (push) Has been cancelled
Build / host (4.0.0, -DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake --install-prefix=$env:GITHUB_WORKSPACE/install, map[os:windows shell:pwsh]) (push) Has been cancelled
Build / host (4.0.0, map[os:macos shell:bash]) (push) Has been cancelled
Build / firmware (UNIVERSAL, 3.12.0, macos) (push) Has been cancelled
Build / firmware (UNIVERSAL, latest, macos) (push) Has been cancelled
Build / host (latest, --install-prefix=/usr/local, map[os:windows shell:msys2]) (push) Has been cancelled
Build / host (latest, -DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake --install-prefix=$env:GITHUB_WORKSPACE/install, map[os:windows shell:pwsh]) (push) Has been cancelled
Build / host (latest, map[os:macos shell:bash]) (push) Has been cancelled
Build / firmware (HACKRF_ONE, latest, windows) (push) Has been cancelled
Build / firmware (JAWBREAKER, latest, windows) (push) Has been cancelled
Build / firmware (PRALINE, 3.12.0, macos) (push) Has been cancelled
Build / firmware (PRALINE, latest, macos) (push) Has been cancelled
Build / firmware (PRALINE, latest, windows) (push) Has been cancelled
Build / firmware (RAD1O, latest, windows) (push) Has been cancelled
Build / firmware (UNIVERSAL, latest, windows) (push) Has been cancelled
2026-06-12 17:09:49 +01:00
Martin Ling
42b7f7703d Fix management of CLKOUT/MCU_CLK synth sharing on H1R9. 2026-06-12 16:00:48 +01:00
Martin Ling
bb1f835403
Merge pull request #1779 from martinling/mcu-pll-b
Use PLL B for MCU_CLKIN on Praline
2026-06-12 09:59:44 +01:00
Martin Ling
9153f3d55e Use PLL B for MCU_CLKIN on Praline.
Some checks failed
Check includes / includes-check (HACKRF_ONE, 3.12.0) (push) Failing after 6s
Check code style / clang-format-2 (push) Failing after 11s
Check code style / clang-format-3 (push) Failing after 9s
Check includes / includes-check (JAWBREAKER, 3.12.0) (push) Failing after 2s
Check includes / includes-check (HACKRF_ONE, latest) (push) Failing after 4s
Check includes / includes-check (JAWBREAKER, latest) (push) Failing after 3s
Check includes / includes-check (PRALINE, 3.12.0) (push) Failing after 3s
Check includes / includes-check (PRALINE, latest) (push) Failing after 3s
Check includes / includes-check (RAD1O, 3.12.0) (push) Failing after 3s
Check includes / includes-check (RAD1O, latest) (push) Failing after 2s
Check includes / includes-check (UNIVERSAL, 3.12.0) (push) Failing after 4s
Check includes / includes-check (UNIVERSAL, latest) (push) Failing after 3s
Build / host (3.10.0, map[os:macos shell:bash]) (push) Has been cancelled
Build / host (3.16.0, map[os:macos shell:bash]) (push) Has been cancelled
Build / host (latest, -DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake --install-prefix=$env:GITHUB_WORKSPACE/install, map[os:windows shell:pwsh]) (push) Has been cancelled
Build / host (latest, map[os:macos shell:bash]) (push) Has been cancelled
Build / host (3.21.0, -DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake --install-prefix=$env:GITHUB_WORKSPACE/install, map[os:windows shell:pwsh]) (push) Has been cancelled
Build / host (3.21.0, map[os:macos shell:bash]) (push) Has been cancelled
Build / host (4.0.0, -DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake --install-prefix=$env:GITHUB_WORKSPACE/install, map[os:windows shell:pwsh]) (push) Has been cancelled
Build / host (4.0.0, map[os:macos shell:bash]) (push) Has been cancelled
Build / host (latest, --install-prefix=/usr/local, map[os:windows shell:msys2]) (push) Has been cancelled
Build / firmware (HACKRF_ONE, latest, windows) (push) Has been cancelled
Build / firmware (JAWBREAKER, latest, windows) (push) Has been cancelled
Build / firmware (PRALINE, 3.12.0, macos) (push) Has been cancelled
Build / firmware (PRALINE, latest, macos) (push) Has been cancelled
Build / firmware (PRALINE, latest, windows) (push) Has been cancelled
Build / firmware (RAD1O, latest, windows) (push) Has been cancelled
Build / firmware (UNIVERSAL, 3.12.0, macos) (push) Has been cancelled
Build / firmware (UNIVERSAL, latest, macos) (push) Has been cancelled
Build / firmware (UNIVERSAL, latest, windows) (push) Has been cancelled
2026-06-11 20:23:35 +01:00
Michael Ossmann
bd2440277d
Merge pull request #1751 from martinling/si5351c-next
Further work on Si5351 driver
2026-06-09 11:27:04 -04:00
Martin Ling
404429de2a
Merge pull request #1753 from martinling/reduce-pins-setup
Reduce dependencies of `pins.c`
2026-06-09 13:57:34 +01:00
Martin Ling
fd470d078d
Merge pull request #1766 from martinling/delay-cleanup
Clean up delay functions
2026-06-09 13:04:48 +01:00
Martin Ling
977a9d24a6 Move ice40-related bits out of pins_setup. 2026-06-08 17:02:59 +01:00
Martin Ling
0585339269 Move cpld_jtag-related bits out of pins_setup. 2026-06-08 17:02:59 +01:00
Martin Ling
d534e1d019 Move mixer-related bits out of pins_setup. 2026-06-08 17:02:59 +01:00
Martin Ling
e3ffbf68f0 Move rf_path-related bits out of pins_setup. 2026-06-08 17:02:59 +01:00
Martin Ling
b533e1c5dc Move sgpio-related bits out of pins_setup. 2026-06-08 17:02:59 +01:00
Martin Ling
9c0a211f13 Move w25q80bv-related bits out of pins_setup. 2026-06-08 17:02:55 +01:00
Martin Ling
a7925bd74e Remove some superfluous spi_bus_setup calls. 2026-06-08 17:02:21 +01:00
Martin Ling
9d6e43a1cb Move max5864-related bits out of pins_setup. 2026-06-08 16:52:16 +01:00
Martin Ling
c77c962b71 Move max283x-related bits out of pins_setup. 2026-06-08 16:52:16 +01:00
Martin Ling
a716b642ec si5351c: Move other globals into driver struct. 2026-06-08 16:31:28 +01:00
Martin Ling
ff052af352 si5351c: Move the clk array into the driver struct. 2026-06-08 16:31:28 +01:00
Martin Ling
7a0e31f4aa
Merge pull request #1765 from martinling/spi-config-management
Automatic SPI bus reconfiguration
2026-06-08 15:43:45 +01:00
Martin Ling
595ea6c072 Make switching SPI bus modes automatic. 2026-06-04 17:29:03 +01:00
Michael Ossmann
6761b6a429
Merge pull request #1775 from therealdreg/main
Add SigDigger support information to documentation
2026-06-03 10:51:15 -04:00
Michael Ossmann
c2db36265c
Merge pull request #1773 from mndza/gateware-docs
Add gateware documentation
2026-06-03 10:33:34 -04:00
mndza
e32695e24f
gateware: CIC defaults to the minimum resampling factor 2026-06-03 10:12:36 +02:00
mndza
5d9b6bf411
add gateware documentation 2026-06-03 08:59:50 +02:00
Dreg
4f9f6a4c74
Add SigDigger support information to documentation 2026-06-03 02:41:37 +02:00
Martin Ling
b86b139305 Express all delays as delay_us() or delay_ms(). 2026-06-02 16:55:17 +01:00
Martin Ling
eb2e6a1c05 Move SSP0 and SSP1 bus instances to spi_ssp.{c,h}. 2026-05-28 16:37:18 +01:00
Michael Ossmann
74d0437e6b
Merge pull request #1761 from martinling/remove-sample-rate-callback
Remove sample rate callback, move radio instance to `radio.c`.
2026-05-28 11:06:47 -04:00
Michael Ossmann
cc69102202
Merge pull request #1762 from mndza/fix-spiflash-requests
Fix reads with hackrf_spiflash when size is a multiple of 64 bytes.
2026-05-25 09:46:30 -04:00
mndza
7cce66a7fa
Fix reads with hackrf_spiflash when size is a multiple of 64 bytes. 2026-05-22 08:18:17 +02:00
Martin Ling
62229fdf73 Remove sample rate callback, move radio instance to radio.c. 2026-05-21 18:40:44 +01:00
Martin Ling
c2262ccda1 si5351c: Add control of MCU_CLKIN output. 2026-05-21 15:34:47 +01:00
Michael Ossmann
621fc1dc3a
Merge pull request #1759 from martinling/move-i2c-defs
Move LPC43xx I2C instances and config to `i2c_lpc.{c,h}`
2026-05-20 10:08:53 -04:00
grvvy
6c01a078d5 Jenkinsfile: ensure device resets occur between test runs 2026-05-19 15:27:11 -06:00
grvvy
62cdff3448 Jenkinsfile: add resource locks to HIL USB hubs to allow for concurrent builds 2026-05-19 15:26:51 -06:00
Martin Ling
835e7b618a Move LPC43xx I2C instances and configs to ipc_lpc.{c,h}. 2026-05-19 17:57:07 +01:00
Martin Ling
9423133c4b si5351c: Make clk array persistent, setup in init, include OE flags. 2026-05-19 16:57:15 +01:00
Martin Ling
4c69adb9da si5351c: API: change argument of si5351c_clkout_enable to bool. 2026-05-19 16:40:44 +01:00
Martin Ling
50ce90908f si5351c: Wait for SYS_INIT flag to clear during startup. 2026-05-19 16:40:44 +01:00
Michael Ossmann
49bce311e2
Merge pull request #1755 from martinling/font-edit
Add script to extract font data to an image file for editing.
2026-05-18 14:39:04 -04:00
Michael Ossmann
06453e2924
Merge pull request #1757 from martinling/cpld-fix
Fix up IWYU issues in cpld_jtag.{c,h}
2026-05-18 14:14:00 -04:00
Martin Ling
dc255468b1 Fix up IWYU issues in cpld_jtag.{c,h}. 2026-05-18 17:31:57 +01:00
Michael Ossmann
76dd5916a7
Merge pull request #1752 from martinling/move-cpld-load
Move `cpld_jtag_sram_load` into `cpld_jtag.c`
2026-05-18 11:52:49 -04:00
Michael Ossmann
2d1f53d730
Merge pull request #1750 from greatscottgadgets/old-iwyu
Fix compatibility with older IWYU
2026-05-18 11:42:36 -04:00
Michael Ossmann
8ddf7f7649
Merge pull request #1749 from martinling/default-control-timeout
libhackrf: Set timeouts for all USB transfers
2026-05-18 11:31:57 -04:00
Michael Ossmann
c77e7e7358
Merge pull request #1747 from martinling/si5351c-defs
Si5351C refactoring
2026-05-18 11:20:03 -04:00
Martin Ling
478a520d65 Add script to extract font data to an image file for editing. 2026-05-18 14:42:16 +01:00
Martin Ling
016910567b si5351c: internal: reimplement using register helpers. 2026-05-14 22:25:55 +01:00
Martin Ling
a1cdbaddbf si5351c: internal: Add register definitions and helpers. 2026-05-14 22:25:39 +01:00
Martin Ling
098b9dd9f2 si5351c: API: distinguish between PLL IDs and PLL masks.
We're going to want a type that just identifies one PLL, and is
consistent with how the PLLs are numbered in register settings.

The current si5351c_pll_t is a bitmask which allows referring to
both PLLs. Let's make that a different type, and name things more
clearly when using it.
2026-05-14 22:25:35 +01:00
Martin Ling
d00dae3835 si5351c: API: change terminology to refer to XTAL/CLKIN as "inputs".
There are multiple similar but different things called a "source"
or "clock source", or that are set in a register called "SRC", in the
context of the Si5351 and its usage in HackRF.

One place we can be unambiguous is that there are only two inputs to
the Si5351C itself: XTAL and CLKIN. Let's have a type for that alone,
and name it as such when we use it.

There should be no functional changes in this commit.
2026-05-14 22:24:04 +01:00
Martin Ling
b460014811 Move cpld_jtag_sram_load() into cpld_jtag.c. 2026-05-13 21:52:51 +01:00
Martin Ling
fe060fd04b libhackrf: Set timeouts for all USB transfers. 2026-05-11 12:19:29 +01:00
Michael Ossmann
db44436fda Remove redundant includes 2026-05-07 19:30:30 -04:00
Michael Ossmann
6ff7f8ed63 Fix IWYU --keep syntax for compatibility with 0.22 2026-05-07 18:56:53 -04:00
Martin Ling
e9b2ff852c
Merge pull request #1738 from antoinevg/antoinevg/move-platform-defs-to-cmake
Move platform preprocessor definitions to cmake
2026-05-07 16:36:25 +01:00
Martin Ling
23104c7bd9
firmware: bump CMake requirement to 3.12. 2026-05-07 14:38:39 +02:00
Antoine van Gelder
01ffff68ee
firmware: remove spurious platform_detect.h includes 2026-05-07 14:38:39 +02:00
Antoine van Gelder
9c81954b1b
firmware: move platform preprocessor definitions to cmake 2026-05-07 14:38:38 +02:00
Michael Ossmann
3bbd0702b1
Merge pull request #1746 from greatscottgadgets/fix-fpga-config
Improve pins_shutdown()
2026-05-06 10:45:12 -04:00
Michael Ossmann
475db9c53a
Merge pull request #1745 from antoinevg/antoinevg/organize-drivers
Firmware: Move driver instances into driver implementation files
2026-05-05 11:00:03 -04:00
Michael Ossmann
181946c78a
Merge pull request #1741 from martinling/picoprintf
Use picoprintf for formatting
2026-05-05 09:10:35 -04:00
Antoine van Gelder
8bdefc2d89
firmware: remove drivers.x 2026-05-04 09:52:51 +02:00
Antoine van Gelder
8569c1dfd2
firmware: move fpga object instance to fpga.x 2026-05-04 09:52:51 +02:00
Antoine van Gelder
d0f61abcd7
firmware: move ice40 driver instance to ice40_spi.x 2026-05-04 09:52:51 +02:00
Antoine van Gelder
90ab84ba28
firmware: move jtag_cpld driver instance to cpld_jtag.x 2026-05-04 09:52:51 +02:00
Martin Ling
9688caaf1c ui_rad1o: Eliminate use of sprintf. 2026-05-01 15:37:57 +01:00
Martin Ling
f73c2b8e6a rad1o: Add formatting support to rad1o_lcdPrint. 2026-05-01 15:37:57 +01:00
Martin Ling
ec1ff486b4 picoprintf: Enable additional features. 2026-05-01 15:37:57 +01:00
Martin Ling
f970722195 picoprintf: Standardize code style. 2026-05-01 15:37:57 +01:00
Martin Ling
a20da328ba picoprintf: use #pragma once. 2026-05-01 15:37:57 +01:00
Martin Ling
83fd6a00a8 picoprintf: Fix unused variable warnings with GCC 15.2. 2026-05-01 15:37:57 +01:00
Martin Ling
5b4392f609 picoprintf: add LICENSE text to source & header files. 2026-05-01 15:37:57 +01:00
Martin Ling
58334a565b picoprintf: remove unnecessary picobool.h.
We don't require workarounds for ancient C environments.
2026-05-01 15:37:57 +01:00
Martin Ling
e8cfb86e10 Add picoprintf to RAD1O firmware build.
Code taken from https://github.com/rom-p/picoprintf @ dfb7f93.
2026-05-01 15:37:57 +01:00
Michael Ossmann
a426b7518d Improve pins_shutdown() 2026-05-01 09:53:43 -04:00
Antoine van Gelder
47f91d29cf
firmware: move sgpio_config configuration instance to sgpio.x 2026-04-30 16:24:33 +02:00
Michael Ossmann
b97d1978b0
Merge pull request #1744 from martinling/radio-ui-rounding
Round displayed values to nearest kHz in rad1o UI
2026-04-30 09:58:32 -04:00
Antoine van Gelder
9a3abb6413
firmware: move rf_path object instance to rf_path.x 2026-04-30 15:41:59 +02:00
Antoine van Gelder
c8a0b02d85
firmware: move mixer object's extern instance to mixer.h 2026-04-30 15:41:53 +02:00
Antoine van Gelder
3efc8bdbb6
firmware: move max5864 driver instance to max5864.x 2026-04-30 15:30:00 +02:00
Antoine van Gelder
76252016b6
firmware: rename si5351c driver instance 'clock_gen' to 'si5351c' 2026-04-30 15:22:11 +02:00
Antoine van Gelder
01a3b34542
firmware: move si5351c driver instance 'clock_gen' to si5351c.x 2026-04-30 15:22:11 +02:00
Martin Ling
5d7b6c33cf ui_rad1o: Round displayed frequencies to nearest kHz. 2026-04-30 14:15:05 +01:00
Martin Ling
f655bec11f ui_rad1o: use a helper function for printing frequencies. 2026-04-30 14:14:41 +01:00
Martin Ling
ac93a68a02 ui_rad1o: remove unnecessary include. 2026-04-30 14:11:45 +01:00
Antoine van Gelder
e5c8dc2350
firmware: move max283x driver instance to max283x.x 2026-04-30 15:03:48 +02:00
Antoine van Gelder
4f44917f68
firmware: move w25q80vc driver instance to w25q80bv.x 2026-04-30 14:55:09 +02:00
Antoine van Gelder
858ffd268a
firmware: move i2c_bus0, i2c_bus1 driver instances to i2c_bus.x 2026-04-30 14:55:09 +02:00
Antoine van Gelder
1af5055720
firmware: move spi_bus_ssp0, spi_bus_ssp1 driver instances to spi_bus.x 2026-04-30 14:55:04 +02:00
Antoine van Gelder
f1ece3769c
firmware: move radio_t object instance to hackrf_usb binary 2026-04-30 14:54:41 +02:00
Michael Ossmann
a23503812f
Merge pull request #1601 from martinling/extra-buffer
Firmware: Add an additional layer of DMA-assisted sample buffering
2026-04-30 08:32:42 -04:00
Martin Ling
03119000a4 Use DMA for transfers. 2026-04-30 11:48:04 +01:00
Martin Ling
5afdd6dfef If the host knows our buffer size, don't auto-flush. 2026-04-30 11:46:51 +01:00
Martin Ling
90625818ad For API >= 1.12, get buffer size when opening device. 2026-04-30 11:46:51 +01:00
Martin Ling
9584416b49 Add vendor request to retrieve buffer size. 2026-04-30 11:46:51 +01:00
Martin Ling
3517d0adfc NAK the request that takes us out of TX mode until buffer flushed. 2026-04-30 11:46:51 +01:00
Martin Ling
ebe5a5acdf Read USB API version in hackrf_open() and cache it. 2026-04-30 11:46:51 +01:00
Martin Ling
cebf0c7ce1 Flush both buffers before leaving TX mode. 2026-04-30 11:46:50 +01:00
Martin Ling
0fb7b1c8c0 Reduce memory transfer size to 8KB. 2026-04-30 11:45:51 +01:00
Martin Ling
40a8dc53dc Use both buffers, with memcpy in place of DMA for now. 2026-04-30 11:45:51 +01:00
Martin Ling
d222e0188e Add new usb_bulk_buffer. 2026-04-30 11:45:51 +01:00
Martin Ling
ba5fe7f7da Rename usb_bulk_buffer to usb_samp_buffer. 2026-04-30 11:45:51 +01:00
Michael Ossmann
7efffeac52
Merge pull request #1702 from greatscottgadgets/p1-default
Change Praline CLKIN default to P1_CLKIN
2026-04-28 11:51:10 -04:00
Michael Ossmann
fd0c7cc5f1 Document Praline P1, P2, and CLKIN control 2026-04-28 11:19:15 -04:00
Michael Ossmann
3e1542261a Add CLKIN control option to hackrf_clock 2026-04-28 11:19:15 -04:00
Michael Ossmann
db376ad194 Change Praline CLKIN default to P1_CLKIN
Previously the CLKIN switch defaulted to P22_CLKIN, enabling usage of
the clock input on pin header P22 but not on SMA port P1. This change
enables use of clock input on P1 and disables P22_CLKIN by default.
2026-04-28 11:19:06 -04:00
Michael Ossmann
eaa858bf5d
Merge pull request #1710 from antoinevg/antoinevg/refactor-hackrf-core-pins
Rename `hackrf_core.x` to `pins.x` (3/3)
2026-04-28 10:15:20 -04:00
Antoine van Gelder
679179eb63
firmware: rename hackrf_core.x to pins.x 2026-04-28 11:07:40 +02:00
Michael Ossmann
10ab440b2f
Merge pull request #1737 from greatscottgadgets/fix-resample
Fix explicit resampling configuration
2026-04-24 10:20:28 -04:00
Michael Ossmann
60f7ccf4eb
Merge pull request #1709 from antoinevg/antoinevg/refactor-hackrf-core-drivers
Move `hackrf_core.x` driver instances to `drivers.x` (2/3)
2026-04-24 10:11:32 -04:00
Antoine van Gelder
adf83cbac2
firmware: move hackrf_core drivers & configurations to drivers.h|c 2026-04-24 09:17:42 +02:00
Michael Ossmann
f1c28bce5c
Merge pull request #1705 from antoinevg/antoinevg/refactor-hackrf-core
Refactor `hackrf_core.x` in preparation for removal. (1/3)
2026-04-23 14:37:02 -04:00
Michael Ossmann
49e7b18a18
Merge pull request #1736 from greatscottgadgets/biast-default
By default, turn off bias tee when radio idle
2026-04-23 11:17:17 -04:00
Antoine van Gelder
5672be9d00
firmware: move clock-associated gpio functions to clkin.x and rename to clock_io.h|c 2026-04-23 16:44:32 +02:00
Antoine van Gelder
e2741090ad
firmware: move narrowband_filter_set to rf_path.h|c 2026-04-23 16:24:01 +02:00
Antoine van Gelder
634bd605b9
firmware: move clkin_ctrl_set to clkin.h|c 2026-04-23 15:58:28 +02:00
Antoine van Gelder
799af35b5f
firmware: move led logic to leds.h|c 2026-04-23 15:54:28 +02:00
Antoine van Gelder
92476260ed
firmware: move power logic to power.h|c 2026-04-23 15:50:30 +02:00
Antoine van Gelder
b8cd1d51a7
firmware: move clock generator logic to clock_gen.h|c 2026-04-23 15:49:13 +02:00
Antoine van Gelder
902ae831bf
firmware: move cpu clock logic to cpu_clock.h|c 2026-04-23 15:38:44 +02:00
Michael Ossmann
230bfbc36f Allow explicit resampling ratio of 1 2026-04-22 13:41:26 -04:00
Michael Ossmann
4bd414194a Fix explicit TX interpolation 2026-04-21 17:11:31 -04:00
Michael Ossmann
f2962ce9b1 By default, turn off bias tee when radio idle
This matches the behavior before #1648.
2026-04-21 14:24:41 -04:00
Michael Ossmann
91439ec79e
Merge pull request #1715 from greatscottgadgets/universal-rebase
Unified Firmware Redux²
2026-04-20 10:25:15 -04:00
Martin Ling
f7a3d43407 Use IS macros for all conditional compilation. 2026-04-18 00:20:21 +01:00
Martin Ling
7a6b099624 firmware: Separate compile-time and runtime platform checks. 2026-04-18 00:19:31 +01:00
Martin Ling
439f6fd355 firmware: Use macros to simplify platform-specific code. 2026-04-18 00:19:26 +01:00
Martin Ling
d4b2091b12 max283x: Add macros to simplify variant-specific dispatch. 2026-04-18 00:12:38 +01:00
Martin Ling
9b5f342be0 max283x: Move platform switch inside max283x_setup(). 2026-04-18 00:12:38 +01:00
Martin Ling
421af49744 Jenkinsfile: add tests with BOARD=UNIVERSAL. 2026-04-18 00:12:38 +01:00
Martin Ling
6387a0b100 Add UNIVERSAL firmware build to GitHub Actions. 2026-04-18 00:12:38 +01:00
Martin Ling
3faa91ef85 Add UNIVERSAL board target. 2026-04-18 00:12:38 +01:00
Martin Ling
85dfacf6ef Universalize: firmware/hackrf_usb
Co-authored-by: Antoine van Gelder <antoine@greatscottgadgets.com>
2026-04-18 00:12:21 +01:00
Martin Ling
938c020f3b Universalize: hackrf_core.{c,h}, selftest.h
Co-authored-by: Antoine van Gelder <antoine@greatscottgadgets.com>
2026-04-17 20:24:44 +01:00
Martin Ling
6c4023e179 Universalize: radio.c
Co-authored-by: Antoine van Gelder <antoine@greatscottgadgets.com>
2026-04-17 20:24:32 +01:00
Martin Ling
54dfdd9174 Universalize: sgpio.{c,h}
Co-authored-by: Antoine van Gelder <antoine@greatscottgadgets.com>
2026-04-17 16:08:06 +01:00
Martin Ling
ed1a4d0e9e Universalize: w25q80bv.c
Co-authored-by: Antoine van Gelder <antoine@greatscottgadgets.com>
2026-04-17 16:08:06 +01:00
Martin Ling
9285573f0b Universalize: operacake_sctimer.c
Co-authored-by: Antoine van Gelder <antoine@greatscottgadgets.com>
2026-04-17 16:08:06 +01:00
Martin Ling
233951c9c9 Universalize: hackrf_ui.c
Co-authored-by: Antoine van Gelder <antoine@greatscottgadgets.com>
2026-04-17 16:08:06 +01:00
Martin Ling
275b75fc85 Universalize: tuning.{c,h}, tune_config.h
Co-authored-by: Antoine van Gelder <antoine@greatscottgadgets.com>
2026-04-17 16:06:56 +01:00
Martin Ling
3aaa7185bd Universalize: mixer.{c,h}, usb_api_register.c
Co-authored-by: Antoine van Gelder <antoine@greatscottgadgets.com>
2026-04-17 16:00:45 +01:00
Martin Ling
cdc17d5e67 Universalize: rf_path.{c,h}
Co-authored-by: Antoine van Gelder <antoine@greatscottgadgets.com>
2026-04-17 16:00:37 +01:00
Martin Ling
cfd729597c Universalize: si5351.c
Co-authored-by: Antoine van Gelder <antoine@greatscottgadgets.com>
2026-04-17 15:56:18 +01:00
Martin Ling
c913e81ed6 Universalize: rffc5071.{c,h}
Co-authored-by: Antoine van Gelder <antoine@greatscottgadgets.com>
2026-04-17 15:56:18 +01:00
Martin Ling
8d4570d2cb Universalize: max283x.{c,h}
Co-authored-by: Antoine van Gelder <antoine@greatscottgadgets.com>
2026-04-17 15:55:45 +01:00
Martin Ling
d0ac3183f5 Universalize: cpld_jtag.{c,h}
Co-authored-by: Antoine van Gelder <antoine@greatscottgadgets.com>
2026-04-17 15:40:42 +01:00
Martin Ling
6176dbcdd5 Universalize: platform_scu.{c,h}
Co-authored-by: Antoine van Gelder <antoine@greatscottgadgets.com>
2026-04-17 15:40:42 +01:00
Martin Ling
5120383da3 Universalize: platform_gpio.{c,h}
Co-authored-by: Antoine van Gelder <antoine@greatscottgadgets.com>
2026-04-17 15:40:42 +01:00
Michael Ossmann
afb8474668
Merge pull request #1735 from greatscottgadgets/hil-fix
Praline HIL Fix
2026-04-16 20:02:00 -04:00
grvvy
a36f5ca08a ci: increase wait time after running spiflash, add support for building firmware for different boards 2026-04-16 16:49:28 -06:00
Michael Ossmann
da017d7c77
Merge pull request #1689 from greatscottgadgets/radio-config-callback
Add radio configuration update callback
2026-04-16 10:55:53 -04:00
Michael Ossmann
533c3f15c2
Merge pull request #1733 from martinling/jawbreaker-fix
Correct GPIO pin assignments for CPLD JTAG on Jawbreaker.
2026-04-15 15:03:02 -04:00
Michael Ossmann
94d1517153 Correct SCU config for CPLD JTAG on Jawbreaker 2026-04-15 14:47:08 -04:00
Martin Ling
1b37541237 Correct GPIO pin assignments for CPLD JTAG on Jawbreaker. 2026-04-15 19:02:42 +01:00
Martin Ling
43454dd512 Move sgpio_configure calls to radio_changed callback. 2026-04-14 13:35:21 -04:00
Michael Ossmann
57285507d1 Add radio configuration update callback
Co-authored-by: Martin Ling <martin-git@earth.li>
2026-04-14 13:35:21 -04:00
Michael Ossmann
59e8670c51 Ensure correct gains displayed in PortaPack UI
Previously it was possible, though rare, for an update of an RX gain
setting to be displayed during TX mode or for an update of a TX gain
setting to be displayed during RX mode.
2026-04-14 13:35:21 -04:00
Michael Ossmann
62e381ef90
Merge pull request #1708 from greatscottgadgets/radio-config-tuning
Refactor radio tuning
2026-04-14 13:02:34 -04:00
Martin Ling
1e69ee09b7 Remove some superfluous parentheses. 2026-04-14 12:30:18 +01:00
Michael Ossmann
3d616df762 Store rotation in 32-bit format 2026-04-13 15:45:52 -04:00
Michael Ossmann
5a82627a2b Clean up static applied_afe_rate 2026-04-13 15:45:52 -04:00
Michael Ossmann
4366b49206 Refactor radio tuning
- Store applied settings in radio registers
- Support arbitrary combinations of tuning registers
2026-04-13 15:45:45 -04:00
Michael Ossmann
207ed04f6b Restrict tuning frequency in tuning functions 2026-04-13 15:33:52 -04:00
Michael Ossmann
d032dedf9f Add program option to tuning functions 2026-04-13 15:28:35 -04:00
Michael Ossmann
e84e867a6c Return tuned frequency from tuning functions 2026-04-13 15:24:02 -04:00
Michael Ossmann
14d196d3dd Use fixed-point type for tuning functions 2026-04-13 15:22:31 -04:00
Michael Ossmann
4063cddd7b
Merge pull request #1730 from martinling/fp-macros
Add macros to clarify fixed-point constants.
2026-04-13 10:24:35 -04:00
Martin Ling
1b06ccf0f7 Add macros to clarify fixed-point constants. 2026-04-12 00:15:20 +01:00
Michael Ossmann
911483b79c
Merge pull request #1721 from mndza/better-samplerate-precision
Increase sample rate fixed-point precision
2026-04-10 18:22:36 -04:00
mndza
b76c8759bd Decrease long division cycles in sample_rate_set 2026-04-10 18:06:13 -04:00
mndza
5af101e45c Fixed-point format for sample rate with 36 fractional bits
Fix overflowing division in sample_rate_set

Avoid overflows in round_sample_rate
2026-04-10 18:06:11 -04:00
mndza
59c61c9ace Set optimal fractional divider values (P2, P3) when setting sample rate 2026-04-10 18:05:41 -04:00
Michael Ossmann
53f316291b
Merge pull request #1724 from greatscottgadgets/portapack-sweep
Fix sweep mode with PortaPack
2026-04-10 18:02:01 -04:00
Michael Ossmann
0205dd441d Update UI opportunistically in sweep mode 2026-04-09 18:46:36 -04:00
Michael Ossmann
3e256d1415 Write RADIO_OPMODE when switching operating mode 2026-04-09 18:46:36 -04:00
Michael Ossmann
3f51f407fa Move transceiver_mode_t to own header file 2026-04-09 18:46:36 -04:00
Michael Ossmann
caa47500c5 Show 0 in MHz column on PortaPack display
The PortaPack UI hides leading zeros in the most significant digits.
Previously zeros in the 1 MHz column and above were hidden. Now zeros in
the 10 MHz column and above are hidden.
2026-04-09 18:46:36 -04:00
Michael Ossmann
c386327696
Merge pull request #1729 from greatscottgadgets/reduce-macos-jobs
CI: conserve macOS runners by not building firmware for every board.
2026-04-09 18:28:59 -04:00
Michael Ossmann
a3e620ee25
Merge pull request #1728 from greatscottgadgets/fix-radio-config-gain 2026-04-09 17:49:07 -04:00
Martin Ling
693b7e79f7 CI: conserve macOS runners by not building firmware for every board. 2026-04-09 21:46:48 +01:00
Michael Ossmann
0cf5cc2298 Fix RX IF gain configuration
Some checks failed
Check includes / includes-check (HACKRF_ONE, 3.10.0) (push) Failing after 3s
Check code style / clang-format-3 (push) Failing after 7s
Check includes / includes-check (HACKRF_ONE, latest) (push) Failing after 5s
Check includes / includes-check (JAWBREAKER, 3.10.0) (push) Failing after 5s
Check includes / includes-check (JAWBREAKER, latest) (push) Failing after 5s
Check includes / includes-check (PRALINE, 3.10.0) (push) Failing after 6s
Check includes / includes-check (PRALINE, latest) (push) Failing after 5s
Check includes / includes-check (RAD1O, 3.10.0) (push) Failing after 4s
Check includes / includes-check (RAD1O, latest) (push) Failing after 5s
Build / host (3.10.0, map[os:macos shell:bash]) (push) Has been cancelled
Build / host (3.16.0, map[os:macos shell:bash]) (push) Has been cancelled
Build / host (3.21.0, -DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake --install-prefix=$env:GITHUB_WORKSPACE/install, map[os:windows shell:pwsh]) (push) Has been cancelled
Build / host (3.21.0, map[os:macos shell:bash]) (push) Has been cancelled
Build / host (4.0.0, -DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake --install-prefix=$env:GITHUB_WORKSPACE/install, map[os:windows shell:pwsh]) (push) Has been cancelled
Build / host (4.0.0, map[os:macos shell:bash]) (push) Has been cancelled
Build / host (latest, --install-prefix=/usr/local, map[os:windows shell:msys2]) (push) Has been cancelled
Build / host (latest, -DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake --install-prefix=$env:GITHUB_WORKSPACE/install, map[os:windows shell:pwsh]) (push) Has been cancelled
Build / host (latest, map[os:macos shell:bash]) (push) Has been cancelled
Build / firmware (HACKRF_ONE, 3.10.0, macos) (push) Has been cancelled
Build / firmware (HACKRF_ONE, latest, macos) (push) Has been cancelled
Build / firmware (HACKRF_ONE, latest, windows) (push) Has been cancelled
Build / firmware (JAWBREAKER, 3.10.0, macos) (push) Has been cancelled
Build / firmware (JAWBREAKER, latest, macos) (push) Has been cancelled
Build / firmware (JAWBREAKER, latest, windows) (push) Has been cancelled
Build / firmware (PRALINE, 3.10.0, macos) (push) Has been cancelled
Build / firmware (PRALINE, latest, macos) (push) Has been cancelled
Build / firmware (PRALINE, latest, windows) (push) Has been cancelled
Build / firmware (RAD1O, 3.10.0, macos) (push) Has been cancelled
Build / firmware (RAD1O, latest, macos) (push) Has been cancelled
Build / firmware (RAD1O, latest, windows) (push) Has been cancelled
2026-04-09 15:34:42 -04:00
Michael Ossmann
bca9b185a0
Merge pull request #1727 from greatscottgadgets/get-cmake
CI: switch from actions-setup-cmake to get-cmake
2026-04-09 15:06:41 -04:00
Martin Ling
c4bc078364 CI: switch from actions-setup-cmake to get-cmake. 2026-04-09 19:44:42 +01:00
Michael Ossmann
5aff56dec9
Merge pull request #1717 from greatscottgadgets/antoinevg/ci-headers-check
Add an includes-check CI workflow
2026-04-09 10:32:56 -04:00
Antoine van Gelder
8018feb1d0
ci: run includes-check workflow on debian:13 2026-04-09 11:40:49 +02:00
Michael Ossmann
96172175a3
Merge pull request #1720 from martinling/clang-format-version
Improve `clang-format` version detection
2026-04-07 11:26:50 -04:00
Michael Ossmann
159050ba8f
Merge pull request #1704 from antoinevg/antoinevg/consistent-structs
Standardize `struct` + `typedef` usage.
2026-04-07 11:23:29 -04:00
Antoine van Gelder
d49b5b1f13
firmware: standardize recursive struct+typedef usage 2026-04-07 16:52:42 +02:00
Antoine van Gelder
b11f6b2f7e
firmware: standardize struct+typedef usage 2026-04-07 16:52:42 +02:00
Martin Ling
a06232270e Fix issues with clang-format version detection.
Recent versions include a suffix in brackets, e.g:

$ clang-format --version
Debian clang-format version 21.1.8 (3+b1)

Require a specific version rather than a minimum one, due to differences
in output between versions.
2026-04-07 12:01:53 +01:00
Antoine van Gelder
98bdd30197
ci: add a includes-check workflow that runs include-what-you-use on the firmware sources 2026-04-07 10:49:29 +02:00
Michael Ossmann
1e9991e42c
Merge pull request #1718 from greatscottgadgets/fix-pll-reset
Reset only sample clock outputs when changing rate
2026-04-06 11:45:10 -04:00
Michael Ossmann
d1b37390e2
Merge pull request #1703 from antoinevg/antoinevg/pragma-once
Replace include guards with `#pragma once`
2026-04-06 11:34:55 -04:00
Michael Ossmann
1c29079faf Reset only sample clock outputs when changing rate
Some checks failed
Build / firmware (JAWBREAKER, 3.10.0, ubuntu) (push) Failing after 4s
Build / firmware (PRALINE, 3.10.0, ubuntu) (push) Failing after 6s
Build / firmware (RAD1O, 3.10.0, ubuntu) (push) Failing after 4s
Build / firmware (PRALINE, latest, ubuntu) (push) Failing after 6s
Build / firmware (RAD1O, latest, ubuntu) (push) Failing after 5s
Check code style / clang-format (push) Failing after 4s
Check code style / clang-format-1 (push) Failing after 6s
Check code style / clang-format-2 (push) Failing after 7s
Check code style / clang-format-3 (push) Failing after 8s
Build / firmware (RAD1O, latest, macos) (push) Has been cancelled
Build / host (latest, --install-prefix=/usr/local, map[os:windows shell:msys2]) (push) Has been cancelled
Build / host (latest, -DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake --install-prefix=$env:GITHUB_WORKSPACE/install, map[os:windows shell:pwsh]) (push) Has been cancelled
Build / host (latest, map[os:macos shell:bash]) (push) Has been cancelled
Build / firmware (HACKRF_ONE, 3.10.0, macos) (push) Has been cancelled
Build / firmware (HACKRF_ONE, latest, macos) (push) Has been cancelled
Build / firmware (HACKRF_ONE, latest, windows) (push) Has been cancelled
Build / firmware (JAWBREAKER, 3.10.0, macos) (push) Has been cancelled
Build / firmware (JAWBREAKER, latest, macos) (push) Has been cancelled
Build / firmware (JAWBREAKER, latest, windows) (push) Has been cancelled
Build / firmware (PRALINE, 3.10.0, macos) (push) Has been cancelled
Build / firmware (PRALINE, latest, macos) (push) Has been cancelled
Build / firmware (PRALINE, latest, windows) (push) Has been cancelled
Build / firmware (RAD1O, 3.10.0, macos) (push) Has been cancelled
Build / host (3.10.0, map[os:macos shell:bash]) (push) Has been cancelled
Build / host (3.16.0, map[os:macos shell:bash]) (push) Has been cancelled
Build / host (3.21.0, -DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake --install-prefix=$env:GITHUB_WORKSPACE/install, map[os:windows shell:pwsh]) (push) Has been cancelled
Build / host (3.21.0, map[os:macos shell:bash]) (push) Has been cancelled
Build / host (4.0.0, -DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake --install-prefix=$env:GITHUB_WORKSPACE/install, map[os:windows shell:pwsh]) (push) Has been cancelled
Build / host (4.0.0, map[os:macos shell:bash]) (push) Has been cancelled
Build / firmware (RAD1O, latest, windows) (push) Has been cancelled
2026-04-02 19:48:16 -04:00
Jacob Graves
8e9b06ba1b
Merge pull request #1716 from greatscottgadgets/jenkins-functions
Define functions to avoid repetition in `Jenkinsfile`
2026-04-02 11:27:04 -06:00
Michael Ossmann
6fccdb5f1d
Merge pull request #1711 from antoinevg/antoinevg/fix-nvic-include
Add include-what-you-use mapping file for libopencm3
2026-04-02 11:18:22 -04:00
Antoine van Gelder
e9986d4601
repo: add include-what-you-use mapping file for libopencm3 2026-04-02 14:16:24 +02:00
Antoine van Gelder
5f8601b8c8
host: replace include guards with #pragma once 2026-04-02 09:36:56 +02:00
Antoine van Gelder
020e57b2f5
firmware: replace include guards with #pragma once 2026-04-02 09:36:56 +02:00
Martin Ling
601a77a9da Jenkinsfile: Add runCommand() helper function.
Some checks failed
Build / firmware (JAWBREAKER, latest, ubuntu) (push) Failing after 3s
Build / firmware (PRALINE, 3.10.0, ubuntu) (push) Failing after 4s
Build / firmware (PRALINE, latest, ubuntu) (push) Failing after 6s
Build / firmware (RAD1O, 3.10.0, ubuntu) (push) Failing after 6s
Build / firmware (RAD1O, latest, ubuntu) (push) Failing after 4s
Check code style / clang-format (push) Failing after 5s
Check code style / clang-format-1 (push) Failing after 5s
Check code style / clang-format-2 (push) Failing after 4s
Check code style / clang-format-3 (push) Failing after 3s
Build / host (3.16.0, map[os:macos shell:bash]) (push) Has been cancelled
Build / host (3.21.0, -DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake --install-prefix=$env:GITHUB_WORKSPACE/install, map[os:windows shell:pwsh]) (push) Has been cancelled
Build / host (3.21.0, map[os:macos shell:bash]) (push) Has been cancelled
Build / firmware (RAD1O, 3.10.0, macos) (push) Has been cancelled
Build / firmware (RAD1O, latest, macos) (push) Has been cancelled
Build / firmware (RAD1O, latest, windows) (push) Has been cancelled
Build / host (3.10.0, map[os:macos shell:bash]) (push) Has been cancelled
Build / host (4.0.0, -DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake --install-prefix=$env:GITHUB_WORKSPACE/install, map[os:windows shell:pwsh]) (push) Has been cancelled
Build / host (4.0.0, map[os:macos shell:bash]) (push) Has been cancelled
Build / host (latest, --install-prefix=/usr/local, map[os:windows shell:msys2]) (push) Has been cancelled
Build / host (latest, -DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake --install-prefix=$env:GITHUB_WORKSPACE/install, map[os:windows shell:pwsh]) (push) Has been cancelled
Build / host (latest, map[os:macos shell:bash]) (push) Has been cancelled
Build / firmware (HACKRF_ONE, 3.10.0, macos) (push) Has been cancelled
Build / firmware (HACKRF_ONE, latest, macos) (push) Has been cancelled
Build / firmware (HACKRF_ONE, latest, windows) (push) Has been cancelled
Build / firmware (JAWBREAKER, 3.10.0, macos) (push) Has been cancelled
Build / firmware (JAWBREAKER, latest, macos) (push) Has been cancelled
Build / firmware (JAWBREAKER, latest, windows) (push) Has been cancelled
Build / firmware (PRALINE, 3.10.0, macos) (push) Has been cancelled
Build / firmware (PRALINE, latest, macos) (push) Has been cancelled
Build / firmware (PRALINE, latest, windows) (push) Has been cancelled
2026-04-02 07:26:09 +01:00
Martin Ling
dc79c298a2 Jenkinsfile: Add reset() helper function. 2026-04-02 07:26:09 +01:00
Martin Ling
da1358076e Jenkinsfile: move 'hubs all off' to a function. 2026-04-02 07:26:09 +01:00
Michael Ossmann
dc8b0c84b1
Merge pull request #1712 from greatscottgadgets/radio-config-fix
Fix radio_update() usage
2026-04-01 13:24:18 -04:00
Michael Ossmann
73987e607f
Merge pull request #1653 from mndza/rx-ext-prec-nco
Add configurable mixer to RX extended precision gateware
2026-04-01 12:55:07 -04:00
mndza
37ad28a03a
gateware: add configurable mixer to RX extended precision 2026-04-01 17:43:33 +02:00
mndza
627c43b279
gateware: add complex multiplier 2026-04-01 17:40:31 +02:00
mndza
b2669ef2fd
fix NCO phase symmetry 2026-04-01 17:40:31 +02:00
mndza
68f9ee8b79
gateware: fix signal direction 2026-04-01 17:40:31 +02:00
mndza
e5f79913eb
gateware: unify resampling factors between gatewares 2026-04-01 17:38:22 +02:00
Michael Ossmann
f2a221d0b8 Remove radio_update() call from radio_reg_write()
This was intended to be removed in #1648. Registers are typically
written from within USB ISRs. Updates are meant to happen outside of
ISRs.
2026-04-01 08:11:29 -04:00
Michael Ossmann
3f1549c51c Fix radio_update() usage in sweep mode 2026-04-01 07:54:21 -04:00
mndza
e9b69b144c
gateware: add pstep register in RX extended precision 2026-03-31 12:49:15 +02:00
Michael Ossmann
96a6f2842d
Merge pull request #1707 from greatscottgadgets/beanless
Clean up vestiges of Jellybean
2026-03-30 17:31:23 -04:00
Michael Ossmann
99cdefb761 Clean up vestiges of Jellybean 2026-03-27 18:07:35 -04:00
Michael Ossmann
f84974d0ea
Merge pull request #1701 from antoinevg/antoinevg/clean-up-includes
Remove unused includes and avoid transitive dependencies.
2026-03-27 13:05:16 -04:00
Antoine van Gelder
b49f1df956
Remove unused includes and avoid transitive dependencies. 2026-03-27 17:29:48 +02:00
Michael Ossmann
a8661eef4a
Merge pull request #1676 from mndza/rearrange-gateware-regs 2026-03-26 04:07:18 -04:00
Michael Ossmann
ea4b55b4a8 Enable TX interpolation 2026-03-25 15:31:59 -04:00
mndza
dc4f946b0b gateware: reduce ADC clock time delay, force BEL of LUT chain 2026-03-25 15:31:59 -04:00
mndza
5038dbea8d gateware: fix missed resets when changing rate in CIC interpolator 2026-03-25 15:31:59 -04:00
mndza
a153a42b40 gateware: rearrange registers 2026-03-25 15:31:59 -04:00
mndza
42cfa481f9 gateware: create a special DAC clock domain 2026-03-25 15:31:59 -04:00
mndza
b4c4dd7506 gateware: change extended precision samples to little-endian 2026-03-25 15:31:59 -04:00
Michael Ossmann
5e0ecb9eac Add phase offset to FPGA_CLK/SCT_CLK
In order to support higher DAC sample rates on Praline with
interpolation, it is necessary to adjust the phase of FPGA_CLK with
respect to AFE_CLK.
2026-03-25 15:31:53 -04:00
Michael Ossmann
8d6ee8438c Always use PLL A
On most platforms, we previously set PLL A to use XTAL input and PLL B
to use CLKIN, switching from one PLL to the other to change clock
source. Now we use PLL A at all times, switching the PLL input to change
clock source.

This avoids output clock phase inconsistencies that can happen when
switching output multisynths from one PLL to another. It also makes it
possible in the future to use one PLL for sample rate and the other PLL
for reference clocks.
2026-03-24 12:24:50 -04:00
mndza
9c255d78fd Fix output clock glitches on PLL reset 2026-03-24 12:24:50 -04:00
Michael Ossmann
35f1f2fab2 Fix typo 2026-03-24 12:24:50 -04:00
Michael Ossmann
49912be056 Ensure clean firmware build directory in CI 2026-03-24 12:21:06 -04:00
Michael Ossmann
0099dfb4ec
Merge pull request #1698 from miek/da7219_detection
Skip detection of conflicting Opera Cake board if a DA7219 is detected
2026-03-23 12:58:28 -04:00
Mike Walters
00f47250f2 Skip detection of conflicting Opera Cake board if a DA7219 is detected 2026-03-23 11:17:59 -04:00
Michael Ossmann
75d2bbc036
Merge pull request #1699 from antoinevg/antoinevg/centralize-scu-and-gpio
Move SCU and GPIO definitions to `platform`.
2026-03-23 10:31:20 -04:00
Antoine van Gelder
2b8b61879a
firmware: use consistent indentation across gpio/scu assignments 2026-03-23 12:31:25 +02:00
Antoine van Gelder
0c5b893868
firmware: exclude signals not used by praline 2026-03-23 10:49:04 +02:00
Antoine van Gelder
ce5cd7b052
firmware: replace static gpio & scu definitions 2026-03-19 14:38:38 +02:00
Antoine van Gelder
5d8e23953b
firmware: define platform scu 2026-03-19 14:38:38 +02:00
Antoine van Gelder
a25ca541df
firmware: define platform gpio 2026-03-19 14:38:37 +02:00
Michael Ossmann
73694ccf44
Merge pull request #1700 from martinling/fpga-loader
Support customization of FPGA image loading mechanism.
2026-03-17 16:39:18 -04:00
Martin Ling
431becb190 Support customization of FPGA image loading mechanism. 2026-03-16 17:55:42 +00:00
Michael Ossmann
8188e84784
Merge pull request #1693 from antoinevg/add-max2831-to-max283x
Add MAX2831 support to max283x
2026-03-13 15:21:43 -04:00
Antoine van Gelder
bd87a5a1b4
firmware: add MAX2831 support to max283x.c 2026-03-11 11:56:41 +00:00
Michael Ossmann
5275150bf0
Merge pull request #1695 from martinling/nostring-freq
Add nostring attribute to buffer used for UI frequency display
2026-03-10 14:05:39 -04:00
Michael Ossmann
60417db27d
Merge pull request #1688 from greatscottgadgets/radio-config-rate 2026-03-10 13:17:49 -04:00
Michael Ossmann
25bd7dad1b Use external callback to set radio sample rate 2026-03-10 09:40:50 -04:00
Michael Ossmann
2e1fbd5960 Remove fractional sample rate radio register 2026-03-10 09:40:50 -04:00
Michael Ossmann
67b5617373 Configure sample rate more precisely 2026-03-10 09:40:42 -04:00
Martin Ling
880bc57ed1 Add nostring attribute to buffer used for UI frequency display. 2026-03-07 23:51:35 +00:00
Michael Ossmann
ff6ce14fbe
Merge pull request #1668 from martinling/struct-gpio
Rename `struct gpio_t` to `struct gpio` to distinguish from `gpio_t`
2026-03-04 08:30:52 -05:00
Michael Ossmann
bb670f9af7 Add 40.24 fixed-point type 2026-03-03 11:21:42 -05:00
Michael Ossmann
30229730b4 Fix baseband bandwidth configuration 2026-03-03 11:21:42 -05:00
Martin Ling
5a07b8629b
Rename 'struct gpio_t' to 'struct gpio' to distinguish from gpio_t. 2026-03-03 09:30:37 +02:00
Michael Ossmann
10f4184cee
Merge pull request #1692 from grvvy/hpro_ci_cleanup 2026-03-02 21:30:08 -05:00
grvvy
5fa6907c64 improve timeout handling 2026-03-02 19:00:19 -07:00
grvvy
0e04680435 add timeouts to test script calls 2026-03-02 17:30:46 -07:00
grvvy
caa2ef9565 increase hub command timeout duration, remove unnecessary build args 2026-03-02 17:20:29 -07:00
Michael Ossmann
246ce7720f
Merge pull request #1690 from grvvy/hpro_hitl
HackRF Pro HITL CI
2026-03-01 10:26:59 -05:00
grvvy
b6da7ddef6 wrap hub commands in timeout blocks 2026-02-27 16:40:35 -07:00
grvvy
6b2e0b6ec8 display transmit stdout and stderr for debugging 2026-02-27 16:40:35 -07:00
grvvy
66e148f1af switch from log() to out() to match hackrf one hackrf_test.py, update version string 2026-02-27 16:40:35 -07:00
grvvy
73ab8bffb2 hackrf pro jenkins ci 2026-02-27 16:40:35 -07:00
Michael Ossmann
1972e37074
Merge pull request #1684 from grvvy/hub_command_server
USB port power server compatibility
2026-02-27 16:47:43 -05:00
grvvy
7f7974ce8f retry hackrf_test up to three times if it fails 2026-02-25 18:07:37 -07:00
grvvy
c41cda0424 rename devices 2026-02-25 18:00:53 -07:00
Michael Ossmann
849ce28779
Merge pull request #1648 from greatscottgadgets/radio-config
Radio configuration register interface
2026-02-23 12:51:03 -05:00
grvvy
161dc0a7b3 move hub command from test script to Jenkinsfile for consistency 2026-02-20 15:50:13 -07:00
grvvy
71cfa84165 mount necessary files for usb command server communication 2026-02-20 13:52:00 -07:00
Michael Ossmann
a2b2728234 Implement bias tee with radio registers 2026-02-20 11:31:06 -05:00
Michael Ossmann
b1bfc246bf Do not apply radio configuration inside ISRs 2026-02-20 11:30:50 -05:00
Michael Ossmann
b4041dd550 Add radio register access from host 2026-02-20 11:29:18 -05:00
Michael Ossmann
547a851fba Store radio configuration in register banks 2026-02-20 11:28:56 -05:00
Michael Ossmann
aaad548b0b Track RFFC5071 enabled state
Re-lock PLL when re-tuning while enabled
2026-02-20 11:28:15 -05:00
Michael Ossmann
d60ebc2781 Add clock generator power supply start-up comments 2026-02-20 11:28:15 -05:00
Michael Ossmann
72a96a77f8 Call a sample rate a sample rate
Previously we used "sample rate" to mean a rate that is twice the sample
rate in several places in firmware.
2026-02-20 11:28:15 -05:00
Michael Ossmann
19d00fb5f9 Remove full-duplex support for RFFC5071
This eliminates unnecessary disable/enable cycles for our half-duplex
RFFC5072.
2026-02-20 11:28:15 -05:00
Michael Ossmann
afb42968c9
Merge pull request #1680 from martinling/avoid-not-keyword
Rename gpio.not to gpio.inv to avoid conflict with C++ keyword
2026-02-19 11:11:00 -05:00
Martin Ling
8d1b1a5f9a Rename gpio.not to gpio.inv to avoid conflict with C++ keyword. 2026-02-19 00:32:31 +00:00
Martin Ling
cc63a764ab
Don't allocate large LZ4 buffers on stack; use some dedicated RAM. (#1670) 2026-02-11 14:13:32 -05:00
Michael Ossmann
43fb9fec3c
Merge pull request #1673 from martinling/update-libopencm3
Update libopencm3 for recent compiler warning fixes.
2026-02-11 13:28:32 -05:00
Martin Ling
bce1b871c6 Update libopencm3 for recent compiler warning fixes. 2026-02-09 19:08:06 +00:00
Michael Ossmann
f6be9d54f1
Merge pull request #1669 from martinling/delay
Firmware: Move delay functions, add M0 version of `delay_us_at_mhz`.
2026-02-09 12:44:34 -05:00
Martin Ling
3ef784b830 Add delay loop implementation for M0 core. 2026-02-09 08:35:16 +00:00
Michael Ossmann
67d61bae6e
Merge pull request #1672 from martinling/nonstring
Add `nonstring` attribute to firmware_info magic field
2026-02-06 19:45:31 -05:00
Michael Ossmann
14d404082e
Merge pull request #1671 from martinling/old-style-definitions
Add `-Wold-style-definition` to compiler flags
2026-02-06 19:41:58 -05:00
Martin Ling
a246f9a35a Add 'nonstring' attribute to firmware_info magic field.
Fixes compiler warnings such as:

firmware_info.c:49:18: warning: initializer-string for array of 'char'
truncates NUL terminator but destination lacks 'nonstring' attribute (9
chars into 8 available) [-Wunterminated-string-initialization]
   49 |         .magic = "HACKRFFW",
      |                  ^~~~~~~~~~
2026-02-06 21:30:01 +00:00
Martin Ling
84aed3a67c Add -Wold-style-definition to compiler flags. 2026-02-06 20:58:00 +00:00
Michael Ossmann
3db0bbfc4f
Merge pull request #1667 from martinling/strict-prototypes
Firmware: Enable `-Wstrict-prototypes` and fix remaining warnings
2026-02-06 14:22:39 -05:00
Martin Ling
afb6d1372f Move delay functions out of hackrf_core. 2026-02-06 18:29:54 +00:00
Martin Ling
2ffcc908fb Enable -Wstrict-prototypes warnings. 2026-02-06 17:30:56 +00:00
Martin Ling
ead77b91cf Always use void argument type for functions taking no arguments. 2026-02-06 17:30:56 +00:00
stafur
1ee45eaaa2
Toolchain 9.2.1 support fix (#1666)
Added -B arm flag to firmware/hackrf_usb/CMakeLists.txt to support builds with v9.2.1 toolchains.
2026-02-05 11:36:56 -05:00
Michael Ossmann
2df9ad26af
Merge pull request #1664 from greatscottgadgets/post-release
Set version to 2026.01.3+
2026-01-30 13:11:31 -05:00
Michael Ossmann
a7dc78612f Set version to 2026.01.3+ 2026-01-29 23:03:34 -05:00
Michael Ossmann
1cfe7dfe98
Merge pull request #1663 from greatscottgadgets/release
Some checks failed
Build / firmware (JAWBREAKER, latest, ubuntu) (push) Failing after 9s
Build / firmware (PRALINE, 3.10.0, ubuntu) (push) Failing after 9s
Build / firmware (PRALINE, latest, ubuntu) (push) Failing after 6s
Build / firmware (RAD1O, 3.10.0, ubuntu) (push) Failing after 7s
Build / firmware (RAD1O, latest, ubuntu) (push) Failing after 6s
Check code style / clang-format (push) Failing after 6s
Check code style / clang-format-2 (push) Failing after 5s
Check code style / clang-format-1 (push) Failing after 7s
Check code style / clang-format-3 (push) Failing after 4s
Build / firmware (RAD1O, latest, macos) (push) Has been cancelled
Build / firmware (RAD1O, latest, windows) (push) Has been cancelled
Build / host (3.10.0, map[os:macos shell:bash]) (push) Has been cancelled
Build / host (3.16.0, map[os:macos shell:bash]) (push) Has been cancelled
Build / host (latest, --install-prefix=/usr/local, map[os:windows shell:msys2]) (push) Has been cancelled
Build / firmware (HACKRF_ONE, latest, macos) (push) Has been cancelled
Build / firmware (HACKRF_ONE, latest, windows) (push) Has been cancelled
Build / firmware (JAWBREAKER, latest, macos) (push) Has been cancelled
Build / firmware (JAWBREAKER, latest, windows) (push) Has been cancelled
Build / firmware (PRALINE, 3.10.0, macos) (push) Has been cancelled
Build / firmware (JAWBREAKER, 3.10.0, macos) (push) Has been cancelled
Build / firmware (PRALINE, latest, macos) (push) Has been cancelled
Build / firmware (PRALINE, latest, windows) (push) Has been cancelled
Build / firmware (RAD1O, 3.10.0, macos) (push) Has been cancelled
Build / host (3.21.0, map[os:macos shell:bash]) (push) Has been cancelled
Build / host (4.0.0, -DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake --install-prefix=$env:GITHUB_WORKSPACE/install, map[os:windows shell:pwsh]) (push) Has been cancelled
Build / host (4.0.0, map[os:macos shell:bash]) (push) Has been cancelled
Build / host (latest, -DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake --install-prefix=$env:GITHUB_WORKSPACE/install, map[os:windows shell:pwsh]) (push) Has been cancelled
Build / host (latest, map[os:macos shell:bash]) (push) Has been cancelled
Build / firmware (HACKRF_ONE, 3.10.0, macos) (push) Has been cancelled
Build / host (3.21.0, -DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake --install-prefix=$env:GITHUB_WORKSPACE/install, map[os:windows shell:pwsh]) (push) Has been cancelled
Release 2026.01.3
2026-01-29 22:47:16 -05:00
Michael Ossmann
a0066ded51 Set version to 2026.01.3 2026-01-29 22:21:45 -05:00
Michael Ossmann
3233cd56cf Set USB API version to 1.10 2026-01-29 22:19:42 -05:00
Michael Ossmann
e6ca4d9b71 Set libhackrf version to 0.9.2 2026-01-29 22:16:11 -05:00
Michael Ossmann
3ffda68f18
Merge pull request #1655 from martinling/flash-size
Provide access to the larger SPI flash on Praline
2026-01-29 21:58:15 -05:00
Martin Ling
06c1163d64 Provide access to the larger SPI flash on Praline. 2026-01-30 00:06:16 +00:00
Michael Ossmann
6a02d4e333
Merge pull request #1658 from greatscottgadgets/fix-mixer-lock
Fix mixer lock
2026-01-29 18:16:53 -05:00
Michael Ossmann
16355f8e5d Update RFFC5072 default registers
Some checks failed
Build / firmware (JAWBREAKER, latest, ubuntu) (push) Failing after 7s
Build / firmware (PRALINE, 3.10.0, ubuntu) (push) Failing after 7s
Build / firmware (PRALINE, latest, ubuntu) (push) Failing after 6s
Build / firmware (RAD1O, 3.10.0, ubuntu) (push) Failing after 5s
Build / firmware (RAD1O, latest, ubuntu) (push) Failing after 5s
Check code style / clang-format (push) Failing after 4s
Check code style / clang-format-1 (push) Failing after 7s
Check code style / clang-format-2 (push) Failing after 6s
Check code style / clang-format-3 (push) Failing after 4s
Build / host (3.21.0, map[os:macos shell:bash]) (push) Has been cancelled
Build / host (3.10.0, map[os:macos shell:bash]) (push) Has been cancelled
Build / host (3.16.0, map[os:macos shell:bash]) (push) Has been cancelled
Build / host (3.21.0, -DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake --install-prefix=$env:GITHUB_WORKSPACE/install, map[os:windows shell:pwsh]) (push) Has been cancelled
Build / host (4.0.0, -DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake --install-prefix=$env:GITHUB_WORKSPACE/install, map[os:windows shell:pwsh]) (push) Has been cancelled
Build / host (4.0.0, map[os:macos shell:bash]) (push) Has been cancelled
Build / host (latest, --install-prefix=/usr/local, map[os:windows shell:msys2]) (push) Has been cancelled
Build / host (latest, -DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake --install-prefix=$env:GITHUB_WORKSPACE/install, map[os:windows shell:pwsh]) (push) Has been cancelled
Build / host (latest, map[os:macos shell:bash]) (push) Has been cancelled
Build / firmware (HACKRF_ONE, 3.10.0, macos) (push) Has been cancelled
Build / firmware (HACKRF_ONE, latest, macos) (push) Has been cancelled
Build / firmware (HACKRF_ONE, latest, windows) (push) Has been cancelled
Build / firmware (JAWBREAKER, 3.10.0, macos) (push) Has been cancelled
Build / firmware (JAWBREAKER, latest, macos) (push) Has been cancelled
Build / firmware (JAWBREAKER, latest, windows) (push) Has been cancelled
Build / firmware (PRALINE, 3.10.0, macos) (push) Has been cancelled
Build / firmware (PRALINE, latest, macos) (push) Has been cancelled
Build / firmware (PRALINE, latest, windows) (push) Has been cancelled
Build / firmware (RAD1O, 3.10.0, macos) (push) Has been cancelled
Build / firmware (RAD1O, latest, macos) (push) Has been cancelled
Build / firmware (RAD1O, latest, windows) (push) Has been cancelled
2026-01-29 18:59:42 +00:00
Michael Ossmann
ec784cbfbc Change from 5th order to 3rd order DSM modulator 2026-01-29 18:59:25 +00:00
Mike Walters
72636b53f5 Move dithering disable to rffc5071_setup 2026-01-29 18:03:57 +00:00
Michael Ossmann
b516631743 Use lower feedback divider when possible
This reverts a previous change that was a workaround for tuning glitches
in sweep mode. Increase of TVCO is a better solution.
2026-01-29 17:43:54 +00:00
Michael Ossmann
40bdea769b Increase RFFC5072 VCO warm-up time TVCO 2026-01-29 17:43:47 +00:00
Michael Ossmann
38abc35e23 Output RFFC5072 LD to test point on HackRF One 2026-01-29 17:42:28 +00:00
Michael Ossmann
845c0c8394 Enable RFFC5072 reference oscillator standby 2026-01-29 17:42:28 +00:00
Michael Ossmann
e95b3afbc3 Zero only the bits we want to be zero
Previously we zeroed all RFFC5072 frequency synthesizer control
registers, resulting in an invalid configuration which could adversely
affect start-up if the part is enabled before a valid frequency is set.
2026-01-29 17:42:28 +00:00
Michael Ossmann
9aa37b9f8c
Merge pull request #1656 from greatscottgadgets/readme-faq
Change README help link from FAQ to troubleshooting
2026-01-26 21:56:03 -05:00
Mike Walters
9c4caad83e
Change README help link from FAQ to troubleshooting 2026-01-27 00:15:59 +00:00
Michael Ossmann
5820e5264a
Merge pull request #1654 from martinling/lock-test
Test RFFC5072 PLL lock during startup
2026-01-26 15:11:51 -05:00
Martin Ling
f4e120e50d Test RFFC5072 PLL lock during startup. 2026-01-26 19:00:53 +00:00
Michael Ossmann
6e06b3c678
Merge pull request #1645 from greatscottgadgets/post-release
Set version to 2026.01.2+
2026-01-16 18:33:19 -05:00
Michael Ossmann
85b57c01c3 Set version to 2026.01.2+ 2026-01-16 18:15:12 -05:00
Michael Ossmann
85160ee735
Merge pull request #1644 from greatscottgadgets/release
Some checks failed
Build / firmware (JAWBREAKER, latest, ubuntu) (push) Failing after 3s
Build / firmware (PRALINE, latest, ubuntu) (push) Failing after 4s
Build / firmware (PRALINE, 3.10.0, ubuntu) (push) Failing after 5s
Build / firmware (RAD1O, 3.10.0, ubuntu) (push) Failing after 3s
Build / firmware (RAD1O, latest, ubuntu) (push) Failing after 6s
Check code style / clang-format (push) Failing after 5s
Check code style / clang-format-1 (push) Failing after 9s
Check code style / clang-format-2 (push) Failing after 9s
Check code style / clang-format-3 (push) Failing after 5s
Build / host (3.16.0, map[os:macos shell:bash]) (push) Has been cancelled
Build / host (3.10.0, map[os:macos shell:bash]) (push) Has been cancelled
Build / firmware (JAWBREAKER, 3.10.0, macos) (push) Has been cancelled
Build / firmware (JAWBREAKER, latest, macos) (push) Has been cancelled
Build / firmware (JAWBREAKER, latest, windows) (push) Has been cancelled
Build / firmware (PRALINE, 3.10.0, macos) (push) Has been cancelled
Build / host (latest, --install-prefix=/usr/local, map[os:windows shell:msys2]) (push) Has been cancelled
Build / firmware (HACKRF_ONE, latest, macos) (push) Has been cancelled
Build / firmware (HACKRF_ONE, latest, windows) (push) Has been cancelled
Build / firmware (PRALINE, latest, macos) (push) Has been cancelled
Build / firmware (PRALINE, latest, windows) (push) Has been cancelled
Build / firmware (RAD1O, 3.10.0, macos) (push) Has been cancelled
Build / firmware (RAD1O, latest, macos) (push) Has been cancelled
Build / firmware (RAD1O, latest, windows) (push) Has been cancelled
Build / host (3.21.0, -DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake --install-prefix=$env:GITHUB_WORKSPACE/install, map[os:windows shell:pwsh]) (push) Has been cancelled
Build / host (3.21.0, map[os:macos shell:bash]) (push) Has been cancelled
Build / host (4.0.0, -DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake --install-prefix=$env:GITHUB_WORKSPACE/install, map[os:windows shell:pwsh]) (push) Has been cancelled
Build / host (4.0.0, map[os:macos shell:bash]) (push) Has been cancelled
Build / host (latest, -DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake --install-prefix=$env:GITHUB_WORKSPACE/install, map[os:windows shell:pwsh]) (push) Has been cancelled
Build / host (latest, map[os:macos shell:bash]) (push) Has been cancelled
Build / firmware (HACKRF_ONE, 3.10.0, macos) (push) Has been cancelled
Set version to 2026.01.2
2026-01-16 17:55:09 -05:00
Michael Ossmann
c228504784 Set version to 2026.01.2 2026-01-16 17:04:43 -05:00
Michael Ossmann
0f0d425576
Merge pull request #1641 from greatscottgadgets/fix-sdrpp
Ignore re-tune requests
2026-01-16 13:45:55 -05:00
Michael Ossmann
a5af0edabb Ignore re-tune requests
If the requested frequency is the same as the already-configured
frequency, ignore the tuning request.
2026-01-13 14:54:26 -05:00
Michael Ossmann
663c99378f
Merge pull request #1639 from mndza/generic-sgpio-intf
gateware: generic SGPIOInterface, simpler capture mgmt, fix resampler bugs
2026-01-11 23:22:03 -05:00
mndza
76318321f5
gateware: fix HalfBandInterpolator backpressure issues 2026-01-09 16:24:55 +01:00
mndza
29bfc3b78b
gateware: fix occasional IQ swap in half-band decimator
Prevent loosing track of the IQ time-multiplexing state within the FIR
filter.
2026-01-09 16:19:45 +01:00
mndza
4724eb5644
gateware: fix SB_MAC16 versions of the FIR decimator, interpolator
Simplified the filter architecture by using an adder tree for obtaining
the final sum of the subfilters (vs systolic array). Previously, no
backpressure (always_ready=True) worked fine but otherwise we lost
samples.
2026-01-09 16:19:44 +01:00
mndza
70c211d0ff
gateware: generic SGPIOInterface and simpler capture management 2026-01-09 12:33:11 +01:00
Michael Ossmann
0e05bda647
Merge pull request #1638 from martinling/fix-rad1o
Fix clock generator initialisation on rad1o.
2026-01-07 14:39:40 -05:00
Martin Ling
46a9a6e881 Fix clock generator initialisation on rad1o.
On the CCC 2015 rad1o badge, the Si5351C clock generator is powered
by the RF section supply (named VDD on the schematic).

So clock_gen_init() must be called after enable_rf_power().

Since the Si5351C is off when the RF power is off, there should be
no need for the shutdown/init calls at startup.
2026-01-06 16:35:12 +00:00
Michael Ossmann
676cfa7b99
Merge pull request #1635 from greatscottgadgets/post-release
Set version to 2026.01.1+
2026-01-05 08:30:38 -05:00
Michael Ossmann
ca209ed928 Set version to 2026.01.1+ 2026-01-04 22:09:40 -05:00
Michael Ossmann
bdae250310
Merge pull request #1634 from greatscottgadgets/release
Some checks failed
Build / firmware (JAWBREAKER, latest, ubuntu) (push) Failing after 4s
Build / firmware (PRALINE, 3.10.0, ubuntu) (push) Failing after 5s
Build / firmware (PRALINE, latest, ubuntu) (push) Failing after 4s
Build / firmware (RAD1O, latest, ubuntu) (push) Failing after 3s
Build / firmware (RAD1O, 3.10.0, ubuntu) (push) Failing after 5s
Check code style / clang-format (push) Failing after 5s
Check code style / clang-format-1 (push) Failing after 3s
Check code style / clang-format-2 (push) Failing after 4s
Check code style / clang-format-3 (push) Failing after 4s
Build / host (latest, map[os:macos shell:bash]) (push) Has been cancelled
Build / firmware (HACKRF_ONE, 3.10.0, macos) (push) Has been cancelled
Build / firmware (HACKRF_ONE, latest, macos) (push) Has been cancelled
Build / firmware (HACKRF_ONE, latest, windows) (push) Has been cancelled
Build / firmware (JAWBREAKER, 3.10.0, macos) (push) Has been cancelled
Build / firmware (JAWBREAKER, latest, macos) (push) Has been cancelled
Build / firmware (PRALINE, latest, macos) (push) Has been cancelled
Build / firmware (JAWBREAKER, latest, windows) (push) Has been cancelled
Build / firmware (PRALINE, 3.10.0, macos) (push) Has been cancelled
Build / firmware (PRALINE, latest, windows) (push) Has been cancelled
Build / firmware (RAD1O, 3.10.0, macos) (push) Has been cancelled
Build / firmware (RAD1O, latest, macos) (push) Has been cancelled
Build / firmware (RAD1O, latest, windows) (push) Has been cancelled
Build / host (3.21.0, -DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake --install-prefix=$env:GITHUB_WORKSPACE/install, map[os:windows shell:pwsh]) (push) Has been cancelled
Build / host (3.21.0, map[os:macos shell:bash]) (push) Has been cancelled
Build / host (3.10.0, map[os:macos shell:bash]) (push) Has been cancelled
Build / host (3.16.0, map[os:macos shell:bash]) (push) Has been cancelled
Build / host (4.0.0, -DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake --install-prefix=$env:GITHUB_WORKSPACE/install, map[os:windows shell:pwsh]) (push) Has been cancelled
Build / host (4.0.0, map[os:macos shell:bash]) (push) Has been cancelled
Build / host (latest, --install-prefix=/usr/local, map[os:windows shell:msys2]) (push) Has been cancelled
Build / host (latest, -DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake --install-prefix=$env:GITHUB_WORKSPACE/install, map[os:windows shell:pwsh]) (push) Has been cancelled
Set version to 2026.01.1
2026-01-04 21:45:01 -05:00
Michael Ossmann
3793493e02 Set version to 2026.01.1 2026-01-04 21:11:34 -05:00
Michael Ossmann
ba7cc54893
Merge pull request #1633 from greatscottgadgets/update-docs
Update docs
2026-01-04 21:03:05 -05:00
Michael Ossmann
203fd9229b Update firmware instructions for HackRF Pro 2026-01-04 20:39:56 -05:00
Michael Ossmann
95911ee6aa Clarify HackRF Pro LED descriptions 2026-01-04 19:57:54 -05:00
Michael Ossmann
25420ef7c3 Add line breaks after block diagrams 2026-01-04 19:52:30 -05:00
Michael Ossmann
ea420002f5 Clarify end plate design location 2026-01-04 19:48:02 -05:00
Michael Ossmann
cb9d1c9472
Merge pull request #1595 from martinling/windows-build-docs
Update documentation on building for Windows.
2026-01-04 12:42:39 -05:00
Michael Ossmann
8d5e05cf3a
Merge pull request #1632 from greatscottgadgets/praline
Add support for HackRF Pro (code name: Praline)
2026-01-03 22:59:42 -05:00
Michael Ossmann
cd4eb19a2b
Merge pull request #1631 from greatscottgadgets/praline-legacy
Add HackRF Pro legacy radio mode
2026-01-03 22:44:28 -05:00
Michael Ossmann
b225a8a7e3 Fix RFFC5072 GPO bug on Jawbreaker 2026-01-03 19:03:15 -05:00
Michael Ossmann
eb9b1e0ffe Improve tuning tables 2026-01-02 16:27:54 -05:00
Michael Ossmann
9e0e0eb81c Increase maximum self-test buffer size
Closes #1617
2026-01-01 15:58:03 -05:00
Michael Ossmann
9949100982 Don't try to self-test during clockgen shutdown 2026-01-01 15:41:23 -05:00
Michael Ossmann
9400ff2f92
Merge pull request #1484 from martinling/warn-bus-sharing
Report whether other devices are sharing the USB bus
2026-01-01 14:57:51 -05:00
Michael Ossmann
6c25a06d16
Merge pull request #1625 from greatscottgadgets/tx-filters
Praline TX filter bandwidth
2026-01-01 13:46:18 -05:00
Michael Ossmann
7228c6260c
Merge pull request #1623 from martinling/platform-docs
Add HackRF Pro documentation
2026-01-01 11:16:24 -05:00
Michael Ossmann
ed2e2ce2d2 Use consistent feedback divider in RFFC5072 2025-12-31 14:05:13 -05:00
Michael Ossmann
636f8bde6e Add special tuning configuration case at 0 Hz 2025-12-30 22:07:30 -05:00
Michael Ossmann
5766678b6f Don't repeat tuning and baseband filter setting 2025-12-30 22:04:07 -05:00
Michael Ossmann
1ad8adb449 Automatically configure Praline baseband LPF
For compatibility with old host software, the analog baseband filter is
automatically selected based on the sample rate and offset tuning
configuration. The bandwidth set by legacy vendor request is ignored.
2025-12-30 21:57:58 -05:00
Michael Ossmann
d8a9d445f5 Rename tuning config tables 2025-12-30 21:42:30 -05:00
Michael Ossmann
fc4b9aca68 Implement automatic offset tuning
Add RX tuning table
2025-12-30 21:42:19 -05:00
Michael Ossmann
7e1c17593d Move tuning config search to radio_set_frequency() 2025-12-30 21:42:01 -05:00
Michael Ossmann
10e8b0d934 Decimate automatically in RX and RX sweep modes 2025-12-30 20:35:25 -05:00
Michael Ossmann
df6543073b Add HackRF Pro to firmware/README 2025-12-30 20:13:04 -05:00
Michael Ossmann
0ab032c4fc Rename hw_sync to trigger
Replace hw_sync_mode_t with bool.
2025-12-30 20:10:10 -05:00
Michael Ossmann
8e14cf6b0c Make tuning_set_frequency() return type consistent 2025-12-30 19:52:05 -05:00
Michael Ossmann
4580824866 Don't commit to table-based tuning for non-praline 2025-12-30 19:42:42 -05:00
Michael Ossmann
c9c5e1bddd Enable DC block by default 2025-12-30 18:21:35 -05:00
Michael Ossmann
d5361ea523 Don't use doubles in firmware
The FPU supports only single-precision floats.
2025-12-30 18:14:28 -05:00
Michael Ossmann
f6c23be2d9 Set default MAX2831 RX HPF to 30 kHz
The 100 Hz setting that is recommended by the data sheet doesn't seem to
work correctly.  The other settings would be appropriate only with the
extended precision RX gateware.

The 600 kHz setting seems like it should be useful with higher sample
rates, but it increases LPF roll-off.
2025-12-30 18:08:13 -05:00
Michael Ossmann
980c87417e Clean up compiler warnings 2025-12-30 18:07:18 -05:00
Michael Ossmann
6f02a4c544
Merge pull request #1630 from greatscottgadgets/revert-1610-generic-sgpio-intf
Revert "gateware: generic SGPIOInterface, simpler capture management, fix SB_MAC16 resamplers"
2025-12-23 19:01:54 -05:00
Michael Ossmann
0a9e24c7bd
Revert "gateware: generic SGPIOInterface, simpler capture management, fix SB_MAC16 resamplers" 2025-12-23 18:41:15 -05:00
Michael Ossmann
d1be4dba86
Merge pull request #1626 from mndza/prbs-null-check
Check for null values in PRBS self-test
2025-12-21 11:59:43 -05:00
Michael Ossmann
5d5c88ed1a
Merge pull request #1610 from mndza/generic-sgpio-intf
gateware: generic SGPIOInterface, simpler capture management, fix SB_MAC16 resamplers
2025-12-21 11:49:48 -05:00
Martin Ling
4228637fb6 Add HackRF Pro block diagram. 2025-12-20 17:52:27 +00:00
Martin Ling
ed221e65a9 Update hardware documentation to cover HackRF Pro. 2025-12-20 17:52:27 +00:00
mndza
985c18c950
Check for null values in PRBS self-test 2025-12-19 17:12:55 +01:00
mndza
91c005d13e
gateware: fix SB_MAC16 versions of the FIR decimator, interpolator
Simplified the filter architecture by using an adder tree for obtaining
the final sum of the subfilters (vs systolic array). Previously, no
backpressure (always_ready=True) worked fine but otherwise we lost
samples.
2025-12-19 17:03:05 +01:00
mndza
99f96d2498
gateware: generic SGPIOInterface and simpler capture management 2025-12-19 17:03:05 +01:00
Michael Ossmann
c011b78f40
Merge pull request #1614 from antoinevg/praline-fpga-regs-def
Add register definitions for the standard FPGA bitstream.
2025-12-19 11:01:20 -05:00
Antoine van Gelder
a53385af84
firmware: fix smol typo and off-by-one error 2025-12-19 17:40:11 +02:00
Antoine van Gelder
3faf82ede6
firmware: move fpga selftest to a separate file to resolve blinky linker issues 2025-12-19 16:10:15 +02:00
Antoine van Gelder
4e90ee5c51
firmware: add register definitions for standard fpga bitstream 2025-12-19 16:10:15 +02:00
Michael Ossmann
b9f28460d2
Merge pull request #1619 from antoinevg/praline-max2831-rx-hpf
Add support for setting the MAX2831 receiver's HPF corner frequency.
2025-12-19 08:35:01 -05:00
Michael Ossmann
0e869d31f7 Use measured MAX2831 TX filter bandwidth 2025-12-18 18:20:27 -05:00
Michael Ossmann
0ea91e2fa0
Merge pull request #1620 from greatscottgadgets/pin-shutdown
Improve firmware boot process
2025-12-18 13:44:35 -05:00
Michael Ossmann
444f4311ec
Merge pull request #1622 from greatscottgadgets/loopback-thresholds
Adjust transceiver loopback self-test thresholds
2025-12-18 13:44:07 -05:00
Michael Ossmann
8e390c3b79 Adjust transceiver loopback self-test thresholds 2025-12-18 00:27:29 -05:00
Diego Hurtado
4ed9169f4e
fix gateware typo and update build, no DC block in loopback test (#1621) 2025-12-17 14:33:06 -05:00
Michael Ossmann
2aaa2213c9 Ensure clock generator off before turning on
Do not try to activate clock generator if power supply is disabled on
Praline.
2025-12-17 09:54:24 -05:00
Michael Ossmann
d36805da4e Activate Praline FPGA and RF supplies selectively
Do not turn them on if running from RAM
2025-12-16 21:55:37 -05:00
Michael Ossmann
6f862a1349 Add pin_shutdown()
Portions of pin_setup() that establish a safe, low-power state are moved
into the new pin_shutdown(). Use pin_shutdown() to prepare for sleep or
reset or prior to calling pin_setup().
2025-12-16 21:52:53 -05:00
Michael Ossmann
44db1674d7 Use gateware default trigger setting on Praline
Don't try to talk to gateware before FPGA configuration
2025-12-16 21:31:48 -05:00
Michael Ossmann
22e56a7076 Simplify pin_setup() 2025-12-16 21:30:50 -05:00
Antoine van Gelder
7be3c7fdf1
firmware: add support for setting max2831 rx hpf corner frequency 2025-12-16 09:30:36 +02:00
Michael Ossmann
1925e5908a
Merge pull request #1615 from mndza/xcvr-loopback-extended
Extend self-tests
2025-12-13 11:05:12 -05:00
mndza
d8fa93dcda
Add FPGA SPI test 2025-12-11 18:22:17 +01:00
mndza
c7cf262486
Add skipped and timeout states as possible results for self-tests 2025-12-11 12:48:43 +01:00
mndza
86850fa14f
Extend transceiver loopback self-tests 2025-12-05 09:44:42 +01:00
Michael Ossmann
9039eb063f
Merge pull request #1616 from mndza/safe-pin-setup-fpga
Add safe defaults for the FPGA configuration pins in `pin_setup()`
2025-12-04 21:05:46 -05:00
Martin Ling
5ba4886ded
Merge pull request #1613 from antoinevg/fix-zlp-bug
Fix zlp bug when request response length falls on a packet boundary.
2025-12-04 16:14:52 +00:00
mndza
e4c0dd3cee
Add safe defaults for the FPGA configuration pins in pin_setup() 2025-12-04 11:17:41 +01:00
Antoine van Gelder
db73ecbf5b
firmware: fix zlp bug when IN transfer length falls on a packet boundary 2025-12-03 15:50:02 +02:00
Michael Ossmann
90e15ec85f
Merge pull request #1612 from martinling/new-rtc-test
New method to test RTC oscillator
2025-11-30 23:12:42 -05:00
Martin Ling
4fdd656d46 Add -o / --rtc-osc option to hackrf_debug usage message. 2025-11-30 14:58:05 +00:00
Martin Ling
9726cf56e5 Flip Si5351 register bits back again after testing them flipped.
Needed since other tests expect this register to have its initial value.
2025-11-27 04:53:05 +00:00
Martin Ling
23d69bf90c New method to test RTC oscillator. 2025-11-27 04:41:09 +00:00
Michael Ossmann
00467d0506
Merge pull request #1611 from mndza/fpga-self-test
Do not halt when FPGA configuration fails: update report instead.
2025-11-26 19:19:11 -05:00
mndza
24b05d6426
Do not halt when FPGA configuration fails: update report instead. 2025-11-26 20:53:49 +01:00
Michael Ossmann
f5e5ed5ba2
Merge pull request #1608 from greatscottgadgets/fix-selftests
Fix self-tests
2025-11-25 21:03:58 -05:00
Michael Ossmann
cde5d754d3 Remove 32 kHz oscillator self-test
Reliable oscillator start-up requires several hundred milliseconds which
is longer than we are willing to wait at every boot. We could add an
on-demand test in the future instead of an automatic self-test.
2025-11-25 20:31:44 -05:00
Michael Ossmann
95e7e2a009 Fix readsel for RFFC5072 device ID read 2025-11-25 20:13:01 -05:00
Michael Ossmann
4832619823 Use MAX2831 RSSI mux and ADC for selftest
Co-authored-by: Martin Ling <martin-git@earth.li>
2025-11-25 20:12:27 -05:00
Michael Ossmann
29be31bf71 Add hackrf_debug option to read ADC
Co-authored-by: Martin Ling <martin-git@earth.li>
2025-11-25 20:08:20 -05:00
Martin Ling
692da36d76 Use _stricmp instead of strcasecmp on MSVC. 2025-11-25 10:16:48 +00:00
Michael Ossmann
785c068f91 Change Praline USB product string to "HackRF Pro" 2025-11-24 21:33:21 -05:00
Michael Ossmann
409acbc3c9 Add support for HackRF Pro (code name: Praline)
Co-authored-by: mndza <diego.hdmp@gmail.com>
Co-authored-by: Martin Ling <martin-git@earth.li>
Co-authored-by: Antoine van Gelder <antoine@greatscottgadgets.com>
2025-11-24 20:53:41 -05:00
Martin Ling
b3bf7a1b70 Report whether other devices are sharing the USB bus. 2025-11-06 16:27:21 +00:00
Michael Ossmann
390837715b
Merge pull request #1602 from martinling/mb-unit
Correct units in hackrf_transfer output from MiB to MB
2025-11-06 11:07:05 -05:00
Jacob Graves
9e6f1a24f3
Add hackrf_test.py (#1587)
hackrf_test.py uses one HackRF to test another.

Co-authored-by: Michael Ossmann <mike@ossmann.com>
2025-10-31 13:51:09 -04:00
Martin Ling
5dad4961e6 Correct units in hackrf_transfer output from MiB to MB. 2025-10-27 10:04:48 +00:00
Michael Ossmann
d56d652764
Merge pull request #1596 from martinling/libhackrf-version
Set libhackrf version to 0.9.1
2025-10-13 12:53:35 -04:00
Martin Ling
a0f359c394
Merge pull request #1597 from martinling/ci-msys
CI: Add builds on Windows using MSYS2
2025-10-08 13:23:37 +01:00
Martin Ling
69e8f476c5 CI: Remove separate steps for creating directories. 2025-10-05 09:07:08 +01:00
Martin Ling
f03020296b CI: Add host builds using MSYS. 2025-10-05 08:53:56 +01:00
Martin Ling
4a664b68c2 CI: Avoid writing '-latest' everywhere in OS matrix. 2025-10-05 06:16:26 +01:00
Martin Ling
59e145439a CI: Add firmware build on Windows using MSYS2. 2025-10-05 05:22:01 +01:00
Martin Ling
384e8f270b Set libhackrf version to 0.9.1. 2025-10-04 18:27:55 +01:00
Martin Ling
6609bc6d70 Update documentation on building for Windows. 2025-10-04 04:29:40 +01:00
Martin Ling
19b20123cd
Merge pull request #1594 from martinling/pkg-config-windows
CMake: support use of pkgconf to find libraries on Windows
2025-10-04 03:52:53 +01:00
Martin Ling
afbcf633f5 CI: Simplify Windows build by using pkgconf to find paths. 2025-10-04 03:41:09 +01:00
Martin Ling
0ee6e2ed86 FindLIBUSB.cmake: Fix inconsistency in LIBUSB_LIBRARY_NAME[S] vars. 2025-10-04 03:38:04 +01:00
Martin Ling
ae23839084 FindLIBUSB.cmake: allow use of pkg-config on Windows. 2025-10-04 03:35:57 +01:00
Martin Ling
bfe7392453
Merge pull request #1593 from martinling/use-fftw-without-pkgconf
CMake fixups
2025-10-04 03:07:19 +01:00
Martin Ling
861002537c cmake: Update & simplify options needed for Windows builds. 2025-10-04 02:55:30 +01:00
Martin Ling
b862c31473 cmake: Use FFTW3f if found by any means, not just pkg-config.
PC_FFTW3f_FOUND indicates that FFTW3f was found via pkg-config.
It can also be found without pkg-config, if the necessary paths
are supplied. This fixes hackrf_sweep not being built in that case.
2025-10-04 02:49:36 +01:00
Michael Ossmann
6195f42d94
Merge pull request #1585 from greatscottgadgets/dependabot/pip/docs/jinja2-3.1.6
build(deps): bump jinja2 from 3.1.5 to 3.1.6 in /docs
2025-10-02 12:22:39 -04:00
Michael Ossmann
721bd3e239
Merge pull request #1591 from martinling/update-uninstall
Update CMake code for producing 'make uninstall' target
2025-10-02 11:55:35 -04:00
Martin Ling
967d2b4f86 Update CMake code for producing 'make uninstall' target. 2025-10-02 16:44:54 +01:00
Michael Ossmann
dbae993ec1
Merge pull request #1590 from martinling/stdbool
Use stdbool.h rather than our own bool definition
2025-10-02 11:34:29 -04:00
Martin Ling
8cbcc8a4e9 Use stdbool.h rather than our own bool definition. 2025-10-02 16:22:30 +01:00
Martin Ling
3d9e01d24f
Merge pull request #1589 from atsampson/libtarget
Fix missing shared library version
2025-10-02 16:16:01 +01:00
Adam Sampson
aa6390a34a Fix missing shared library version
The libtarget variable isn't defined here (it's used in a helper
function above). This caused libhackrf to be built and installed without
a version number.
2025-10-01 12:14:45 +01:00
Michael Ossmann
ab60569255
Merge pull request #1586 from martinling/modern-cmake
Modern CMake, rebased
2025-09-30 12:25:08 -04:00
Martin Ling
b8dae7a3e5 Enable earlier CMake versions on macOS runners. 2025-09-19 03:20:43 +01:00
Martin Ling
fbeda8d018 Don't try to use --install option on CMake 3.10 (added in 3.15). 2025-09-19 03:20:38 +01:00
A. Maitland Bottoms
48034f7e2e update scripts
Modernize CMake usage in scripts to define a build directory
using the cmake -B flag, use cmake --build rather than just make.
2025-09-19 02:59:30 +01:00
A. Maitland Bottoms
506c8cb292 modern cmake
Refactor HackRF build system with a more modern CMake style.
Install files to allow library users using CMake to
find_project(HackRF CONFIG) and obtain HackRF::hackrf
and/or HackRF::hackrf_static library targets.

Add options ENABLE_STATIC_LIB and ENABLE_SHARED_LIB
to allow shared or static library to be disabled.
(Default builds both shared and static libraries.)

Add option ENABLE_HACKRF_SWEEP, when disabled allows
building without FFT library. (Default enabled.)

Add option DISABLE_USB_DEVICE_DISCOVERY for a compile definition
which could be used to alter libusb usage as needed on Android.
2025-09-19 02:59:30 +01:00
dependabot[bot]
3c7cc02a5e
build(deps): bump jinja2 from 3.1.5 to 3.1.6 in /docs
Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.5 to 3.1.6.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/3.1.5...3.1.6)

---
updated-dependencies:
- dependency-name: jinja2
  dependency-version: 3.1.6
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-19 00:44:43 +00:00
Martin Ling
adc537331c
Merge pull request #1584 from martinling/cmake-version-ci
Bump CMake minimum to 3.10, and test with multiple CMake versions
2025-09-19 01:43:49 +01:00
Martin Ling
3e4c45f6b0 Test build with multiple CMake versions. 2025-09-19 01:36:39 +01:00
Martin Ling
2d2b6231fb Bump CMake minimum version to 3.10. 2025-09-19 01:12:24 +01:00
Martin Ling
0dc68be1f6
Merge pull request #1583 from martinling/remove-appveyor
Fix CI breakage
2025-09-16 19:08:10 +01:00
Martin Ling
5c39452040 Bump CMake minimum version to 3.5.0.
This is the minimum now accepted by latest CMake releases.
2025-09-16 19:00:49 +01:00
Martin Ling
3225485253 Remove Appveyor configuration. 2025-09-16 18:54:10 +01:00
Martin Ling
33168526d1
Merge pull request #1483 from JVital2013/rawio
Implement RAW_IO with WinUSB
2025-09-16 12:35:50 +01:00
Jamie Vital
3d5bddb88f Implement RAW_IO with WinUSB 2025-09-15 10:03:26 -04:00
Jacob Graves
ce07fd3f33
Merge pull request #1558 from grvvy/ci_sgpio_debug
ci: improve sgpio-debug test reliability and error messaging
2025-09-04 15:23:45 -06:00
Michael Ossmann
6aa419f2c0
Merge pull request #1567 from mndza/new-tuning
Tuning improvements
2025-08-22 12:03:43 -04:00
mndza
cae8060d0d
firmware: disable rffc5071 dithering, tune to nearest 625000 Hz step 2025-08-21 10:04:45 +02:00
mndza
5520f8467c
firmware: round to nearest frequency when tuning 2025-08-19 11:40:09 +02:00
mndza
2e6bb0ab68
firmware: rffc5071 synth configuration accepts Hz instead of MHz 2025-08-19 11:40:09 +02:00
mndza
ac0552a5b9
firmware: optimize and rename rffc5071 synth config function 2025-08-19 11:40:08 +02:00
mndza
d3ee417807
firmware: fix max283x fractional long division 2025-08-19 11:17:04 +02:00
mndza
32870ad486
firmware: no division when calculating n_lo in RFFC5071 synth 2025-08-19 11:17:04 +02:00
Michael Ossmann
c5d63b97db
Merge pull request #1576 from miek/clang-format-sweep
hackrf_sweep: fix clang-format errors
2025-08-12 14:50:04 -04:00
Mike Walters
eb798c5cdf hackrf_sweep: fix clang-format errors 2025-08-08 15:53:39 +01:00
grvvy
132da7b421 ci: check shortfall count to isolate failures in firmware 2025-08-01 10:45:53 -06:00
Michael Ossmann
4282a3d8dc
Merge pull request #1551 from philippuhl/patch-1
Update doc section about windows binaries
2025-07-03 11:16:28 -04:00
philippuhl
a757698bea
Add radioconda information
I added the Information about radioconda. I would still suggest leaving the hint about the build artifacts in the documentation, as this is currently the only source of the binaries that don't require any third party.
2025-06-14 21:22:51 +02:00
grvvy
8431761b1d ci: improve sgpio-debug test reliability and error messaging 2025-06-06 15:06:30 -06:00
Michael Ossmann
4b8dbfc308
Merge pull request #1553 from miek/fix-dfu-crc
Fix DFU CRC errors
2025-06-05 12:00:58 -04:00
Michael Ossmann
305576ed17
Merge pull request #1555 from albayenes/num-fft-bins-is-more-appropriate-name-for-fftSize
Replace fftSize with more meaningful name for num_fft_bins
2025-06-05 11:15:32 -04:00
Enes Albay
eead55af45 Replace fftSize with more meaningful name num_fft_bins 2025-05-23 19:43:22 +03:00
Mike Walters
3b5cd8f889 Fix DFU CRC errors
Previously we were calculating the dfu-suffix CRC and then modifying the
image, invalidating the check.

This re-orders the operations to apply the boot image header first and
then run dfu-suffix.
2025-05-22 10:04:40 +01:00
philippuhl
b84aab3bca
Update section about windows binaries 2025-05-19 12:51:16 +02:00
antoinevg
e5cfe1ac2b
Merge pull request #1540 from miek/docs-improvements
docs: Rename FAQ to troubleshooting, reorganise, and add info on troubleshooting undetected hardware
2025-03-27 16:31:06 +02:00
Mike Walters
17b641d776 docs: add troubleshooting section for no boards found 2025-03-25 13:07:11 +00:00
Mike Walters
980bb9c548 docs: remove mention of a very old DC spike bug
At this point it's more likely to confuse things than help
2025-03-25 11:18:37 +00:00
Mike Walters
655be2e225 docs: add pictures to DC spike explanation 2025-03-25 11:17:27 +00:00
Mike Walters
1c691c4a56 docs: rename FAQ to Troubleshooting 2025-03-25 10:46:47 +00:00
Mike Walters
a7d9d853ff docs: move LED color info from FAQ 2025-03-25 10:14:35 +00:00
Mike Walters
fd20d32774 docs: reword gain settings 2025-03-25 10:11:04 +00:00
Mike Walters
2d5070832c docs: move gain info from FAQ 2025-03-25 10:05:51 +00:00
Mike Walters
20e5830c2e docs: add links to product page & resellers on HackRF one page, remove from faq 2025-03-24 14:25:55 +00:00
Mike Walters
bb03d1c42a docs: Remove full-duplex FAQ entries 2025-03-24 13:39:12 +00:00
Mike Walters
87e779306a docs: adjust input/output power titles & wording 2025-03-24 13:39:12 +00:00
Mike Walters
60c262fd18 docs: Move TX/RX power FAQ entries to HackRF One page 2025-03-24 13:39:12 +00:00
Mike Walters
71bc394088
Merge pull request #1523 from greatscottgadgets/dependabot/pip/docs/jinja2-3.1.5
build(deps): bump jinja2 from 3.1.4 to 3.1.5 in /docs
2025-01-09 14:37:25 +00:00
dependabot[bot]
72775fc387
build(deps): bump jinja2 from 3.1.4 to 3.1.5 in /docs
Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.4 to 3.1.5.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/3.1.4...3.1.5)

---
updated-dependencies:
- dependency-name: jinja2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-08 20:53:05 +00:00
Mike Walters
e00468929b
Merge pull request #1519 from gullradriel/locking-fix
define replacement for enable and disable irq for m0
2024-12-18 17:44:48 +00:00
gullradriel
9bdf731fc0 added memory clobber to prevent memory reordering 2024-12-18 17:01:18 +01:00
gullradriel
039ab0de46 define replacement for enable and disable irq for m0 2024-12-17 22:00:47 +01:00
Michael Ossmann
cfdfe8a1aa
Merge pull request #1517 from martinling/locking-api
Add a shim header to support locking without ldrex/strex
2024-12-17 12:14:03 -05:00
Martin Ling
f3e7d10d07 Add comment about constraints on locking primitives. 2024-12-16 21:19:12 +00:00
Martin Ling
a272e97fda Include nvic.h via the dispatch headers. 2024-12-16 21:14:16 +00:00
gullradriel
46f43c3a9e
fix compilation warnings (#1516)
Co-authored-by: gullradriel <gullradriel@no-mail.com>
2024-12-16 19:28:16 +00:00
Martin Ling
b9945de490 Add a shim header to support locking without ldrex/strex.
Required to allow the USB queue code to be built for the M0.
2024-12-16 19:15:08 +00:00
Michael Ossmann
db884152dc
Merge pull request #1513 from martinling/sgpio-doc-fix
Update SGPIO code documentation
2024-12-05 11:31:16 -05:00
Michael Ossmann
75431531f2
Merge pull request #1510 from martinling/sgpio-deadline-check
SGPIO deadline check
2024-12-05 11:30:06 -05:00
Michael Ossmann
7777088bf5
Merge pull request #1507 from greatscottgadgets/Update-technical-support-issue-template
Update technical-support.yml
2024-12-05 11:29:25 -05:00
Michael Ossmann
a7da235bf3
Merge pull request #1493 from inomotech-foss/master
Handle CTRL+BREAK signals hackrf-tools on Windows
2024-12-05 11:21:29 -05:00
Michael Ossmann
83a7e6ccad
Merge pull request #1469 from martinling/sync-checklist
Add synchronization checklist to documentation
2024-12-05 11:19:12 -05:00
Martin Ling
e4f9a7d462 Add synchronization checklist to documentation. 2024-12-05 16:16:08 +00:00
Martin Ling
8b5a10c26c Update SGPIO code documentation. 2024-12-04 16:10:07 +00:00
Michael Ossmann
3c77ebb5cf
Merge pull request #1512 from bernd-herzog/agm_cpld
Add AGM CPLD to portapack detection routine
2024-12-02 13:00:46 -05:00
bernd-herzog
3175c47372 added AGM CPLD to portapack detect routine 2024-12-01 10:29:25 +01:00
Martin Ling
03551cb1fd Detect whether the M0 missed its deadline.
Counter-intuitively, this actually saves us two cycles because we unroll
the first iteration of the loop that spins on the interrupt flag, saving
a branch in the case that the flag is clear the first time.
2024-11-26 19:34:29 +00:00
Martin Ling
d21f01f7b4 In conditional branch table, list one destination per line, in order. 2024-11-26 19:04:42 +00:00
Straithe
c895a0f8be
Update technical-support.yml 2024-11-23 11:46:20 -05:00
Michael Ossmann
b178c66e6e
Merge pull request #1498 from miek/operacake-block-diagram
Add Opera Cake Block Diagram
2024-11-13 12:35:09 -05:00
Mike Walters
5b6b46da53 docs: add Opera Cake Block Diagram 2024-11-06 16:07:00 +00:00
Simon Berger
c0181b46d1
hackrf-tools: handle ctrl+break signal on windows 2024-10-18 14:32:56 +00:00
Michael Ossmann
17f394331d
Merge pull request #1466 from grvvy/hub_update
ci: usb hub ppps handling overhaul
2024-07-17 13:47:16 -04:00
grvvy
c9c6d76ef8 ci: use repository URL instead of relying on jenkins environment variables 2024-07-17 11:30:31 -06:00
grvvy
0212bf625a ci: build docker image from master branch's Dockerfile 2024-07-15 13:47:00 -06:00
grvvy
ab69bef242 ci: usb hub ppps handling overhaul 2024-07-12 13:12:52 -06:00
Martin Ling
2d9a7dbd0b
Merge pull request #1453 from greatscottgadgets/dependabot/pip/docs/jinja2-3.1.4
build(deps): bump jinja2 from 3.1.3 to 3.1.4 in /docs
2024-07-09 20:09:58 +01:00
Michael Ossmann
c65af50cd2
Merge pull request #1459 from straithe/updateHardwareRevisionsDocs
Add spec statement to hardware revision docs
2024-07-04 11:46:46 -04:00
Straithe
9d54ba484d Add spec statement to hardware revision docs 2024-06-08 01:41:39 -04:00
dependabot[bot]
f927307787
build(deps): bump jinja2 from 3.1.3 to 3.1.4 in /docs
Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.3 to 3.1.4.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/3.1.3...3.1.4)

---
updated-dependencies:
- dependency-name: jinja2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-06 21:02:34 +00:00
Martin Ling
d4ed8474e5
Merge pull request #1442 from martinling/example-fix
Correct prototype of flush callback in example code.
2024-05-02 16:40:04 +01:00
Martin Ling
dd3b2c3d96
Merge pull request #1440 from jglim/master
docs: update github.com/mossmann urls
2024-05-02 16:38:57 +01:00
Martin Ling
9042395af3
Merge pull request #1449 from rudis/master
hackrf.h: fix typos in documentation comments
2024-05-02 16:36:06 +01:00
Michael Ossmann
8082e696a3
Merge pull request #1450 from grvvy/workflow_pip
ci: use python venv for github actions firmware builds
2024-04-30 12:20:13 -04:00
grvvy
282c5bf2f9 ci: use python venv for firmware builds 2024-04-26 14:07:01 -06:00
Simon Ruderich
658829fdd5 hackrf.h: fix typos in documentation comments 2024-04-26 08:10:25 +02:00
Martin Ling
c201c14a7e Correct prototype of flush callback in example code. 2024-04-11 10:35:30 +01:00
JinGen Lim
74efc69bf7 docs: update github.com/mossmann urls
In the installing_hackrf_software docs, under "Installing From Source", the source url still points to `git clone https://github.com/mossmann/hackrf.git` instead of https://github.com/greatscottgadgets/hackrf.git

Unlike the other browser links, the git url is not automatically redirected, so cloning will fail:

```
jg@buildbot:~/hackrf$ git clone https://github.com/mossman/hackrf.git
Cloning into 'hackrf'...
remote: Repository not found.
fatal: repository 'https://github.com/mossman/hackrf.git/' not found
```

While creating this patch, I also found a few more of those older urls and updated them too.
One last unfixed url remains at https://hackrf.readthedocs.io/en/latest/LPC43XX_Debugging.html#lpc-link, however I could not find the intended destination so I have left it as-is.
2024-04-06 22:38:26 +08:00
Michael Ossmann
22c9ff10f9
Merge pull request #1430 from martinling/cache-arm-toolchain
CI: Use special action to install & cache GNU Arm toolchain
2024-04-04 11:27:02 -04:00
Martin Ling
85ff670dda CI: Use special action to install & cache GNU Arm toolchain. 2024-03-19 00:13:14 +00:00
Michael Ossmann
857d2ca04d
Merge pull request #1424 from NoSuck/doc-markdown-heading
doc: markdown heading
2024-03-07 11:42:33 -05:00
Michael Ossmann
1525b624d1
Merge pull request #1391 from dmaltsiniotis/feature/package-windows-artifacts
Auto-package windows binaries on build (and fix a few bugs and warnings)
2024-03-07 11:40:26 -05:00
Friendly
57f9d7a6ce doc: markdown heading
The previous markdown was not valid and yielded the following warning:

```sh
make html
Running Sphinx v5.3.0
WARNING: Invalid configuration value found: 'language = None'. Update your configuration to a valid language code. Falling back to 'en' (English).
making output directory... done
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 34 source files that are out of date
updating environment: [new config] 34 added, 0 changed, 0 removed
reading sources... [100%] virtual_machines
hackrf/docs/source/list_of_hardware_revisions.rst:36: WARNING: Title underline too short.

HackRF One r10
~~~~~~~~~~~~~
hackrf/docs/source/list_of_hardware_revisions.rst:36: WARNING: Title underline too short.

HackRF One r10
~~~~~~~~~~~~~
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] virtual_machines
generating indices... genindex done
writing additional pages... search done
copying images... [100%] ../images/noisereducingcablescreenshot.jpeg
copying static files... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded, 3 warnings.

The HTML pages are in build/html.
```

Congratulations on double digits.
2024-03-03 19:24:18 -06:00
Demetri Maltsiniotis
3d83a2f911 * Fix quoting issue causing bad library include path, add install step hackrf-tools.
* Add artifact publish step for Windows libraries and host tools.
* Replace runner.workspace with github.workspace.
* Update checkout task to v4 to supress warning.
* Update CMAKE for libhackrf and hackrf-tools to also install DLLs on WIN32 platforms.
* Update uploadartifact task to v4 since v3 uses an end-of-life node version 16.
* Add a new windows variable for the vcpkg cmake toolchain makefile.
2024-02-29 18:39:03 -06:00
Michael Ossmann
8486cb2a0c
Merge pull request #1420 from greatscottgadgets/post-release
Set version to 2024.02.1+
2024-02-28 12:04:35 -05:00
Michael Ossmann
413409760a Set version to 2024.02.1+ 2024-02-23 13:09:46 -05:00
Michael Ossmann
18b485e3b6
Merge pull request #1419 from greatscottgadgets/release
Some checks failed
Build / host (ubuntu-latest) (push) Failing after 8s
Build / firmware (HACKRF_ONE, ubuntu-latest) (push) Failing after 20s
Check code style / clang-format (push) Failing after 5s
Build / firmware (JAWBREAKER, ubuntu-latest) (push) Failing after 25s
Build / firmware (RAD1O, ubuntu-latest) (push) Failing after 18s
Check code style / clang-format-1 (push) Failing after 10s
Check code style / clang-format-3 (push) Failing after 12s
Check code style / clang-format-2 (push) Failing after 13s
Build / host (macos-latest) (push) Has been cancelled
Build / host (windows-latest) (push) Has been cancelled
Build / firmware (HACKRF_ONE, macos-latest) (push) Has been cancelled
Build / firmware (JAWBREAKER, macos-latest) (push) Has been cancelled
Build / firmware (RAD1O, macos-latest) (push) Has been cancelled
Release 2024.02.1
2024-02-22 19:17:57 -05:00
Michael Ossmann
16b0363fb5
Merge pull request #1411 from greatscottgadgets/h1r10
HackRF One r10
2024-02-22 14:23:04 -05:00
Michael Ossmann
109d7c025c Set version to 2024.02.1 2024-02-22 14:11:01 -05:00
Michael Ossmann
5bed412018 Set libhackrf API version to 0.9 2024-02-22 14:01:59 -05:00
Michael Ossmann
d0bb89643a
Merge pull request #1403 from smburdick/build-updates
Update CMAKE minimum version to 2.8.12
2024-02-22 13:56:15 -05:00
Michael Ossmann
3bdc554700 Add HackRF One r10 to list of hardware revisions 2024-02-22 10:58:12 -05:00
Michael Ossmann
39940af59d
Merge pull request #1418 from greatscottgadgets/h1r10-fw
Support detection of HackRF One r10
2024-02-22 10:52:35 -05:00
Michael Ossmann
24ac1edf5a Support detection of HackRF One r10 2024-02-21 23:48:54 -05:00
Michael Ossmann
93d9f9b45c Use 10-bit ADC value for pin strap detection
Previously we thought we were configuring the ADC for 8-bit values, but
we did so incorrectly. We were throwing away the top two bits of a
10-bit value. This never caused a problem because the only fixed
voltages we used were at the extreme minimum or maximum of the ADC
range.
2024-02-21 23:29:27 -05:00
Michael Ossmann
4b036648fd
Merge pull request #1398 from grvvy/sgpio_debug_test
sgpio debug ci test
2024-02-21 23:01:33 -05:00
Michael Ossmann
cbb5e18317
Merge pull request #1415 from martinling/issue-template-fix
Update documentation link in issue template.
2024-02-15 12:25:44 -05:00
Michael Ossmann
840b6f4632
Merge pull request #1412 from martinling/revert-8k-transfers
Revert "Reduce firmware USB transfer size from 16KB to 8KB."
2024-02-15 12:25:08 -05:00
Martin Ling
b17fafcc0f Update documentation link in issue template. 2024-02-13 13:50:48 +00:00
Martin Ling
72a0a01190 Revert "Reduce firmware USB transfer size from 16KB to 8KB."
This reverts commit fefa4f0e45.
2024-02-08 01:07:11 +00:00
Michael Ossmann
24b53345af HackRF One: update version to 10 2024-02-07 13:29:41 -05:00
Michael Ossmann
df452e7533 HackRF One: update symbols from libraries 2024-02-07 13:29:41 -05:00
Michael Ossmann
d7b5a35371 HackRF One: correct fabrication attributes and DNP 2024-02-07 13:29:41 -05:00
Michael Ossmann
1d138898ab HackRF One: update 0402 silkscreen for readability 2024-02-07 13:29:41 -05:00
Michael Ossmann
f90930f4c0 HackRF One: remove silkscreen from pads 2024-02-07 13:29:41 -05:00
Michael Ossmann
375ba4e21a HackRF One: clean up symbol value names 2024-02-07 13:29:41 -05:00
Michael Ossmann
e0d64a42a3 HackRF One: update version detection pin straps
Hardware version detection now requires sensing of an analog voltage.
2024-02-07 13:29:41 -05:00
Michael Ossmann
44e3b74647 HackRF One: correct T3 and T4 balun symbol
- Swap GND pins to reflect correct internal wiring
- Remove obsolete and apparently incorrect substitution
2024-02-07 13:29:41 -05:00
Michael Ossmann
a4e07bde83 HackRF One: update 100 nF capacitor part selection 2024-02-07 13:29:41 -05:00
Michael Ossmann
3f34a678a5 HackRF One: add SMA connector keepouts 2024-02-07 13:29:41 -05:00
Michael Ossmann
72d2682136 HackRF One: add second fiducial mark 2024-02-07 13:29:41 -05:00
Michael Ossmann
aefb900e9b HackRF One: add resistance to amplifier supplies
This may improve reliability since switching to a MOSFET with lower on
resistance.
2024-02-07 13:29:41 -05:00
Michael Ossmann
f0b6bdb7eb HackRF One: update component selections
Add Substitution field
2024-02-07 13:29:41 -05:00
Michael Ossmann
a785f20a27 HackRF One: use DNP field instead of Note field 2024-02-07 13:29:41 -05:00
Michael Ossmann
e67e3a8b1c HackRF One: update version to 8+ 2024-02-07 13:29:41 -05:00
Michael Ossmann
31944783f2 HackRF One: revert hardware design to 8727449
This commit is between r8 and r9 and will be used as the basis for r10.
It includes some of the changes in r9 but predates the major changes to
the clock generator and IF transceiver ICs.
2024-02-07 13:29:41 -05:00
Gabriele Gristina
f6598e7b14
hackrf_sweep: normalized timestamp (#1350)
* Added a new option (-n) to enable timestamp normalization within a same sweep
2024-02-01 17:24:55 +00:00
Sam Burdick
3b55d5a65e Min CMAKE Version -> 2.8.12 2024-02-01 09:18:31 -08:00
Sam Burdick
041778b5c8
Merge branch 'greatscottgadgets:master' into build-updates 2024-02-01 09:14:06 -08:00
Martin Ling
05a03d41a4
Merge pull request #1404 from smburdick/macos-build-directions
macOS build directions
2024-02-01 17:03:05 +00:00
Michael Ossmann
980331ba77
Merge pull request #1406 from martinling/rtd-update
Update readthedocs requirements to current versions.
2024-02-01 11:59:20 -05:00
Martin Ling
c0e7391c48 Update readthedocs requirements to current versions. 2024-01-17 05:13:46 +00:00
Sam Burdick
423940f59d update readme 2024-01-15 18:38:51 -08:00
Sam Burdick
a1cb37a66a Add macOS build instructions 2024-01-15 18:38:03 -08:00
Sam Burdick
f445c265b1 Update CMAKE minimum version 2024-01-15 18:31:42 -08:00
grvvy
38b7e53ef6 ci: add sgpio debug test 2024-01-08 15:24:56 -07:00
Michael Ossmann
4b31fd9132
Merge pull request #1390 from grvvy/ci_update
ci: ubuntu 22.04 update
2024-01-04 11:24:16 -05:00
grvvy
c85d6b5245 ci: update docker base image and prerequisites, catch errors from intermediate test scripts, retry tx/rx tests before failing 2023-12-18 16:37:13 -07:00
Martin Ling
44c557ae3b
Merge pull request #1387 from straithe/updateRTDtoPassChecks
Updated files for RTD workflow
2023-12-08 00:07:23 +00:00
straithe
77805a55c9 docs: update files for RTD 2023-12-07 15:43:32 -05:00
Martin Ling
d867f7f008
Merge pull request #1383 from gvanem/patch-1
Add '#include <io.h>'
2023-12-04 20:08:55 +00:00
Gisle Vanem
e1f0a2cea1
Add '#include <io.h>'
Compiling with clang-cl, gives this error:
```c
hackrf-tools/src/hackrf_sweep.c(685,3): error: call to undeclared function '_setmode'; ISO C99 and later do not support implicit function
      declarations [-Wimplicit-function-declaration]
  685 |                 _setmode(_fileno(stdout), _O_BINARY);
      |                 ^
```

fixed by simply adding `#include <io.h>`.
2023-12-01 11:34:55 +01:00
Martin Ling
f5dd48a5bc
Merge pull request #1372 from miek/mac-ci
Switch to gcc-arm-embedded package for macOS CI build
2023-11-02 17:45:02 +00:00
Mike Walters
5f42c27a4c Switch to gcc-arm-embedded package for macOS CI build 2023-11-02 16:27:22 +00:00
Jonathan Suite
799d9ad158
Run fftw_execute() once on an empty buffer (Fix #1366), add option to save wisdom and specify plan (#863) (#1368)
* Call fftw_execute once prior to starting IQ streaming
* Add options to use/save to an FFTW wisdom file and specify plan
* Fix bug where using -P would also enable one-shot mode

Fixes #1366
Fixes #1260
Addresses #863
2023-11-02 11:25:13 -04:00
Michael Ossmann
1fd67f66ca
Merge pull request #1346 from Sasszem/libhackrf_usb_api_versions
libhackrf: document required library versions
2023-09-13 11:23:31 -04:00
bsdmp
ed8a1a6f53
mask all signals in libhackrf transfer_threadproc (#1330)
* mask all signals in libhackrf transfer_threadproc

hackrf_transfer uses pause() and SIGALRM to print statistics and POSIX doesn't
specify which thread must recieve the signal, block all signals here, so we
don't interrupt their reception by hackrf_transfer or any other app which uses
the library (#1323)

* fix windows build and remove empty line
2023-09-13 11:20:14 -04:00
Jonathan Suite
dab548bf29
Firmware updates to allow fine-grained control of biast from command line (#1314)
* Initial commit of hackrf_biast

* Cleaned up hackrf_biast

* Cleaned up usage info

* Include getopt.h for non-GNU systems

* Add support for overriding HackRF's default antenna power behavior in firmware.  Add support for specifying antenna power behavior in libhackrf.

* Moved bias tee config routines into user_config.c, cleaned up operation of hackrf_biast

* hackrf_biast now calls usage() and exits when invoked with no arguments

* Fixed minor documentation error in usage()

* minor syntax cleanup

* Add some documentation to the host API call

* Add proper declaration magic in hackrf.h to hackrf_set_user_bias_t_opts() to appease Visual Studio

* Documentation changes suggested by @martinling

* Moved bias t setting above switch statement, removed line that explicit turned bias t off when entering OFF mode

* Change hackrf_set_user_bias_t_opts() to use a friendly struct() instead of a bitmask.  User friendliness fixes to hackrf_biast options.  More clang-format appeasement.

* Removed support for integer mode args from hackrf_biast

* clang-format error fixes

* Tweaked position of comment for clang-format v14

* Reformat files with clang-format v14 instead of 16

* Remove internal numeric modes for bias T settings

Co-authored-by: Martin Ling <martin-github@earth.li>

* Fix documentation error in hackrf_biast.c

---------

Co-authored-by: Martin Ling <martin-github@earth.li>
2023-09-13 11:15:30 -04:00
Sasszem
9910c88ac3 libhackrf: document required library versions 2023-07-06 01:37:08 +02:00
Straithe
13dacd81e6
Add jawbreaker photo to jawbreaker page (#1321) 2023-06-12 17:42:12 -04:00
Straithe
14ae0743e6
Add project to community page (#1334) 2023-06-09 16:44:07 -04:00
Straithe
50c22aa05b
docs: move connectors information to its own section (#1316) 2023-05-08 00:09:04 -04:00
László Baráth
17269d3a7c
Document libhackrf functions using Doxygen (#1244)
* Document & comment code

* document functions & add pages for groups

* Run clang-format

* Fix most review change requests

* Fix typos, add information on using multiple Opera Cake boards

* Update documentation

* Changes requested by @Straithe
- update project brief
- set paper type to letter
- move doxyfile

* Changes requested by @martinling
Excluding the USB API versioning

* Remove incomplete USB version info
The required versions were only noted at a few places. Will add complete info later, but for now, it's removed
2023-04-22 22:03:49 -04:00
Jacob Graves
189b5bf693
wrap clkin init in r9 board check (#1307) 2023-04-19 13:32:32 -04:00
Straithe
464a6019b7
reorganize and update existing HackRF documentation (#1295)
* reorganize and update existing HackRF documentation

* include changes suggested by martinling

* Update software support page

* fix typo

* Update acrylic case link

* docs: make adjustments based on feedback from epenelope
2023-04-10 16:06:37 -04:00
Gianpaolo Macario
ebe1ca003a
Readme.md: Fix typo (#1299)
s/documenation/documentation/
2023-03-27 22:10:59 -04:00
Michael Ossmann
ae71cb5b7a
Merge pull request #1277 from grvvy/debug_device_fix
change the device long option to required in hackrf_debug
2023-02-14 20:15:53 -05:00
Michael Ossmann
aa34025d86
Merge pull request #1275 from greatscottgadgets/post-release
set version to 2023.01.1+
2023-02-08 19:08:14 -05:00
grvvy
fe86f005f6 change the device long option to required in hackrf_debug 2023-02-08 12:18:27 -07:00
Michael Ossmann
00253b02e1 set version to 2023.01.1+ 2023-02-08 14:03:06 -05:00
Michael Ossmann
b42a185503
Merge pull request #1272 from greatscottgadgets/release
Some checks failed
Build / host (ubuntu-latest) (push) Failing after 10s
Build / firmware (HACKRF_ONE, ubuntu-latest) (push) Failing after 12s
Check code style / clang-format (push) Failing after 7s
Build / firmware (JAWBREAKER, ubuntu-latest) (push) Failing after 16s
Build / firmware (RAD1O, ubuntu-latest) (push) Failing after 18s
Check code style / clang-format-1 (push) Failing after 17s
Check code style / clang-format-2 (push) Failing after 15s
Check code style / clang-format-3 (push) Failing after 13s
Build / firmware (HACKRF_ONE, macos-latest) (push) Has been cancelled
Build / host (macos-latest) (push) Has been cancelled
Build / host (windows-latest) (push) Has been cancelled
Build / firmware (JAWBREAKER, macos-latest) (push) Has been cancelled
Build / firmware (RAD1O, macos-latest) (push) Has been cancelled
set version to 2023.01.1
2023-02-01 00:26:55 -05:00
Michael Ossmann
d9ebb089a5 set version to 2023.01.1 2023-02-01 00:22:29 -05:00
Michael Ossmann
1bbab10955
Merge pull request #1215 from greatscottgadgets/h1r9
HackRF One r9
2023-02-01 00:18:49 -05:00
Michael Ossmann
b1d1fd4ac1 docs: add block diagram subheadings
Some checks failed
Build / host (ubuntu-latest) (push) Failing after 11s
Build / firmware (HACKRF_ONE, ubuntu-latest) (push) Failing after 21s
Check code style / clang-format (push) Failing after 5s
Build / firmware (JAWBREAKER, ubuntu-latest) (push) Failing after 22s
Build / firmware (RAD1O, ubuntu-latest) (push) Failing after 19s
Check code style / clang-format-2 (push) Failing after 4s
Check code style / clang-format-1 (push) Failing after 5s
Check code style / clang-format-3 (push) Failing after 8s
Build / host (macos-latest) (push) Has been cancelled
Build / host (windows-latest) (push) Has been cancelled
Build / firmware (HACKRF_ONE, macos-latest) (push) Has been cancelled
Build / firmware (JAWBREAKER, macos-latest) (push) Has been cancelled
Build / firmware (RAD1O, macos-latest) (push) Has been cancelled
2023-01-31 21:29:08 -05:00
Michael Ossmann
6f1cee1f00
Merge pull request #1255 from miek/h1r9-fw
Add firmware support for h1r9
2023-01-10 07:48:24 -05:00
Michael Ossmann
3796bc94d8 h1r9: check firmware running on r9 for r9 support
Previously we checked for OG support instead of r9 support because we
didn't yet have a way to tag firmware binaries with support for multiple
platforms.
2023-01-08 08:27:28 -05:00
Michael Ossmann
c19f85ef24 h1r9: use single SSP configuration for MAX283x
During r9 hardware development it was thought that the MAX2839 would use
a different GPIO pin for chip select, but it ended up being the same pin
as is used for MAX2837 on other hardware revisions.

This takes the MAX283x abstraction a bit further and fixes a bug with
hackrf_debug -m.
2023-01-08 08:21:27 -05:00
Michael Ossmann
ddfe8620a8 docs: updates for HackRF One r9 2023-01-07 13:25:49 -05:00
Mike Walters
8051675c60 h1r9: add R9 to supported platforms 2023-01-06 14:40:55 +00:00
Michael Ossmann
ff4e1107f3 h1r9: fix clkout PLL source bug 2023-01-06 14:33:56 +00:00
Michael Ossmann
bdb6000bb4 h1r9: fix inverted spectrum on TX
Unify and clean up the firmware spectrum inversion handling for all
hardware platforms.
2023-01-06 14:33:56 +00:00
Michael Ossmann
50a2e9dd56 h1r9: update clock drive strength for spin C 2023-01-06 14:33:56 +00:00
Mike Walters
bfe882a2fa h1r9: add MAX283x abstraction layer 2023-01-06 14:33:53 +00:00
Michael Ossmann
24f2c1d073 h1r9: MAX2839: always use the low LNA band 2023-01-06 14:33:53 +00:00
Michael Ossmann
51bae663fc h1r9: update pin assignments for board spin B 2023-01-06 14:33:53 +00:00
Michael Ossmann
dc67fbd2ee h1r9: fix Opera Cake time mode compatibility
TIMER3 match register 3 was interfering with SCT, fixed by turning off
all ORing of timer outputs with SCT outputs.
2023-01-06 14:33:53 +00:00
Michael Ossmann
7b5d8da821 h1r9: swap RX Q inversion 2023-01-06 14:33:53 +00:00
Michael Ossmann
b15509c2d9 h1r9: MAX2839: emulate MAX2837 RX gain configuration 2023-01-06 14:33:53 +00:00
Michael Ossmann
5693f7b193 h1r9: MAX2839: support maximum TX gain, not minimum 2023-01-06 14:33:53 +00:00
Michael Ossmann
eb8ed45f9a h1r9: adjust PLLA according to source frequency 2023-01-06 14:33:53 +00:00
Michael Ossmann
7a0aec00ef h1r9: fix usb_vendor_request_reset()
The bootloader is configured by pin straps on certain pins. We use some
of those for other purposes in r9 which causes the bootloader to
misbehave if the device is reset from software. By switching these pins
from outputs to inputs just before reset this problem is avoided.
2023-01-06 14:33:53 +00:00
Michael Ossmann
ea3b804edf h1r9: workaround platform detection problem
On the first spin of r9 one of the pins used for platform detection is
pulled up to VAA, not VCC, and VAA hasn't been switched on yet at the
time of platform detection. This results in r9 being misidentified as OG
from time to time.

As a temporary workaround until the next board spin, change the platform
from OG to r9 if it is detected as OG but has r9 pin straps.
2023-01-06 14:33:53 +00:00
Michael Ossmann
3f73290524 h1r9: configure MAX2839 HPF
Without this, the RX baseband gain amplifies a DC offset.
2023-01-06 14:33:53 +00:00
Michael Ossmann
616705b7e5 h1r9: don't write to outputs in TIMER3 ext. match register
Writing to the output bits in the TIMER3 external match register
resulted in intermittent failures that varied in likelihood from board
to board and from commit to commit for no apparent reason.
2023-01-06 14:33:53 +00:00
Michael Ossmann
4db7e8d38a h1r9: more bring-up fixes 2023-01-06 14:33:53 +00:00
Michael Ossmann
edd0a80812 h1r9: stop writing MAX2837 registers to MAX2839 2023-01-06 14:33:53 +00:00
Michael Ossmann
f4817b60a3 h1r9: MAX2839 driver updates 2023-01-06 14:33:53 +00:00
Michael Ossmann
a72f084ff0 h1r9: fix CLKOUT_EN pin setup 2023-01-06 14:33:53 +00:00
Michael Ossmann
3738270e4f h1r9: use MAX2839 2023-01-06 14:33:53 +00:00
grvvy
14183a96ea h1r9: implement additional MAX2839 functions, change some mreg definition names, fix RF gain control math 2023-01-06 14:33:53 +00:00
grvvy
cbbe94c8fe h1r9: add preliminary MAX2839 driver and accompanying header file; add some convenience macros to regs_def 2023-01-06 14:33:53 +00:00
grvvy
dcb9cd1beb h1r9: add preliminary MAX2839 register definitions 2023-01-06 14:33:53 +00:00
Michael Ossmann
b61c30a50d h1r9: bring-up wip 2023-01-06 14:33:53 +00:00
Michael Ossmann
4ffe3658be h1r9: add max2839_target.c 2023-01-06 14:33:53 +00:00
Michael Ossmann
1f73f2fd25 h1r9: add Si5351A support 2023-01-06 14:33:48 +00:00
Michael Ossmann
6d48671084 h1r9: initial GPIO definitions 2023-01-06 12:45:51 +00:00
Michael Ossmann
8aa79e9fe5 h1r9: use timer to detect external clock frequency 2023-01-06 12:45:46 +00:00
Michael Ossmann
ae805c43c6 HackRF One: correct RXBB net names 2023-01-06 06:09:09 -05:00
Michael Ossmann
ec254ff7cf HackRF One: update R83 and R84 attributes 2023-01-06 06:09:09 -05:00
Michael Ossmann
ae2a983f51 HackRF One: change R60 from 0 ohms to 100 ohms
This matches R31 and was intended to be done when R31 was changed to 100
ohms.
2023-01-06 06:09:09 -05:00
Michael Ossmann
3a20745a6d HackRF One: populate R83 instead of R84
This removes clock buffer chaining which was intended to be done when
the RC delay was added.
2023-01-06 06:09:09 -05:00
Michael Ossmann
92c21ea953 HackRF One: clean up
- silkscreen
- fabrication attributes
- dates
- copyright
- README
2023-01-06 06:09:09 -05:00
Michael Ossmann
a0d7f1edfe hardware: update .gitignore for KiCad and plugin 2023-01-06 06:09:09 -05:00
Michael Ossmann
d08d2418fe HackRF One: update RF amplifier series resistance 2023-01-06 06:09:09 -05:00
Michael Ossmann
9b1ddf8a8f HackRF One: update clock termination passives 2023-01-06 06:09:09 -05:00
Michael Ossmann
220099e3d1 HackRF One: update IF balun tuning inductors 2023-01-06 06:09:08 -05:00
Michael Ossmann
04f7487a2f HackRF One: update 100 nF capacitor part selection 2023-01-06 06:09:08 -05:00
Michael Ossmann
643336b224 HackRF One: add SMA connector keepouts 2023-01-06 06:09:08 -05:00
Michael Ossmann
d352952f96 HackRF One: adjust clock phase with RC delay
Remove chaining of buffers to delay GCK2 and instead use an RC delay for
both GCK2 and SGPIO_CLK.
2023-01-06 06:09:08 -05:00
Michael Ossmann
f927c5c25b HackRF One: add sample clock distribution options 2023-01-06 06:09:08 -05:00
Michael Ossmann
d915f821e3 HackRF One: add second fiducial mark 2023-01-06 06:09:08 -05:00
Michael Ossmann
a4a007ed75 HackRF One: AC couple CLKIN
We've always specified that CLKIN should be DC (based on the Si5351C
documentation), but it has worked with AC input.  AC coupling the buffer
input restores this undocumented feature.
2023-01-06 06:09:08 -05:00
Michael Ossmann
2154b4227a HackRF One: add resistance to amplifier supplies
This may improve reliability since switching to a MOSFET with lower on
resistance.
2023-01-06 06:09:08 -05:00
Michael Ossmann
e15bb0e972 HackRF One: chain SGPIO_CLK and GCK2 buffers
This more closely emulates the clock phase relationships on prior
hardware revisions that used the Si5351C.

Update clock trace widths.
2023-01-06 06:09:08 -05:00
Michael Ossmann
9d71e91e74 HackRF One: change CLKIN_DETECT pin
- move CLKIN_DETECT to U23 pin 15, P4_8, CTIN_5
- move SGPIO13 to U23 pin 91, P2_5, GPIO5[5]
- rename SGPIO13 to TRIGGER_EN

This allows TIMER1/TIMER2 instead of TIMER3/TIMER0 to be used for CLKIN
detection, avoiding conflicts with PortaPack firmware.

SGPIO13 was never used for SGPIO, so it is renamed to reflect current
usage.
2023-01-06 06:09:08 -05:00
Michael Ossmann
155a4532f0 HackRF One: swap pins for platform detection
- move EN_1V8 to P5_0, U23 pin 37
- move !VAA_ENABLE to P6_10, U23 pin 100
- move !RX_AMP_PWR back to P2_12, U23 pin 106

Platform detection is now performed using P5_0 and P6_10 which avoids
the complication of having to detect a pull-up to VAA which may not yet
be switched on.
2023-01-06 06:09:08 -05:00
Michael Ossmann
40dca9ecf2 HackRF One: component selections, DNP, and Notes 2023-01-06 06:09:08 -05:00
Michael Ossmann
4f607f3f38 HackRF One: move !ANT_BIAS control from U4 to U23 2023-01-06 06:09:08 -05:00
Michael Ossmann
9175b4e7aa HackRF One: change U17 from MAX2837 to MAX2839 2023-01-06 06:09:08 -05:00
Michael Ossmann
fe42edf790 HackRF One: update hardware detection pin straps
Additionally swap:
 - EN_1V8, P6_10, U23 pin 100 (pull-down)
 - !RX_AMP_PWR, P2_12, U23 pin 106 (pull-up)

Detecting which has the pull-up and which has the pull-down enables
version detection that may be more reliable than the ADC method.
2023-01-06 06:09:08 -05:00
Michael Ossmann
d176b0a118 HackRF One: change U19 from Si5351C to Si5351A
add clock distribution and detection
2023-01-06 06:09:08 -05:00
Michael Ossmann
87274494e2 hardware: add .zip files to .gitignore 2023-01-06 06:09:08 -05:00
Michael Ossmann
895be8964f HackRF One: add diode bypass jumper 2023-01-06 06:09:07 -05:00
Michael Ossmann
1680e25c38 HackRF One: update DC output voltage documentation 2023-01-06 06:09:07 -05:00
Michael Ossmann
c6aa1eb16b HackRF One: add diode to Q4 output 2023-01-06 06:09:07 -05:00
Michael Ossmann
e02e7a541f HackRF One: update dates 2023-01-06 06:09:07 -05:00
Michael Ossmann
793c366dcd HackRF One: correct or ignore ERC errors 2023-01-06 06:09:07 -05:00
Michael Ossmann
2c456a5a16 HackRF One: update trace widths for new stack-up
correct or ignore ERC/DRC errors
2023-01-06 06:09:07 -05:00
Michael Ossmann
3d4d923841 HackRF One: update PCB stack-up specification 2023-01-06 06:09:07 -05:00
Michael Ossmann
239b28528e HackRF One: update to KiCad 6 2023-01-06 06:09:07 -05:00
Martin Ling
dbdba0a57e Add MAX2839 symbol. 2023-01-06 06:09:07 -05:00
Michael Ossmann
b1c68b4a71 HackRF One: update revision number to r9 2023-01-06 06:09:07 -05:00
Michael Ossmann
6f26b74e90
Merge pull request #1253 from Sasszem/memory-waste
Fix memory waste in allocated_transfers
2023-01-05 15:34:27 -05:00
Michael Ossmann
e47ee0d20f
Merge pull request #1251 from miek/firmware_info_struct
Add firmware info structure
2023-01-05 15:29:43 -05:00
László Baráth
ff843584dd
Fix "14dB" RF amplification in FAQ (#1252)
Also added a comment on why is this value often quoted wrong
2023-01-05 13:24:06 -05:00
Mike Walters
c2b3052c78 hackrf_spiflash: implement compatibility checking using new firmware info struct 2023-01-05 15:18:52 +00:00
Mike Walters
f426ac2174 hackrf_spiflash: use defines for compatibility_check return value 2023-01-05 15:13:06 +00:00
Mike Walters
5084a84a3d libhackrf: add function to lookup platform ID from board ID 2023-01-05 15:13:06 +00:00
Mike Walters
060d9cbd8a Add firmware_info structure 2023-01-05 15:13:06 +00:00
Michael Ossmann
10111d81af
Merge pull request #1205 from straithe/splitOutOperaCakeDocumentation
Docs: Move Opera Cake documentation to its own section
2023-01-05 07:40:11 -05:00
Sasszem
b52631b6f5 Fix memory waste in allocated_transfers
Did a search for allocations & all others were fine
2023-01-04 22:09:49 +01:00
Michael Ossmann
3d39660be1
Merge pull request #1237 from greatscottgadgets/tuning
restrict IF to 2170-2740 MHz
2022-12-23 11:56:38 -05:00
Michael Ossmann
3d687a20fd increase forceable IF range to 2000-3000 MHz 2022-12-23 06:06:22 -05:00
Michael Ossmann
c1bda490b1
Merge pull request #1245 from greatscottgadgets/leds
add --led option to hackrf_debug
2022-12-20 13:34:55 -05:00
Michael Ossmann
c0c8c944c3
Merge pull request #1239 from martinling/windows-ci
Add Windows build of libhackrf and host tools to Github Actions
2022-12-20 13:25:03 -05:00
Michael Ossmann
173612ac77 add --led option to hackrf_debug
and corresponding changes to libhackrf and firmware
2022-12-18 07:22:17 -05:00
Martin Ling
9fce4ebf04 CI: add steps to build libhackrf and host-tools on Windows. 2022-12-13 02:31:58 +00:00
Martin Ling
d912c8c326 CI: don't specify bash as shell for commands.
On Linux and macOS runners, bash is already the default.

For Windows, specifying bash prevents the same step being used.
2022-12-13 02:31:58 +00:00
Martin Ling
9c0a3e0244 CI: remove BUILD_TYPE environment variable.
We were only setting this to Release, so there is no current need for an
environment variable.

Removing it allows us to reuse some steps for Windows, where the syntax
to insert an environment variable is different.
2022-12-13 02:30:53 +00:00
Michael Ossmann
86c1d8ce6e restrict IF to 2170-2740 MHz 2022-12-09 09:12:37 -05:00
Mike Walters
eff4a20022
Remove default titles from issue forms (#1217)
* Remove default titles from issue forms

* Update technical-support.yml

Issue template: reversed an option in the technical support template.

Co-authored-by: Straithe <b@straithe.com>
2022-12-05 01:53:33 -05:00
Michael Ossmann
b106495042
Merge pull request #1235 from stevefalco/correct_register_definition
Make definition of "prev" consistent
2022-12-01 13:08:35 -05:00
Michael Ossmann
ebbbfa28b4
Merge pull request #1233 from grvvy/ci_hackrf_debug
CI: add hackrf_debug test
2022-12-01 12:45:05 -05:00
Michael Ossmann
956492fb65
Merge pull request #1212 from schneider42/schneider/m0_reset
m0: reset M0 before starting it
2022-12-01 12:42:15 -05:00
Michael Ossmann
e226a416de
Merge pull request #1203 from martinling/8k-transfers
Reduce firmware USB transfer size from 16KB to 8KB
2022-12-01 12:40:26 -05:00
Steven A. Falco
7dbf6d65b6 Make definition of "prev" consistent 2022-11-30 16:53:11 -05:00
grvvy
1f5a88b400 CI: add full path to hackrf_debug call 2022-11-23 14:29:48 -07:00
grvvy
394168a475 CI: add hackrf_debug test 2022-11-23 14:20:34 -07:00
Michael Ossmann
32a4541bf6
Merge pull request #1231 from grvvy/ci_transfer_test
Add testing for hackrf_transfer to CI
2022-11-23 14:14:29 -05:00
grvvy
3154786c93 CI: use PASS FAIL in place of returning 1 or 0 2022-11-23 11:51:02 -07:00
grvvy
8f39ccc22e CI: add transfer test 2022-11-17 15:16:58 -07:00
Straithe
15636efb4d
Docs: Update HackRF troubleshooting docs (#1210)
* Update HackRF troubleshooting docs
2022-11-07 14:22:28 -05:00
straithe
e1e95b0dc9 docs: update documentaiton based on PR changes requested 2022-10-28 15:37:40 -04:00
schneider
d8d3dc039d m0: reset M0 before starting it
The rad1o was not starting the M0 when powered up by inserting a USB
cable. Interestingly the M0 does start when toggling the power switch.

Resetting the M0 before starting it in `main()` solves this issue.
2022-10-26 20:03:39 +02:00
Michael Ossmann
48b94321fc
Merge pull request #1206 from greatscottgadgets/post-release
set version to 2022.09.1+
2022-10-24 15:37:20 -04:00
Michael Ossmann
5acd0cb99e set version to 2022.09.1+ 2022-10-24 15:14:00 -04:00
Martin Ling
fefa4f0e45 Reduce firmware USB transfer size from 16KB to 8KB. 2022-10-22 13:47:06 +01:00
straithe
23a092f444 Update Opera Cake docs 2022-10-20 18:30:01 -04:00
Jacob Graves
b3f7a11a58
Merge pull request #1200 from grvvy/dual_device_patch
CI: add serial numbers for both connected HackRFs
2022-10-17 12:53:54 -06:00
grvvy
5027e27497 CI: add serial numbers for both connected HackRFs 2022-10-17 12:41:52 -06:00
Jacob Graves
2b3e2e52cb
Merge pull request #1198 from grvvy/test_device_path_fix
CI: remove the no longer needed device path from dfu-util
2022-10-17 12:29:00 -06:00
grvvy
c5d81be1fe CI: remove the no longer needed device path from dfu-util 2022-10-12 12:20:23 -06:00
Michael Ossmann
e3e406491d
Merge pull request #1191 from greatscottgadgets/release
set version to 2022.09.1
2022-09-29 07:12:06 -04:00
Michael Ossmann
b6acd66cfe set version to 2022.09.1
Some checks failed
Build / host (ubuntu-latest) (push) Failing after 10s
Build / firmware (HACKRF_ONE, ubuntu-latest) (push) Failing after 21s
Build / firmware (JAWBREAKER, ubuntu-latest) (push) Failing after 21s
Build / firmware (RAD1O, ubuntu-latest) (push) Failing after 29s
Check code style / clang-format (push) Failing after 18s
Check code style / clang-format-1 (push) Failing after 21s
Check code style / clang-format-2 (push) Failing after 13s
Check code style / clang-format-3 (push) Failing after 12s
Build / firmware (HACKRF_ONE, macos-latest) (push) Has been cancelled
Build / firmware (JAWBREAKER, macos-latest) (push) Has been cancelled
Build / firmware (RAD1O, macos-latest) (push) Has been cancelled
Build / host (macos-latest) (push) Has been cancelled
Starting with this release we will no longer use "unknown" as the
default software version string used in cases where the version cannot
be determined from context. Instead we commit the release version string
to git so that any software built from the tagged commit will have the
appropriate release version string. After the release we will commit a
post-release version string as the new default.

We will continue to use the commit hash as version string when the
software is built inside a git repository.
2022-09-29 05:20:39 -04:00
Michael Ossmann
0afc9857e4
Update some outdated technical docs (#1190)
* update outdated libhackrf documentation

* update outdated hackrf_sweep documentation
2022-09-28 18:16:39 -04:00
Michael Ossmann
dfb6611b08
Merge pull request #1189 from straithe/addHackRFPictureToDocumentation
Add picture of HackRF to documentation
2022-09-28 05:12:13 -04:00
Michael Ossmann
efebd73e77
Merge pull request #1188 from straithe/fixDocumentationIssueTemplateTypo
Fix Documentation Issue Template Typo
2022-09-28 05:06:45 -04:00
Michael Ossmann
219abf7a4c
Merge pull request #1180 from martinling/fix-transfer-locking
Improve transfer locking
2022-09-28 05:06:07 -04:00
straithe
58e65517a5 Add picture of HackRF to documentation 2022-09-28 01:34:11 -04:00
straithe
7f15fc5e0b Fix Documentation Issue Template Typo 2022-09-28 01:09:34 -04:00
Michael Ossmann
0d9b04e41b
Merge pull request #1183 from straithe/addDocumentationRequestIssueTemplate
Add documentation request issue template
2022-09-27 13:30:36 -04:00
Michael Ossmann
681ebc46ad
Merge pull request #1182 from straithe/removeDocsRetiredContentSection
remove retired content and move jawbreaker content
2022-09-27 13:30:03 -04:00
Michael Ossmann
a442450e30
Merge pull request #1179 from straithe/updateOperaCakeDocumentation
Add picture of Opera Cake to documentation
2022-09-27 13:24:11 -04:00
Michael Ossmann
0b17762c3a
Merge pull request #1178 from straithe/fixReadMeTypo
Fix typos in Readme file
2022-09-27 13:21:05 -04:00
Michael Ossmann
7243db7d68
Merge pull request #1181 from greatscottgadgets/cleanup
pre-release clean-up and platform detection improvement
2022-09-27 13:19:52 -04:00
Michael Ossmann
0c85e10195
Merge pull request #1184 from martinling/flush-on-setup
Flush queues on control endpoint when a new SETUP is received.
2022-09-27 13:19:27 -04:00
Martin Ling
1db39c0e61 Flush queues on control endpoint when a new SETUP is received.
On macOS 12.6 running libusb 1.0.26, the host was seen to sometimes
make an incomplete ClearFeature(ENDPOINT_HALT) request when
ClearPipeStallBothEnds was called from libusb_cancel_transfer.

The host would send the SETUP packet, and the firmware would
call usb_transfer_schedule_ack to acknowledge the upcoming IN
token. However, the host would then not send the IN token,
proceeding directly to the next SETUP.

Since an empty transfer was queued to schedule the ACK, the
firmware would leak one transfer from the free_transfers list.

After a few iterations of this, the firmware would run out of
free transfers and the next request would hang waiting for one.

Fix this by flushing the transfer queues for the control endpoint
when a new SETUP is received, since that token implicitly cancels
any previously ongoing request.
2022-09-27 09:45:43 +01:00
straithe
44244f525d Add documentation request issue template 2022-09-27 03:12:36 -04:00
straithe
12b9d4cdc9 remove retired content and move jawbreakercontent 2022-09-27 02:53:35 -04:00
Michael Ossmann
1f9f597ea8 firmware: use python3 interpreter, not python 2022-09-26 16:46:04 -04:00
Michael Ossmann
f3d10dcc62 firmware: improve platform detection
Slow down the detection of pull-up and pull-down resistors to make
detection more reliable.
2022-09-26 16:44:38 -04:00
Michael Ossmann
b026c07000 firmware: fix duration of delay_us_at_mhz() 2022-09-26 16:43:43 -04:00
Martin Ling
f7c219e30f Merge all_finished_lock with transfer_lock. 2022-09-26 14:01:16 +01:00
Martin Ling
367ce3d7b3 Hold transfer lock during initial submissions in prepare_transfers. 2022-09-26 14:01:15 +01:00
Martin Ling
559a45bd6b Extend scope of transfer_lock in callback. 2022-09-26 13:42:22 +01:00
straithe
3678bfa03e Add picture of Opera Cake to documentation 2022-09-26 00:24:42 -04:00
straithe
b4e2cd2e42 Fix typos in Readme file 2022-09-25 23:43:38 -04:00
Michael Ossmann
0e8b941897 hackrf_transfer: fix function name in debug output 2022-09-24 14:23:29 -04:00
Michael Ossmann
04614c616a blinky: support platform detection 2022-09-23 15:08:22 -04:00
Michael Ossmann
06b9d7bee0 Clean up source code copyright notices. 2022-09-23 14:46:52 -04:00
Michael Ossmann
3d378466fb hackrf_operacake: clean up text output 2022-09-23 14:45:34 -04:00
Michael Ossmann
caf0cfde87
Merge pull request #1176 from straithe/updateReadMeDocumentation
Update Readme to have docs PDF build instructions
2022-09-23 14:22:02 -04:00
straithe
c1fb7a72a8 update pdf building documentation 2022-09-23 13:53:10 -04:00
straithe
2e4a2a9e30 Update Readme to have docs PDF build instructions 2022-09-23 13:06:42 -04:00
Michael Ossmann
5b98cf92d8
Merge pull request #1168 from martinling/flush-callback
Provide a callback for TX flush, rather than a wait function.
2022-09-23 11:12:37 -04:00
Martin Ling
2e73a4f2db If TX callback sets valid_length to 0, treat as end of data. 2022-09-23 12:46:49 +01:00
Michael Ossmann
45504ff397 Don't repeat file that can't advance its position.
Some checks failed
Build / host (ubuntu-latest) (push) Failing after 10s
Build / firmware (HACKRF_ONE, ubuntu-latest) (push) Failing after 21s
Check code style / clang-format (push) Failing after 5s
Check code style / clang-format-1 (push) Failing after 5s
Build / firmware (RAD1O, ubuntu-latest) (push) Failing after 26s
Build / firmware (JAWBREAKER, ubuntu-latest) (push) Failing after 36s
Check code style / clang-format-2 (push) Failing after 10s
Check code style / clang-format-3 (push) Failing after 10s
Build / host (macos-latest) (push) Has been cancelled
Build / firmware (HACKRF_ONE, macos-latest) (push) Has been cancelled
Build / firmware (JAWBREAKER, macos-latest) (push) Has been cancelled
Build / firmware (RAD1O, macos-latest) (push) Has been cancelled
This avoids a confusing condition when hackrf_transfer is reading from
stdin with -R in which it does not repeat previous data but repeatedly
restarts reading new data after the user types Ctrl-D to indicate EOF.

The -R option should repeat previous data or should do nothing if the
input file cannot be rewound.
2022-09-23 06:48:01 -04:00
Michael Ossmann
8fbaf1336c Improve handling of file read results. 2022-09-23 06:47:54 -04:00
Martin Ling
db33e1bdaf Revert rename of byte_count now that we only have one count. 2022-09-23 05:19:29 -04:00
Martin Ling
0becbc6b4a Indicate success or failure to flush callback. 2022-09-23 05:19:29 -04:00
Martin Ling
4810d1f992 Fold transfer_finished function into libusb transfer callback. 2022-09-23 05:19:29 -04:00
Martin Ling
1484b78c05 Expand lock scope in libusb transfer callback.
This is required since cancel_transfers will also cancel the flush.
2022-09-23 05:19:29 -04:00
Martin Ling
770416f122 Cancel flush transfer if shutting down. 2022-09-23 05:19:29 -04:00
Martin Ling
c089bb0b88 Fix handling of EOF and error conditions after fread. 2022-09-23 05:19:29 -04:00
Martin Ling
eae7049284 Fix empty report when TX ends soon after the last report. 2022-09-23 05:19:29 -04:00
Martin Ling
14093fe73b Provide a callback for completion of a TX transfer. 2022-09-23 05:19:29 -04:00
Martin Ling
2448796e35 Handle failures in fread from TX callback. 2022-09-23 05:19:29 -04:00
Martin Ling
cb8fc333aa Fix inaccurate error message when TX completes near a 1 second boundary. 2022-09-23 05:19:29 -04:00
Martin Ling
98faa5429f Fix inaccurate statistics in hackrf_transfer. 2022-09-23 05:19:29 -04:00
Martin Ling
b872647e97 Provide a callback for TX flush, rather than a wait function. 2022-09-23 05:19:29 -04:00
Michael Ossmann
c0ba843085
Merge pull request #1175 from grvvy/update-test-device-path
update test device path for test server
2022-09-22 23:16:01 -04:00
grvvy
e5c03ba9fe update test device path for test server 2022-09-22 20:41:21 -06:00
Michael Ossmann
92b15f226e
Merge pull request #1172 from martinling/amp-startup
Fix initial state of RF path GPIOs.
2022-09-21 15:19:04 -04:00
Michael Ossmann
0f7d560925
Merge pull request #1167 from martinling/tx-sync-output
Don't start baseband streaming until TX buffer is first filled.
2022-09-21 15:05:51 -04:00
Michael Ossmann
1167f49b7f hackrf_transfer: refer to triggers as "triggers" 2022-09-21 10:37:40 -04:00
Michael Ossmann
0e84382f5a document hardware triggering
This replaces outdated documentation of an older trigger mechanism.
2022-09-21 10:36:06 -04:00
Martin Ling
3dd2e51d71 Initialise rf_path->switchctrl to SWITCHCTRL_SAFE.
This was previously never being initialised.
2022-09-21 12:22:58 +01:00
Martin Ling
cf34beebb0 Remove extra call to switchctrl_set and global switchctrl variable.
This call is not required since the GPIOs are already configured in
rf_path_pin_setup(). The global switchctrl is not used anywhere else.
2022-09-21 12:17:18 +01:00
Martin Ling
eec6963759 Initialise RF path GPIOs to safe settings.
Previously these calls were leaving the amplifiers on, since the
control settings passed were missing SWITCHCTRL_NO_TX_AMP_PWR and
SWITCHCTRL_NO_RX_AMP_PWR. Use the predefined SWITCHCTRL_SAFE here.

Also move these calls before setting the GPIO pins to output mode,
to avoid driving them to the wrong states briefly first.
2022-09-21 12:05:17 +01:00
Michael Ossmann
5c812681ab docs: Remove outdated clocking page 2022-09-21 04:09:54 -04:00
Martin Ling
767db9f06c Don't start baseband streaming until TX buffer is first filled. 2022-09-20 11:13:25 +01:00
Michael Ossmann
e623c7aed7
Merge pull request #1103 from dizcza/master
fixed firmware manual build docs
2022-09-19 21:30:22 -04:00
Michael Ossmann
8e83506da1
Merge pull request #1166 from martinling/tx-disconnect-hang
Fix hang in TX when a libusb error occurs.
2022-09-19 21:28:49 -04:00
Michael Ossmann
6835bc4812
Merge pull request #1165 from greatscottgadgets/board-id-compat
libhackrf: #define outdated board IDs
2022-09-19 21:15:26 -04:00
Martin Ling
e53b9d5717 Fix hang in TX when a libusb error occurs.
Where our callback is called with a status other than COMPLETED,
something abnormal has happened and we no longer want to either
submit further transfers or await a flush. So clear the streaming
and flush flags, and proceed to transfer_finished.

Do the same in the case where libusb_submit_transfer fails when
called to submit the flush transfer.
2022-09-20 02:07:21 +01:00
Michael Ossmann
471c5bc5de libhackrf: #define outdated board IDs 2022-09-19 19:55:33 -04:00
Michael Ossmann
c487e3f6b1
Merge pull request #1162 from martinling/ant-bias-glitch
Fix antenna bias pulse glitch at startup.
2022-09-19 10:33:57 -04:00
Martin Ling
44511c6c3b Move RFFC5072 setup before enabling RF power. 2022-09-19 13:02:29 +01:00
Martin Ling
5d78302d97 Change default RFFC5072 register settings to disable antenna bias. 2022-09-19 13:02:01 +01:00
Martin Ling
6d57709000 Move delay after enabling RF power to rad1o-specific code. 2022-09-19 10:46:01 +01:00
Michael Ossmann
555c6fb47b
Merge pull request #1161 from greatscottgadgets/wee-bugs
clean-up and small bug fixes
2022-09-19 04:55:53 -04:00
Michael Ossmann
f4202d1163 hackrf_transfer: Don't skip preload stats in RX
Fixes a bug introduced in 8a9af7a: Statistics skipped for initial
buffers not only when preloaded in TX mode but also in RX mode with no
preloading.

The total bytes transferred may appear inflated in RX mode when
receiving a small number of samples with -n, but the stats represent
data transferred over USB, some of which may have been discarded by the
host.
2022-09-18 13:27:51 -04:00
Michael Ossmann
82ecfce414 hackrf_transfer: simplify hardware sync mode logic
The -H option now requires no argument.
2022-09-18 05:49:03 -04:00
Michael Ossmann
22635bf07d libhackrf: update hackrf_transfer struct comment 2022-09-18 05:13:25 -04:00
Michael Ossmann
9181cbe049 hackrf_transfer: send signal to own PID
Instead of sending a signal to the process group, get our own process ID
and send the signal to it. This fixes a bug that prevented termination
when called from a script.
2022-09-18 05:07:09 -04:00
Michael Ossmann
ca5049fcd3
Merge pull request #1156 from martinling/tx-transfer-sizing
Fix handling of the final <256KiB of data transmitted with `hackrf_transfer`
2022-09-18 04:31:47 -04:00
Martin Ling
6ab17209d7 Disable flush when cancelling transfers. 2022-09-16 15:55:20 +01:00
Martin Ling
55fdddd81e Merge remote-tracking branch 'origin/master' into tx-transfer-sizing 2022-09-15 15:32:20 +01:00
Martin Ling
1b166a5b05 Pad the last data in a transmission to the next 512 byte boundary. 2022-09-15 15:27:53 +01:00
Martin Ling
69823397b1 Submit flush transfer as soon as end of data is reached. 2022-09-15 15:12:41 +01:00
Michael Ossmann
2b1aa545f8
Merge pull request #1157 from martinling/standardise-dbfs
Standardise dBFS level
2022-09-15 04:59:45 -04:00
Martin Ling
09c6030ec9 Start TX/RX in hackrf_transfer after all other requests.
This avoids glitches and lost samples at the start of a transmission.
2022-09-15 09:51:11 +01:00
Danylo Ulianych
a2c30a8896
Update firmware/README
Co-authored-by: Martin Ling <martin-github@earth.li>
2022-09-15 07:39:48 +03:00
Michael Ossmann
75e3137d55
Merge pull request #1155 from greatscottgadgets/platform-detect
Detect hardware platform at run-time.
2022-09-14 17:45:58 -04:00
Michael Ossmann
4f779aae7a
Merge pull request #1154 from greatscottgadgets/clkout-source
firmware: use consistent clock source
2022-09-14 17:43:28 -04:00
Martin Ling
f1e34b7cea Correct the calculation of dBfs signal level.
dBFS is defined in AES Standard AES17-1998, IEC 61606, and ITU-T Recs.
P.381 and P.382, such that the RMS value of a full-scale sine wave is
designated 0 dBFS.

A full scale sine wave on HackRF has the range -127 to 127.

We calculate the full scale ratio relative to a signal in which both I
and Q are held at 127. This represents a signal with sqrt(2) times
the amplitude, and thus twice the power, of a full scale sine wave.

Therefore to obtain dBfs by the above definition, we add 3dB.
2022-09-14 18:21:07 +01:00
Martin Ling
66fa76c550 In CW mode, set only the I component to the specified amplitude. 2022-09-14 18:14:59 +01:00
Martin Ling
d5d2b09fe8 Restrict CW mode amplitude to 127. 2022-09-14 18:14:23 +01:00
Martin Ling
f2d00adab8 Add commentary to TX callback. 2022-09-14 15:55:07 +01:00
Martin Ling
e38534b99d Don't return -1 from the TX callback that provides the last data. 2022-09-14 15:55:07 +01:00
Martin Ling
5ad08cfd96 Set valid_length correctly in hackrf_transfer TX callback. 2022-09-14 15:55:04 +01:00
Martin Ling
22846b5682 Make libhackrf honour the valid_length set by TX callback. 2022-09-14 15:48:34 +01:00
Martin Ling
9905e960a4 Rearrange to avoid duplicating sample limit return path. 2022-09-14 15:16:18 +01:00
Martin Ling
16f93d9b27 Move duplicated code to one place. 2022-09-14 15:15:34 +01:00
Martin Ling
29787cd291 Clarify variables used in TX callback.
The power measurement depends on the number of bytes that were valid
from the previous use of the transfer buffer.

The number of bytes to be read to fill the next transfer, is the full
size of the buffer.
2022-09-14 15:10:13 +01:00
Michael Ossmann
9329c5e44e Detect hardware platform at run-time.
Firmware now detects the hardware it is running on at startup and
refuses to run if it is compiled for the wrong platform. The board ID
returned by firmware to the host is now derived from run-time detection
rather than a compile-time value. A separate method to retrieve
compile-time supported platform is added.

On HackRF One, pin straps are checked to determine hardware revision.
This is informational to aid troubleshooting and does not affect any
function.
2022-09-14 07:08:47 -04:00
Michael Ossmann
fdfe310f9a
Merge pull request #1139 from martinling/tx-flush
Support flushing the device TX buffer before ending transmission
2022-09-14 05:45:40 -04:00
Martin Ling
7650236839 Flush buffer when CW mode is used with -n. 2022-09-12 16:50:53 +01:00
Martin Ling
0142ae6da9 Don't await buffer flush if interrupted by Ctrl-C. 2022-09-12 16:32:11 +01:00
Michael Ossmann
2104291594 firmware: use consistent clock source
CLKOUT now switches to the active clock source whenever the internal
clocks change source. It previously did so only when (re)enabled.
2022-09-10 06:54:51 -04:00
Michael Ossmann
57d51fd042
Merge pull request #1153 from greatscottgadgets/measure-power
Measure digital signal power, not amplitude in hackrf_transfer
2022-09-09 20:11:08 -04:00
Michael Ossmann
8a9af7a1ad hackrf_transfer: report on only actual transfers
The statistics reported to the user now reflect only completed USB
transfers and do not include information about the empty buffers that
are preloaded with data at the start of a TX operation.
2022-09-09 16:32:07 -04:00
Michael Ossmann
70a04855ac libhackrf: add transfer buffer size access calls
Applications may need to learn the size of the USB transfer buffer
queue, for example to determine how many bytes will be preloaded with
calls to the TX callback.
2022-09-09 16:16:24 -04:00
Michael Ossmann
c1e65778bc
Merge pull request #1149 from grvvy/operacake_time_mode_fix
operacake: disable the usage of time mode when a portapack is installed
2022-09-09 12:46:45 -04:00
Michael Ossmann
e7b19ef2c2 hackrf_transfer: accept CW amplitude up to 128 2022-09-09 05:17:28 -04:00
Michael Ossmann
755ca960e5 hackrf_transfer: report power, not amplitude
improve accuracy and reliability of digital signal power measurement
2022-09-09 05:15:15 -04:00
Michael Ossmann
5b4be3e078
Merge pull request #1138 from martinling/preload-tx-transfers
Preload TX transfers
2022-09-05 11:41:05 -04:00
Michael Ossmann
ad5398d92c
Merge pull request #1132 from martinling/hackrf-transfer-short-files
Support repeating short files in `hackrf_transfer`
2022-09-05 10:37:29 -04:00
grvvy
5d7b203058 operacake: disable the usage of time mode when a portapack is installed 2022-09-01 14:03:18 -06:00
Straithe
e41b4c5116
change checkboxes to text area for OS technical support question (#1148) 2022-08-28 19:55:50 -04:00
Straithe
0a85acf27a
Add quotes to yes and no (#1147) 2022-08-28 19:18:44 -04:00
Straithe
783899b06f
address hash issues in technical support issue template (#1146) 2022-08-28 19:06:46 -04:00
Straithe
e0b6978634
fix technical support template (#1145) 2022-08-28 18:47:13 -04:00
Straithe
e5e1507b4f
remove yaml errors (#1144) 2022-08-28 18:29:48 -04:00
Straithe
a2ff44f0fd
converted issue templates to .yml instead of .md (#1143) 2022-08-28 18:07:52 -04:00
Straithe
6e38a68234
Add issue templates (#1122)
* Add issue templates

* Update templates based on feedback

* Update feature request issue template

* update templates based on suggestions
2022-08-28 17:45:09 -04:00
Martin Ling
8f60e6b66f Wait for TX buffer flush at end of hackrf_transfer. 2022-08-24 23:48:24 +01:00
Martin Ling
d556f0abab Add API to support flushing the device buffer when TX finishes. 2022-08-24 23:48:22 +01:00
Martin Ling
9d2e163a2d Call TX callback to fill transfers before initial submission. 2022-08-23 13:21:43 +01:00
Martin Ling
8bd8dedddc Use an early return to reduce indentation in prepare_transfers. 2022-08-23 13:03:53 +01:00
Martin Ling
5881b3b6a1 Add defines for TX and RX endpoint addresses. 2022-08-23 12:24:00 +01:00
Martin Ling
9b6a0259a7 Remove message when rewinding input file.
For small input files this may be printed a very large number of times.
2022-08-23 09:30:04 +01:00
Martin Ling
0c35cff05b In repeat mode, rewind file as many times as needed to fill buffer.
Fixes #720.
2022-08-23 09:30:04 +01:00
Martin Ling
06a0c2b189 One more early return to simplify TX callback. 2022-08-23 09:30:02 +01:00
Martin Ling
85a86b8baa Use more early returns to further simplify callbacks. 2022-08-23 09:29:13 +01:00
Martin Ling
bcaebc00c3 Use some early returns to reduce deeply indented callbacks. 2022-08-23 09:26:00 +01:00
dizcza
fc79b0ffb1 fixed firmware manual build docs 2022-06-05 11:18:48 +03:00
404 changed files with 187857 additions and 47335 deletions

37
.github/ISSUE_TEMPLATE/bug-report.yml vendored Normal file
View file

@ -0,0 +1,37 @@
name: Bug Report
description: Submit a bug report
labels: ["bug report"]
body:
- type: markdown
attributes:
value: |
Thank you for taking the time to fill out this bug report!
- type: dropdown
id: issue-type
attributes:
label: What type of issue is this?
options:
- transient - occurring only once
- intermittent - occurring irregularly
- permanent - occurring repeatedly
validations:
required: true
- type: textarea
id: issue
attributes:
label: What issue are you facing?
placeholder: Please describe what you have encountered
validations:
required: true
- type: textarea
id: reproduce-issue
attributes:
label: What are the steps to reproduce this?
placeholder: Please provide the steps to reproduce this issue
validations:
required: true
- type: textarea
id: logs
attributes:
label: Can you provide any logs? (output, errors, etc.)
placeholder: Please provide any logs you might have that illustrate the issue

1
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View file

@ -0,0 +1 @@
blank_issues_enabled: false

View file

@ -0,0 +1,14 @@
name: Documentation
description: Make a request regarding HackRF documentation
labels: ["documentation"]
body:
- type: markdown
attributes:
value: |
Thank you for taking the time to help Great Scott Gadgets improve the HackRF One documentation!
- type: textarea
id: documentation-request
attributes:
label: What would you like us to add to or change about the HackRF One documentation?
validations:
required: true

View file

@ -0,0 +1,16 @@
name: Feature Request
description: File a feature request
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
Thank you for taking the time to fill out this feature request form!
- type: textarea
id: feature-request
attributes:
label: What feature would you like to see and why?
description: Please be as detailed as possible with your feature request.
validations:
required: true

14
.github/ISSUE_TEMPLATE/question.yml vendored Normal file
View file

@ -0,0 +1,14 @@
name: Question
description: Ask a question not covered by current hackrf.rtfd.io documentation
labels: ["question"]
body:
- type: markdown
attributes:
value: |
Thank you for taking the time to ask your question! If you need technical support, want to open a feature request, or need to file a bug report, please abandon this issue, open a new issue, and choose the correct template. If you do not choose the correct template, you will be asked to re-open your issue with the correct template.
- type: textarea
id: question
attributes:
label: What would you like to know?
validations:
required: true

View file

@ -0,0 +1,51 @@
name: Technical Support Request
description: File a technical support request
labels: ["technical support"]
body:
- type: markdown
attributes:
value: |
Thank you for taking the time to fill out this technical support request form! Please note that technical support requests can expect a response time of two weeks.
- type: textarea
id: expected-outcome
attributes:
label: What outcome were you hoping for?
placeholder: Please be detailed in what you expected to happen
validations:
required: true
- type: textarea
id: actual-outcome
attributes:
label: What outcome actually happened?
placeholder: Please be detailed in what did happen
validations:
required: true
- type: textarea
id: operating-systems
attributes:
label: What operating systems are you seeing the problem on?
validations:
required: true
- type: textarea
id: hackrf_info-output
attributes:
label: What is the output of ```hackrf_info```?
description: Please put the output of the command in the box below or indicate N/A.
validations:
required: true
- type: textarea
id: third-party-software
attributes:
label: Are you using any third-party software?
description: Please list the software you are using with your HackRF or indicate N/A. Please list version numbers where possible.
placeholder: GNU Radio, GQRX, etc.
validations:
required: true
- type: textarea
id: third-party-hardware
attributes:
label: Are you using any third-party hardware?
description: Please list any hardware you are using with your HackRF or indicate N/A.
placeholder: portapack, specialized antenna, etc.
validations:
required: true

View file

@ -9,118 +9,286 @@ on:
- cron: 1 12 * * 1
env:
BUILD_TYPE: Release
# Override OSX architecture detection. Required for CMake versions < 3.19.2.
CMAKE_OSX_ARCHITECTURES: arm64
jobs:
host:
strategy:
matrix:
os: ['macos-latest', 'ubuntu-latest']
os: ['macos', 'ubuntu', 'windows']
cmake: ['3.10.0', '3.21.7', '4.2.6', 'latest']
compiler: ['gcc', 'msvc']
exclude:
# MSVC only runs on Windows.
- os: 'macos'
compiler: 'msvc'
- os: 'ubuntu'
compiler: 'msvc'
# We can't use the oldest CMake versions on Windows.
- os: 'windows'
cmake: '3.10.0'
# The in-between CMake versions aren't so intersting with GCC.
- compiler: 'gcc'
cmake: '3.21.7'
- compiler: 'gcc'
cmake: '4.2.6'
include:
# Shell selection
- os: 'macos'
shell: 'bash'
- os: 'ubuntu'
shell: 'bash'
- os: 'windows'
compiler: 'msvc'
shell: 'pwsh'
- os: 'windows'
compiler: 'gcc'
shell: 'msys2'
# MSVC version selection
- cmake: '3.21.7'
msvc: '17.14'
- cmake: '4.2.6'
msvc: 'latest'
- cmake: 'latest'
msvc: 'latest'
# CMake generator selection
- os: 'macos'
generator: 'Unix Makefiles'
- os: 'ubuntu'
generator: 'Unix Makefiles'
- compiler: 'msvc'
cmake: '3.21.7'
generator: 'Visual Studio 17 2022'
- compiler: 'msvc'
cmake: '4.2.6'
generator: 'Visual Studio 18 2026'
- compiler: 'msvc'
cmake: 'latest'
generator: 'Visual Studio 18 2026'
- os: 'windows'
compiler: 'gcc'
generator: 'MSYS Makefiles'
# Additional CMake arguments
- os: 'windows'
compiler: 'msvc'
cmake_args: >-
-DPKG_CONFIG_EXECUTABLE=C:/vcpkg/installed/x64-windows/tools/pkgconf/pkgconf.exe
-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake
--install-prefix=$env:GITHUB_WORKSPACE/install
- os: 'windows'
compiler: 'gcc'
cmake_args: >-
--install-prefix=/usr/local
# CMake 3.10 uses --build with --target install
- cmake: '3.10.0'
install_cmd: --build
install_args: --target install
# Later versions just use --install
- cmake: '3.21.7'
install_cmd: --install
- cmake: '4.2.6'
install_cmd: --install
- cmake: 'latest'
install_cmd: --install
# We need sudo on MacOS and Ubuntu only
- os: macos
sudo: sudo
- os: ubuntu
sudo: sudo
# Don't cancel all builds when one fails
fail-fast: false
runs-on: ${{ matrix.os }}
runs-on: ${{ matrix.os }}-latest
defaults:
run:
shell: '${{ matrix.shell }} {0}'
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- name: Setup cmake
uses: lukka/get-cmake@latest
with:
cmakeVersion: ${{ matrix.cmake }}
if: matrix.shell != 'msys2'
- name: Install MSVC (Windows)
uses: k3DW/setup-msvc@v1
with:
vs-version: ${{ matrix.msvc }}
if: matrix.compiler == 'msvc' && matrix.msvc != 'latest'
- name: Install dependencies (macOS)
run: brew install fftw
if: matrix.os == 'macos-latest'
if: matrix.os == 'macos'
- name: Install dependencies (Ubuntu)
run: |
sudo apt update
sudo apt install libfftw3-dev libusb-1.0-0-dev
if: matrix.os == 'ubuntu-latest'
if: matrix.os == 'ubuntu'
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/host/build
- name: Install dependencies (Windows)
run: vcpkg install --triplet=x64-windows libusb fftw3 pthreads pkgconf
if: matrix.os == 'windows' && matrix.shell != 'msys2'
- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/host/build
run: cmake $GITHUB_WORKSPACE/host/ -DCMAKE_BUILD_TYPE=$BUILD_TYPE
- name: Setup MSYS (Windows)
if: matrix.os == 'windows' && matrix.shell == 'msys2'
uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
install: >-
git
make
mingw-w64-ucrt-x86_64-cmake
mingw-w64-ucrt-x86_64-toolchain
mingw-w64-ucrt-x86_64-libusb
mingw-w64-ucrt-x86_64-fftw
- name: Build
working-directory: ${{runner.workspace}}/host/build
shell: bash
run: cmake --build . --config $BUILD_TYPE
# Build libhackrf and hackrf-tools together
- name: Create Build Environment (libhackrf)
run: cmake -E make_directory ${{runner.workspace}}/host/libhackrf/build
- name: Configure & Build
run: |
cmake -E make_directory host/build
cd host/build
cmake .. -G "${{ matrix.generator }}" -DCMAKE_BUILD_TYPE=Release ${{matrix.cmake_args}}
cmake --build . --config Release
- name: Configure CMake (libhackrf)
shell: bash
working-directory: ${{runner.workspace}}/host/libhackrf/build
run: cmake $GITHUB_WORKSPACE/host/libhackrf/ -DCMAKE_BUILD_TYPE=$BUILD_TYPE
# Build libhackrf ONLY
- name: Build (libhackrf)
working-directory: ${{runner.workspace}}/host/libhackrf/build
shell: bash
run: cmake --build . --config $BUILD_TYPE
- name: Configure & Build (libhackrf)
run: |
cmake -E make_directory host/libhackrf/build
cd host/libhackrf/build
cmake .. -G "${{ matrix.generator }}" -DCMAKE_BUILD_TYPE=Release ${{ matrix.cmake_args }}
cmake --build . --config Release
- name: Install (libhackrf)
working-directory: ${{runner.workspace}}/host/libhackrf/build
shell: bash
run: |
sudo cmake --install . --config $BUILD_TYPE
${{ matrix.sudo }} cmake ${{ matrix.install_cmd }} host/libhackrf/build ${{ matrix.install_args }} --config Release
- name: Create Build Environment (hackrf-tools)
run: cmake -E make_directory ${{runner.workspace}}/host/hackrf-tools/build
# Build hackrf-tools ONLY
- name: Configure CMake (hackrf-tools)
shell: bash
working-directory: ${{runner.workspace}}/host/hackrf-tools/build
run: cmake $GITHUB_WORKSPACE/host/hackrf-tools/ -DCMAKE_BUILD_TYPE=$BUILD_TYPE
- name: Configure & Build (hackrf-tools)
run: |
cmake -E make_directory host/hackrf-tools/build
cd host/hackrf-tools/build
cmake .. -G "${{ matrix.generator }}" -DCMAKE_BUILD_TYPE=Release ${{ matrix.cmake_args }}
cmake --build . --config Release
- name: Build (hackrf-tools)
working-directory: ${{runner.workspace}}/host/hackrf-tools/build
shell: bash
run: cmake --build . --config $BUILD_TYPE
- name: Install (hackrf-tools)
run: |
${{ matrix.sudo }} cmake ${{ matrix.install_cmd }} host/hackrf-tools/build ${{ matrix.install_args }}
# Publish the contents of install/bin (which should be the combination libhackrf and host-tools) for Windows
- name: Publish Artifacts (Windows)
uses: actions/upload-artifact@v4
with:
name: hackrf-tools-windows
path: ${{github.workspace}}/install/bin
if: matrix.os == 'windows' && matrix.cmake == 'latest' && matrix.shell == 'pwsh'
firmware:
strategy:
matrix:
os: ['macos-latest', 'ubuntu-latest']
board: ['HACKRF_ONE', 'JAWBREAKER', 'RAD1O']
os: ['macos', 'ubuntu', 'windows']
board: ['HACKRF_ONE', 'JAWBREAKER', 'RAD1O', 'PRALINE', 'UNIVERSAL']
cmake: ['3.12.0', 'latest']
exclude:
- os: 'windows'
cmake: '3.12.0'
# GitHub doesn't give us many macOS runners, so don't build for every board.
# We just need to know that building firmware works on macOS. Use PRALINE
# since that's the most complicated one due to FPGA bitstreams.
- os: 'macos'
board: 'HACKRF_ONE'
- os: 'macos'
board: 'JAWBREAKER'
- os: 'macos'
board: 'RAD1O'
# Don't cancel all builds when one fails
fail-fast: false
runs-on: ${{ matrix.os }}
runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
with:
submodules: true
- name: Setup cmake
uses: lukka/get-cmake@latest
with:
cmakeVersion: ${{ matrix.cmake }}
if: matrix.os != 'windows'
- name: Install Arm GNU Toolchain
uses: carlosperate/arm-none-eabi-gcc-action@v1
if: matrix.os != 'windows'
- name: Install dependencies (macOS)
run: |
brew tap armmbed/formulae
brew install arm-none-eabi-gcc dfu-util
pip install PyYAML
if: matrix.os == 'macos-latest'
brew install dfu-util
python3 -m venv environment && source environment/bin/activate
python3 -m pip install PyYAML
if: matrix.os == 'macos'
- name: Install dependencies (Ubuntu)
run: |
sudo apt install dfu-util gcc-arm-none-eabi
if: matrix.os == 'ubuntu-latest'
python3 -m venv environment && source environment/bin/activate
python3 -m pip install PyYAML
sudo apt install dfu-util
if: matrix.os == 'ubuntu'
- name: Build libopencm3
shell: bash
working-directory: ${{github.workspace}}/firmware/libopencm3/
run: make
run: |
source ../../environment/bin/activate
make
if: matrix.os != 'windows'
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/firmware/build
run: cmake -E make_directory ${{github.workspace}}/firmware/build
if: matrix.os != 'windows'
- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/firmware/build
run: cmake $GITHUB_WORKSPACE/firmware/ -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBOARD=${{ matrix.board }}
working-directory: ${{github.workspace}}/firmware/build
run: cmake $GITHUB_WORKSPACE/firmware/ -DCMAKE_BUILD_TYPE=Release -DBOARD=${{ matrix.board }}
if: matrix.os != 'windows'
- name: Build
working-directory: ${{runner.workspace}}/firmware/build
working-directory: ${{github.workspace}}/firmware/build
shell: bash
run: cmake --build . --config $BUILD_TYPE
run: |
source ../../environment/bin/activate
cmake --build . --config Release
if: matrix.os != 'windows'
- name: Setup MSYS (Windows)
if: matrix.os == 'windows'
uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
update: true
install: >-
git
make
mingw-w64-ucrt-x86_64-arm-none-eabi-gcc
mingw-w64-ucrt-x86_64-cmake
mingw-w64-ucrt-x86_64-dfu-util
mingw-w64-ucrt-x86_64-python-yaml
- name: Build with MSYS (Windows)
if: matrix.os == 'windows'
shell: msys2 {0}
run: |
mkdir firmware/build
cd firmware/build
cmake -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Release -DBOARD=${{ matrix.board }} ..
make

View file

@ -16,7 +16,7 @@ jobs:
- check: 'firmware/hackrf_usb'
exclude: ''
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- name: Run clang-format-action
uses: jidicula/clang-format-action@v4.6.2
with:

96
.github/workflows/includes-check.yml vendored Normal file
View file

@ -0,0 +1,96 @@
name: Check includes
on: [push, pull_request]
defaults:
run:
shell: bash
jobs:
includes-check:
runs-on: ubuntu-latest
container:
image: "debian:13"
options: --user 0
strategy:
matrix:
board: ['HACKRF_ONE', 'JAWBREAKER', 'RAD1O', 'PRALINE', 'UNIVERSAL']
cmake: ['3.12.0', 'latest']
# Don't cancel all builds when one fails
fail-fast: false
steps:
- name: Make it work on debian
run: |
apt update
apt install -y git python3 python3-pip python3-venv nodejs unzip
# actions/checkout insists on putting the checkout in the
# working directory rather than ${{ github.workspace }}.
#
# This may just be because the 'runner' user does not exist
# in the docker image at startup.
#
# also see: https://github.com/actions/runner/issues/878
useradd -ms /bin/bash runner
ln -s /__w /home/runner/work
- name: Checkout repository
uses: actions/checkout@v6
with:
submodules: true
- name: Setup cmake
uses: lukka/get-cmake@latest
with:
cmakeVersion: ${{ matrix.cmake }}
- name: Install Arm GNU Toolchain
uses: carlosperate/arm-none-eabi-gcc-action@v1
- name: Install dependencies
run: |
python3 -m venv environment && source environment/bin/activate
python3 -m pip install PyYAML
apt install -y iwyu
iwyu --version
- name: Build libopencm3
working-directory: ${{github.workspace}}/firmware/libopencm3/
run: |
source ../../environment/bin/activate
make
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/firmware/build
- name: Configure CMake
working-directory: ${{github.workspace}}/firmware/build
run: cmake ${{github.workspace}}/firmware/ -DCMAKE_BUILD_TYPE=Release -DBOARD=${{ matrix.board }} -DCHECK_INCLUDES=1
- name: Build
working-directory: ${{github.workspace}}/firmware/build
run: |
source ../../environment/bin/activate
output="$(cmake --build . --config Release 2>&1)"
while IFS= read -r line
do
if [[ "${line}" == "Warning: include-what-you-use"* ]]; then
exit_code=1
dump=1
echo
elif [[ "${line}" == "---" ]]; then
dump=0
echo
fi
if [[ ${dump} == "1" ]]; then
echo "${line}"
fi
done <<< ${output}
if [[ ${exit_code} == "1" ]]; then
echo "Includes check failed for board target: ${{ matrix.board }}"
else
echo "Includes check succeeded for board target: ${{ matrix.board }}"
fi
echo $(include-what-you-use --version)
exit ${exit_code}

1
.gitignore vendored
View file

@ -6,6 +6,7 @@
*.srec
host/build/
host/**/build
install/
# Operating system spew
.DS_Store

24
.readthedocs.yaml Normal file
View file

@ -0,0 +1,24 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# Required
version: 2
# Set the OS, Python version and other tools
build:
os: ubuntu-22.04
tools:
python: "3.12"
# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/source/conf.py
# Build PDF for docs
formats:
- pdf
python:
install:
- requirements: docs/requirements.txt

View file

@ -1,12 +1,18 @@
# Sandbox test environment for HackRF
FROM ubuntu:20.04
CMD ["/bin/bash"]
# Environment for HackRF HIL testing with Jenkins CI
FROM ubuntu:22.04
USER root
# Override interactive installations and install prerequisites
ENV DEBIAN_FRONTEND=noninteractive
# Copy usb hub script from Jenkins' container
COPY --from=gsg-jenkins /startup/hubs.py /startup/hubs.py
COPY --from=gsg-jenkins /startup/.hubs /startup/.hubs
RUN ln -s /startup/hubs.py /usr/local/bin/hubs
# Override interactive installations and install software dependencies
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
curl \
dfu-util \
gcc-arm-none-eabi \
git \
@ -15,9 +21,19 @@ RUN apt-get update && apt-get install -y \
pkg-config \
python3 \
python3-pip \
python-is-python3 \
python3-yaml \
usbutils \
&& rm -rf /var/lib/apt/lists/*
RUN pip3 install git+https://github.com/CapableRobot/CapableRobot_USBHub_Driver --upgrade
# Install USB hub PPPS dependencies
RUN pip3 install numpy python-dotenv git+https://github.com/CapableRobot/CapableRobot_USBHub_Driver --upgrade
RUN curl -L https://github.com/mvp/uhubctl/archive/refs/tags/v2.5.0.tar.gz > uhubctl-2.5.0.tar.gz \
&& mkdir uhubctl-2.5.0 \
&& tar -xvzf uhubctl-2.5.0.tar.gz -C uhubctl-2.5.0 --strip-components 1 \
&& rm uhubctl-2.5.0.tar.gz \
&& cd uhubctl-2.5.0 \
&& make \
&& make install
# Inform Docker that the container is listening on port 8080 at runtime
EXPOSE 8080

172
Jenkinsfile vendored
View file

@ -1,37 +1,130 @@
import org.jenkinsci.plugins.workflow.steps.FlowInterruptedException
def docker_args = '''--group-add=20 --group-add=46 --device-cgroup-rule="c 189:* rmw" \
--device-cgroup-rule="c 166:* rmw" -v /dev/bus/usb:/dev/bus/usb \
-v /tmp/req_pipe:/tmp/req_pipe -v /tmp/res_pipe:/tmp/res_pipe'''
def h1_test = '''python3 ci-scripts/hackrf_test.py --ci --log log \
--hostdir host/build/hackrf-tools/src/ \
--fwupdate firmware/hackrf_usb/build/ \
--tester 0000000000000000325866e629a25623 \
--eut RunningFromRAM --unattended --rev r4'''
def hpro_test = '''python3 ci-scripts/hackrf_pro_test.py --ci --log log \
--hostdir host/build/hackrf-tools/src \
--fwupdate firmware/hackrf_usb/build \
--tester 0000000000000000a06063c82338145f \
--eut RunningFromRAM -p --rev r1.2'''
pipeline {
agent {
dockerfile {
args '--group-add=46 --device-cgroup-rule="c 189:* rmw" -v /dev/bus/usb:/dev/bus/usb'
}
}
agent any
stages {
stage('Build (Host)') {
stage('Build Docker Image') {
options {
timeout(time: 20, unit: 'MINUTES')
}
steps {
sh './ci-scripts/install-host.sh'
sh 'docker build -t hackrf https://github.com/greatscottgadgets/hackrf.git'
}
}
stage('Build (Firmware)') {
stage('Test HackRF One with BOARD=HACKRF_ONE') {
agent {
docker {
image 'hackrf'
reuseNode true
args docker_args
}
}
options {
timeout(time: 20, unit: 'MINUTES')
}
steps {
sh './ci-scripts/install-firmware.sh'
runCommand("Install Host Tools", './ci-scripts/install_host.sh', 3, 1, 'MINUTES')
runCommand("Build HackRF One Firmware", './ci-scripts/build_firmware.sh HACKRF_ONE', 3, 1, 'MINUTES')
lock('HIL_hubs') {
script {
allOff()
runTest("Check Host", 'h1_eut', './ci-scripts/test_host.sh')
runTest("HackRF One HIL Test", 'h1_tester h1_eut', h1_test)
runTest("SGPIO Debug Test", 'h1_eut', 'python3 ci-scripts/test_sgpio_debug.py')
}
}
}
}
stage('Test') {
stage('Test HackRF One with BOARD=UNIVERSAL') {
agent {
docker {
image 'hackrf'
reuseNode true
args docker_args
}
}
options {
timeout(time: 20, unit: 'MINUTES')
}
steps {
sh './ci-scripts/configure-hubs.sh --off'
retry(3) {
sh './ci-scripts/test-host.sh'
runCommand("Install Host Tools", './ci-scripts/install_host.sh', 3, 1, 'MINUTES')
runCommand("Build Universal Firmware", './ci-scripts/build_firmware.sh UNIVERSAL', 3, 1, 'MINUTES')
lock('HIL_hubs') {
script {
allOff()
runTest("Check Host", 'h1_eut', './ci-scripts/test_host.sh')
runTest("HackRF One HIL Test", 'h1_tester h1_eut', h1_test)
runTest("SGPIO Debug Test", 'h1_eut', 'python3 ci-scripts/test_sgpio_debug.py')
}
}
retry(3) {
sh './ci-scripts/test-firmware-program.sh'
}
}
stage('Test HackRF Pro with BOARD=PRALINE') {
agent {
docker {
image 'hackrf'
reuseNode true
args "$docker_args"
}
}
options {
timeout(time: 20, unit: 'MINUTES')
}
steps {
runCommand("Install Host Tools", './ci-scripts/install_host.sh', 3, 1, 'MINUTES')
runCommand("Build Praline Firmware", './ci-scripts/build_firmware.sh PRALINE', 3, 1, 'MINUTES')
lock('HIL_hubs') {
script {
allOff()
runTest("Check Host", 'hpro_eut', './ci-scripts/test_host.sh')
runTest("HackRF Pro HIL Test", 'hpro_tester hpro_eut', hpro_test)
}
}
}
}
stage('Test HackRF Pro with BOARD=UNIVERSAL') {
agent {
docker {
image 'hackrf'
reuseNode true
args "$docker_args"
}
}
options {
timeout(time: 20, unit: 'MINUTES')
}
steps {
runCommand("Install Host Tools", './ci-scripts/install_host.sh', 3, 1, 'MINUTES')
runCommand("Build Universal Firmware", './ci-scripts/build_firmware.sh UNIVERSAL', 3, 1, 'MINUTES')
lock('HIL_hubs') {
script {
allOff()
runTest("Check Host", 'hpro_eut', './ci-scripts/test_host.sh')
runTest("HackRF Pro HIL Test", 'hpro_tester hpro_eut', hpro_test)
}
}
sh './ci-scripts/test-firmware-flash.sh'
}
}
}
post {
always {
sh './ci-scripts/configure-hubs.sh --reset'
sh 'rm -rf testing-venv/'
cleanWs(cleanWhenNotBuilt: false,
deleteDirs: true,
disableDeferredWipeout: true,
@ -39,3 +132,46 @@ pipeline {
}
}
}
def allOff() {
// Allow up to 3 retries, 20 seconds each, for the USB hub port power server to respond appropriately
runCommand('USB hub port power server command', "hubs all off", 3, 20, 'SECONDS')
}
def reset(devices) {
// Allow up to 3 retries, 20 seconds each, for the USB hub port power server to respond appropriately
runCommand('USB hub port power server command', "hubs ${devices} reset", 3, 20, 'SECONDS')
}
def runCommand(title, cmd, retries, time, unit) {
retry(retries) {
try {
timeout(time: time, unit: unit) {
sh "${cmd}"
}
} catch (FlowInterruptedException err) {
// Check if the cause was specifically an exceeded timeout
def cause = err.getCauses().get(0)
if (cause instanceof org.jenkinsci.plugins.workflow.steps.TimeoutStepExecution.ExceededTimeout) {
echo "${title} timeout reached."
throw err // Re-throw the exception to fail the build
} else {
echo "Build interrupted for another reason."
throw err // Re-throw the exception to fail the build
}
} catch (Exception err) {
echo "An unrelated error occurred: ${err.getMessage()}"
throw err
}
}
}
def runTest(title, devices, cmd) {
retry(3) {
// reset() retains it's own internal retries
reset(devices)
sh 'sleep 1s'
// run the test with 0 internal retries and 3 external retries to ensure resets between runs
runCommand(title, cmd, 0, 5, 'MINUTES')
}
}

View file

@ -15,14 +15,19 @@ Information on HackRF and purchasing HackRF: https://greatscottgadgets.com/hackr
# Documentation
Documentation for HackRF can be viewed on [Read the Docs](https://hackrf.readthedocs.io/en/latest/). The raw documenation files for HackRF are in the [docs folder](https://github.com/mossmann/hackrf/tree/master/docs) in this repository and can be built locally by installing [Sphinx Docs](https://www.sphinx-doc.org/en/master/usage/installation.html) and running `make html`. Documentation changes can be submitted through pull request and suggestions can be made as GitHub issues.
Documentation for HackRF can be viewed on [Read the Docs](https://hackrf.readthedocs.io/en/latest/). The raw documentation files for HackRF are in the [docs folder](https://github.com/mossmann/hackrf/tree/master/docs) in this repository and can be built locally by installing [Sphinx Docs](https://www.sphinx-doc.org/en/master/usage/installation.html) and running `make html`. Documentation changes can be submitted through pull request and suggestions can be made as GitHub issues.
To create a PDF of the HackRF documentation from the HackRF repository while on Ubuntu:
* run `sudo apt install latexmk texlive-latex-extra`
* navigate to hackrf/docs on command line
* run the command `make latex`
* run the command `make latexpdf`
--------------------
# Getting Help
Before asking for help with HackRF, check to see if your question is listed in the [FAQ](https://hackrf.readthedocs.io/en/latest/faq.html).
Before asking for help with HackRF, check to see if your question is listed on the [troubleshooting page](https://hackrf.readthedocs.io/en/latest/troubleshooting.html).
For assistance with HackRF general use or development, please look at the [issues on the GitHub project](https://github.com/greatscottgadgets/hackrf/issues). This is the preferred place to ask questions so that others may locate the answer to your question in the future.

View file

@ -1,52 +0,0 @@
os: Visual Studio 2017
clone_depth: 1
configuration:
- Release
init:
- C:\"Program Files (x86)"\"Microsoft Visual Studio 14.0"\VC\vcvarsall.bat %PLATFORM%
install:
# Dependencies for libHackRF
- appveyor DownloadFile "https://github.com/libusb/libusb/releases/download/v1.0.22/libusb-1.0.22.7z" -FileName "C:\libusb.7z"
- 7z x -y "C:\libusb.7z" -o"C:\libusb"
- appveyor DownloadFile "http://mirrors.kernel.org/sourceware/pthreads-win32/pthreads-w32-2-9-1-release.zip" -FileName "C:\pthreads-w32-release.zip"
- 7z x -y "C:\pthreads-w32-release.zip" -o"C:\pthreads"
- appveyor DownloadFile "http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/pkg-config_0.26-1_win32.zip" -FileName "C:\pkg-config_win32.zip"
- 7z x -y "C:\pkg-config_win32.zip" -o"C:\pkg-config"
# FFTW for hackrf_sweep
- curl -fsS -o "C:\fftw-3.3.5.zip" "ftp://ftp.fftw.org/pub/fftw/fftw-3.3.5-dll64.zip"
- 7z x -y "C:\fftw-3.3.5.zip" -o"C:\fftw"
- cd c:\fftw
- ps: lib /machine:x64 /def:libfftw3f-3.def
# ARM GCC for firmware builds
# - appveyor DownloadFile "https://developer.arm.com/-/media/Files/downloads/gnu-rm/6-2017q2/gcc-arm-none-eabi-6-2017-q2-update-win32.zip" -FileName "C:\gcc-arm-none-eabi-win32.zip"
# - 7z x -y "C:\gcc-arm-none-eabi-win32.zip" -o"C:\gcc-arm-none-eabi"
# - set PATH=%PATH%;c:\gcc-arm-none-eabi\bin
build_script:
# Host library and tools
- mkdir c:\projects\hackrf\host\build
- cd c:\projects\hackrf\host\build
- cmake -G "Visual Studio 14 2015 Win64" \
-DLIBUSB_LIBRARIES="C:\libusb\MS64\dll\libusb-1.0.lib" \
-DLIBUSB_INCLUDE_DIR="C:\libusb\include\libusb-1.0" \
-DTHREADS_PTHREADS_INCLUDE_DIR=c:\pthreads\Pre-built.2\include \
-DTHREADS_PTHREADS_WIN32_LIBRARY=c:\pthreads\Pre-built.2\lib\x64\pthreadVC2.lib \
-DPKG_CONFIG_EXECUTABLE="C:\pkg-config\bin\pkg-config.exe" \
-DFFTW_INCLUDES=C:\fftw \
-DFFTW_LIBRARIES=C:\fftw\libfftw3f-3.lib \
..
- msbuild HackRF.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
# Firmware
# - cd c:\projects\hackrf\
# - git submodule init
# - git submodule update
# - '%CYG_BASH% -lc "cd $APPVEYOR_BUILD_FOLDER && firmware/appveyor.sh"'
after_build:
- 7z a %APPVEYOR_BUILD_FOLDER%\HackRF-Windows-%APPVEYOR_REPO_COMMIT%.zip %APPVEYOR_BUILD_FOLDER%\host\build\libhackrf\src\Release\* %APPVEYOR_BUILD_FOLDER%\host\build\hackrf-tools\src\Release\*
artifacts:
- path: HackRF-Windows-%APPVEYOR_REPO_COMMIT%.zip
name: HackRF-Windows-%APPVEYOR_REPO_COMMIT%

9
ci-scripts/build_firmware.sh Executable file
View file

@ -0,0 +1,9 @@
#!/bin/bash
set -e
git submodule init
git submodule update
cd firmware/hackrf_usb
rm -rf build
cmake -DBOARD=$1 -B build
cmake --build build
cd ../..

View file

@ -1,3 +0,0 @@
#!/bin/bash
usbhub --disable-i2c --hub D9D1 power state --port 1,2,3,4 $1
usbhub --disable-i2c --hub 624C power state --port 1,2,3,4 $1

File diff suppressed because it is too large Load diff

1425
ci-scripts/hackrf_test.py Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,8 +0,0 @@
#!/bin/bash
git submodule init
git submodule update
mkdir firmware/hackrf_usb/build
cd firmware/hackrf_usb/build
cmake ..
make
cd ../../..

View file

@ -1,6 +0,0 @@
#!/bin/bash
mkdir host/build
cd host/build
cmake ..
make
cd ../..

6
ci-scripts/install_host.sh Executable file
View file

@ -0,0 +1,6 @@
#!/bin/bash
set -e
cd host
cmake -B build
cmake --build build
cd ..

37
ci-scripts/test-debug.py Normal file
View file

@ -0,0 +1,37 @@
#!/usr/bin/python3
import sys
import subprocess
PASS, FAIL = range(2)
EUT = "RunningFromRAM"
def check_debug(target, register, reg_val):
hackrf_debug = subprocess.run(["host/build/hackrf-tools/src/hackrf_debug",
f"--{target}", "--register", register,
"--read", "--device", EUT],
capture_output=True, encoding="UTF-8")
if reg_val in hackrf_debug.stdout:
print(f"hackrf_debug --{target} passed.")
return PASS
else:
print(f"hackrf_debug --{target} failed.")
return FAIL
def main():
results = [
check_debug("si5351c", "2", "0x03"),
check_debug("max2837", "3", "0x1b9"),
check_debug("rffc5072", "2", "0x9055"),
]
if FAIL not in results:
sys.exit(PASS)
else:
sys.exit(FAIL)
if __name__ == "__main__":
main()

View file

@ -3,7 +3,7 @@ host/build/hackrf-tools/src/hackrf_spiflash -w firmware/hackrf_usb/build/hackrf_
EXIT_CODE="$?"
if [ "$EXIT_CODE" == "1" ]
then
echo "No GreatFET found! Disconnected? Exiting.."
echo "No HackRF found! Disconnected? Exiting.."
exit $EXIT_CODE
elif [ "$EXIT_CODE" == "0" ]
then
@ -13,6 +13,6 @@ then
echo "Host tool installation failed! Exiting.."
exit $EXIT_CODE
else
echo "god have mercy on your soul"
echo "Unknown error"
exit $EXIT_CODE
fi
fi

View file

@ -1,7 +1,6 @@
#!/bin/bash
usbhub --disable-i2c --hub D9D1 power state --port 2 --reset
dfu-util --device 1fc9:000c --alt 0 --download firmware/hackrf_usb/build/hackrf_usb.dfu
sleep 1s
dfu-util --path 1-1.2 --alt 0 --download firmware/hackrf_usb/build/hackrf_usb.dfu
EXIT_CODE="$?"
if [ "$EXIT_CODE" == "0" ]
then
@ -16,6 +15,6 @@ then
echo "dfu-util installation failed! Exiting.."
exit $EXIT_CODE
else
echo "god have mercy on your soul"
echo "Unhandled exception"
exit $EXIT_CODE
fi
fi

127
ci-scripts/test-transfer.py Normal file
View file

@ -0,0 +1,127 @@
#!/usr/bin/python3
import subprocess
import time
import sys
from os import environ
EUT = environ.get('EUT')
TESTER = environ.get('TESTER')
PASS, FAIL = range(2)
def write_bytes():
tx_bytes = b'\x7f\x00\x59\x59\x00\x7f\xa7\x59\x81\x00\xa7\xa7\x00\x81\x59\xa7'
with open("/tmp/binary100", "wb") as bin_file:
for i in range(62500): # 1MB file size
bin_file.write(tx_bytes)
def capture_signal(sweep_range, tx_gain, rx_lna_gain, rx_vga_gain, freq=None,
if_freq=None, lo_freq=None, image_reject=0):
test_type = sys.argv[1]
if test_type == "tx":
transmitter = EUT
receiver = TESTER
elif test_type == "rx":
transmitter = TESTER
receiver = EUT
else:
print(f"Invalid command-line argument: {test_type}. Use tx or rx")
sys.exit(1)
if if_freq == None:
transmit = subprocess.Popen(["host/build/hackrf-tools/src/hackrf_transfer",
"-d", transmitter, "-R", "-t", "/tmp/binary100",
"-a", "0", "-x", tx_gain, "-f", freq],
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
else:
transmit = subprocess.Popen(["host/build/hackrf-tools/src/hackrf_transfer",
"-d", transmitter, "-R", "-t", "/tmp/binary100",
"-a", "0", "-x", tx_gain, "-i", if_freq,
"-o", lo_freq, "-m", image_reject],
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
time.sleep(1)
sweep = subprocess.Popen(["host/build/hackrf-tools/src/hackrf_sweep",
"-d", receiver, "-N", "2", "-w", "333333",
"-f", sweep_range, "-a", "0", "-l", rx_lna_gain,
"-g", rx_vga_gain],
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
sweep.wait()
transmit.terminate()
transmit.wait()
# parse the hackrf_sweep output
data, stderr = sweep.communicate()
data = data.decode("utf-8")
data = data.split("\n")
print(data[4])
data = data[4] # Note: using data from the 2nd sweep until issue #1230 is resolved.
data = data.split(", ")
data = data[6:21]
bins = [float(bin) for bin in data]
return bins
def check_signal(freq, bins):
signal = bins.pop(1)
signal_threshold = -25
max_power = -10
result = PASS
if signal < signal_threshold:
print(f"Signal not strong enough at {freq} MHz")
result = FAIL
elif signal > max_power:
print(f"Received signal exceeded maximum power at {freq} MHz")
result = 1
for bin in bins:
if bin > max_power or bin > signal:
print(f"Non-target bin power exceeded max power threshold at {freq} MHz")
result = FAIL
break
return result
def main():
write_bytes()
tester_hub_on = subprocess.Popen(["hubs", "hackrf", "reset"])
tester_hub_on.wait()
time.sleep(1)
eut_clkout_on = subprocess.Popen(["host/build/hackrf-tools/src/hackrf_clock",
"-o", "1", "-d", EUT])
tester_clkout_off = subprocess.Popen(["host/build/hackrf-tools/src/hackrf_clock",
"-o", "0", "-d", TESTER])
eut_clkout_on.wait()
tester_clkout_off.wait()
_9_5Mhz_data = capture_signal(sweep_range="9:29", tx_gain="38", rx_lna_gain="16",
rx_vga_gain="16", if_freq="2628250000",
lo_freq="2620000000", image_reject="1")
_915_5Mhz_data = capture_signal(sweep_range="915:935", tx_gain="38", rx_lna_gain="16",
rx_vga_gain="16", if_freq="2540750000",
lo_freq="3455000000", image_reject="1")
_2665_5Mhz_data = capture_signal(sweep_range="2665:2685", tx_gain="26", rx_lna_gain="16",
rx_vga_gain="16", freq="2664250000")
_5999_5Mhz_data = capture_signal(sweep_range="5999:6019", tx_gain="37", rx_lna_gain="32",
rx_vga_gain="40", if_freq="2540750000",
lo_freq="3460000000", image_reject="2")
lp1_result = check_signal(9.5, _9_5Mhz_data)
lp2_result = check_signal(915.5, _915_5Mhz_data)
bp_result = check_signal(2665.5, _2665_5Mhz_data)
hp_result = check_signal(5999.5, _5999_5Mhz_data)
results = [lp1_result, lp2_result, bp_result, hp_result]
if FAIL in results:
sys.exit(FAIL)
else:
sys.exit(PASS)
if __name__ == "__main__":
main()

View file

@ -1,6 +1,4 @@
#!/bin/bash
usbhub --disable-i2c --hub D9D1 power state --port 2 --reset
sleep 1s
#!/bin/bash
host/build/hackrf-tools/src/hackrf_info
EXIT_CODE="$?"
if [ "$EXIT_CODE" == "1" ]
@ -18,4 +16,4 @@ then
else
echo "god have mercy on your soul"
exit $EXIT_CODE
fi
fi

View file

@ -0,0 +1,87 @@
#!/usr/bin/python3
import os
import sys
import subprocess
from pathlib import Path
FILENAME = f"/tmp/rx_100kB_{str(os.getpid())}"
def program_device():
# build new firmware with SGPIO_DEBUG mode enabled
print("Programming device...")
fw_dir = os.getcwd() + "/firmware/hackrf_usb/build"
del_dir = subprocess.run(["rm", "-rf", "firmware/hackrf_usb/build"])
mk_dir = subprocess.run(["mkdir", "firmware/hackrf_usb/build"])
cmake = subprocess.run(["cmake", "-D", "SGPIO_DEBUG=1", ".."],
cwd=fw_dir, stdout=subprocess.DEVNULL)
make = subprocess.run(["make"],
cwd=fw_dir, stdout=subprocess.DEVNULL)
program = subprocess.run(["./ci-scripts/test-firmware-program.sh"],
stdout=subprocess.DEVNULL)
def capture():
shortfall_count = -1
capture_tries = 0
while shortfall_count != 0:
print("Capturing data...")
rx_100kB = subprocess.run(["host/build/hackrf-tools/src/hackrf_transfer",
"-r", FILENAME, "-d", "RunningFromRAM",
"-n", "50000", "-s", "20000000"],
capture_output=True, encoding="UTF-8")
print(rx_100kB.stdout)
print(rx_100kB.stderr)
print(f"Wrote capture data to file: {FILENAME}")
debug_state_proc = subprocess.run(["host/build/hackrf-tools/src/hackrf_debug", "--state"],
capture_output=True, encoding="UTF-8")
print(debug_state_proc.stdout)
print(debug_state_proc.stderr)
capture_tries += 1
debug_state = debug_state_proc.stdout.split("\n")
shortfalls_line = [s for s in debug_state if s.startswith("Number of shortfalls")]
shortfall_count = [int(c) for c in shortfalls_line[0].split() if c.isdigit()][0]
if capture_tries == 10:
print("Unable to transmit data with 0 shortfalls. " \
"This is not indicative of a device failure. " \
"Likely an issue with the testing infrastructure.")
sys.exit(1)
def check_bytes():
print(f"Checking length of {FILENAME}")
rx_data = Path(FILENAME).read_bytes()
if len(rx_data) != 100000: # file should be 100k bytes when using 50k samples
print(f"ERROR: Only {str(len(rx_data))} bytes found in file, expected 100k.")
sys.exit(1)
else:
print("Correct file size found.")
# check that each byte = prev_byte + 1 except at wraparound bounds
print("Checking bytes...")
for i in range(1, len(rx_data)):
if rx_data[i-1] != rx_data[i] - 1:
if not (rx_data[i] == 0 and rx_data[i-1] == 255):
print(f"ERROR: Incorrect data value found at location {str(i)} in {FILENAME}:")
# print up to 5 values starting from at most 1 value before error occurence
j = -1
while j < 4:
if i + j < len(rx_data) and i + j > -1:
print(f"{str(i+j)} : {str(rx_data[i+j])}")
j = j + 1
sys.exit(1)
print("Successfully validated all bytes in file.\nSGPIO debug test passed.")
def main():
program_device()
capture()
check_bytes()
if __name__ == "__main__":
main()

2658
docs/doxygen/Doxyfile Normal file

File diff suppressed because it is too large Load diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 KiB

File diff suppressed because it is too large Load diff

After

Width:  |  Height:  |  Size: 312 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 KiB

File diff suppressed because it is too large Load diff

After

Width:  |  Height:  |  Size: 245 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 238 KiB

After

Width:  |  Height:  |  Size: 242 KiB

Before After
Before After

View file

@ -1,22 +1,22 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="1280"
height="720"
viewBox="0 0 338.66666 190.50001"
version="1.1"
id="svg8"
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
sodipodi:docname="block-diagram.svg"
inkscape:export-filename="C:\Users\Martin\Documents\hackrf\docs\images\block-diagram.png"
inkscape:export-filename="block-diagram.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96">
inkscape:export-ydpi="96"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<defs
id="defs2">
<marker
@ -163,9 +163,9 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1"
inkscape:cx="633.92814"
inkscape:cy="396.56459"
inkscape:zoom="0.70710678"
inkscape:cx="603.16209"
inkscape:cy="390.32295"
inkscape:document-units="px"
inkscape:current-layer="layer1"
inkscape:document-rotation="0"
@ -173,17 +173,18 @@
units="px"
inkscape:snap-text-baseline="true"
showguides="true"
inkscape:window-width="1920"
inkscape:window-height="1137"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-width="1916"
inkscape:window-height="1005"
inkscape:window-x="1600"
inkscape:window-y="54"
inkscape:window-maximized="1"
inkscape:snap-object-midpoints="false"
inkscape:snap-bbox="false"
inkscape:snap-page="true"
inkscape:bbox-nodes="true"
inkscape:snap-nodes="true"
inkscape:snap-others="true">
inkscape:snap-others="true"
inkscape:pagecheckerboard="0">
<inkscape:grid
type="xygrid"
id="grid833"
@ -235,11 +236,6 @@
height="80.433342"
x="203.20001"
y="21.166662" />
<path
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.529167, 0.529167;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
d="m 213.78333,40.216668 1e-5,15.875 h 12.7 l -1e-5,39.158334 23.28334,0"
id="path2723"
sodipodi:nodetypes="ccccc" />
<g
id="g4744"
transform="matrix(0,1,1,0,182.03336,-118.53334)">
@ -1456,29 +1452,6 @@
x="206.37503"
y="28.575012"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:5.82083px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583">MAX2837 </tspan></text>
<g
id="g2581"
transform="translate(12.699999,16.933341)">
<rect
style="fill:#4095bf;fill-opacity:1;stroke:#000000;stroke-width:0.529167;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect2575"
width="12.699997"
height="8.4666672"
x="194.73335"
y="27.516672" />
<text
xml:space="preserve"
style="font-size:2.64583px;line-height:1.25;font-family:sans-serif;stroke-width:0.264583"
x="201.08334"
y="33.866669"
id="text2579"><tspan
sodipodi:role="line"
id="tspan2577"
x="201.08334"
y="33.866669"
style="font-size:6.35px;text-align:center;text-anchor:middle;stroke-width:0.264583"
rotate="0 0 0 0">LPF</tspan></text>
</g>
<g
id="g2689"
transform="translate(12.700006,4.2333395)">
@ -1569,54 +1542,6 @@
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 259.29169,42.333333 257.17502,41.275 v 2.116667 z"
id="path2697" />
<g
id="g2805"
transform="matrix(-1,0,0,1,427.56669,33.866685)">
<rect
style="fill:#4095bf;fill-opacity:1;stroke:#000000;stroke-width:0.529167;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect2799"
width="12.700001"
height="8.4666672"
x="194.73335"
y="27.516666" />
<text
xml:space="preserve"
style="font-size:2.64583px;line-height:1.25;font-family:sans-serif;stroke-width:0.529167;stroke-miterlimit:4;stroke-dasharray:none"
x="-201.33759"
y="33.866669"
id="text2803"
transform="scale(-1,1)"><tspan
sodipodi:role="line"
id="tspan2801"
x="-201.33759"
y="33.866669"
style="font-size:6.35px;text-align:center;text-anchor:middle;stroke-width:0.529167;stroke-miterlimit:4;stroke-dasharray:none"
rotate="0 0 0 0">LPF</tspan></text>
</g>
<g
id="g2813"
transform="matrix(-1,0,0,1,427.56669,46.566685)">
<rect
style="fill:#4095bf;fill-opacity:1;stroke:#000000;stroke-width:0.529167;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect2807"
width="12.700001"
height="8.4666672"
x="194.73335"
y="27.516666" />
<text
xml:space="preserve"
style="font-size:2.64583px;line-height:1.25;font-family:sans-serif;stroke-width:0.264583"
x="-201.33759"
y="33.866669"
id="text2811"
transform="scale(-1,1)"><tspan
sodipodi:role="line"
id="tspan2809"
x="-201.33759"
y="33.866669"
style="font-size:6.35px;text-align:center;text-anchor:middle;stroke-width:0.264583"
rotate="0 0 0 0">LPF</tspan></text>
</g>
<g
id="g2819"
transform="matrix(-1,0,0,1,427.56669,33.866685)">
@ -1837,7 +1762,7 @@
id="tspan3054"
x="207.43335"
y="99.483337"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.175px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.264583">21502750 MHz</tspan></text>
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.175px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.264583">21702740 MHz</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.175px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:center;text-anchor:middle;stroke-width:0.264583"
@ -2586,22 +2511,22 @@
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.64583px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:center;text-anchor:middle;stroke-width:0.264583"
x="281.51669"
x="281.23917"
y="41.274998"
id="text3678"><tspan
sodipodi:role="line"
x="281.51669"
x="281.23917"
y="41.274998"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
id="tspan3676">TX_IF</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.64583px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:center;text-anchor:middle;stroke-width:0.264583"
x="280.45834"
x="281.00922"
y="70.90834"
id="text3682"><tspan
sodipodi:role="line"
x="280.45834"
x="281.00922"
y="70.90834"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
id="tspan3680">RX_IF</tspan></text>
@ -2845,17 +2770,17 @@
x="16.933332"
y="177.39795"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.64583px;line-height:1.1;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.264583"
id="tspan810">12150 MHz: 515 dBm</tspan><tspan
id="tspan810">12170 MHz: 515 dBm</tspan><tspan
sodipodi:role="line"
x="16.933332"
y="180.30836"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.64583px;line-height:1.1;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.264583"
id="tspan812">21502750 MHz: 1315 dBm</tspan><tspan
id="tspan812">21702740 MHz: 1315 dBm</tspan><tspan
sodipodi:role="line"
x="16.933332"
y="183.21878"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.64583px;line-height:1.1;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.264583"
id="tspan816">27504000 MHz: 05 dBm</tspan><tspan
id="tspan816">27404000 MHz: 05 dBm</tspan><tspan
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.64583px;line-height:1.1;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.264583"
sodipodi:role="line"
id="tspan822"
@ -3275,7 +3200,7 @@
id="path4820" />
<path
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 31.750002,143.93334 2.11667,1.05834 v -2.11667 z"
d="m 31.913522,143.93334 2.11667,1.05834 v -2.11667 z"
id="path4822" />
<text
xml:space="preserve"
@ -3603,7 +3528,7 @@
id="tspan1878"
x="226.48334"
y="147.10834"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.175px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.264583">&gt; 2750 MHz</tspan></text>
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.175px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.264583">&gt; 2740 MHz</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.175px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:center;text-anchor:middle;stroke-width:0.264583"
@ -3614,7 +3539,7 @@
id="tspan1882"
x="226.48334"
y="164.04167"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.175px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.264583">&lt; 2150 MHz</tspan></text>
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.175px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';stroke-width:0.264583">&lt; 2170 MHz</tspan></text>
<path
style="opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
d="m 247.65003,118.53335 27.51665,-1e-5"
@ -3808,74 +3733,74 @@
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.64583px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
x="281.51669"
x="281.00922"
y="87.841675"
id="text1778"><tspan
sodipodi:role="line"
x="281.51669"
x="281.00922"
y="87.841675"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
id="tspan1776">MIX_BYPASS</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.64583px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
x="270.93335"
x="270.42587"
y="176.74168"
id="text1782"><tspan
sodipodi:role="line"
x="270.93335"
x="270.42587"
y="176.74168"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
id="tspan1780">RX</tspan></text>
<path
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.529167, 0.529167;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
d="m 270.93337,177.80001 h 8.46666 v -61.38334"
style="font-variation-settings:normal;opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.52916668;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.52916668,0.52916668;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
d="m 270.66875,177.79994 h 8.73118 v -61.38327"
id="path1786"
sodipodi:nodetypes="ccc" />
<path
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.529167, 0.529167;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
d="m 190.50002,177.80001 h 63.5 v -14.81666"
style="font-variation-settings:normal;opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.52916668;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.52916668,0.52916668;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
d="M 190.23542,177.80001 H 254 v -14.81666"
id="path1788"
sodipodi:nodetypes="ccc" />
<path
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.529167, 0.529167;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
style="font-variation-settings:normal;opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.52916699;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.52916699,0.52916699;stroke-dashoffset:0.2645835;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
d="M 198.96668,177.80001 V 162.98335"
id="path1790" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.64583px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
x="190.50002"
x="189.99254"
y="176.74168"
id="text1794"><tspan
sodipodi:role="line"
x="190.50002"
x="189.99254"
y="176.74168"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
id="tspan1792">LP</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.64583px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
x="63.500004"
x="63.2225"
y="185.20834"
id="text1798"><tspan
sodipodi:role="line"
x="63.500004"
x="63.2225"
y="185.20834"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
id="tspan1796">TX_AMP</tspan></text>
<path
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.529167, 0.529167;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
d="m 63.500004,186.26668 67.733346,0 v -23.28333"
style="font-variation-settings:normal;opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.529174;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.529174, 0.529174;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
d="M 63.235418,186.26668 H 131.23333 V 162.98335"
id="path1800"
sodipodi:nodetypes="ccc" />
<path
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.529167, 0.529167;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
style="font-variation-settings:normal;opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.52916699;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.52916699,0.52916699;stroke-dashoffset:0.2645835;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
d="M 84.666674,186.26668 V 162.98335"
id="path1802"
sodipodi:nodetypes="cc" />
<path
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.529167, 0.529167;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
d="M 281.51667,88.900008 H 300.5667 V 44.450004"
style="font-variation-settings:normal;opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.52916668;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.52916668,0.52916668;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
d="m 281.25209,88.899987 h 19.31457 V 44.450004"
id="path1804" />
<path
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
@ -3942,18 +3867,18 @@
sodipodi:nodetypes="ccc" />
<path
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
d="M 57.150004,150.28335 H 40.216668"
d="M 57.150004,150.28335 H 39.952084"
id="path2613"
sodipodi:nodetypes="cc" />
<text
xml:space="preserve"
style="font-size:2.64583px;line-height:1.25;font-family:sans-serif;text-align:center;text-anchor:middle;stroke-width:0.264583"
x="40.216667"
x="39.775093"
y="149.22501"
id="text2617"><tspan
sodipodi:role="line"
id="tspan2615"
x="40.216667"
x="39.775093"
y="149.22501"
style="font-weight:bold;text-align:start;text-anchor:start;stroke-width:0.264583">3.3V 50mA</tspan></text>
<ellipse
@ -3993,87 +3918,88 @@
</g>
<path
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.529167, 0.529167;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
d="m 40.21667,158.75002 h 21.166667 v -2.11667"
id="path2634" />
d="m 39.952084,158.75002 h 21.431253 v -2.11667"
id="path2634"
sodipodi:nodetypes="ccc" />
<text
xml:space="preserve"
style="font-size:2.64583px;line-height:1.25;font-family:sans-serif;text-align:center;text-anchor:middle;stroke-width:0.264583"
x="40.216667"
x="39.581306"
y="157.69168"
id="text2638"><tspan
sodipodi:role="line"
id="tspan2636"
x="40.216667"
x="39.581306"
y="157.69168"
style="font-weight:bold;text-align:start;text-anchor:start;stroke-width:0.264583">!ANT_BIAS</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.64583px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
x="63.5"
x="62.992538"
y="178.85834"
id="text1611"><tspan
sodipodi:role="line"
x="63.5"
x="62.992538"
y="178.85834"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
id="tspan1609">RX_AMP</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.64583px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
x="63.5"
x="63.2225"
y="182.03334"
id="text1615"><tspan
sodipodi:role="line"
x="63.5"
x="63.2225"
y="182.03334"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
id="tspan1613">AMP_BYPASS</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.64583px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
x="190.50002"
x="189.99254"
y="173.56668"
id="text1619"><tspan
sodipodi:role="line"
x="190.50002"
x="189.99254"
y="173.56668"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
id="tspan1617">HP</tspan></text>
<path
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.529;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.529, 0.529;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
d="m 143.93334,186.26668 h 21.16667 v -23.28333"
style="font-variation-settings:normal;opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.529204;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.529204, 0.529204;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
d="m 143.66875,186.26666 h 21.43123 v -23.28331"
id="path1621"
sodipodi:nodetypes="ccc" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.64583px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
x="143.93335"
x="143.65584"
y="185.20834"
id="text1625"><tspan
sodipodi:role="line"
x="143.93335"
x="143.65584"
y="185.20834"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
id="tspan1623">TX_MIX_BP</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.64583px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
x="143.93335"
x="143.29797"
y="178.85834"
id="text1629"><tspan
sodipodi:role="line"
x="143.93335"
x="143.29797"
y="178.85834"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
id="tspan1627">!MIX_BYPASS</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.64583px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
x="143.93335"
x="143.42587"
y="182.03334"
id="text1633"><tspan
sodipodi:role="line"
x="143.93335"
x="143.42587"
y="182.03334"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
id="tspan1631">RX_MIX_BP</tspan></text>
@ -4175,6 +4101,11 @@
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 225.42502,88.900005 -2.11667,-1.05834 v 2.11667 z"
id="path2876" />
<path
style="font-variation-settings:normal;vector-effect:none;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:0.529167, 0.529167;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000"
d="m 213.78334,39.952084 1e-5,16.139584 h 12.7 l -1e-5,39.158335 h 23.28334"
id="path2723"
sodipodi:nodetypes="ccccc" />
<path
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 225.42502,93.133338 -2.11667,-1.05834 v 2.11667 z"
@ -4243,65 +4174,91 @@
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:6.90875px;line-height:0.85;font-family:'League Gothic';-inkscape-font-specification:'League Gothic Bold';text-align:end;text-anchor:end;stroke-width:0.172719"
id="tspan3429">GADGETS</tspan></text>
</g>
<path
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
d="m 16.933335,136.52501 h 1.058333 v -2.11667 h 2.116667 v 2.11667 h 2.116667 v -2.11667 h 2.116666 v 2.11667 h 2.116666 v -2.11667 h 2.116669 v 2.11667 h 1.058334"
id="path1717" />
<path
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
d="m 16.933336,153.45836 h 1.058333 v -2.11667 h 2.116667 v 2.11667 h 2.116667 v -2.11667 h 2.116666 v 2.11667 h 2.116666 v -2.11667 h 2.116669 v 2.11667 h 1.058334"
id="path1719" />
<g
id="g3853">
id="g3853"
transform="translate(-0.23745481,-0.10144164)">
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.64583px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
x="129.11667"
y="134.40834"
y="135.99582"
id="text1551"><tspan
sodipodi:role="line"
x="129.11667"
y="134.40834"
y="135.99582"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
id="tspan1553">Diagram Revision: A</tspan><tspan
id="tspan1553">Diagram Revision: C</tspan><tspan
sodipodi:role="line"
x="129.11667"
y="138.29544"
y="139.88292"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:5.29167px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
id="tspan1559" /></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.64583px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
x="129.11667"
y="131.23338"
id="text1551-3"><tspan
sodipodi:role="line"
x="129.11667"
y="131.23338"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:4.23333px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
id="tspan1553-6">Hardware Revision: r1-r8</tspan><tspan
sodipodi:role="line"
x="129.11667"
y="135.12048"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:5.29167px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
id="tspan1559-7" /></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.175px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
x="129.11667"
y="138.64168"
y="140.75832"
id="text1563"><tspan
sodipodi:role="line"
id="tspan1561"
x="129.11667"
y="138.64168"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:3.175px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583">© Great Scott Gadgets 2022</tspan><tspan
y="140.75832"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.64583px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583">© Great Scott Gadgets 2022-2023</tspan><tspan
sodipodi:role="line"
x="129.11667"
y="142.61043"
y="144.72707"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:2.64583px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';text-align:start;text-anchor:start;stroke-width:0.264583"
id="tspan3512" /></text>
<rect
style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.264583;stroke-linecap:square;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
style="fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.299903;stroke-linecap:square;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect3475"
width="71.966675"
height="19.050007"
x="127.00001"
y="129.11667" />
width="71.947708"
height="24.481998"
x="127.00948"
y="125.59979" />
<text
xml:space="preserve"
style="font-size:2.64583px;line-height:0;font-family:sans-serif;text-align:center;text-anchor:middle;stroke-width:0.264583"
x="129.10376"
y="142.76855"
y="144.88519"
id="text3532"><tspan
sodipodi:role="line"
id="tspan3530"
x="129.10376"
y="142.76855"
y="144.88519"
style="font-weight:bold;line-height:1.1;text-align:start;text-anchor:start;stroke-width:0.264583">This design may be copied &amp; used</tspan><tspan
sodipodi:role="line"
x="129.10376"
y="145.67897"
y="147.79561"
style="font-weight:bold;line-height:1.1;text-align:start;text-anchor:start;stroke-width:0.264583"
id="tspan3534">under the terms of CERN-OHL-P v2</tspan></text>
<g
id="g3819">
id="g3819"
transform="translate(0,2.1166668)">
<g
transform="matrix(0.0574526,0,0,-0.0574526,161.22832,155.90395)"
id="g3012"
@ -4392,13 +4349,76 @@
</g>
</g>
</g>
<path
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
d="m 16.933335,136.52501 h 1.058333 v -2.11667 h 2.116667 v 2.11667 h 2.116667 v -2.11667 h 2.116666 v 2.11667 h 2.116666 v -2.11667 h 2.116669 v 2.11667 h 1.058334"
id="path1717" />
<path
style="font-variation-settings:normal;opacity:1;vector-effect:none;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.529167;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000;stop-opacity:1"
d="m 16.933336,153.45836 h 1.058333 v -2.11667 h 2.116667 v 2.11667 h 2.116667 v -2.11667 h 2.116666 v 2.11667 h 2.116666 v -2.11667 h 2.116669 v 2.11667 h 1.058334"
id="path1719" />
<g
id="g2581"
transform="translate(12.699999,16.933341)">
<rect
style="fill:#4095bf;fill-opacity:1;stroke:#000000;stroke-width:0.529167;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect2575"
width="12.699997"
height="8.4666672"
x="194.73335"
y="27.516672" />
<text
xml:space="preserve"
style="font-size:2.64583px;line-height:1.25;font-family:sans-serif;stroke-width:0.264583"
x="201.08334"
y="33.866669"
id="text2579"><tspan
sodipodi:role="line"
id="tspan2577"
x="201.08334"
y="33.866669"
style="font-size:6.35px;text-align:center;text-anchor:middle;stroke-width:0.264583"
rotate="0 0 0 0">LPF</tspan></text>
</g>
<g
id="g2805"
transform="matrix(-1,0,0,1,427.56669,33.866685)">
<rect
style="fill:#4095bf;fill-opacity:1;stroke:#000000;stroke-width:0.529167;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect2799"
width="12.700001"
height="8.4666672"
x="194.73335"
y="27.516666" />
<text
xml:space="preserve"
style="font-size:2.64583px;line-height:1.25;font-family:sans-serif;stroke-width:0.529167;stroke-miterlimit:4;stroke-dasharray:none"
x="-201.33759"
y="33.866669"
id="text2803"
transform="scale(-1,1)"><tspan
sodipodi:role="line"
id="tspan2801"
x="-201.33759"
y="33.866669"
style="font-size:6.35px;text-align:center;text-anchor:middle;stroke-width:0.529167;stroke-miterlimit:4;stroke-dasharray:none"
rotate="0 0 0 0">LPF</tspan></text>
</g>
<g
id="g2813"
transform="matrix(-1,0,0,1,427.56669,46.566685)">
<rect
style="fill:#4095bf;fill-opacity:1;stroke:#000000;stroke-width:0.529167;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect2807"
width="12.700001"
height="8.4666672"
x="194.73335"
y="27.516666" />
<text
xml:space="preserve"
style="font-size:2.64583px;line-height:1.25;font-family:sans-serif;stroke-width:0.264583"
x="-201.33759"
y="33.866669"
id="text2811"
transform="scale(-1,1)"><tspan
sodipodi:role="line"
id="tspan2809"
x="-201.33759"
y="33.866669"
style="font-size:6.35px;text-align:center;text-anchor:middle;stroke-width:0.264583"
rotate="0 0 0 0">LPF</tspan></text>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 263 KiB

After

Width:  |  Height:  |  Size: 264 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 191 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 560 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 KiB

BIN
docs/images/jawbreaker.JPG Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 831 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

File diff suppressed because it is too large Load diff

After

Width:  |  Height:  |  Size: 106 KiB

BIN
docs/images/operacake.jpeg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

BIN
docs/images/rad1o_8.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 315 KiB

View file

@ -1,4 +1,4 @@
sphinx==1.8.5
sphinx_rtd_theme==1.0.0
readthedocs-sphinx-search==0.1.1
jinja2==3.0.0
sphinx==7.2.6
sphinx_rtd_theme==2.0.0
readthedocs-sphinx-search==0.3.2
jinja2==3.1.6

View file

@ -1,168 +0,0 @@
================================================
LPC4350 SGPIO Experimentation
================================================
The NXP LPC43xx microcontrollers have an interesting, programmable serial peripheral called the SGPIO (Serial GPIO). It consists of a slew of counters and shift registers that can be configured to serialize and deserialize many channels of data. Channels can be grouped to create multi-bit parallel data streams.
The current HackRF design entails using the SGPIO peripheral to move quadrature baseband receive and transmit data between the USB interface and the baseband ADC/DAC IC. Because the baseband ADC/DAC IC (MAX5864) uses DDR signaling, we expect to use a CPLD to convert bus signaling. The CPLD may also help manage bus turnaround (between transmit and receive modes) or interfacing two narrower but faster interfaces to the LPC43xx to facilitate full-duplex.
Because the Jellybean board wasn't completed at the time of these experiments, I used the Diolan LPC-4350-DB1-A development board. Despite using an LPC4350 in an BGA256 package, the SGPIO peripheral's signals can be mapped to many different pins. So reworking code to a new set of SGPIO pins should be a trivial matter of switching the SGU configuration for the affected pins.
SGPIO Examples
~~~~~~~~~~~~~~
Some SGPIO peripheral examples can be found in `the LPCWare repository <http://sw.lpcware.com/?p=lpc43xx.git&a=summary>`__. All source I've found so far is focused on generating many I2S interfaces, which is not very similar to HackRF's needs. But reviewing the code is still valuable in grasping how the SGPIO peripheral operates.
There are a few common details to setting up the SGPIO peripheral:
.. code-block :: C
// Configure the PLL to generate a reasonable clock. The SGPIO
// will operate with a clock of up to 204MHz (the same as the
// M4 clock.
CGU_SetPLL1(12);
// Set the BASE_PERIPH clock to come from PLL1.
CGU_EnableEntity(CGU_BASE_PERIPH, ENABLE);
CGU_EntityConnect(CGU_CLKSRC_PLL1, CGU_BASE_PERIPH);
// Compute and commit clock configuration changes.
CGU_UpdateClock();
Jiggle SGPIO Pins From GPIO Mode
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
My first test was to ensure I had the right pin(s) hooked up to my scope:
.. code-block :: C
// Jiggle one of the SGPIO pins in GPIO mode, to make sure
// I'm looking at the right pin on the scope.
scu_pinmux(9, 0, MD_PLN_FAST, 0);
GPIO_SetDir(4, 1L << 12, 1);
while(1) {
volatile int i;
GPIO_SetValue(4, 1L << 12);
for(i=0; i<1000; i++);
GPIO_ClearValue(4, 1L << 12);
for(i=0; i<1000; i++);
}
Jiggle Pins from SGPIO Mode
^^^^^^^^^^^^^^^^^^^^^^^^^^^
You can also control SGPIO pins, GPIO-style, from within the SGPIO peripheral. This helped me understand the basics of operating the SGPIO output mux.
.. code-block :: C
// Set pin to SGPIO mode, toggle output using SGPIO
// peripheral registers.
scu_pinmux(9, 0, MD_PLN_FAST, 6); // SGPIO0
// P_OUT_CFG = 4, gpio_out
// P_OE_CFG = X
LPC_SGPIO->OUT_MUX_CFG[0] = (0L << 4) | (4L << 0);
LPC_SGPIO->GPIO_OENREG |= (1L << 0);
while(1) {
volatile int i;
LPC_SGPIO->GPIO_OUTREG |= (1L << 0);
for(i=0; i<1000; i++);
LPC_SGPIO->GPIO_OUTREG &= ~(1L << 0);
for(i=0; i<1000; i++);
}
Serializing Data With Slice Clock Source
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
My first full-on SGPIO experiment involved serializing a data pattern from slice A, using slice D to generate a SGPIO_CLK/2 data rate. I derived the code from examples that configured the SGPIO as I2S interfaces:
.. code-block :: C
// Disable all counters during configuration
LPC_SGPIO->CTRL_ENABLED = 0;
// Configure pin functions.
scu_pinmux(9, 0, MD_PLN_FAST, 6); // SGPIO0
scu_pinmux(2, 3, MD_PLN_FAST, 0); // SGPIO12
// Enable SGPIO pin outputs.
LPC_SGPIO->GPIO_OENREG =
(1L << 12) | // SGPIO12
(1L << 0); // SGPIO0
// SGPIO pin 0 outputs slice A bit 0.
LPC_SGPIO->OUT_MUX_CFG[0] =
(0L << 4) | // P_OE_CFG = X
(0L << 0); // P_OUT_CFG = 0, dout_doutm1 (1-bit mode)
// SGPIO pin 12 outputs slice D bit 0.
LPC_SGPIO->OUT_MUX_CFG[12] =
(0L << 4) | // P_OE_CFG = X
(0L << 0); // P_OUT_CFG = 0, dout_doutm1 (1-bit mode)
// Slice A
LPC_SGPIO->SGPIO_MUX_CFG[0] =
(0L << 12) | // CONCAT_ORDER = 0 (self-loop)
(1L << 11) | // CONCAT_ENABLE = 1 (concatenate data)
(0L << 9) | // QUALIFIER_SLICE_MODE = X
(0L << 7) | // QUALIFIER_PIN_MODE = X
(0L << 5) | // QUALIFIER_MODE = 0 (enable)
(0L << 3) | // CLK_SOURCE_SLICE_MODE = 0, slice D
(0L << 1) | // CLK_SOURCE_PIN_MODE = X
(0L << 0); // EXT_CLK_ENABLE = 0, internal clock signal (slice)
LPC_SGPIO->SLICE_MUX_CFG[0] =
(0L << 8) | // INV_QUALIFIER = 0 (use normal qualifier)
(0L << 6) | // PARALLEL_MODE = 0 (shift 1 bit per clock)
(0L << 4) | // DATA_CAPTURE_MODE = 0 (detect rising edge)
(0L << 3) | // INV_OUT_CLK = 0 (normal clock)
(0L << 2) | // CLKGEN_MODE = 0 (use clock from COUNTER)
(0L << 1) | // CLK_CAPTURE_MODE = 0 (use rising clock edge)
(0L << 0); // MATCH_MODE = 0 (do not match data)
LPC_SGPIO->PRESET[0] = 1;
LPC_SGPIO->COUNT[0] = 0;
LPC_SGPIO->POS[0] = (0x1FL << 8) | (0x1FL << 0);
LPC_SGPIO->REG[0] = 0xAAAAAAAA; // Primary output data register
LPC_SGPIO->REG_SS[0] = 0xAAAAAAAA; // Shadow output data register
// Slice D (clock for Slice A)
LPC_SGPIO->SGPIO_MUX_CFG[3] =
(0L << 12) | // CONCAT_ORDER = 0 (self-loop)
(1L << 11) | // CONCAT_ENABLE = 1 (concatenate data)
(0L << 9) | // QUALIFIER_SLICE_MODE = X
(0L << 7) | // QUALIFIER_PIN_MODE = X
(0L << 5) | // QUALIFIER_MODE = 0 (enable)
(0L << 3) | // CLK_SOURCE_SLICE_MODE = 0, slice D
(0L << 1) | // CLK_SOURCE_PIN_MODE = X
(0L << 0); // EXT_CLK_ENABLE = 0, internal clock signal (slice)
LPC_SGPIO->SLICE_MUX_CFG[3] =
(0L << 8) | // INV_QUALIFIER = 0 (use normal qualifier)
(0L << 6) | // PARALLEL_MODE = 0 (shift 1 bit per clock)
(0L << 4) | // DATA_CAPTURE_MODE = 0 (detect rising edge)
(0L << 3) | // INV_OUT_CLK = 0 (normal clock)
(0L << 2) | // CLKGEN_MODE = 0 (use clock from COUNTER)
(0L << 1) | // CLK_CAPTURE_MODE = 0 (use rising clock edge)
(0L << 0); // MATCH_MODE = 0 (do not match data)
LPC_SGPIO->PRESET[3] = 0;
LPC_SGPIO->COUNT[3] = 0;
LPC_SGPIO->POS[3] = (0x1FL << 8) | (0x1FL << 0);
LPC_SGPIO->REG[0] = 0xAAAAAAAA; // Primary output data register
LPC_SGPIO->REG_SS[0] = 0xAAAAAAAA; // Shadow output data register
// Start SGPIO operation by enabling slice clocks.
LPC_SGPIO->CTRL_ENABLED =
(1L << 3) | // Slice D
(1L << 0); // Slice A

View file

@ -13,11 +13,8 @@ In the current HackRF design, there is a CPLD which manages the interface betwee
Frequently Asked Questions
~~~~~~~~~~~~~~~~~~~~~~~~~~
Why not use GPDMA to transfer samples through SGPIO?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
It would be great if we could, as that would free up lots of processor time. Unfortunately, the GPDMA scheme in the LPC43xx does not seem to support peripheral-to-memory and memory-to-peripheral transfers with the SGPIO peripheral.

View file

@ -1,38 +0,0 @@
================================================
Clocking Signals
================================================
HackRF clock signals are generated by the Si5351. The plan so far:
* crystal frequency: 25 MHz (supports 25 or 27 MHz)
* optional clock input frequency: 10 MHz recommended (supports 10 to 40 MHz, or higher with division)
* VCO frequency: 800 MHz (supports 600 to 900 MHz)
* MAX2837 clock: 40 MHz
* preferred MAX5864 clocks: 8, 10, 12.5, 16, 20 MHz
* A clock at double the MAX5864 rate will be delivered to the CPLD and SGPIO.
* LPC43xx clock: 12 MHz (from separate crystal so the ROM-based USB DFU will work)
Lemondrop+Jellybean Si5351 output mapping:
* CLK0 -> MAX2837
* CLK1 -> MAX5864/CPLD
* CLK2 -> CPLD
* CLK3 -> CPLD
* CLK4 -> LPC4330
* CLK5 -> RFFC5072
* CLK6 -> extra
* CLK7 -> extra
Jawbreaker output mapping:
* CLK0 -> MAX5864/CPLD
* CLK1 -> CPLD
* CLK2 -> SGPIO
* CLK3 -> external clock output
* CLK4 -> RFFC5072
* CLK5 -> MAX2837
* CLK6 -> none
* CLK7 -> LPC4330 (but LPC4330 will start up on its own crystal)

View file

@ -1,12 +1,16 @@
import sphinx_rtd_theme
extensions = [
'sphinx_rtd_theme'
]
# -- Project information -----------------------------------------------------
project = 'HackRF'
copyright = '2021, Great Scott Gadgets'
author = 'Great Scott Gadgets'
# The short X.Y version
version = ''
# The full version, including alpha/beta/rc tags
release = ''
@ -26,7 +30,7 @@ pygments_style = None
# -- Options for HTML output -------------------------------------------------
html_theme = 'sphinx_rtd_theme'
# run pip install sphinx_rtd_theme if you get sphinx_rtd_theme errors
html_theme = "sphinx_rtd_theme"
html_css_files = ['status.css']

View file

@ -1,29 +0,0 @@
================================================
Design Goals
================================================
Eventually, the HackRF project may result in multiple hardware designs, but the initial goal is to build a single wideband transceiver peripheral that can be attached to a general purpose computer for software radio functions.
Primary goals:
* half-duplex transceiver
* operating freq: 100 MHz to 6 GHz
* maximum sample rate: 20 Msps
* resolution: 8 bits
* interface: High Speed USB
* power supply: USB bus power
* portable
* open source
Wish list:
* full-duplex (at reduced max sample rate)
* external clock reference
* dithering
* parallel interface for external FPGA, etc.
If there is a primary goal we miss, it will probably be the operating frequency range. The wideband front end is the part of the design furthest from completion. At an absolute minimum, the board should do 900 MHz and 2.4 GHz.
The design is FPGA-less. There will be a tiny bit of DSP capability (ARM Cortex-M4), but mostly we're just trying to get samples to and from a host computer.
We are trading resolution and DSP capability for cost, portability, and frequency range. Considering that we'll be able to support oversampling for many applications and that we should be able to implement AGC, it should be a pretty good trade.

View file

@ -1,8 +1,8 @@
Enclosure Options
~~~~~~~~~~~~~~~~~
The commercial version of HackRF One from Great Scott Gadgets ships with an injection molded plastic enclosure, but it is designed to fit two optional enclosures:
Commercial versions of both HackRF Pro and HackRF One from Great Scott Gadgets ship with an injection molded plastic enclosure but are also designed to fit two optional enclosures:
* Hammond 1455J1201: HackRF One fits this extruded aluminum enclosure and other similar models from Hammond Manufacturing. In order to use the enclosure's end plates, you will have to drill them. An end plate template can be found in the HackRF One KiCad layout.
* Hammond 1455J1201: Both HackRF Pro and HackRF One fit this extruded aluminum enclosure and other similar models from Hammond Manufacturing. In order to use the enclosure's end plates, you will have to drill them. An end plate template can be found in the HackRF One KiCad layout.
* Acrylic sandwich: You can also use a laser cut acrylic enclosure with HackRF One. This is a good option for access to the expansion headers. A design can be found in the HackRF One hardware directory. Use any laser cutting service or purchase from a `reseller <http://greatscottgadgets.com/acrylic_case/>`__.
* Acrylic sandwich: You can also use a laser cut acrylic enclosure with either HackRF Pro or HackRF One. This is a good option for access to the expansion headers. A design can be found in the HackRF hardware directory. Use any laser cutting service or purchase from a `reseller <https://greatscottgadgets.com/hackrf/acrylic-case/>`__.

View file

@ -1,55 +1,7 @@
Expansion Interface
~~~~~~~~~~~~~~~~~~~
The HackRF One expansion interface consists of headers P9, P20, P22, and P28. These four headers are installed on the commercial HackRF One from Great Scott Gadgets.
P9 Baseband
^^^^^^^^^^^
A direct analog interface to the high speed dual ADC and dual DAC.
.. list-table ::
:header-rows: 1
:widths: 1 1
* - Pin
- Function
* - 1
- GND
* - 2
- GND
* - 3
- GND
* - 4
- RXBBQ-
* - 5
- RXBBI-
* - 6
- RXBBQ+
* - 7
- RXBBI+
* - 8
- GND
* - 9
- GND
* - 10
- TXBBI-
* - 11
- TXBBQ+
* - 12
- TXBBI+
* - 13
- TXBBQ-
* - 14
- GND
* - 15
- GND
* - 16
- GND
The common HackRF expansion interface consists of headers P20, P22, and P28. These headers are present on both HackRF Pro and HackRF One, and support hardware add-ons including PortaPack and Opera Cake.
P20 GPIO
^^^^^^^^
@ -65,15 +17,15 @@ Providing access to GPIO, ADC, RTC, and power.
* - 1
- VBAT
* - 2
- RTC_ALARM
- RTC_ALARM (One) / PB_5 (Pro)
* - 3
- VCC
- VCC (One) / 3V3AUX (Pro)
* - 4
- WAKEUP
* - 5
- GPIO3_8
* - 6
- GPIO3_0
- GPIO3_0 (One) / GPIO3_9 (Pro)
* - 7
- GPIO3_10
* - 8
@ -121,7 +73,7 @@ I2S, SPI, I2C, UART, GPIO, and clocks.
* - Pin
- Function
* - 1
- CLKOUT
- CLKOUT (One) / P2 (Pro)
* - 2
- CLKIN
* - 3
@ -133,21 +85,21 @@ I2S, SPI, I2C, UART, GPIO, and clocks.
* - 6
- I2C1_SDA
* - 7
- SPIFI_MISO
- SPIFI_MISO (One) / PB_1 (Pro)
* - 8
- SPIFI_SCK
- SPIFI_SCK (One) / PB_3 (Pro)
* - 9
- SPIFI_MOSI
- SPIFI_MOSI (One) / PA_4 (Pro)
* - 10
- GND
* - 11
- VCC
- VCC (One) / 3V3AUX (Pro)
* - 12
- I2S0_RX_SCK
- I2S0_RX_SCK (One) / PA_3 (Pro)
* - 13
- I2S_RX_SDA
- I2S0_RX_SDA (One) / I2S0_TX_SDA (Pro)
* - 14
- I2S0_RX_MCLK
- I2S0_RX_MCLK (One) / PB_0 (Pro)
* - 15
- I2S0_RX_WS
* - 16
@ -169,7 +121,7 @@ I2S, SPI, I2C, UART, GPIO, and clocks.
* - 24
- SDA
* - 25
- CLK6
- CLK6 (One) / AUX_CLK2 (Pro)
* - 26
- SCL
@ -187,7 +139,7 @@ SDIO, GPIO, clocks, and CPLD.
* - Pin
- Function
* - 1
- VCC
- VCC (One) / 3V3AUX (Pro)
* - 2
- GND
* - 3
@ -211,26 +163,70 @@ SDIO, GPIO, clocks, and CPLD.
* - 12
- GND
* - 13
- GCK2
- GCK2 (One) / P5_6 (Pro)
* - 14
- GCK1
- GCK1 (One) / P5_7 (Pro)
* - 15
- B1AUX14
- Trigger out: B1AUX14 (One) / TRIGGER.OUT (Pro)
* - 16
- B1AUX13
- Trigger in: B1AUX13 (One) / TRIGGER.IN (Pro)
* - 17
- CPLD_TCK
* - 18
- BANK2F3M2
- BANK2F3M2 (One) / PE_0 (Pro)
* - 19
- CPLD_TDI
- CPLD_TDI (One) / I2S0_RX_SDA (Pro)
* - 20
- BANK2F3M6
- BANK2F3M6 (One) / P9_1 (Pro)
* - 21
- BANK2F3M12
- BANK2F3M12 (One) / P5_3 (Pro)
* - 22
- BANK2F3M4
- BANK2F3M4 (One) / P1_7 (Pro)
P9 Baseband (HackRF One)
^^^^^^^^^^^^^^^^^^^^^^^^
A direct analog interface to the high speed dual ADC and dual DAC.
.. list-table ::
:header-rows: 1
:widths: 1 1
* - Pin
- Function
* - 1
- GND
* - 2
- GND
* - 3
- GND
* - 4
- RXBBQ-
* - 5
- RXBBI-
* - 6
- RXBBQ+
* - 7
- RXBBI+
* - 8
- GND
* - 9
- GND
* - 10
- TXBBI-
* - 11
- TXBBQ+
* - 12
- TXBBI+
* - 13
- TXBBQ-
* - 14
- GND
* - 15
- GND
* - 16
- GND
Additional unpopulated headers and test points are available for test and development, but they may be incompatible with some enclosure or expansion options.
Refer to the schematics and component documentation for more information.
Refer to the schematics and component documentation for more information.

View file

@ -1,11 +1,29 @@
===========================================
External Clock Interface (CLKIN and CLKOUT)
===========================================
========================
External Clock Interface
========================
HackRF One produces a 10 MHz clock signal on CLKOUT. The signal is a 10 MHz square wave from 0 V to 3 V intended for a high impedance load.
.. _external_clock_interface:
The CLKIN port on HackRF One is a high impedance input that expects a 0 V to 3 V square wave at 10 MHz. Do not exceed 3.3 V or drop below 0 V on this input. Do not connect a clock signal at a frequency other than 10 MHz (unless you modify the firmware to support this). You may directly connect the CLKOUT port of one HackRF One to the CLKIN port of another HackRF One.
HackRF Pro
~~~~~~~~~~
HackRF Pro has two configurable SMA ports, P1 and P2. By default, P1 is configured as CLKIN and P2 as CLKOUT. The default behaviour of these signals is as described for HackRF One below.
A second CLKIN signal is available on header P22 pin 2. Unlike HackRF One, HackRF Pro's P22_CLKIN is a separate signal from P1_CLKIN. To enable P22_CLKIN instead of P1_CLKIN use ``hackrf_clock -c p22``.
Various internal signals can be connected to P1 or P2 instead of the default CLKIN and CLKOUT signals. Use ``hackrf_clock -1`` or ``hackrf_clock -2`` to select a different signal.
HackRF One
~~~~~~~~~~
HackRF One produces a 10 MHz clock signal on the CLKOUT SMA port. The signal is a 3.3 V, 10 MHz square wave intended for a high impedance load.
The CLKIN SMA port on HackRF One is a high impedance input that expects 3.3 V square wave at 10 MHz. Do not exceed 3.3 V or drop below 0 V on this input. Do not connect a clock signal at a frequency other than 10 MHz (unless you modify the firmware to support this). You may directly connect the CLKOUT port of one HackRF One to the CLKIN port of another HackRF.
The CLKIN signal is also connected to header P22 pin 2. Unlike HackRF Pro, HackRF One has only one CLKIN signal shared between P22 pin 2 and the CLKIN port. Do not connect input signals to both CLKIN and P22 pin 2 simultaneously.
HackRF One uses CLKIN instead of the internal crystal when a clock signal is detected on CLKIN. The switch to or from CLKIN only happens when a transmit or receive operation begins.
To verify that a signal has been detected on CLKIN, use ``hackrf_clock -i``. The expected output with a clock detected is `CLKIN status: clock signal detected`. The expected output with no clock detected is `CLKIN status: no clock signal detected`.
To activate CLKOUT, use ``hackrf_clock -o 1``. To switch it off, use ``hackrf_clock -o 0``.

View file

@ -1,155 +0,0 @@
.. _faq:
================================================
FAQ
================================================
What is the Transmit Power of HackRF?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HackRF One's absolute maximum TX power varies by operating frequency:
* 1 MHz to 10 MHz: 5 dBm to 15 dBm, generally increasing as frequency increases (see this `blog post <https://greatscottgadgets.com/2015/05-15-hackrf-one-at-1-mhz/>`__)
* 10 MHz to 2150 MHz: 5 dBm to 15 dBm, generally decreasing as frequency increases
* 2150 MHz to 2750 MHz: 13 dBm to 15 dBm
* 2750 MHz to 4000 MHz: 0 dBm to 5 dBm, decreasing as frequency increases
* 4000 MHz to 6000 MHz: -10 dBm to 0 dBm, generally decreasing as frequency increases
Through most of the frequency range up to 4 GHz, the maximum TX power is between 0 and 10 dBm. The frequency range with best performance is 2150 MHz to 2750 MHz.
Overall, the output power is enough to perform over-the-air experiments at close range or to drive an external amplifier. If you connect an external amplifier, you should also use an external bandpass filter for your operating frequency.
Before you transmit, know your laws. HackRF One has not been tested for compliance with regulations governing transmission of radio signals. You are responsible for using your HackRF One legally.
----
What is the Receive Power of HackRF?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The maximum RX power of HackRF One is -5 dBm. Exceeding -5 dBm can result in permanent damage!
In theory, HackRF One can safely accept up to 10 dBm with the front-end RX amplifier disabled. However, a simple software or user error could enable the amplifier, resulting in permanent damage. It is better to use an external attenuator than to risk damage.
----
What is the minimum signal power level that can be detected by HackRF?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This isn't a question that can be answered for a general purpose SDR platform such as HackRF. Any answer would be very specific to a particular application. For example, an answerable question might be: What is the minimum power level in dBm of modulation M at frequency F that can be detected by HackRF One with software S under configuration C at a bit error rate of no more than E%? Changing any of those variables (M, F, S, C, or E) would change the answer to the question. Even a seemingly minor software update might result in a significantly different answer. To learn the exact answer for a specific application, you would have to measure it yourself.
HackRF's concrete specifications include operating frequency range, maximum sample rate, and dynamic range in bits. These specifications can be used to roughly determine the suitability of HackRF for a given application. Testing is required to finely measure performance in an application. Performance can typically be enhanced significantly by selecting an appropriate antenna, external amplifier, and/or external filter for the application.
----
Is HackRF full-duplex?
~~~~~~~~~~~~~~~~~~~~~~
HackRF One is a half-duplex transceiver. This means that it can transmit or receive but not both at the same time.
----
Why isn't HackRF One full-duplex?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HackRF One is designed to support the widest possible range of SDR applications in a single, low cost, portable device. Many applications do not require full-duplex operation. Full-duplex support would have made HackRF larger and more expensive, and it would have required an external power supply. Since full-duplex needs can be met by simply using a second HackRF One, it made sense to keep the device small, portable, and low cost for everyone who does not require full-duplex operation.
----
How could the HackRF One design be changed to make it full-duplex?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The HackRF One hardware design is actually full-duplex (at lower sample rates) from the USB connection through the ADC/DAC. The RF section is the only part of the design that cannot support full-duplex operation. The easiest way to make HackRF One full-duplex would be to create an add-on board that duplicates the RF section and also provides an external power input (from a wall wart, for example) for the additional power required. This would also require software effort; the firmware, CPLD, libhackrf, and other host software would all need work to support full-duplex operation.
If you were to try to redesign the RF section on HackRF One to support full-duplex, the main thing to focus on would be the MAX2837 (intermediate frequency transceiver). This part is half-duplex, so you would either need two of them or you would have to redesign the RF section to use something other than the MAX2837, likely resulting in a radically different design. If you used two MAX2837s you might be able to use one RFFC5071 instead of two RFFC5072s.
----
Are those connectors SMA or RP-SMA?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Some connectors that appear to be SMA are actually RP-SMA. If you connect an RP-SMA antenna to HackRF One, it will seem to connect snugly but won't function at all because neither the male nor female side has a center pin. RP-SMA connectors are most common on 2.4 GHz antennas and are popular on Wi-Fi equipment. Adapters are available.
----
.. _bigspike:
What is the big spike in the center of my received spectrum?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you see a large spike in the center of your FFT display regardless of the frequenecy you are tuned to, you are seeing a DC offset (or component or bias). The term "DC" comes from "Direct Current" in electronics. It is the unchanging aspect of a signal as opposed to the "alternating" part of the signal (AC) that changes over time. Take, for example, the signal represented by the digital sequence:
.. code-block:: sh
-2, -1, 1, 6, 8, 9, 8, 6, 1, -1, -2, -1, 1, 6, 8, 9, 8, 6, 1, -1, -2, -1, 1, 6, 8, 9, 8, 6, 1, -1
This periodic signal contains a strong sinusoidal component spanning from -2 to 9. If you were to plot the spectrum of this signal, you would see one spike at the frequency of this sinusoid and a second spike at 0 Hz (DC). If the signal spanned from values -2 to 2 (centered around zero), there would be no DC offset. Since it is centered around 3.5 (the number midway between -2 and 9), there is a DC component.
Samples produced by HackRF are measurements of radio waveforms, but the measurement method is prone to a DC bias introduced by HackRF. It's an artifact of the measurement system, not an indication of a received radio signal. DC offset is not unique to HackRF; it is common to all quadrature sampling systems.
There was a bug in the HackRF firmware (through release 2013.06.1) that made the DC offset worse than it should have been. In the worst cases, certain Jawbreakers experienced a DC offset that drifted to a great extreme over several seconds of operation. This bug has been fixed. The fix reduces DC offset but does not do away with it entirely. It is something you have to live with when using any quadrature sampling system like HackRF.
A high DC offset is also one of a few symptoms that can be caused by a software version mismatch. A common problem is that people run an old version of gr-osmosdr with newer firmware.
----
What gain controls are provided by HackRF?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HackRF (both Jawbreaker and One) provides three different analog gain controls on RX and two on TX.
The three RX gain controls are at these stages:
- RF ("amp", 0 or 14 dB)
- IF ("lna", 0 to 40 dB in 8 dB steps)
- baseband ("vga", 0 to 62 dB in 2 dB steps)
The two TX gain controls are at these stages:
- RF (0 or 14 dB)
- IF (0 to 47 dB in 1 dB steps)
----
Why is the RF gain setting restricted to two values?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HackRF has two RF amplifiers close to the antenna port, one for TX and one for RX. These amplifiers have two settings: on or off. In the off state, the amps are completely bypassed. They nominally provide 14 dB of gain when on, but the actual amount of gain varies by frequency. In general, expect less gain at higher frequencies. For fine control of gain, use the IF and/or baseband gain options.
----
Why are the LEDs on HackRF different colours?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Each LED is a single color. There are no multi-colored LEDs on HackRF One. Adjacent LEDs are different colors in order to make them easier to distinguish from one another. The colors do not mean anything.
----
Where can I purchase HackRF?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HackRF is designed and manufactured by Great Scott Gadgets. We do not sell low volumes of HackRFs to people individually; instead we have agreements with specific resellers. Please see our reseller list on the Great Scott Gadgets website for availability: `http://greatscottgadgets.com/hackrf/ <http://greatscottgadgets.com/hackrf/>`__.
HackRF is open source hardware, so you can also build your own.

View file

@ -4,4 +4,4 @@ Firmware Development Setup
Firmware build instructions are included in the repository under firmware/README:
`https://github.com/mossmann/hackrf/blob/master/firmware/README <https://github.com/mossmann/hackrf/blob/master/firmware/README>`__
`https://github.com/greatscottgadgets/hackrf/blob/master/firmware/README <https://github.com/greatscottgadgets/hackrf/blob/master/firmware/README>`__

View file

@ -1,98 +0,0 @@
================================================
Future Hardware Modifications
================================================
Things to consider for post-Jawbreaker hardware designs:
----
Antenna
^^^^^^^
The PCB antenna on Jawbreaker was included to facilitate beta testing. Future designs likely will not include a PCB antenna.
SMA connectors will be PCB edge-mounted.
----
Baseband
^^^^^^^^
The interfaces between the MAX2837 and MAX5864 have some signals inverted. Theoretically, that's fine if compensated for in software. However, I'm theorizing that RX/ADC DC offset compensation assumes that both channels have the same DC polarity. I've fixed the inversion in the CPLD. However, a PCB experiment should be conducted to see if the DC offset is reduced by un-inverting the RX Q channel connections to the MAX5864.
----
CPLD
^^^^
The CPLD could be removed, but some sort of multiplexer would be needed to meet the MAX5864 i/o requirements. Depending on the particular LPC43xx part used, it might be possible to use the System Control Unit (SCU) for this.
----
Clocking
^^^^^^^^
The clock signal from the Si5351C to the LPC43xx's GP_CLKIN pin may need different passives, but the documentation on that clock input is thin (acceptable peak-to-peak voltage anyone?).
An unpopulated footprint for a 32.768 kHz RTC crystal would be nice. Also break out RTC battery pins to an expansion header.
----
USB
^^^
Would support for host mode on the second USB PHY be useful somehow? This is only possible with a larger LPC43xx package that exposes the second PHY's ULPI signals. Unless, of course, a mere full-speed PHY is acceptable.
----
Power Management
^^^^^^^^^^^^^^^^
The MAX5864 appears to come up in "Tx" or "Rcvr" mode -- I have observed that the part will pass DA bus data to ID/QD without any SPI configuration. If we're worried about USB power and minimizing current consumption, it might be good to have this device on a power regulator with an ENABLE pin, or have a FET power switch. Yes, let's add a high side switch for the whole RF section.
----
Regulators
^^^^^^^^^^
U21 (the TPS62410) FB1 pin is connected on the far side of jumper P8 (VCC), which puts the jumper inside the feedback path. If the jumper trace is cut, the regulator may go nuts because the FB pin is floating.
----
Buttons
^^^^^^^
Add a reset button (for the LPC43xx). Maybe add a DFU button too.
----
Shielding
^^^^^^^^^
Maybe add a can around the RF section.
----
Footprints
^^^^^^^^^^
Tighten up holes for USB connector support legs to improve placement consistency. Make some of the QFN pads bigger (especially on the RF switches) for better soldering.
----
Shield Support
^^^^^^^^^^^^^^
If support for add-on shields is considered valuable, here are some tweaks I'd suggest:
Any reason P28 (SD) pin 12 isn't grounded or doing something useful? Same goes for P25 (LPC_ISP) pin 3 -- maybe make it VCC, the signaling voltage for the ISP interface? The SPIFI connector could also use a reference voltage (GND?).
I'd like to see an I2C bus exposed somewhere, and perhaps an I2S0_RX_SDA signal, so I don't have to steal it from the CPLD interface. The I2S0 will function in "four-wire mode" with only one more pin (RX_SDA), so why not?
Provide a way to inject a supply voltage into the board? Having diodes managing multiple voltage sources would be lossy, so a more expensive solution would be necessary on the Jawbreaker board, adding cost.
If an LPC43xx package with a higher pin-count is used, it would be stellar to expose the LCD interface and quadrature encoder peripheral pins.
The RTC would be handy for stand-alone use. This would require a crystal (32.768kHz) between RTCX1 and RTCX2, and exposing VBAT to a shield for battery backup (disconnecting it from VCC) or providing a coin cell footprint on the HackRF PCB.
Coalesce separate headers into fewer, larger banks of headers, to reduce the number of unique, small header receptacles required for mating? Reducing the header count will also increase the amount of board space around the perimeter of a shield for components and connectors.

118
docs/source/gateware.rst Normal file
View file

@ -0,0 +1,118 @@
================================================
Gateware
================================================
One of the significant hardware changes in :ref:`HackRF Pro <hackrf_pro>` is the replacement of the CPLD with a FPGA. While the older CPLD primarily provided glue logic between the MCU and RF front end, the FPGA in HackRF Pro introduces more logic and DSP capability. This enables offloading digital signal processing tasks from the MCU.
FPGAs are highly flexible devices whose behavior is defined by *gateware*: hardware descriptions that configure the internal logic fabric. HackRF Pro gateware is written in `Amaranth HDL <https://amaranth-lang.org/>`__, a Python-based hardware description language.
The specific FPGA device used in HackRF Pro is the Lattice iCE40UP5K, which features
5280 LUT4s and 8 dedicated DSP (multiply-accumulate) blocks. We rely on the `open-source iCE40 FPGA toolchain <https://github.com/YosysHQ/icestorm>`__ to build the required bitstreams that are bundled in the firmware.
All gateware source code lives under `firmware/fpga/` in the HackRF repository. Top-level designs reside in `firmware/fpga/top/` and are the primary entry points for different operational modes.
By default, a standard gateware configuration is loaded at boot. However, the firmware can dynamically reconfigure the FPGA at runtime to switch between different gateware variants.
Standard gateware
~~~~~~~~~~~~~~~~~
The standard gateware is used by default when the firmware has not requested an alternative bitstream.
The standard gateware provides a balanced configuration optimized for general-purpose operation. It implements configurable digital signal processing paths for the reception and transmission paths, capable of (limited) frequency translation and supporting a wide range of sample rates.
Block diagram
^^^^^^^^^^^^^
.. image:: ../images/gateware-basic-block-diagram.png
:align: center
.. image:: ../images/gateware-standard-dsp-chain.png
:align: center
:width: 75%
Features
^^^^^^^^
* 8-bit I, 8-bit Q data format
* Receiver signal chain:
* Optional DC offset removal (DC blocker)
* Configurable fs/4 shifter (quarter sample rate): bypass, shift up or shift down
* Configurable decimation rates: 1x, 2x, 4x, 8x, 16x, 32x
* Transmitter signal chain:
* Configurable interpolation rates: 1x, 2x, 4x, 8x, 16x, 32x
* SPI control interface for register configuration
* Double data rate (DDR) interface to RF transceiver
* Interface to MCU (SGPIO)
Half-precision gateware
~~~~~~~~~~~~~~~~~~~~~~~
The half-precision gateware reduces sample width to 4 bits per I/Q component, enabling higher throughput within the constraints of the USB interface (up to 40 Msps).
This configuration is intended for applications where bandwidth is more critical than dynamic range, such as wideband spectrum monitoring.
Block diagram
^^^^^^^^^^^^^
.. image:: ../images/gateware-basic-block-diagram.png
:align: center
.. image:: ../images/gateware-halfprec-dsp-chain.png
:align: center
:width: 75%
Features
^^^^^^^^
* 4-bit I, 4-bit Q data format
* Receiver signal chain:
* Optional DC offset removal (DC blocker)
* Round to 4-bit I/Q
* Transmitter signal chain:
* Extend width to 8-bit I/Q
* SPI control interface for register configuration
* Double data rate (DDR) interface to RF transceiver
* Interface to MCU (SGPIO)
Extended-precision gateware (RX and TX)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The extended-precision gateware increases internal signal processing precision and output sample width to improve signal quality. The main drawback is that the minimum decimation or interpolation factor is 16x. Due to increased logic requirements, this gateware is split in two top-level designs (RX and TX).
Samples are 16-bit I/Q, while the effective number of bits (ENOB) depends on the selected configuration and typically ranges between 9 and 11 bits.
The increased dynamic range of the output makes it particularly useful for weak and/or narrowband signals.
Block diagram (RX)
^^^^^^^^^^^^^^^^^^
.. image:: ../images/gateware-rx-only-basic-block-diagram.png
:align: center
.. image:: ../images/gateware-ext-prec-rx-dsp-chain.png
:align: center
:width: 75%
Block diagram (TX)
^^^^^^^^^^^^^^^^^^
.. image:: ../images/gateware-tx-only-basic-block-diagram.png
:align: center
.. image:: ../images/gateware-ext-prec-tx-dsp-chain.png
:align: center
:width: 75%
Features
^^^^^^^^
* 16-bit I, 16-bit Q data format
* Receiver signal chain (RX extended-precision gateware):
* Optional DC offset removal (DC blocker)
* Configurable mixer (in fs/128 steps)
* Configurable decimation rates: 16x, 32x, 64x, 128x
* Transmitter signal chain (TX extended-precision gateware):
* Configurable interpolation rates: 16x, 32x, 64x, 128x
* SPI control interface for register configuration
* Double data rate (DDR) interface to RF transceiver
* Interface to MCU (SGPIO)

View file

@ -1,9 +1,11 @@
================================================
============
Getting Help
================================================
============
Before asking for help with HackRF, check to see if your question is listed in the :ref:`FAQ <faq>` or has already been answered in `GitHub issues <https://github.com/mossmann/hackrf/issues>`__ or the `mailing list archives <https://pairlist9.pair.net/pipermail/hackrf-dev/>`__.
Before asking for help with HackRF, check to see if your question is answered in this documentation, listed in the :ref:`Troubleshooting <troubleshooting>` page, or addressed in the `HackRF GitHub repository issues <https://github.com/greatscottgadgets/hackrf/issues>`__.
For assistance with HackRF use or development, please look at the `issues on the GitHub project <https://github.com/mossmann/hackrf/issues>`__. This is the preferred place to ask questions so that others may locate the answer to your question in the future.
For assistance with HackRF general use or development, please look at the `issues on the GitHub project <https://github.com/greatscottgadgets/hackrf/issues>`__. This is the preferred place to ask questions so that others may locate the answer to your question in the future.
Many users spend time in the `#hackrf channel on Discord <https://discord.gg/rsfMw3rsU8>`__.
We invite you to join our community discussions on `Discord <https://discord.gg/rsfMw3rsU8>`__. Note that while technical support requests are welcome here, we do not have support staff on duty at all times. Be sure to also submit an issue on GitHub if youve found a bug or if you want to ensure that your request will be tracked and not overlooked.
If you wish to see past discussions and questions about HackRF, you may also view the `mailing list archives <https://pairlist9.pair.net/pipermail/hackrf-dev/>`__.

View file

@ -1,69 +0,0 @@
================================================
Getting Started with HackRF and GNU Radio
================================================
We recommend getting started by watching the `Software Defined Radio with HackRF <https://greatscottgadgets.com/sdr/>`__ video series. This series will introduce you to HackRF One, software including GNU Radio, and teach you the fundamentals of Digital Signal Processing (DSP) needed to take full advantage of the power of Software Defined Radio (SDR). Additional helpful information follows.
.. _try_pentoo:
Try Your HackRF with Pentoo Linux
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The easiest way to get started with your HackRF and ensure that it works is to use Pentoo, a Linux distribution with full support for HackRF and GNU Radio. Download the latest Pentoo .iso image from one of the mirrors listed at `http://pentoo.ch/downloads/ <https://pentoo.ch/downloads>`__. Then burn the .iso to a DVD or use `UNetbootin <http://unetbootin.sourceforge.net/>`__ to install the .iso on a USB flash drive. Boot your computer using the DVD or USB flash drive to run Pentoo. Do this natively, not in a virtual machine. (Unfortunately high speed USB operation invariably fails when people try to run HackRF from a virtual machine.)
Once Pentoo is running, you can immediately use it to :ref:`update firmware <updating_firmware>` on your HackRF or use other HackRF command line tools. For a walkthrough, watch `SDR with HackRF, Lesson 5: HackRF One <http://greatscottgadgets.com/sdr/5/>`__.
To verify that your HackRF is detected, type ``hackrf_info`` at the command line. It should produce a few lines of output including "Found HackRF board." The 3V3, 1V8, RF, and USB LEDs should all be illuminated and are various colors.
You can type ``startx`` at the command line to launch a desktop environment. Accept the "default config" in the first dialog box. The desktop environment is useful for GNU Radio Companion and other graphical applications but is not required for basic operations such as firmware updates.
Now you can use programs such as gnuradio-companion or gqrx to start experimenting with your HackRF. Try the Examples below. If you are new to GNU Radio, an excellent place to start is with the `SDR with HackRF <http://greatscottgadgets.com/sdr/>`__ video series or with the `GNU Radio guided tutorials <https://wiki.gnuradio.org/index.php/Tutorials>`__.
**Alternative: GNU Radio Live SDR Environment**
The `GNU Radio Live SDR Environment <https://wiki.gnuradio.org/index.php/GNU_Radio_Live_SDR_Environment>`__ is another nice bootable Linux .iso with support for HackRF and, of course, GNU Radio.
Software Setup
~~~~~~~~~~~~~~
As mentioned above, the best way to get started with HackRF is to use Pentoo Linux. Eventually you may want to install software to use HackRF with your favorite operating system.
If your package manager includes the most recent release of libhackrf and gr-osmosdr, then use it to install those packages in addition to GNU Radio. Otherwise, the recommended way to install these tools is by using `PyBOMBS <https://github.com/gnuradio/pybombs>`__.
See the :ref:`Operating System Tips <operating_system_tips>` page for information on setting up HackRF software on particular Operating Systems and Linux distributions.
If you have any trouble, make sure that things work when booted to Pentoo. This will allow you to easily determine if your problem is being caused by hardware or software, and it will give you a way to see how the software is supposed to function.
Examples
~~~~~~~~
A great way to get started with HackRF is the `SDR with HackRF <http://greatscottgadgets.com/sdr/>`__ video series. Additional examples follow:
Testing the HackRF
#. Plug in the HackRF
#. run the hackrf_info command ``$ hackrf_info``
If everything is OK, you should see something similar to the following:
.. code-block:: sh
hackrf_info version: 2017.02.1
libhackrf version: 2017.02.1 (0.5)
Found HackRF
Index: 0
Serial number: 0000000000000000################
Board ID Number: 2 (HackRF One)
Firmware Version: 2017.02.1 (API:1.02)
Part ID Number: 0x######## 0x########
**FM Radio Example**
This Example was derived from the following works:
* `RTL-SDR FM radio receiver with GNU Radio Companion <http://www.instructables.com/id/RTL-SDR-FM-radio-receiver-with-GNU-Radio-Companion/>`__
* `How To Build an FM Receiver with the USRP in Less Than 10 Minutes <https://www.youtube.com/watch?v=KWeY2yqwVA0>`__
#. Download the FM Radio Receiver python file `here <https://raw.githubusercontent.com/rrobotics/hackrf-tests/master/fm_radio/fm_radio_rx.py>`__
#. Run the file ``$ python ./fm_radio_rx.py``
#. You can find the GNU Radio Companion source file `here <https://raw.githubusercontent.com/rrobotics/hackrf-tests/master/fm_radio/fm_radio_rx.grc>`__

View file

@ -0,0 +1,7 @@
==========
Connectors
==========
The connectors on both HackRF Pro and HackRF One are SMA.
**Note:** SMA connectors and RP-SMA connectors are visually very similar. If you connect an RP-SMA antenna to a HackRF, it will seem to connect snugly but won't function at all because neither the male nor female side has a center pin. RP-SMA connectors are most common on 2.4 GHz antennas and are popular on Wi-Fi equipment. Adapters are available.

View file

@ -0,0 +1,9 @@
============================================
Minimum Host System Requirements for HackRF
============================================
HackRF requires you to supply 500 mA at 5 V DC to your HackRF via the USB port. If your host computer has difficulty meeting this requirement, you may need to use a powered USB hub.
There is no specific minimum CPU requirement for the host computer when using a HackRF, but SDR is generally a CPU-intensive application. If you have a slower CPU, you may be unable to run certain SDR software or you may only be able to operate at lower sample rates.
Most users will want to stream data to or from the HackRF at high speeds. This requires that the host computer supports Hi-Speed USB. Some Hi-Speed USB hosts are better than others, and you may have multiple host controllers on your computer. If you have difficulty operating your HackRF at high sample rates (10 Msps to 20 Msps), try using a different USB port on your computer. If possible, arrange things so that the HackRF is the only device on the bus.

View file

@ -2,9 +2,15 @@
HackRF One
================================================
HackRF One is the current hardware platform for the HackRF project. It is a Software Defined Radio peripheral capable of transmission or reception of radio signals from 1 MHz to 6 GHz. Designed to enable test and development of modern and next generation radio technologies, HackRF One is an open source hardware platform that can be used as a USB peripheral or programmed for stand-alone operation.
.. _hackrf_one:
.. image:: ../images/HackRF-One-fd0-0009.jpeg
:alt: HackRF One
HackRF One was the first production hardware platform for the HackRF project. It is a Software Defined Radio peripheral capable of transmission or reception of radio signals from 1 MHz to 6 GHz. Designed to enable test and development of modern and next generation radio technologies, HackRF One is an open source hardware platform that can be used as a USB peripheral or programmed for stand-alone operation.
| `Product page <https://greatscottgadgets.com/hackrf/one/>`_
| `Where to buy <https://greatscottgadgets.com/hackrf/one/#purchasing>`_
Features
~~~~~~~~
@ -15,11 +21,44 @@ Features
* resolution: 8 bits
* interface: High Speed USB (with USB Micro-B connector)
* power supply: USB bus power
* software-controlled antenna port power (max 50 mA at 3.3 V)
* software-controlled antenna port power (max 50 mA at 3.0 to 3.3 V)
* SMA female antenna connector (50 ohms)
* SMA female clock input and output for synchronization
* convenient buttons for programming
* pin headers for expansion
* portable
* open source
Maximum input power
~~~~~~~~~~~~~~~~~~~
The maximum input power of HackRF One is -5 dBm. Exceeding -5 dBm can result in permanent damage!
In theory, HackRF One can safely accept up to 10 dBm with the front-end RX amplifier disabled. However, a simple software or user error could enable the amplifier, resulting in permanent damage. It is better to use an external attenuator than to risk damage.
Minimum detectable input power
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This isn't a question that can be answered for a general purpose SDR platform such as HackRF. Any answer would be very specific to a particular application. For example, an answerable question might be: What is the minimum power level in dBm of modulation M at frequency F that can be detected by HackRF One with software S under configuration C at a bit error rate of no more than E%? Changing any of those variables (M, F, S, C, or E) would change the answer to the question. Even a seemingly minor software update might result in a significantly different answer. To learn the exact answer for a specific application, you would have to measure it yourself.
HackRF's concrete specifications include operating frequency range, maximum sample rate, and dynamic range in bits. These specifications can be used to roughly determine the suitability of HackRF for a given application. Testing is required to finely measure performance in an application. Performance can typically be enhanced significantly by selecting an appropriate antenna, external amplifier, and/or external filter for the application.
Typical maximum transmit power
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HackRF One's maximum TX power varies by operating frequency:
* 1 MHz to 10 MHz: 5 dBm to 15 dBm, generally increasing as frequency increases (see this `blog post <https://greatscottgadgets.com/2015/05-15-hackrf-one-at-1-mhz/>`__)
* 10 MHz to 2170 MHz: 5 dBm to 15 dBm, generally decreasing as frequency increases
* 2170 MHz to 2740 MHz: 13 dBm to 15 dBm
* 2740 MHz to 4000 MHz: 0 dBm to 5 dBm, decreasing as frequency increases
* 4000 MHz to 6000 MHz: -10 dBm to 0 dBm, generally decreasing as frequency increases
Through most of the frequency range up to 4 GHz, the maximum TX power is between 0 and 10 dBm. The frequency range with best performance is 2170 MHz to 2740 MHz.
Overall, the output power is enough to perform over-the-air experiments at close range or to drive an external amplifier. If you connect an external amplifier, you should also use an external bandpass filter for your operating frequency.
Before you transmit, know your laws. HackRF One has not been tested for compliance with regulations governing transmission of radio signals. You are responsible for using your HackRF One legally.

View file

@ -0,0 +1,52 @@
================================================
HackRF Pro
================================================
.. _hackrf_pro:
.. image:: ../images/hackrf-pro-preliminary-photo.jpg
:alt: HackRF Pro
HackRF Pro is the current hardware platform for the HackRF project. It is a Software Defined Radio peripheral capable of transmission or reception of radio signals from 100 kHz to 6 GHz. HackRF Pro is designed to be backwards compatible with software and hardware developed for use with
:ref:`HackRF One <hackrf_one>`,
whilst introducing many new features and improvements.
| `Product page <https://greatscottgadgets.com/hackrf/pro/>`_
| `Where to buy <https://greatscottgadgets.com/hackrf/pro/#purchasing>`_
Features
~~~~~~~~
* 100 kHz to 6 GHz operating frequency
* Tunable from 0 Hz to 7.1 GHz
* Half-duplex transceiver
* Up to 20 million samples per second
* 8-bit quadrature samples (8-bit I and 8-bit Q)
* Compatible with GNU Radio, SDR#, and more
* Software-configurable RX and TX gain and baseband filter
* Software-controlled RF port power (50 mA at 3.3 V)
* SMA RF connector
* SMA clock input and output for synchronization and triggering
* Convenient buttons for programming
* Internal pin headers for expansion
* High-Speed USB 2.0 with Type-C connector
* USB-powered
* Open source hardware
Compared to HackRF One, HackRF Pro introduces a host of new and updated features, including:
* Wider operating frequency range
* Improved RF performance with flatter frequency response
* Modern USB Type-C connector
* Built-in TCXO crystal oscillator for superior timing stability
* Logic upgrade from a CPLD to a power-efficient FPGA
* Elimination of the DC spike
* Extended-precision mode with 16-bit samples for low sample rates (typical ENOB: 9-11)
* Half-precision mode with 4-bit samples at up to 40 Msps
* More RAM and flash memory for custom firmware
* Installed shielding around the radio section
* Trigger input and output accessible through clock connectors
* Cutout in the PCB provides space for future add-ons
* Improved power management
* Enhanced RF port protection
* Facility to hardware-disable transmit mode

View file

@ -9,6 +9,7 @@ Have you done something cool with HackRF or mentioned HackRF in one of your pres
* `LEGO car <http://ossmann.blogspot.com/2013/06/hackrf-lego-car.html>`__ (Michael Ossmann)
* `wireless microphones <http://www.sharebrained.com/2013/06/15/wireless-microphones-and-hackrf/>`__ (Jared Boone)
* `Tesla Charging Port Opener <https://github.com/rgerganov/tesla-opener>`__ (Radoslav Gerganov)
* `Hacking my smart tooth brush <https://kuenzi.dev/toothbrush/>`__ (Cyrill Künzi)

View file

@ -1,119 +0,0 @@
================================================
hackrf_sweep
================================================
Usage
~~~~~
.. code-block:: sh
[-h] # this help
[-d serial_number] # Serial number of desired HackRF
[-a amp_enable] # RX RF amplifier 1=Enable, 0=Disable
[-f freq_min:freq_max] # minimum and maximum frequencies in MHz
[-p antenna_enable] # Antenna port power, 1=Enable, 0=Disable
[-l gain_db] # RX LNA (IF) gain, 0-40dB, 8dB steps
[-g gain_db] # RX VGA (baseband) gain, 0-62dB, 2dB steps
[-n num_samples] # Number of samples per frequency, 8192-4294967296
[-w bin_width] # FFT bin width (frequency resolution) in Hz
[-1] # one shot mode
[-B] # binary output
[-I] # binary inverse FFT output
-r filename # output file
Output fields
~~~~~~~~~~~~~
``date, time, hz_low, hz_high, hz_bin_width, num_samples, dB, dB, ...``
Running ``hackrf_sweep -f 2400:2490`` gives the following example results:
.. list-table ::
:header-rows: 1
:widths: 1 1 1 1 1 1 1 1 1 1 1
* - Date
- Time
- Hz Low
- Hz High
- Hz bin width
- Num Samples
- dB
- dB
- dB
- dB
- dB
* - 2019-01-03
- 11:57:34.967805
- 2400000000
- 2405000000
- 1000000.00
- 20
- -64.72
- -63.36
- -60.91
- -61.74
- -58.58
* - 2019-01-03
- 11:57:34.967805
- 2410000000
- 2415000000
- 1000000.00
- 20
- -69.22
- -60.67
- -59.50
- -61.81
- -58.16
* - 2019-01-03
- 11:57:34.967805
- 2405000000
- 2410000000
- 1000000.00
- 20
- -61.19
- -70.14
- -60.10
- -57.91
- -61.97
* - 2019-01-03
- 11:57:34.967805
- 2415000000
- 2420000000
- 1000000.00
- 20
- -72.93
- -79.14
- -68.79
- -70.71
- -82.78
* - 2019-01-03
- 11:57:34.967805
- 2420000000
- 2425000000
- 1000000.00
- 20
- -67.57
- -61.61
- -57.29
- -61.90
- -70.19
* - 2019-01-03
- 11:57:34.967805
- 2430000000
- 2435000000
- 1000000.00
- 20
- -56.04
- -59.58
- -66.24
- -66.02
- -62.12
Two ranges of 5 MHz are analyzed at once from the same set of samples, so a single timestamp applies to the whole range.
The fifth column tells you the width in Hz (1 MHz in this case) of each frequency bin, which you can set with ``-w``. The sixth column is the number of samples analyzed to produce that row of data.
Each of the remaining columns shows the power detected in each of several frequency bins. In this case there are five bins, the first from 2400 to 2401 MHz, the second from 2401 to 2402 MHz, and so forth.

View file

@ -0,0 +1,139 @@
============
HackRF Tools
============
Great Scott Gadgets provides some commandline tools for interacting with HackRF.
* **hackrf_info** Read device information from HackRF such as serial number and firmware version.
* **hackrf_transfer** Send and receive signals using HackRF. Input/output files are 8-bit signed quadrature samples.
* **hackrf_sweep**, a command-line spectrum analyzer.
* **hackrf_clock** Read and write clock input and output configuration.
* **hackrf_operacake** Configure Opera Cake antenna switch connected to HackRF.
* **hackrf_spiflash** A tool to write new firmware to HackRF. See: :ref:`Updating Firmware <updating_firmware>`.
* **hackrf_debug** Read and write registers and other low-level configuration for debugging.
hackrf_sweep
~~~~~~~~~~~~
Usage
^^^^^
.. code-block:: sh
[-h] # this help
[-d serial_number] # Serial number of desired HackRF
[-a amp_enable] # RX RF amplifier 1=Enable, 0=Disable
[-f freq_min:freq_max] # minimum and maximum frequencies in MHz
[-p antenna_enable] # Antenna port power, 1=Enable, 0=Disable
[-l gain_db] # RX LNA (IF) gain, 0-40dB, 8dB steps
[-g gain_db] # RX VGA (baseband) gain, 0-62dB, 2dB steps
[-w bin_width] # FFT bin width (frequency resolution) in Hz, 2445-5000000
[-1] # one shot mode
[-N num_sweeps] # Number of sweeps to perform
[-B] # binary output
[-I] # binary inverse FFT output
-r filename # output file
Output fields
^^^^^^^^^^^^^
``date, time, hz_low, hz_high, hz_bin_width, num_samples, dB, dB, ...``
Running ``hackrf_sweep -f 2400:2490`` gives the following example results:
.. list-table ::
:header-rows: 1
:widths: 1 1 1 1 1 1 1 1 1 1 1
* - Date
- Time
- Hz Low
- Hz High
- Hz bin width
- Num Samples
- dB
- dB
- dB
- dB
- dB
* - 2019-01-03
- 11:57:34.967805
- 2400000000
- 2405000000
- 1000000.00
- 20
- -64.72
- -63.36
- -60.91
- -61.74
- -58.58
* - 2019-01-03
- 11:57:34.967805
- 2410000000
- 2415000000
- 1000000.00
- 20
- -69.22
- -60.67
- -59.50
- -61.81
- -58.16
* - 2019-01-03
- 11:57:34.967805
- 2405000000
- 2410000000
- 1000000.00
- 20
- -61.19
- -70.14
- -60.10
- -57.91
- -61.97
* - 2019-01-03
- 11:57:34.967805
- 2415000000
- 2420000000
- 1000000.00
- 20
- -72.93
- -79.14
- -68.79
- -70.71
- -82.78
* - 2019-01-03
- 11:57:34.967805
- 2420000000
- 2425000000
- 1000000.00
- 20
- -67.57
- -61.61
- -57.29
- -61.90
- -70.19
* - 2019-01-03
- 11:57:34.967805
- 2430000000
- 2435000000
- 1000000.00
- 20
- -56.04
- -59.58
- -66.24
- -66.02
- -62.12
Each sweep across the entire specified frequency range is given a single time stamp.
The fifth column tells you the width in Hz (1 MHz in this case) of each frequency bin, which you can set with ``-w``. The sixth column is the number of samples analyzed to produce that row of data.
Each of the remaining columns shows the power detected in each of several frequency bins. In this case there are five bins, the first from 2400 to 2401 MHz, the second from 2401 to 2402 MHz, and so forth.

View file

@ -1,11 +1,13 @@
====================
HackRF One's Buttons
====================
=======
Buttons
=======
The RESET button resets the microcontroller. This is a reboot that should result in a USB re-enumeration.
This information is applicable to both HackRF Pro and HackRF One.
The DFU button invokes a USB DFU bootloader located in the microcontroller's ROM. This bootloader makes it possible to unbrick a HackRF One with damaged firmware because the ROM cannot be overwritten.
The **RESET button** resets the microcontroller. This is a reboot that should result in a USB re-enumeration.
To invoke DFU mode: Press and hold the DFU button. While holding the DFU button, reset the HackRF One either by pressing and releasing the RESET button or by powering on the HackRF One. Release the DFU button.
The **DFU button** invokes a USB DFU bootloader located in the microcontroller's ROM. This bootloader makes it possible to unbrick a HackRF with damaged firmware because the ROM cannot be overwritten.
The DFU button only invokes the bootloader during reset. This means that it can be used for other functions by custom firmware.
The DFU button only invokes the bootloader during reset. This means that it can be used for other functions by custom firmware.
To invoke DFU mode: Press and hold the DFU button. While holding the DFU button, reset the HackRF either by pressing and releasing the RESET button or by powering on the HackRF. Release the DFU button.

View file

@ -2,18 +2,56 @@
Hardware Components
================================================
Major parts used in HackRF One:
Block Diagrams
~~~~~~~~~~~~~~
* `MAX2837 2.3 to 2.7 GHz transceiver <https://www.maximintegrated.com/en/products/comms/wireless-rf/MAX2837.html>`__
* `Datasheet <https://datasheets.maximintegrated.com/en/ds/MAX2837.pdf>`__
* There's also a register map document that Mike received directly from Maxim. Send an email to Mike or submit a support request to Maxim if you want a copy.
* `MAX5864 ADC/DAC <http://www.maxim-ic.com/datasheet/index.mvp/id/3946/t/do>`__
* `Datasheet <http://datasheets.maxim-ic.com/en/ds/MAX5864.pdf>`__
HackRF Pro Block Diagram
^^^^^^^^^^^^^^^^^^^^^^^^
.. image:: ../images/block-diagram-pro.png
:align: center
|
HackRF One r1-r8 Block Diagram
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. image:: ../images/block-diagram.png
:align: center
|
HackRF One r9 Block Diagram
^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. image:: ../images/block-diagram-r9.png
:align: center
|
Key Components
~~~~~~~~~~~~~~
Major parts used in HackRF:
* `MAX2831 2.3 to 2.6 GHz transceiver <https://www.analog.com/en/products/max2831.html>`__
* Used on HackRF Pro.
* `Datasheet <https://www.analog.com/media/en/technical-documentation/data-sheets/MAX2831-MAX2832.pdf>`__
* `MAX2837 2.3 to 2.7 GHz transceiver <https://www.analog.com/en/products/max2837.html>`__
* Used on HackRF One (except revision r9), Jawbreaker and rad1o.
* `Datasheet <https://www.analog.com/media/en/technical-documentation/data-sheets/max2837.pdf>`__
* `MAX2839 2.3 to 2.7 GHz transceiver <https://www.analog.com/en/products/max2839.html>`__
* Substitution for MAX2837, used on HackRF One revision r9.
* `Datasheet <https://www.analog.com/media/en/technical-documentation/data-sheets/max2839.pdf>`__
* `MAX5864 ADC/DAC <https://www.analog.com/en/products/max5864.html>`__
* `Datasheet <https://www.analog.com/media/en/technical-documentation/data-sheets/MAX5864.pdf>`__
* `Si5351 clock generator <http://www.silabs.com/products/clocksoscillators/clock-generator/Pages/lvcmos-clocks-5-outputs.aspx>`__
* `AN619: Manually Generating an Si5351 Register Map <http://www.silabs.com/Support%20Documents/TechnicalDocs/AN619.pdf>`__
* `Datasheet <http://www.silabs.com/Support%20Documents/TechnicalDocs/Si5351.pdf>`__ - this document is a mess of typos, and best used in conjunction with AN619, which has its own typos. Usually, you can reconcile what's true by comparison and a bit of thought.
* `Datasheet <http://www.silabs.com/Support%20Documents/TechnicalDocs/Si5351.pdf>`__ - see AN619 for the complete register map.
* `Other Documentation <http://www.silabs.com/products/clocksoscillators/clock-generators-and-buffers/Pages/clock+vcxo.aspx>`__ - includes application notes, user guides, and white papers.
* CoolRunner-II CPLD
* `ice40 UltraPlus FPGA <https://www.latticesemi.com/en/Products/FPGAandCPLD/iCE40UltraPlus>`__ (HackRF Pro)
* CoolRunner-II CPLD (all other platforms)
* `LPC43xx ARM Cortex-M4 microcontroller <http://www.nxp.com/products/microcontrollers-and-processors/arm-processors/lpc-arm-cortex-m-mcus/lpc-dual-core-cortex-m0-m4f/lpc4300:MC_1403790133078>`__
* `User Manual <http://www.nxp.com/documents/user_manual/UM10503.pdf>`__
* `Datasheet <http://www.nxp.com/documents/data_sheet/LPC4350_30_20_10.pdf>`__
@ -23,13 +61,5 @@ Major parts used in HackRF One:
* `RFFC5072 mixer/synthesizer <http://www.rfmd.com/store/rffc5072-1.html>`__
* `Datasheet <http://www.rfmd.com/CS/Documents/RFFC5071_2DS.pdf>`__
* `Other Documentation <http://www.rfmd.com/store/rffc5072-1.html>`__ ; click "Technical Documents" - includes programming guides and application notes.
* `W25Q80BV 8M-bit Flash <https://www.winbond.com/resource-files/w25q80bv%20revk%2020151203.pdf>`__
Block Diagram
~~~~~~~~~~~~~
.. image:: ../images/block-diagram.png
:align: center
* `W25Q32 32M-bit Flash <https://www.winbond.com/resource-files/W25Q32JV%20RevJ%2012242024%20Plus.pdf>`__ (HackRF Pro)
* `W25Q80BV 8M-bit Flash <https://www.winbond.com/resource-files/w25q80bv%20revk%2020151203.pdf>`__ (all other platforms)

View file

@ -0,0 +1,81 @@
.. _hardware_triggering:
===================
Hardware Triggering
===================
HackRF transmit and receive operations can be synchronized with another HackRF or with other external equipment by using the trigger input and output. Triggering provides time synchronization with error of less than one sample period.
HackRF Pro has two configurable SMA ports, P1 and P2, which can be set up to provide both clock synchronization and triggering.
HackRF One has CLKIN and CLKOUT ports for clock synchronization, but hardware triggering requires opening the case to access the P28 header.
Clock Synchronization
~~~~~~~~~~~~~~~~~~~~~
When triggering one HackRF from another, it is often desirable to first ensure that the two devices share a common frequency reference. This has an added benefit of grounding the HackRFs to each other, eliminating one of the wires required for triggering. See :ref:`External Clock Interface <external_clock_interface>` for instructions.
Either HackRF may serve as the clock source for the other regardless of which is providing the trigger output.
Usage
~~~~~
Use ``hackrf_info`` to discover the serial numbers of both HackRFs. Using the serial number of the HackRF to be triggered, use ``hackrf_transfer -H`` to set up a triggered operation. For example:
* ``hackrf_transfer -H -d <serial number> -a 0 -l 32 -g 32 -r rx1.cs8``
The command will print "Waiting for trigger..." until a trigger signal is detected on the device's trigger input.
In another terminal, use the serial number of the triggering HackRF One to initiate an operation to take place at the same time as the triggered operation. For example:
* ``hackrf_transfer -d <serial number> -a 0 -l 32 -g 32 -r rx2.cs8``
Note that no special argument is required to activate the trigger output.
Both ``hackrf_transfer`` commands will start sampling RF signals at the same time, accurate to less than one sample period.
Additional Devices
~~~~~~~~~~~~~~~~~~
Multiple HackRFs may be triggered by a single HackRF. Ensure that all the devices share a common ground and then connect one device's trigger output to the trigger inputs of the other devices (with jumpers connected via a breadboard, for example).
Equipment other than a HackRF may be connected to a HackRF's trigger input or output. The trigger signal is a 3.3 V pulse that triggers on the rising edge.
HackRF One Triggering Requirements
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To connect two HackRF Ones for triggering you will need:
* a male-to-male jumper wire for 0.1" pin headers
* an SMA cable for clock synchronization or a second jumper wire
.. _open_your_hackrf_one:
Open Your HackRF One
~~~~~~~~~~~~~~~~~~~~
If your HackRF Ones are not bare boards, you will need to open up their cases to access the pin headers on the HackRF Ones. Each HackRF One case has small plastic clips holding it together. These clips may be damaged when the case is opened, but typically the case can still be used after such damage. Please follow the instructions in `this video <https://www.youtube.com/watch?v=zuXJtpTSEJM>`__ by `Jared Boone <https://twitter.com/sharebrained>`__ to open your HackRF One cases.
Identify the Trigger Pins
~~~~~~~~~~~~~~~~~~~~~~~~~
HackRF One has four normally-populated pin headers, three of which are arranged in a 'C' shape. On the circuit board these are marked P28, P22, and P20. P28 is the header nearest to the center of the board. Locate pins 15 (trigger output) and 16 (trigger input) on header P28.
.. image:: ../images/trigger-pins.png
:align: center
Connect the Trigger Output to the Trigger Input
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
First ensure that the two devices share a common ground. This may be accomplished by connecting one's CLKIN to the other's CLKOUT as recommended above. Alternatively, connect a jumper wire from P28 pin 2 on one HackRF One to P28 pin 2 on the other HackRF One.
Next use a jumper wire to connect P28 pin 15 (trigger output) on one HackRF One to P28 pin 16 (trigger input) on the other HackRF One.
References
~~~~~~~~~~
HackRF's trigger mechanism was contributed by the authors of `Synchronisation of Low-Cost Open Source SDRs for Navigation Applications <http://spcomnav.uab.es/docs/conferences/Bartolucci_NAVITEC_2016.pdf>`__ which provides details about the implementation and background.

View file

@ -6,23 +6,36 @@ Welcome to HackRF's documentation!
:maxdepth: 2
:caption: User Documentation
hackrf_one
opera_cake
faq
troubleshooting
getting_help
tips_tricks
troubleshooting
synchronization_checklist
hackrf_projects_mentions
.. toctree::
:maxdepth: 2
:caption: Software
:caption: Hardware Platforms
installing_hackrf_software
getting_started_hackrf_gnuradio
software_support
libhackrf_api
hackrf_sweep
hackrf_pro
hackrf_one
rad1o
jawbreaker
.. toctree::
:maxdepth: 2
:caption: Hardware Information
hackrf_minimum_requirements
list_of_hardware_revisions
hardware_components
leds
hackrfs_buttons
hackrf_connectors
external_clock_interface
expansion_interface
hardware_triggering
enclosure_options
usb_cables
rf_shield_installation
.. toctree::
:maxdepth: 2
@ -35,25 +48,31 @@ Welcome to HackRF's documentation!
.. toctree::
:maxdepth: 2
:caption: Hardware
:caption: Software
installing_hackrf_software
hackrf_tools
software_support
sampling_rate
setting_gain
virtual_machines
list_of_hardware_revisions
hardware_components
enclosure_options
hackrfs_buttons
external_clock_interface
clocking
expansion_interface
multiple_device_hardware_synch
rf_shield_installation
.. toctree::
:maxdepth: 2
:caption: Retired Content
:caption: Gateware
jawbreaker
design_goals
future_hardware_modifications
lemondrop_bringup
LPC4350
gateware
.. toctree::
:maxdepth: 2
:caption: Opera Cake Documentation
opera_cake
opera_cake_faq
opera_cake_hardware
opera_cake_board_addressing
opera_cake_port_configuration
opera_cake_modes_of_operation

View file

@ -1,8 +1,12 @@
.. _operating_system_tips:
================================================
==========================
Installing HackRF Software
================================================
==========================
HackRF software includes HackRF Tools and libhackrf. HackRF Tools are the commandline utilities that let you interact with your HackRF. libhackrf is a low level library that enables software on your computer to operate with HackRF.
Install Using Package Managers
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -58,17 +62,23 @@ OS X (10.5+): MacPorts
Windows: Binaries
+++++++++++++++++
Binaries are provided as part of the PothosSDR project, they can be downloaded `here <http://downloads.myriadrf.org/builds/PothosSDR/?C=M;O=D>`__.
Windows users can use `radioconda <https://github.com/ryanvolz/radioconda>`__ to get the required binaries installed.
Alternatively, binaries are available as build artifacts under the 'Actions'-tab on github `here <https://github.com/greatscottgadgets/hackrf/actions>`__ (GitHub Login needed).
-----------
Installing From Source
~~~~~~~~~~~~~~~~~~~~~~
Linux / OS X / \*BSD: Building HackRF Software From Source
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acquire the source for the HackRF tools from either a `release archive <https://github.com/mossmann/hackrf/releases>`__ or git: ``git clone https://github.com/mossmann/hackrf.git``
Acquire the source for the HackRF tools from either a `release archive <https://github.com/greatscottgadgets/hackrf/releases>`__ or git: ``git clone https://github.com/greatscottgadgets/hackrf.git``
Once you have the source downloaded, the host tools can be built as follows:
@ -84,60 +94,32 @@ Once you have the source downloaded, the host tools can be built as follows:
If you have HackRF hardware, you may need to :ref:`update the firmware <updating_firmware>` to match the host tools versions.
Windows: Prerequisites for Cygwin, MinGW, or Visual Studio
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
* cmake-2.8.12.1 or later from http://www.cmake.org/cmake/resources/software.html
* libusbx-1.0.18 or later from http://sourceforge.net/projects/libusbx/files/latest/download?source=files
* fftw-3.3.5 or later from http://www.fftw.org/install/windows.html
* Install Windows driver for HackRF hardware or use Zadig see http://sourceforge.net/projects/libwdi/files/zadig
* If you want to use Zadig select HackRF USB device and just install/replace it with WinUSB driver.
Note for Windows build: You shall always execute hackrf-tools from Windows command shell and not from Cygwin or MinGW shell because on Cygwin/MinGW Ctrl+C is not managed correctly and especially for hackrf_transfer the Ctrl+C (abort) will not stop correctly and will corrupt the file.
Windows: Installing HackRF Software via Cygwin
++++++++++++++++++++++++++++++++++++++++++++++
.. code-block :: sh
mkdir host/build
cd host/build
cmake ../ -G "Unix Makefiles" -DCMAKE_LEGACY_CYGWIN_WIN32=1 -DLIBUSB_INCLUDE_DIR=/usr/local/include/libusb-1.0/
make
make install
Windows: Installing HackRF Software via MinGW
Windows: Building HackRF Software From Source
+++++++++++++++++++++++++++++++++++++++++++++
.. code-block :: sh
Install `Visual Studio Community <https://visualstudio.microsoft.com/vs/community/>`__ (2015 or later) and `CMake <https://cmake.org/>`__ (at least version 3.21.4).
mkdir host/build
cd host/build
cmake ../ -G "MSYS Makefiles" -DLIBUSB_INCLUDE_DIR=/usr/local/include/libusb-1.0/
make
make install
Install library dependencies using `vcpkg <https://vcpkg.io/en/>`__:
.. code-block :: winbatch
git clone https://github.com/microsoft/vcpkg
cd vcpkg
bootstrap-vcpkg.bat
vcpkg install libusb fftw3 pthreads pkgconf
Windows: Installing HackRF Software via Visual Studio 2015 x64
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Open the Visual Studio Developer Command Prompt, and change to the directory where you unpacked the HackRF source.
Create library definition for MSVC to link to ``C:\fftw-3.3.5-dll64> lib /machine:x64 /def:libfftw3f-3.def``
The following steps assume you installed vcpkg in ``C:\vcpkg``.
.. code-block :: sh
Configure CMake and build the code:
c:\hackrf\host\build> cmake ../ -G "Visual Studio 14 2015 Win64" \
-DLIBUSB_INCLUDE_DIR=c:\libusb-1.0.21\libusb \
-DLIBUSB_LIBRARIES=c:\libusb-1.0.21\MS64\dll\lib\libusb-1.0.lib \
-DTHREADS_PTHREADS_INCLUDE_DIR=c:\pthreads-w32-2-9-1-release\Pre-built.2\include \
-DTHREADS_PTHREADS_WIN32_LIBRARY=c:\pthreads-w32-2-9-1-release\Pre-built.2\lib\x64\pthreadVC2.lib \
-DFFTW_INCLUDES=C:\fftw-3.3.5-dll64 \
-DFFTW_LIBRARIES=C:\fftw-3.3.5-dll64\libfftw3f-3.lib
.. code-block :: winbatch
CMake will produce a solution file named ``HackRF.sln`` and a series of project files which can be built with msbuild as follows: ``c:\hackrf\host\build> msbuild HackRF.sln``
set PKG_CONFIG=C:\vcpkg\installed\x64-windows\tools\pkgconf\pkgconf.exe
set PKG_CONFIG_PATH=C:\vcpkg\installed\x64-windows\lib\pkgconfig
set CMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake
cmake -B host\build host
cmake --build host\build
CMake will generate a ``HackRF.sln`` project file which you can open in Visual Studio for editing and development.

View file

@ -1,10 +1,16 @@
================================================
==========
Jawbreaker
================================================
==========
HackRF Jawbreaker is the beta test hardware platform for the HackRF project.
.. image:: ../images/jawbreaker.JPG
:alt: Jawbreaker
(Jawbreaker picture provided by `fd0 <https://github.com/fd0>`__ with Creative Commons License CC BY 3.0.)
Features
~~~~~~~~
@ -20,53 +26,48 @@ Features
Set your Jawbreaker Free!
~~~~~~~~~~~~~~~~~~~~~~~~~
Hardware Documentation
~~~~~~~~~~~~~~~~~~~~~~
Jawbreaker has an SMA antenna connector but also includes a built-in PCB antenna intended for operation near 900 MHz. It isn't a very good antenna. Seriously. A paperclip stuck into the SMA connector would probably be better. You can free your Jawbreaker to operate with better antennas by cutting the PCB trace to the PCB antenna with a knife. This enables the SMA connector to be used without interference from the PCB antenna.
A video that demonstrates the antenna modification is on YouTube: `HackRF Antenna Modification <http://youtu.be/B2gwgNoqMxI>`__
The trace to be cut is between the two solder pads inside a box labeled R44 in the `assembly diagram <https://github.com/mossmann/hackrf/blob/master/doc/hardware/jawbreaker-assembly.pdf?raw=true>`__. There is an arrow pointing to it printed on the board.
Due to a manufacturing error, there is solder on R44. R44 may appear as a single solder blob. If you have a soldering iron and solder wick/braid, use a soldering iron and fine solder wick to remove as much solder as you can from the two R44 pads. Then, use a pen knife to gently cut away the area between the two R44 pads. Make multiple, gentle cuts, instead of one or two forceful cuts. As you cut, you'll break through the black solder mask, then the copper trace between the pads, and stop when you reach fiberglass. Remove the copper trace completely, so just the two R44 pads remain. Use a multimeter or continuity tester to verify that the two R44 pads are no longer connected.
If you don't have a soldering iron, you can cut through the copper trace and the solder blob all at once, but it requires a bit more effort.
The only reason not to do this is if you want to try Jawbreaker but don't have any antenna with an SMA connector (or adapter).
If you want to restore the PCB antenna for some reason, you can install a 10 nF capacitor or a 0 ohm resistor on the R44 pads or you may be able to simply create a solder bridge.
SMA, not RP-SMA
~~~~~~~~~~~~~~~
Some connectors that appear to be SMA are actually RP-SMA. If you connect an RP-SMA antenna to Jawbreaker, it will seem to connect snugly but won't function at all because neither the male nor female side has a center pin. RP-SMA connectors are most common on 2.4 GHz antennas and are popular on Wi-Fi equipment.
Schematic diagram, assembly diagram, and bill of materials can be found at `https://github.com/greatscottgadgets/hackrf/tree/master/hardware <https://github.com/greatscottgadgets/hackrf/tree/master/hardware>`__
Transmit Power
~~~~~~~~~~~~~~
The maximum TX power varies by operating frequency:
The maximum TX power for Jawbreaker varies by operating frequency:
* 30 MHz to 100 MHz: 5 dBm to 15 dBm, increasing as frequency decreases
* 100 MHz to 2300 MHz: 0 dBm to 10 dBm, increasing as frequency decreases
* 2300 MHz to 2700 MHz: 10 dBm to 15 dBm
* 2170 MHz to 2740 MHz: 10 dBm to 15 dBm
* 2700 MHz to 4000 MHz: -5 dBm to 5 dBm, increasing as frequency decreases
* 4000 MHz to 6000 MHz: -15 dBm to 0 dBm, increasing as frequency decreases
Overall, the output power is enough to perform over-the-air experiments at close range or to drive an external amplifier. If you connect an external amplifier, you should also use an external bandpass filter for your operating frequency.
Before you transmit, know your laws. Jawbreaker has not been tested for compliance with regulations governing transmission of radio signals. You are responsible for using your Jawbreaker legally.
Before you transmit, know the laws for the region you are transmitting in. Jawbreaker has not been tested for compliance with regulations governing transmission of radio signals. You are responsible for using your Jawbreaker legally.
Hardware Documentation
~~~~~~~~~~~~~~~~~~~~~~
SMA, not RP-SMA
~~~~~~~~~~~~~~~
Schematic diagram, assembly diagram,and bill of materials can be found at `https://github.com/mossmann/hackrf/tree/master/doc/hardware <https://github.com/mossmann/hackrf/tree/master/doc/hardware>`__
The connectors on Jawbreaker are SMA, not RP-SMA. SMA connectors and RP-SMA connectors look extremely similar, the difference is that SMA connectors have a center pin. RP-SMA connectors are common on 2.4 GHz antennas and are popular on Wi-Fi equipment. If you connect an RP-SMA antenna to Jawbreaker, it will seem to connect snugly but won't function at all because neither the male nor female side has a center pin.
Recommended PCB and Antenna Changes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jawbreaker has an SMA antenna connector and it also includes a built-in PCB antenna intended for operation near 900 MHz. The built-in PCB antenna isn't a very good antenna. A paperclip stuck into the SMA connector of the Jawbreaker is likely to be better. We recommend that you free your Jawbreaker to operate with better antennas by cutting the PCB trace to the PCB antenna with a knife. This enables the SMA connector to be used without interference from the PCB antenna.
The trace to be cut is between the two solder pads inside a box labeled R44. There is an arrow printed on the board that points to the R44 box. A video that demonstrates the antenna modification is on YouTube: `HackRF Antenna Modification <http://youtu.be/B2gwgNoqMxI>`__.
Due to a manufacturing error, there is solder on the pads in box R44 that you should try to remove before you cut the trace. R44 may appear as a single solder blob. If you have a soldering iron and solder wick/braid, use a soldering iron and fine solder wick to remove as much solder as you can from the two R44 pads. Then, use a pen knife to gently cut away the area between the two R44 pads. Make multiple, gentle cuts, instead of one or two forceful cuts. As you cut, you'll break through the black solder mask, then the copper trace between the pads, and stop when you reach fiberglass. Remove the copper trace completely, so just the two R44 pads remain. Use a multimeter or continuity tester to verify that the two R44 pads are no longer connected. If you don't have a soldering iron, you can cut through the copper trace and the solder blob all at once, but it requires a bit more effort. The only reason not to cut the PCB trace is if you want to try Jawbreaker but don't have any antenna with an SMA connector (or adapter).
If you want to restore the PCB antenna for some reason, you can install a 10 nF capacitor or a 0 ohm resistor on the R44 pads or you may be able to simply create a solder bridge.
@ -536,14 +537,14 @@ Cut P17 short (trace) to enable external clock input. If short is cut, a jumper
More
^^^^
Additional headers are available. See the `board files <https://github.com/mossmann/hackrf/tree/master/hardware/jawbreaker>`__ for additional details.
Additional headers are available. See the `board files <https://github.com/greatscottgadgets/hackrf/tree/master/hardware/jawbreaker>`__ for additional details.
Differences between Jawbreaker and HackRF One
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jawbreaker was the beta platform that preceded HackRF One. HackRF One incorporates the following changes and enhancements:
Jawbreaker was the beta platform that preceded HackRF One. HackRF One incorporates the following changes and enhancements (at minimum):
* Antenna port: No modification is necessary to use the SMA antenna port on HackRF One.
* PCB antenna: Removed.
@ -556,5 +557,5 @@ Jawbreaker was the beta platform that preceded HackRF One. HackRF One incorporat
* Real-Time Clock: An RTC is installed on HackRF One.
* LPC4320 microcontroller: Jawbreaker had an LPC4330.
* RF shield footprint: An optional shield may be installed over HackRF One's RF section.
* Antenna port power: HackRF One can supply up to 50 mA at 3.3 V DC on the antenna port for compatibility with powered antennas and other low power amplifiers.
* Antenna port power: HackRF One can supply up to 50 mA at 3.0 to 3.3 V DC on the antenna port for compatibility with powered antennas and other low power amplifiers.
* Enhanced frequency range: The RF performance of HackRF One is better than Jawbreaker, particularly at the high and low ends of the operating frequency range. HackRF One can operate at 1 MHz or even lower.

20
docs/source/leds.rst Normal file
View file

@ -0,0 +1,20 @@
====
LEDs
====
HackRF Pro
~~~~~~~~~~
When HackRF Pro is plugged in to a USB host, four LEDs should turn on: MCU, FPGA, RF, and USB. The MCU LED indicates that the primary internal power supply is working properly and that firmware is running. The FPGA and RF LEDs indicate that firmware has switched on additional internal power supplies. The USB LED indicates that the HackRF Pro is communicating with the host over USB.
HackRF One
~~~~~~~~~~
When HackRF One is plugged in to a USB host, four LEDs should turn on: 3V3, 1V8, RF, and USB. The 3V3 LED indicates that the primary internal power supply is working properly. The 1V8 and RF LEDs indicate that firmware is running and has switched on additional internal power supplies. The USB LED indicates that the HackRF One is communicating with the host over USB.
Both versions
~~~~~~~~~~~~~
The RX and TX LEDs indicate that a receive or transmit operation is currently in progress.
Each LED is a single color. There are no multi-colored LEDs on either HackRF One or HackRF Pro. Adjacent LEDs are different colors in order to make them easier to distinguish from one another. The colors do not mean anything.

View file

@ -1,239 +0,0 @@
================================================
Lemondrop Bring Up
================================================
Board draws approximately 24mA from +3V3 when power is applied. This seems a bit high, but may be expected if not all parts are capable of low-power mode, or aren't configured for low power at power-on. I need to review the schematic and datasheets and see what can be done.
When I put my finger on the MAX2837, current consumption goes up. This suggests there may be floating nodes in that region of the circuit.
Si5351 I2C
~~~~~~~~~~
Attached crystal is 25MHz. For now, I'm assuming 10pF "internal load capacitance" is good enough to get the crystal oscillating. The crystal datasheet should be reviewed and measurements made...
Be sure to reference Silicon Labs application note 619 (AN619). The datasheet is a terrible mess (typos and lack of some details). AN619 appears to be less of a mess, on the whole. And as a bonus, AN619 has PDF bookmarks for each register.
Connections
^^^^^^^^^^^
* Bus Pirate GND to P7 pin 1
* Bus Pirate +3V3 to P7 pin 2 (through multimeter set to 200mA range)
* Bus Pirate CLK to P7 pin 3
* Bus Pirate MOSI to P7 pin 5
Bus Pirate I2C Initialization
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. code-block:: sh
# set mode
m
# I2C mode
4
# ~100kHz speed
3
# power supplies ON
W
# macro 1: 7-bit address search
(1)
Searching I2C address space. Found devices at:
0xC0(0x60 W) 0xC1(0x60 R)
I2C A0 address configuration pin (not available on QFN20 package) is apparently forced to "0".
Reading registers
^^^^^^^^^^^^^^^^^
.. code-block:: sh
# Read register 0
I2C>[0xc0 0[0xc1 r]]
...
# Register 0: SYS_INIT=0, LOL_B=0, LOL_A=0, LOS=1, REVID=0
READ: 0x10
...
# Read 16 registers, starting with register 0
I2C>[0xc0 0[0xc1 r:16]]
...
READ: 0x10 ACK 0xF8 ACK 0x03 ACK 0x00 ACK 0x00 ACK 0x00 ACK 0x8F ACK 0x01 ACK
0x00 ACK 0x00 ACK 0x00 ACK 0x00 ACK 0x00 ACK 0x00 ACK 0x90 ACK 0x00
...
# Read 16 registers, starting with register 16
I2C>[0xc0 16[0xc1 r:16]]
...
READ: 0x00 ACK 0x00 ACK 0x00 ACK 0x00 ACK 0x00 ACK 0x00 ACK 0x00 ACK 0x00 ACK
0x00 ACK 0x00 ACK 0x00 ACK 0x00 ACK 0x00 ACK 0x00 ACK 0x00 ACK 0x00
...
Writing registers
^^^^^^^^^^^^^^^^^
Simple XTAL passthrough to CLK0
+++++++++++++++++++++++++++++++
.. code-block:: sh
# Disable all CLKx outputs.
[0xC0 3 0xFF]
# Turn off OEB pin control for all CLKx
[0xC0 9 0xFF]
# Power down all CLKx
[0xC0 16 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80]
# Register 183: Crystal Internal Load Capacitance
# Reads as 0xE4 on power-up
# Set to 10pF (until I find out what loading the crystal/PCB likes best)
[0xC0 183 0xE4]
# Register 187: Fanout Enable
# Turn on XO fanout only.
[0xC0 187 0x40]
# Register 15: PLL Input Source
# CLKIN_DIV=0 (Divide by 1)
# PLLB_SRC=0 (XTAL input)
# PLLA_SRC=0 (XTAL input)
[0xC0 15 0x00]
# Registers 16 through 23: CLKx Control
# CLK0:
# CLK0_PDN=0 (powered up)
# MS0_INT=1 (integer mode)
# MS0_SRC=0 (PLLA as source for MultiSynth 0)
# CLK0_INV=0 (not inverted)
# CLK0_SRC=0 (XTAL as clock source for CLK0)
# CLK0_IDRV=3 (8mA)
[0xC0 16 0x43 0x80 0x80 0x80 0x80 0x80 0x80 0x80]
# Enable CLK0 output only.
[0xC0 3 0xFE]
Clocking Scheme (Work In Progress)
++++++++++++++++++++++++++++++++++
From AN619: If Fxtal=25MHz, Fvco = Fxtal * (a + (b / c)). If we want Fvco = 800MHz, a = 32, b = 0, c = don't care.
.. code-block:: sh
MSNA_P1[17:0] = 128 * a + floor(128 * b / c) - 512
= 128 * a + floor(0) - 512
= 128 * 32 + 0 - 512
= 3584 = 0xE00
MSNA_P1[17:16] (register 28) = 0x00
MSNA_P1[15: 8] (register 29) = 0x0E
MSNA_P1[ 7: 0] (register 30) = 0x00
MSNA_P2[19:0] = 128 * b - c * floor(128 * b / c)
= 128 * 0 - 0 * floor(128 * 0 / X)
= 0
MSNA_P3[19:0] = 0
MultiSynth0 should output 40MHz (800MHz VCO divided by 20):
.. code-block:: sh
a = 20, b = 0, c = X
MS0_P1[17: 0] = 128 * a + floor(128 * b / c) - 512
= 2048 = 0x800
MS0_P1[17:16] (register 44) = 0x00
MS0_P1[15: 8] (register 45) = 0x08
MS0_P1[ 7: 0] (register 46) = 0x00
MS0_P2[19:0] = 0
MS0_P3[19:0] = 0
MultiSynth1 should output 20MHz (800MHz VCO divided by 40) or some smaller integer fraction of the VCO:
.. code-block:: sh
a = 40, b = 0, c = X
MS1_P1[17: 0] = 128 * a + floor(128 * b / c) - 512
= 4608 = 0x1200
MS1_P1[17:16] (register 52) = 0x00
MS1_P1[15: 8] (register 53) = 0x12
MS1_P1[ 7: 0] (register 54) = 0x00
MS1_P2[19:0] = 0
MS1_P3[19:0] = 0
Initialization:
.. code-block:: sh
# Disable all CLKx outputs.
[0xC0 3 0xFF]
# Turn off OEB pin control for all CLKx
[0xC0 9 0xFF]
# Power down all CLKx
[0xC0 16 0x80 0x80 0x80 0x80 0x80 0x80 0x80 0x80]
# Register 183: Crystal Internal Load Capacitance
# Reads as 0xE4 on power-up
# Set to 10pF (until I find out what loading the crystal/PCB likes best)
[0xC0 183 0xE4]
# Register 187: Fanout Enable
# Turn on XO and MultiSynth fanout only.
[0xC0 187 0x50]
# Register 15: PLL Input Source
# CLKIN_DIV=0 (Divide by 1)
# PLLB_SRC=0 (XTAL input)
# PLLA_SRC=0 (XTAL input)
[0xC0 15 0x00]
# MultiSynth NA (PLL1)
[0xC0 26 0x00 0x00 0x00 0x0E 0x00 0x00 0x00 0x00]
# MultiSynth NB (PLL2)
...
# MultiSynth 0
[0xC0 42 0x00 0x00 0x00 0x08 0x00 0x00 0x00 0x00]
# MultiSynth 1
[0xC0 50 0x00 0x00 0x00 0x12 0x00 0x00 0x00 0x00]
# Registers 16 through 23: CLKx Control
# CLK0:
# CLK0_PDN=0 (powered up)
# MS0_INT=1 (integer mode)
# MS0_SRC=0 (PLLA as source for MultiSynth 0)
# CLK0_INV=0 (not inverted)
# CLK0_SRC=3 (MS0 as input source)
# CLK0_IDRV=3 (8mA)
# CLK1:
# CLK1_PDN=0 (powered up)
# MS1_INT=1 (integer mode)
# MS1_SRC=0 (PLLA as source for MultiSynth 1)
# CLK1_INV=0 (not inverted)
# CLK1_SRC=3 (MS1 as input source)
# CLK1_IDRV=3 (8mA)
[0xC0 16 0x4F 0x4F 0x80 0x80 0x80 0x80 0x80 0x80]
# Enable CLK0 output only.
[0xC0 3 0xFC]
Si5351 output phase relationships
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Tested CLK4 and CLK5 (integer division only):
With CLK4 set to MS4 and CLK5 set to MS5, even with both multisynths configured identically, there was no consistent phase between the two. Once started, the clocks maintained relative phase with each other, but when stopped and restarted the initial phase offset was unpredictable.
With CLK4 and CLK5 both set to MS4, the phase of both outputs was identical when no output (R) divider was selected. When an output divider was selected on both MS4 and MS5, the relative phase became predictable only within the constraints of the divider (e.g. with R=2 the relative phase was always either 0 or half a cycle, with R=4 the relative phase was always either 0, a quarter, a half, or three quarters of a cycle). With R=1 on MS4 and R=2 on MS5, the two outputs were consistently in phase with each other. The output (R) dividers supposedly tied to the multisynths are actually tied to the outputs.

View file

@ -1,568 +0,0 @@
================================================
libhackRF API
================================================
This document describes the functions, data structures and constants that libHackRF provides. It should be used as a reference for using libHackRF and the HackRF hardware.
If you are writing a generic SDR application, i.e. not tied to the HackRF hardware, we strongly recommend that you use either gr-osmosdr or SoapySDR to provide support for the broadest possible range of software defined radio hardware.
For example usage of many of these functions, see the `hackrf_transfer <https://github.com/mossmann/hackrf/blob/master/host/hackrf-tools/src/hackrf_transfer.c>`__ tool.
Setup, Initialization and Shutdown
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HackRF Init
^^^^^^^^^^^
Initialize libHackRF, including global libUSB context to support multiple HackRF hardware devices.
**Syntax:** ``int hackrf_init()``
**Returns:** A value from the hackrf_error constants listed below.
HackRF Open
^^^^^^^^^^^
**Syntax:** ``int hackrf_open(hackrf_device** device)``
**Returns:** A value from the hackrf_error constants listed below.
HackRF Device List
^^^^^^^^^^^^^^^^^^
Retrieve a list of HackRF devices attached to the system. This function finds all devices, regardless of permissions or availability of the hardware.
**Syntax:** ``hackrf_device_list_t* hackrf_device_list()``
**Returns:** A pointer to a hackrf_device_list_t struct, a list of HackRF devices attached to the system. The contents of the hackrf_device_list_t struct are decribed in the data structures section below.
HackRF Device List Open
^^^^^^^^^^^^^^^^^^^^^^^
Open and acquire a handle on a device from the hackrf_device_list_t struct.
**Syntax:** ``int hackrf_device_list_open(hackrf_device_list_t* list, int idx, hackrf_device** device)``
**Params:**
``list`` - A pointer to a hackrf_device_list_t returned by ``hackrf_device_list()``
``idx`` - The list index of the HackRF device to open
``device`` - Output location for hackrf_device pointer. Only valid when return value is HACKRF_SUCCESS.
**Returns:** A value from the hackrf_error constants listed below.
HackRF Device List Free
^^^^^^^^^^^^^^^^^^^^^^^
**Syntax:** ``void hackrf_device_list_free(hackrf_device_list_t* list)``
**Params:**
``list`` - A pointer to a hackrf_device_list_t returned by ``hackrf_device_list()``
HackRF Open By Serial
^^^^^^^^^^^^^^^^^^^^^
**Syntax:** ``int hackrf_open_by_serial(const char* const desired_serial_number, hackrf_device** device)``
**Returns:**
HackRF Close
^^^^^^^^^^^^
**Syntax:** ``int hackrf_close(hackrf_device* device)``
**Returns:** A value from the hackrf_error constants listed below.
HackRF Exit
^^^^^^^^^^^
Cleanly shutdown libHackRF and the underlying USB context. This does not stop in progress transfers or close the HackRF hardware. ``hackrf_close()`` should be called before this to cleanly close the connection to the hardware.
**Syntax:** ``int hackrf_exit()``
**Returns:** A value from the hackrf_error constants listed below.
Using the Radio
~~~~~~~~~~~~~~~
HackRF Start Rx
^^^^^^^^^^^^^^^
**Syntax:** ``int hackrf_start_rx(hackrf_device*, hackrf_sample_block_cb_fn, void* rx_ctx)``
**Params:**
**Returns:** A value from the hackrf_error constants listed below.
HackRF Stop Rx
^^^^^^^^^^^^^^
**Syntax:** ``int hackrf_stop_rx(hackrf_device*)``
**Params:**
**Returns:** A value from the hackrf_error constants listed below.
HackRF Start Tx
^^^^^^^^^^^^^^^
**Syntax:** ``int hackrf_start_tx(hackrf_device*, hackrf_sample_block_cb_fn, void* tx_ctx)``
**Params:**
**Returns:** A value from the hackrf_error constants listed below.
HackRF Stop Tx
^^^^^^^^^^^^^^
**Syntax:** ``int hackrf_stop_tx(hackrf_device*)``
**Params:**
**Returns:** A value from the hackrf_error constants listed below.
HackRF Set Baseband Filter Bandwidth
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
**Syntax:** ``int hackrf_set_baseband_filter_bandwidth(hackrf_device*, const uint32_t bandwidth_hz)``
**Params:**
**Returns:** A value from the hackrf_error constants listed below.
HackRF Compute Baseband Filter BW
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Compute best default value depending on sample rate (auto filter).
**Syntax:** ``uint32_t hackrf_compute_baseband_filter_bw(const uint32_t bandwidth_hz)``
**Params:**
**Returns:** A valid baseband filter width available from the Maxim MAX2837 frontend used by the radio.
HackRF Compute Baseband Filter BW Round Down LT
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Compute nearest freq for bw filter (manual filter)
**Syntax:** ``uint32_t hackrf_compute_baseband_filter_bw_round_down_lt(const uint32_t bandwidth_hz)``
**Params:**
**Returns:** A valid baseband filter width available from the Maxim MAX2837 frontend used by the radio.
Reading and Writing Registers
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HackRF MAX2837 Read
^^^^^^^^^^^^^^^^^^^
Read register values from the MAX2837 Baseband IC.
**Syntax:** ``int hackrf_max2837_read(hackrf_device* device, uint8_t register_number, uint16_t* value)``
**Params:**
**Returns:**
HackRF MAX2837 Write
^^^^^^^^^^^^^^^^^^^^
Write register values to the MAX2837 Baseband IC.
**Syntax:** ``int hackrf_max2837_write(hackrf_device* device, uint8_t register_number, uint16_t value)``
**Params:**
**Returns:**
HackRF Si5351C Read
^^^^^^^^^^^^^^^^^^^
Read register values from the Si5351C clock generator IC.
**Syntax:** ``int hackrf_si5351c_read(hackrf_device* device, uint16_t register_number, uint16_t* value)``
**Params:**
**Returns:**
HackRF Si5351C Write
^^^^^^^^^^^^^^^^^^^^
Write register values to the Si5351C clock generator IC.
**Syntax:** ``int hackrf_si5351c_write(hackrf_device* device, uint16_t register_number, uint16_t value)``
**Params:**
**Returns:**
HackRF RFFC5071 Read
^^^^^^^^^^^^^^^^^^^^
Read register values from the RFFC5071 mixer IC.
**Syntax:** ``int hackrf_rffc5071_read(hackrf_device* device, uint8_t register_number, uint16_t* value)``
**Params:**
**Returns:**
HackRF RFFC5071 Write
^^^^^^^^^^^^^^^^^^^^^
Write register values to the RFFC5071 mixer IC.
**Syntax:** ``int hackrf_rffc5071_write(hackrf_device* device, uint8_t register_number, uint16_t value)``
**Params:**
**Returns:**
Updating Firmware
~~~~~~~~~~~~~~~~~
HackRF CPLD Write
^^^^^^^^^^^^^^^^^
Device will need to be reset after hackrf_cpld_write.
**Syntax:** ``int hackrf_cpld_write(hackrf_device* device, unsigned char* const data, const unsigned int total_length)``
**Params:**
**Returns:**
HackRF SPI Flash Erase
^^^^^^^^^^^^^^^^^^^^^^
**Syntax:** ``int hackrf_spiflash_erase(hackrf_device* device)``
**Params:**
**Returns:**
HackRF SPI Flash Write
^^^^^^^^^^^^^^^^^^^^^^
**Syntax:** ``int hackrf_spiflash_write(hackrf_device* device, const uint32_t address, const uint16_t length, unsigned char* const data)``
**Params:**
**Returns:**
HackRF SPI Flash Read
^^^^^^^^^^^^^^^^^^^^^
**Syntax:** ``int hackrf_spiflash_read(hackrf_device* device, const uint32_t address, const uint16_t length, unsigned char* data)``
**Params:**
**Returns:**
Board Identifiers
~~~~~~~~~~~~~~~~~
HackRF Board ID Read
^^^^^^^^^^^^^^^^^^^^
**Syntax:** ``int hackrf_board_id_read(hackrf_device* device, uint8_t* value)``
**Params:**
**Returns:**
HackRF Version String Read
^^^^^^^^^^^^^^^^^^^^^^^^^^
**Syntax:** ``int hackrf_version_string_read(hackrf_device* device, char* version, uint8_t length)``
**Params:**
**Returns:**
HackRF Board Part ID Serial Number Read
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
**Syntax:** ``int hackrf_board_partid_serialno_read(hackrf_device* device, read_partid_serialno_t* read_partid_serialno)``
**Params:**
**Returns:**
Miscellaneous
~~~~~~~~~~~~~
HackRF Error Name
^^^^^^^^^^^^^^^^^
**Syntax:** ``const char* hackrf_error_name(enum hackrf_error errcode)``
**Params:**
**Returns:**
HackRF Board ID Name
^^^^^^^^^^^^^^^^^^^^
**Syntax:** ``const char* hackrf_board_id_name(enum hackrf_board_id board_id)``
**Params:**
**Returns:**
HackRF USB Board ID Name
^^^^^^^^^^^^^^^^^^^^^^^^
**Syntax:** ``const char* hackrf_usb_board_id_name(enum hackrf_usb_board_id usb_board_id)``
**Params:**
**Returns:**
HackRF Filter Path Name
^^^^^^^^^^^^^^^^^^^^^^^
**Syntax:** ``const char* hackrf_filter_path_name(const enum rf_path_filter path)``
**Params:**
**Returns:**
Data Structures
~~~~~~~~~~~~~~~
``typedef struct hackrf_device hackrf_device``
.. code-block :: sh
typedef struct {
hackrf_device* device;
uint8_t* buffer;
int buffer_length;
int valid_length;
void* rx_ctx;
void* tx_ctx;
} hackrf_transfer;
.. code-block :: sh
typedef struct {
uint32_t part_id[2];
uint32_t serial_no[4];
} read_partid_serialno_t;
.. code-block :: sh
typedef struct {
char **serial_numbers;
enum hackrf_usb_board_id *usb_board_ids;
int *usb_device_index;
int devicecount;
void **usb_devices;
int usb_devicecount;
} hackrf_device_list_t;
``typedef int (*hackrf_sample_block_cb_fn)(hackrf_transfer* transfer)``
Enumerations
~~~~~~~~~~~~
Supported board versions
^^^^^^^^^^^^^^^^^^^^^^^^
These values identify the board type of the connected hardware. This value can be used as an indicator of capabilities, such as frequency range, bandwidth or antenna port power.
.. list-table ::
:header-rows: 1
:widths: 1 1 1 1
* - Board
- Frequency range
- Bandwidth
- Antenna port power
* - HackRF One
- 1MHz - 6Ghz
- 20MHz
- Yes
* - Jawbreaker
- 10MHz - 6GHz
- 20MHz
- No
* - Rad1o
- 50MHz - 4GHz
- 20MHz
- Unknown
* - Jellybean
- N/A
- 20MHz
- No
Most boards will identify as HackRF One, Jawbreaker or Rad1o. Jellybean was a pre-production revision of HackRF. No hardware device should intentionally report itself with an invalid board ID.
.. code-block :: sh
enum hackrf_board_id {
BOARD_ID_JELLYBEAN = 0,
BOARD_ID_JAWBREAKER = 1,
BOARD_ID_HACKRF_ONE = 2,
BOARD_ID_RAD1O = 3,
BOARD_ID_INVALID = 0xFF,
};
USB Product IDs
^^^^^^^^^^^^^^^
.. code-block :: sh
enum hackrf_usb_board_id {
USB_BOARD_ID_JAWBREAKER = 0x604B,
USB_BOARD_ID_HACKRF_ONE = 0x6089,
USB_BOARD_ID_RAD1O = 0xCC15,
USB_BOARD_ID_INVALID = 0xFFFF,
};
Transceiver Mode
^^^^^^^^^^^^^^^^
HackRF can operate in three main transceiver modes, Receive, Transmit and Signal Source. There is also a CPLD update mode which is used to write firmware images to the CPLD.
The transceiver mode can be changed with ``hackrf_set_transceiver_mode`` with the value parameter set to one of the following:
.. code-block:: sh
enum transceiver_mode_t {
TRANSCEIVER_MODE_OFF = 0,
TRANSCEIVER_MODE_RX = 1,
TRANSCEIVER_MODE_TX = 2,
TRANSCEIVER_MODE_SS = 3,
TRANSCEIVER_MODE_CPLD_UPDATE = 4
};
Receive mode (TRANSCEIVER_MODE_RX) is used to stream samples from the radio to the host system. Use ``hackrf_set_freq`` to set the center frequency of receiver and ``hackrf_set_sample_rate`` to set the sample rate (effective bandwidth).
Transmit mode (TRANSCEIVER_MODE_TX) is used to stream samples from the host to the radio.
See `hackrf_transfer <https://github.com/mossmann/hackrf/blob/master/host/hackrf-tools/src/hackrf_transfer.c>`__ for an example of setting transmit and receive mode and transferring data over USB.
Function return values
^^^^^^^^^^^^^^^^^^^^^^
.. code-block::sh
enum hackrf_error {
HACKRF_SUCCESS = 0,
HACKRF_TRUE = 1,
HACKRF_ERROR_INVALID_PARAM = -2,
HACKRF_ERROR_NOT_FOUND = -5,
HACKRF_ERROR_BUSY = -6,
HACKRF_ERROR_NO_MEM = -11,
HACKRF_ERROR_LIBUSB = -1000,
HACKRF_ERROR_THREAD = -1001,
HACKRF_ERROR_STREAMING_THREAD_ERR = -1002,
HACKRF_ERROR_STREAMING_STOPPED = -1003,
HACKRF_ERROR_STREAMING_EXIT_CALLED = -1004,
HACKRF_ERROR_OTHER = -9999,
};
RF Filter Path
^^^^^^^^^^^^^^
.. code-block:: sh
enum rf_path_filter {
RF_PATH_FILTER_BYPASS = 0,
RF_PATH_FILTER_LOW_PASS = 1,
RF_PATH_FILTER_HIGH_PASS = 2,
};

View file

@ -1,33 +1,55 @@
================================================
List of Hardware Revisions
Hardware Revisions
================================================
Hardware revisions exist mainly to deal with changes in component availability. Each revision of a product meets the same performance specifications that are measured in the factory.
HackRF Pro
~~~~~~~~~~
The initial production revision of HackRF Pro is r1.2.1.
HackRF One
~~~~~~~~~~
HackRF One r1r4
~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^
The first revision of HackRF One shipped by Great Scott Gadgets starting in 2014 was labeled r1. Subsequent manufacturing runs incremented the revision number up to r4 without modification to the hardware design. Manufacturing years: 20142020
HackRF One r5
~~~~~~~~~~~~~
^^^^^^^^^^^^^
This experimental revision has not been manufactured.
HackRF One r6
~~~~~~~~~~~~~
^^^^^^^^^^^^^
SKY13350 RF switches were replaced by SKY13453 due to component availability. Although the SKY13453 uses simplified control logic, it did not require a firmware modification. Manufacturing year: 2020
SKY13350 RF switches were replaced by SKY13453. Although the SKY13453 uses simplified control logic, it did not require a firmware modification. Hardware revision detection pin straps were added. Manufacturing year: 2020
HackRF One r7
~~~~~~~~~~~~~
^^^^^^^^^^^^^
SKY13453 RF switches were reverted to SKY13350 due to component availability. USB VBUS detection resistor values were changed to better protect the LPC4320. Manufacturing year: 2021
SKY13453 RF switches were reverted to SKY13350. USB VBUS detection resistor values were updated. Manufacturing year: 2021
HackRF One r8
~~~~~~~~~~~~~
^^^^^^^^^^^^^
SKY13350 RF switches were replaced by SKY13453 due to component availability. Manufacturing years: 20212022
SKY13350 RF switches were replaced by SKY13453. Manufacturing years: 20212022
HackRF One r9
^^^^^^^^^^^^^
MAX2837 was replaced by MAX2839. Si5351C was replaced by Si5351A with additional clock distribution. A series diode was added to the antenna port power supply. Manufacturing year: 2023
HackRF One r10
^^^^^^^^^^^^^^
This revision is based on r8, reverting most of the changes made in r9. A series diode was added to the antenna port power supply. Manufacturing year: 2024
Hardware Revision Identification
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HackRF Ones manufactured by Great Scott Gadgets have the revision number printed on the PCB top silkscreen layer near the MAX5864 (U18).
Starting with HackRF One r6, hardware revisions are detected by firmware and reported by ``hackrf_info``.

Some files were not shown because too many files have changed in this diff Show more