* Add KISS TNC external app for APRS RX/TX over USB serial
Adds a KISS TNC (Terminal Node Controller) app that bridges APRS
packets between the HackRF radio and a connected PC over USB CDC
serial using the KISS protocol.
Features:
- APRS receive at 144.390 MHz (configurable), decoding packets via
the existing APRS RX baseband (PAPR.bin)
- Received AX.25 frames forwarded to host as KISS-framed data over
USB serial
- KISS frames received from host transmitted as AFSK audio using the
existing AFSK TX baseband (PAFT.bin)
- Clean RX->TX->RX baseband switching with proper timing delays
- USB connection status indicator with periodic refresh
- Compatible with standard KISS TNC clients (Xastir, APRSISCE/32,
Dire Wolf, etc.)
Firmware changes required to support the external app:
- baseband_api.cpp: mark set_aprs() __attribute__((used)) so it is
retained by the linker for external app use
- protocols/ax25: add make_frame_from_raw() to build NRZI bitstream
from raw AX.25 bytes, marked __attribute__((used))
- usb_serial_host_to_device: add kiss_raw_handler hook to route
incoming USB bytes directly to a registered callback, bypassing
the shell; marked __attribute__((used))
- baseband/proc_aprsrx: add constructor that auto-configures at
1200 baud so external apps do not need to call set_aprs() at init
* Address PR review: generic RAII USB handler, fix TX cutoff and buffer overflow
- Replace KISS-specific set_kiss_raw_handler() in shared USB code with a
generic UsbSerialInputHandler RAII class; any app can now register a
handler via the ctor and it auto-clears in the dtor — no app-specific
'if' checks in shared code, no __attribute__((used)) needed
- Remove __attribute__((used)) from set_aprs() — it is referenced directly
by ui_aprs_rx.cpp so it will never be dead-stripped
- Fix send_kiss_frame() buffer overflow: per-byte bounds check prevents
2-byte escape sequences from writing past the end of the output buffer
- Replace fillOBuffer(TIME_INFINITE) with chOQWriteTimeout(TIME_IMMEDIATE)
to drop bytes instead of blocking the event loop
- Remove chThdSleepMilliseconds() calls from start_tx() and finish_tx()
- Fix TX cutoff bug: call start_tx() directly from process_kiss_frame()
instead of deferring via tx_pending_ flag (deferral caused kiss_idx_
to be 0 by the time start_tx() fired, producing an empty frame)
* Move USB write into UsbSerialInputHandler class
Add a write() method to UsbSerialInputHandler so all USB I/O
(both input callback and output) is encapsulated in the class.
KISS TNC now uses usb_input_handler_->write() instead of calling
chOQWriteTimeout(&SUSBD1.oqueue, ...) directly, keeping raw USB
details out of app code.
* Address PR review: remove auto-configure from APRSRxProcessor, add timeout param to write()
- Remove default_config from APRSRxProcessor() constructor; baseband should
start unconfigured and wait for APRSRxConfigureMessage from the app side
(already sent via baseband::set_aprs() in KISS TNC and APRS RX app)
- Remove stray #include "stdio.h" from proc_aprsrx.cpp
- Add systime_t timeout parameter with default TIME_IMMEDIATE to
UsbSerialInputHandler::write() so callers can choose blocking behaviour
* Add TPMS transmit application with editable fields and update linker script
* Fix formatting in application information structure for TPMS TX
* Implement TPMS recent entry detail view and enhance TPMS TX encoding logic
* Refactor TPMS TX UI layout and streamline packet display updates
* Fix formatting by removing unnecessary blank line in TPMSTXView constructor
* Enhance TPMS transmission logic with signal type handling and update UI components
* Add advanced mode toggle and auto-select signal type based on packet type
* Enhance packet display and encoding logic with protocol-specific notes for temperature and ID handling
* Implement baseband switching logic for TPMS transmission based on signal type
* Implement application-level FSK repeat handling and initialize repeat counter
* Add FSK termination function and improve transmission handling
* Remove unused kill_fsk function and clean up whitespace in TPMS transmission logic
* Add pressure and temperature unit conversion functionality in TPMSTXView
* Add temperature and function field visibility handling in TPMSTXView
* Add signal type handling and improve data loading in TPMSTXView
* Fix formatting of pressure unit string in TPMSRecentEntryDetailView
* Add pressure overflow checks and enhance transponder ID handling in TPMSTXView
* Update application information and change icon color to green in TPMS TX
* Update desired menu position for TPMS TX application
* Initial commit and pr for HackRF Pro (praline) arch-port to mayhem-firmware. Please see https://github.com/portapack-mayhem/mayhem-firmware/issues/2957. Added flash specifics for -DBOARD=PRALINE. This firmware only builds with toolchain v9.2.1 if hackrf codebase has -B arm in firmware/hackrf_usb/CMakeLists.txt.
* Updated CMakeLists.txt per coordination with @HtoToo. For -DBOARD=PRALINE FLASH_MB_SIZE and FLASH_MB_LIMIT_SIZE are now 4. Removed praline specific variable for FLASH limits.
* Updated chibios-portapack's board.cpp to support initialization of the HachRF-Pro (praline) FPGA. Added append_fpga_bitstream.py tool to ensure that praline_fgpa.bin bitstream can be appended to -DBOARD=PRALINE produced firmware. In order to ensure successful execution of append_fpga_bitstream.py to append the fpga bitstream we should expect that the bistsream will be located at 0x180000 in flash. This requires that FLASH_MB_LIMIT_SIZE must be 1.5, and FLASH_BYTES_LIMIT_SIZE must be 1535 * 1024. If we want to allow more or less space for the base firmware image sans the fpga bitstream the location of the bistream must be moved to a location other than 0x180000.
* Updated location of praline_fpga.bin bitstream to 0x380000 to allow more room for firmware. Firmware now has 3.5MB, or 2MB more available than before as coordinated with @HTotoo.
* Expanded #ifndef PRALINE to include og and r9 gpio and pin setup as coordinated with @HTotoo.
* Added note for PRALINE FLASH_MB_LIMIT_SIZE and FLASH_BYTES_LIMIT_SIZE to explain why we are using the 3.5 and 3584 values respectively as coordinated with @HTotoo.
* Next round of modifications derived heavily, if not entirely from work done by @banandana at https://github.com/Banandana/mayhem-firmware. This commit should power on the HackRF Pro (praline) display, power on the fpga, and enable gpio, and provide debug utilties. There is still a lot of work to be done to fully enable the new praline board with this build and firmware architectural porting effort. However, hackrf-one boards do not seem to be adversely impacted by the #ifdef PRALINE statements, and CMakeLists updates, as far as I have been able to test.
* Ran format-code.sh. Updates for this commit are only due to formatting. Tested builds and they seem to work as exptected.
* Addressed fixes in firmware/application and firmware/baseband. Stream now flows to capture and looking glass. Issues were related to thread management. Issues were originally addressed by @banandana.
* Ran format-code.sh to allow for consistency with autoamted clang checks.
* Update hackrf ref repo to mayhem-portapack-hackrf next from https://github.com/portapack-mayhem/hackrf
* Addressed format edits necessary to pass clang-format check.
* Starting addressing Si5351 Clocks for radio sampling. These updates correctly set the Si5351 clock at start up. There appears to be an issue during runtime when testing with RX Test Init, Capture and Looking glass.
* Updated clock_manager.cpp to restore correct function introduced by @banandana when testing with Rx Test Init.
* Switched to using decimation for setting the sample rate without changing the Si5351 clock. This assumes that for the praline board Si5351 CLK0 runs at fixed 8 MHz (constant) and the FPGA decimates to get the desired sample rate. For example, for a 1 MHz sample rate -> Si5351 outputs 8 MHz, FPGA decimates by 8. There is still more work needed here, and potential verification that this is the correct way to operate with this new archteitecture.
* After deliberating on hackrf_usb hackrf_core.c and radio.c, and reviewing firmware/application/hw/si5351.cpp the original approach of using the aproach detailed in hackrf_core.c sample_rate_frac_set() lines 580-582, via the implementation in firmware/application/hw/si5351.cpp seems like the best place to continue testing efforts.
* Tested at ~2.4GHz (2.3 - 2.5) with lookgin glass and was able to receive signals. Added a Signal Path debug app to test gains, and readio mode (receive/transmit).
* Added two debug apps for the RFFC507x. Status View and Tuning View. This helped debug some of the potential issues with tuning.
* update submodule
* format code
* Small touch up merging latest next and ensuring build for HackRF One.
* Reverted edits to re: firmware/baseband/sd_over_usb/scsi.c and firmware/application/portapack.cpp. Source now builds, had to pull latest hackrf submodule.
* Skipped detect hardware for praline board to avoid backscreen in HackRF Pro praline board.
---------
Co-authored-by: gullradriel <gullradriel@users.noreply.github.com>
* Implementation of EPIRB receiver
* Baseband processing of EPIRB signal
* UI to ddecode and display EPIRB message with display on a map
* External application
* External proc element
* Delete CLAUDE.md
* add macaddress db, add vendor name in bluetooth rx app
* show "missing macaddress.db" instead of unknown if db not found
* bluetooth rx list with colors based on mac vendor
* bug fix
* Fix ext notice position ( No need to alter the position of the ext app notice, as there is no back button on the home screen )
* add desired position to external apps
* read and store desired location
* apply ext apps desired order
* fix memory alignment in application_information_t
* Generator for updating the about-page in PP from github.
* Rename generate_ui-about-simple.ccp.py to generate_ui-about-simple.cpp.py
* Adapt changes from "fixed memory usage #2380" to the file generator.
* Generator for updating the about-page in PP from github.
* Fixing typo
* Rename generate_ui-about-simple.ccp.py to generate_ui-about-simple.cpp.py
Rename file, fix typo
* Combined the converter from <ico>.png to bitmap.hpp and reverse in one script: pp_png2hpp.py
* Minor change ficed variables from testing.
* Cleanup output for parser. Add description to readme.md
* Update pp_png2hpp.py
Added the suggested and much cleaner argparse code from zxkmm.
Added a icon-name handling, to convert one or a comma seperated subset of icons by name.
* Update pp_bitmap_parser.py
Updated the handler with dynamic in/outputs, in parallel to the pp_png2hpp.py script ... But I think I'll delete this one, after I decide how to handle the alpha (transparent) code.
This pull requests adds a new type of external app to the firmware: The standalone app.
Pros:
Will work after an upgrade.
Size of image is only limited by shared heap size of M0 (application) (64kb total).
Cons:
No full access to all functions in the main firmware. One well defined (and versioned) API handles all communication.
The Pacman app was converted to be the first the the new kind.
* temp
* temp - 1
* next step note
* fix circuit dependency (to fix:can't read p.mem)
* fix circuit dependency (to fix:can't read p.mem)
* notes
* bitmap
* bitmap
* remove my stupid forward declearation
* clean up
* clean up
* level control
* clean up
* clean up
* clean up
* clean up
* format
* format
* format
* format
* format
* fix for comment advices
* fix for comment advices
* fix display issue in notepad app
* slightly increase performance...
* temp for grey_scale and high_constrast
* format
* note for cache implement
* fix for comment request
* fix for comment request
* Pad image to 1MB and add simple checksum
* Test code to verify firmware checksum
* Comment out unneeded zlib
* Add files via upload
* Print space remaining in ROM
* Append checksum to external apps too
* Check external app checksums when loading
* Is it 2024 already?!
* Validate firmware checksum before flashing
* Add files via upload
* Added flash error warning to nav screen
* Clang
* Replaced some hard-coded values with #defines
* Check FW checksum before USB serial flash too
* Add files via upload
Create entrypoint to orchestrate the build steps
Supported commands: make, ninja
Passes additional arguments to the make / ninja command at the end (like -jNN)
There is a shortcut to make -jNN by just specifying -jNN
Anything else will be directly executed (like getting a shell into the container with bash -li is still possible)