gullradriel abadf35e06 Lna investigations and fix (#3240)
* The LNA gain field 'L' lives in LPF_VGA_2 (reg 6), not RXRF_2 (reg 2). RXRF_2 only holds LNAgain_SPI_EN. The configure_rx_gain() function wrote 'L' into lpf_vga_2 but marked RXRF_2 dirty => the LNA value only got flushed incidentally because the following VGA write marks LPF_VGA_2 dirty. Drop the stray RXRF_2 dirty flag and rely on the LPF_VGA_2 flag, which carries both L and VGA.

* The baseband build defined IS_H1_R9 as the compile-time constant 0, on the (now incorrect) assumption that detected_platform() isn't linked. The sd_over_usb image is the only baseband target that compiles the IS_H1_R9-gated upstream files (rf_path.c, si5351c.c, sgpio.c, platform_gpio.c, platform_scu.c), and it *does* link platform_detect.c and call detect_hardware_platform() at startup. Forcing IS_H1_R9=0 dead-stripped every 'if (IS_H1_R9)' branch, so a real HackRF One r9 was set up with the OG clock/GPIO/RF-path config in that image.
Define IS_H1_R9 as the runtime '(detected_platform()==BOARD_ID_HACKRF1_R9)', mirroring upstream platform-detect.cmake for HACKRF_ONE. All usages are '#ifdef IS_H1_R9' + 'if (IS_H1_R9)' (no arithmetic '#if'), so a function-call expression is safe, single-quoted -D with no internal spaces keeps it intact through the shell-split DDEFS blob.

---------

Co-authored-by: gullradriel <gullradriel@users.noreply.github.com>
2026-07-01 08:47:07 +02:00
2026-01-04 09:25:45 +01:00
2026-01-22 15:26:31 +01:00
2024-12-31 11:27:38 +01:00
2024-12-05 12:31:45 +01:00
2026-06-12 16:52:13 +08:00
2025-03-26 12:09:51 +01:00
2025-03-26 19:53:41 +08:00
2023-02-19 08:35:19 +01:00
2023-02-19 08:35:19 +01:00
2023-03-27 16:22:20 +02:00
2023-03-27 16:22:20 +02:00
2026-02-20 14:49:35 +01:00
2021-11-17 12:15:52 +01:00
2023-05-22 21:14:35 +12:00
2026-06-13 09:50:25 +08:00
2026-06-12 16:52:13 +08:00
2026-03-28 18:14:22 +01:00

PortaPack Mayhem

Nightly Release CodeScene Code Health GitHub All Releases GitHub Releases Docker Hub Pulls Discord Chat

This is a fork of the Havoc firmware, which itself was a fork of the PortaPack firmware, an add-on for the HackRF. A fork is a derivate, in this case one that has extra features and fixes when compared to the older versions.

What is this?

If you are new to HackRF+PortaPack+Mayhem, check these:

HackRF Pro Quick Look

PortaPack H4M Crash Course The Latest HackRF & Portapak Combo - H4M The Flipper Zero Killer? It’s TOO Easy to Accidentally Do Illegal Stuff with This HackRF Portapack H4M - Getting Started Guide

Frequently Asked Questions

This repository expands upon the previous work by many people and aims to constantly add new features, bugfixes and generate documentation to make further development easier. Collaboration is always welcomed and appreciated.

What to buy?

✔️ Static Badge The fabulous H4M complete or upgrade, featuring numerous improvements and accessories. Sold by our friends at OpenSourceSDRLab. Join their giveaways on discord (check the badge on top). EU customers can purchase via Lab401.

✔️ A recommended one is this PortaPack H2, that includes everything you need with the plastic case "inspired" on this.

✔️ Some individuals lean towards the H2 with a metal enclosure, but its advantages remain debated. Share your insights on our wiki.

⚠️ Be cautious , ask the seller about compatibility with the latest releases. Look out for the description of the item, if they provide the firmware files for an older version or they have custom setup instructions, this means it might be NOT compatible, for example:

image

⚠️ If it looks too different, this might mean that they are using their own recipe, check the different models in our wiki. For example all the H3 and clones of that version use their own version of the firmware. They do not contribute the changes back and eventually you will be left with a device that nobody maintains:

image

Where is the latest version?

The current stable release is on the GitHub release (latest by date) page. Follow the instructions you can find in the release description. The latest (nightly) release can be found here.

How can I collaborate

We warmly welcome your contributions! Please refer to our Contributing Guidelines for details.

You can write documentation, fix bugs and answer issues or add new functionality. Please also check the following guide with details.

Consider that the hardware and firmware has been created and maintain by a lot of people, so always try collaborating your time and effort first. For coding related questions, if something does not fit as an issue, please join our Discord by clicking the chat badge on top.

Contributors

To support the people behind the hardware, please buy a genuine HackRF and PortaPack.

What if I really want something specific?

If what you need can be relevant in general, you can request a feature. Alternatively, go to our Discord by clicking the chat badge on top and discuss there.

What if I need help?

First, check the documentation. If you find a bug or you think the problem is related to the current repository, please open an issue.

You can reach the official community in Facebook, and our Discord by clicking the chat badge on top.

S
Description
Languages
C 72%
C++ 19.5%
Makefile 2.6%
HTML 1.6%
Assembly 1.1%
Other 3%