Compare commits

...

4 Commits

Author SHA1 Message Date
jLynx e40cb616da
Merge c52c48090a into a3b71d0e3d 2024-05-05 09:56:35 +02:00
Erwin Ried a3b71d0e3d
Changing all links to grabify (#2139)
Note: If you are worried about grabify, one of our Mayhem maestros cooked up Grabify. Just using general stats to spruce up layout and discussions.
2024-05-05 09:54:25 +02:00
jLynx c52c48090a Updated labels 2024-04-26 20:15:57 +12:00
jLynx fd0124ac48 WIP getting name from board 2024-04-26 20:14:07 +12:00
2 changed files with 45 additions and 4 deletions

View File

@ -10,7 +10,7 @@ This is a fork of the [Havoc](https://github.com/furrtek/portapack-havoc/) firmw
[<img src="https://raw.githubusercontent.com/wiki/portapack-mayhem/mayhem-firmware/img/hw_overview_h2_front.png" height="400">](https://github.com/portapack-mayhem/mayhem-firmware/wiki/Hardware-overview) [<img src="https://raw.githubusercontent.com/wiki/portapack-mayhem/mayhem-firmware/img/hw_overview_h2_inside.png" height="400">](https://github.com/portapack-mayhem/mayhem-firmware/wiki/Hardware-overview#portapack-internals)
*[PortaPack H2+HackRF+battery](https://s.click.aliexpress.com/e/_DmU7GQX) (clone) with a custom [3d printed case](https://github.com/portapack-mayhem/mayhem-firmware/wiki/H2-Enclosure)*
*[PortaPack H2+HackRF+battery](https://grabify.link/7T28JP) (clone) with a custom [3d printed case](https://github.com/portapack-mayhem/mayhem-firmware/wiki/H2-Enclosure)*
# What is this?
@ -26,9 +26,11 @@ This repository expands upon the previous work by many people and aims to consta
## What to buy?
:heavy_check_mark: A recommended one is this [PortaPack H2](https://s.click.aliexpress.com/e/_DmU7GQX), that includes everything you need with the plastic case "inspired" on [this](https://github.com/portapack-mayhem/mayhem-firmware/wiki/H2-Enclosure).
:heavy_check_mark: A recommended one is this [PortaPack H2](https://grabify.link/7T28JP), that includes everything you need with the plastic case "inspired" on [this](https://github.com/portapack-mayhem/mayhem-firmware/wiki/H2-Enclosure).
:heavy_check_mark: Our friends at OpenSourceSDRLab give away five units every three months in our discord (check the badge on top) of their [PortaPack H2](https://www.aliexpress.com/item/4000247041639.html?gatewayAdapt=4itemAdapt), you can support them too by ordering.
:heavy_check_mark: Some individuals lean towards the [H2 with a metal enclosure](https://grabify.link/HTDXG5), but its advantages remain debated. Share your insights on our [wiki](https://github.com/portapack-mayhem/mayhem-firmware/wiki/Hardware-overview).
:heavy_check_mark: Our friends at OpenSourceSDRLab give away five units every three months in our discord (check the badge on top) of their [PortaPack H2](https://grabify.link/LG0OUY), you can support them too by ordering.
:warning: 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:

View File

@ -32,6 +32,8 @@
#include "chprintf.h"
#include "portapack.hpp"
#include "platform_detect.h"
/**
* @brief Shell termination event source.
*/
@ -65,6 +67,39 @@ static void list_commands(BaseSequentialStream* chp, const ShellCommand* scp) {
}
}
static const char* get_board_revision_string(board_rev_t rev) {
switch (rev) {
case BOARD_REV_HACKRF1_OLD:
return "HackRF R1-R5";
case BOARD_REV_HACKRF1_R6:
return "HackRF R6";
case BOARD_REV_HACKRF1_R7:
return "HackRF R7";
case BOARD_REV_HACKRF1_R8:
return "HackRF R8";
case BOARD_REV_HACKRF1_R9:
return "HackRF R9";
case BOARD_REV_HACKRF1_R10:
return "HackRF R10";
case BOARD_REV_GSG_HACKRF1_R6:
return "GSG HackRF R6";
case BOARD_REV_GSG_HACKRF1_R7:
return "GSG HackRF R7";
case BOARD_REV_GSG_HACKRF1_R8:
return "GSG HackRF R8";
case BOARD_REV_GSG_HACKRF1_R9:
return "GSG HackRF R9";
case BOARD_REV_GSG_HACKRF1_R10:
return "GSG HackRF R10";
case BOARD_REV_UNRECOGNIZED:
return "Unrecognized";
case BOARD_REV_UNDETECTED:
return "Undetected";
default:
return "Unknown";
}
}
static void cmd_info(BaseSequentialStream* chp, int argc, char* argv[]) {
(void)argv;
if (argc > 0) {
@ -92,7 +127,11 @@ static void cmd_info(BaseSequentialStream* chp, int argc, char* argv[]) {
#ifdef VERSION_STRING
chprintf(chp, "Mayhem Version: %s\r\n", VERSION_STRING);
#endif
chprintf(chp, "HackRF Board Rev: %s\r\n", hackrf_r9 ? "R9" : "R1-R8");
// Usage
board_rev_t revision = detected_revision();
const char* revision_string = get_board_revision_string(revision);
chprintf(chp, "HackRF Board Rev: %s\r\n", revision_string);
chprintf(chp, "Reference Source: %s\r\n", portapack::clock_manager.get_source().c_str());
chprintf(chp, "Reference Freq: %s\r\n", portapack::clock_manager.get_freq().c_str());
#ifdef __DATE__