Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,57 @@

All notable changes to QuickPRS will be documented in this file.

## [1.1.0] - 2026-10-27

### Fixed
- **Edits broke the file structure RPM reads.** A .PRS file is an MFC archive: every class and object is numbered as it is written, and every list starts with its count. Adding or removing a talkgroup, channel, set or system left every later class tag and the list counts stale, and MFC's loader, which RPM uses, rejects tags that name the wrong class. QuickPRS now reads a personality into a tree that keeps every byte and writes it back with tags and counts recomputed. All 36 RPM-saved test files re-serialize byte for byte. See [docs/prs-format.md](docs/prs-format.md).
- Saving refuses an edit that breaks a file's archive structure, and `validate` reports stale tags and counts; `repair` fixes files saved by QuickPRS 1.0.x
- `create` built a file whose system count, list counts and WAN object did not match its contents
- Conventional sets after a padded gap were missing from the GUI, CSV export and rebuilds (#1)
- A talkgroup ID of 65535 cut its talkgroup list short
- 800 MHz IDEN tables started at 851.00625 MHz in 12.5 kHz steps, which never lands on an 800 MHz channel; they now start at 851.0125 MHz, and TDMA templates use 12.5 kHz as RPM-saved files do
- Trunk channel TX and RX were reversed in the README, example INIs and CSV templates (RPM stores TX on the uplink, 806 MHz, and RX on the downlink, 851 MHz); validation now warns when a trunk set looks swapped
- `import-paste` paired every pasted frequency with itself
- `import-rr` and `auto-setup` sent the API key as the account password, so they could not log in
- 2 m repeater offsets were reversed (146.61-146.97 MHz outputs take -600 kHz, 147.00-147.39 MHz take +600 kHz)
- Interop template: VTAC11-14 were on the wrong frequencies, UTAC44 does not exist, the 800 MHz channels were on their pre-rebanding frequencies, repeater channels were simplex, and the 700 MHz P25 channels were analog. It now follows the NIFOG: 23 channels with repeater pairs and direct channels, all 800 MHz channels wide (20 kHz, 47 CFR 90.209), 700 MHz left to a P25 conventional set
- The built-in P25 system list's IDs were never verified (the FCC does not publish System IDs or WACNs). PSERN is corrected to 939 and marked verified; the CLI and GUI warn before an unverified system is added
- `create` silently replaced an existing file (it now needs `--force` and keeps a `.bak`), and `import-json` overwrote the .PRS its JSON came from
- `cleanup` reported every trunk and talkgroup set as unused
- Backups of `radio_v2.PRS` were listed, restored and pruned as backups of `radio.PRS`
- `fleet`: unit names could write outside the output folder, duplicate names overwrote each other, short CSV rows crashed, and unit IDs were not checked against 24 bits
- `build` ignored the `[options]` section. Options are now checked like `set-option` (an unknown attribute or a value the radio does not allow is an error), and the lists `export-config` writes for programmable buttons, microphones and the short menu build back into those elements
- The wizard saved the time zone to an attribute the radio does not have; it now sets the radio's time zone and asks again for one RPM does not list
- `clone-personality --name/--unit-id` changed nothing the radio uses
- `set-option` accepted misspelt attributes and values a field does not allow, and wrote nested settings on the parent element; the default options XML is now RPM's own; presets and profiles no longer set attributes the XG-100P does not have
- GUI: crashed on start; the Import Wizard failed every non-talkgroup import; the System Wizard reported failure on success and could add a system twice; undo history carried over to the next file; opening a recent file did not ask about unsaved changes; Delete, F2 and undo acted on the tree while typing; multi-select edits touched talkgroups that were not selected; Health Check crashed; dropped paths were not read as Unicode
- `search` skipped unreadable files without saying so; listings print 6.25 kHz channels with 5 decimals

### Added
- `quickprs radio`: groundwork for reading the radio over Bluetooth. The XG-100P uses Bluetooth Classic (serial port profile), which RPM programs over like the USB cable. `scan` finds paired radios and their COM ports, `probe` listens, `relay` sits between RPM and the radio and logs both directions, and `analyze` summarises a capture and extracts any personality in it. None of them sends bytes of its own to the radio. See [docs/bluetooth.md](docs/bluetooth.md).
- P25 conventional sets: CSV export, CSV import and creation
- `quickprs import-csv`, which detects each CSV's type, so `export-csv` output imports directly
- RadioReference login from `--password` or the `QUICKPRS_RR_*` environment variables, with a hidden password prompt
- `radio` optional dependencies (pyserial, bleak); the standalone EXE includes pyserial

### Changed
- CLI writes back up an existing output file, not only the input
- The EXE build collects every quickprs module instead of a hand-kept list

### Also in this release (prepared as 1.0.3, never released)

#### Added
- README: Dedicated RadioReference integration section with auto-setup, paste import, and GUI wizard documentation
- README: Updated Quick Start to lead with RadioReference one-command workflow

#### Fixed
- Section replacement functions now validate section indices before writing, preventing silent data corruption if expected sections are missing
- Added empty set guards to prevent IndexError when trunk, group, or conv sets are unexpectedly empty
- NOAA weather channels now correctly set as receive-only (TX disabled)
- Interop template docstring corrected to document 156.7 Hz PL tone usage and accurate frequency ranges
- `make_conv_channel()` and `make_conv_set()` now support `tx` and `scan` flags from template data
- Updated test count to 5,300+ in README

## [1.0.2] - 2026-03-15

### Added
Expand Down
8 changes: 6 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ Note: Test PRS data files are not included in this repository (gitignored). Test
## Project Structure

- `quickprs/` -- Main package (parser, writer, CLI, GUI, validation, etc.)
- `tests/` -- Test suite (26 test files, 3,265+ tests)
- `archive.py` -- The .PRS document model: reads the MFC archive, checks it, and writes it back with class tags and list counts recomputed ([format notes](docs/prs-format.md))
- `radio/` -- Bluetooth and serial tools for talking to the radio ([notes](docs/bluetooth.md))
- `docs/` -- Format and Bluetooth notes
- `tests/` -- Test suite (pytest)
- `dist/` -- Built executable (gitignored)
- `local/` -- Developer scratch files (gitignored)

Expand All @@ -51,5 +54,6 @@ Note: Test PRS data files are not included in this repository (gitignored). Test
## Code Style

- Follow existing code conventions (PEP 8, type hints where practical)
- Add tests for new features
- Add tests for new features, and check that a new test fails when the fix it covers is undone
- Change personalities through `archive.Document` (or the injector helpers built on it) rather than by splicing bytes, so class tags and list counts stay right
- Keep CLI help text clear and include usage examples
126 changes: 100 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,71 @@ Generate and edit Harris XG-100P personality (.PRS) files without Harris RPM sof

> **STATUS: In Development.** This tool is under active development. While the binary format has been extensively reverse-engineered and tested against known-good RPM files, it has NOT been exhaustively tested on all XG-100P hardware revisions and firmware versions. Test on non-critical equipment first.

> **IMPORTANT: This tool does NOT load mission plans onto radios.** QuickPRS generates and edits .PRS personality files. To actually load a personality onto an XG-100P radio, you still need Harris RPM software (for now). QuickPRS replaces the personality *creation and editing* workflow, not the radio flashing process.
> **IMPORTANT: This tool does NOT load mission plans onto radios.** QuickPRS generates and edits .PRS personality files. To actually load a personality onto an XG-100P radio, you still need Harris RPM software (for now). The `quickprs radio` commands are groundwork for reading radios directly over Bluetooth: they find the radio and record RPM's sessions with it, and never send bytes of their own (see [docs/bluetooth.md](docs/bluetooth.md)).

## RadioReference Integration

QuickPRS can pull P25 trunked system data directly from [RadioReference.com](https://www.radioreference.com/) and automatically build a complete radio personality — talkgroups, frequencies, IDEN tables, control channels, and WAN config — in a single command.

### One-Click Auto Setup (API)

With a RadioReference premium account and API key:

```bash
# Fetch a P25 system and build the entire personality automatically
quickprs create radio.PRS --name "PATROL"
quickprs auto-setup radio.PRS --sid 8155 --username YOUR_USER --apikey YOUR_KEY
quickprs validate radio.PRS
```

`auto-setup` and `import-rr` log in with your RadioReference username and password plus the API key. The password is asked for when you run them (or comes from `--password` or `QUICKPRS_RR_PASSWORD`; `QUICKPRS_RR_USER` and `QUICKPRS_RR_APIKEY` work for the other two).

This single `auto-setup` command:
1. Fetches the full system from RadioReference (talkgroups, sites, frequencies)
2. Creates the trunk frequency set with all site frequencies
3. Creates the talkgroup set with smart short name generation
4. Auto-detects and creates IDEN frequency parameters (base freq, spacing, bandwidth, FDMA/TDMA)
5. Builds Enhanced Control Channel (ECC) entries from site control channels
6. Configures the P25 trunked system with WACN, SysID, and WAN settings
7. Runs validation to catch any hardware limit issues

### Import by Pasting from the Website

No API key? Just copy talkgroup/frequency tables from RadioReference and paste them in:

```bash
# Paste the talkgroup table, the site/frequency table, or both
quickprs import-paste radio.PRS --name PSERN --sysid 939 --wacn 781824 \
--tgs-file tgs.txt --freqs-file freqs.txt
```

### GUI Import Wizard

The GUI includes a dedicated RadioReference import wizard (File > Import Wizard) that walks you through system selection, talkgroup filtering by category and service tag, and previews everything before injection.

### What Gets Imported

| Data | Source | Details |
|------|--------|---------|
| Talkgroups | Categories + service tags | ID, short name, description, mode, encryption status |
| Frequencies | All sites | TX/RX pairs with LCN mapping |
| IDEN Parameters | Channel identifiers | Base freq, spacing, bandwidth, FDMA/TDMA auto-detected |
| Control Channels | Site details | Enhanced CC entries with NAC and RFSS |
| System Config | System metadata | WACN, SysID, system type, WAN configuration |

## Features

- 100% binary format decoded (49 section types, 27 option sections, 514+ fields)
- Writes personalities the way RPM does: the .PRS is an MFC archive, and every save rebuilds its class tags and list counts ([format notes](docs/prs-format.md))
- Refuses to save an edit that breaks the archive structure; `repair` fixes files saved by QuickPRS 1.0.x
- Create PRS files from scratch or INI config files
- Import from RadioReference (SOAP API or paste from website)
- **RadioReference integration** — auto-setup P25 systems via SOAP API, web scraping, or paste
- Import from scanner formats (CHIRP, Uniden Sentinel, SDRTrunk)
- 45+ CLI commands for scripting and batch processing
- Full GUI with tree view, inline editing, drag-and-drop, RadioReference import
- P25 conventional channel sets (CSV export and import)
- 60+ CLI commands for scripting and batch processing
- Full GUI with tree view, inline editing, drag-and-drop, and RadioReference import wizard
- Built-in channel templates (MURS, GMRS, FRS, Marine, NOAA, Interop, Public Safety)
- Built-in P25 system database (30 major US systems)
- Built-in list of 28 US P25 systems as a starting point (IDs unverified except where marked: confirm them before programming)
- Bluetooth groundwork: find a paired radio and record RPM's sessions with it (`quickprs radio`)
- JSON export/import for human-editable radio configs
- Export to CHIRP CSV, Uniden CSV, SDRTrunk, DSD+, Markdown, INI
- Merge, clone, and compare PRS files
Expand All @@ -34,23 +87,32 @@ Generate and edit Harris XG-100P personality (.PRS) files without Harris RPM sof
- Comprehensive validation against XG-100P hardware limits
- File repair and data salvage for damaged PRS files
- Lossless binary roundtrip (parse and rewrite produces byte-identical output)
- 4,000+ automated tests
- 5,400+ automated tests

## Quick Start

### Build a radio config from an INI file:
### One-command P25 setup from RadioReference:

```bash
quickprs create radio.PRS --name "PATROL"
quickprs auto-setup radio.PRS --sid 8155 --username USER --apikey KEY
quickprs inject radio.PRS conv --template interop
quickprs validate radio.PRS
```

### Build from an INI config file:

```bash
quickprs build patrol.ini -o radio.PRS
quickprs set-option radio.PRS gps.gpsMode ON
quickprs validate radio.PRS
```

### Or use individual commands:
### Build step by step:

```bash
quickprs create radio.PRS --name "PATROL"
quickprs inject radio.PRS p25 --name PSERN --sysid 892 --freqs-csv freqs.csv --tgs-csv tgs.csv
quickprs inject radio.PRS p25 --name PSERN --sysid 939 --wacn 781824 --freqs-csv freqs.csv --tgs-csv tgs.csv
quickprs inject radio.PRS conv --template murs
quickprs inject radio.PRS conv --template noaa
quickprs inject radio.PRS conv --template interop
Expand Down Expand Up @@ -79,6 +141,8 @@ Or use the standalone EXE from [Releases](../../releases) (no Python required).
- `darkdetect` — Auto dark mode detection
- `windnd` — Drag-and-drop file support (Windows)
- `zeep` — RadioReference SOAP API access (requires premium subscription)
- `pyserial` — serial and Bluetooth ports for `quickprs radio`
- `bleak` — BLE device scan (`quickprs radio scan --ble`)

## CLI Commands

Expand Down Expand Up @@ -109,6 +173,10 @@ Or use the standalone EXE from [Releases](../../releases) (no Python required).
| `import-paste` | Import from pasted RadioReference text |
| `import-scanner` | Import from CHIRP, Uniden, or SDRTrunk CSV |
| `import-json` | Create a PRS from a JSON file |
| `import-csv` | Import talkgroup, trunk, conventional and P25 conventional sets from CSV (the `export-csv` format) |
| `convert` | Convert between PRS, JSON, INI, CSV, CHIRP and Markdown |
| `preset` | Apply named option presets (GPS, covert, quiet, etc.) |
| `favorites` | Bookmark systems, talkgroups, channels and templates |
| `systems` | Browse/search/add from built-in P25 system database |
| `template-csv` | Generate blank CSV/INI templates for data entry |
| `validate` | Validate PRS file against XG-100P hardware limits |
Expand Down Expand Up @@ -141,6 +209,10 @@ Or use the standalone EXE from [Releases](../../releases) (no Python required).
| `export-config` | Export PRS to editable INI config file |
| `watch` | File watcher with auto-validation on change |
| `cheat-sheet` | Quick reference of common CLI workflows |
| `radio` | Find a paired radio, listen to it, or log RPM talking to it ([docs](docs/bluetooth.md)) |
| `tutorial` | Interactive step-by-step CLI tutorial |
| `demo` | Build an example patrol radio from scratch, non-interactively |
| `about` | Project info and statistics |

## Config File Format

Expand All @@ -151,21 +223,24 @@ INI-style config files let you define an entire radio personality in one place:
name = PATROL.PRS
author = Dispatch

[system.PSERN]
; Example values: use your system's real IDs and frequencies.
[system.COUNTY]
type = p25_trunked
long_name = PSERN SEATTLE
system_id = 892
long_name = COUNTY P25
system_id = 100
wacn = 781824

[system.PSERN.frequencies]
851.0125,806.0125
851.5125,806.5125
852.0125,807.0125
[system.COUNTY.frequencies]
; tx_freq (radio transmit = site uplink), rx_freq (site downlink)
1 = 806.0125,851.0125
2 = 806.5125,851.5125
3 = 807.0125,852.0125

[system.PSERN.talkgroups]
1000,PD DISP,Police Dispatch
1001,PD TAC1,Police Tactical 1
2000,FD DISP,Fire Dispatch
[system.COUNTY.talkgroups]
; id, short_name, long_name
1 = 1000,PD DISP,Police Dispatch
2 = 1001,PD TAC1,Police Tactical 1
3 = 2000,FD DISP,Fire Dispatch

[channels.MURS]
template = murs
Expand All @@ -178,9 +253,8 @@ template = interop

[channels.LOCAL]
; short_name, tx_freq, rx_freq, tx_tone, rx_tone, long_name
RPT IN,147.000,147.600,100.0,100.0,Repeater Input
RPT OUT,147.600,147.600,,,Repeater Output
SIMPLEX,146.520,146.520,,,2m Calling
1 = RPT 147,147.600,147.000,100.0,100.0,147.00+ Repeater
2 = SIMPLEX,146.520,146.520,,,2m Calling

[options]
gps.gpsMode = ON
Expand All @@ -199,7 +273,7 @@ Build with: `quickprs build patrol.ini -o patrol.PRS`
| `frs` | 22 | Family Radio Service (462-467 MHz) |
| `marine` | 15 | Marine VHF (156-157 MHz) |
| `noaa` / `weather` | 7 | NOAA Weather Radio (162 MHz) |
| `interop` | 20 | National Interoperability (NPSPAC) |
| `interop` | 23 | National interoperability (NIFOG): VHF, UHF and 800 MHz calling and tactical channels |
| `public_safety` | 10 | Public Safety simplex frequencies |

Usage: `quickprs inject file.PRS conv --template murs`
Expand All @@ -221,7 +295,7 @@ Note: Test PRS data files are not included in this repository. Tests that requir
- This tool is an independent project and is NOT affiliated with, endorsed by, or supported by L3Harris Technologies, Harris Corporation, or any radio manufacturer
- XG-100P, RPM, and related trademarks belong to their respective owners
- Users are responsible for ensuring their radio configurations comply with all applicable FCC regulations and local laws
- The P25 system database contains publicly available information from FCC records
- The built-in P25 system list is a starting point only: its System IDs and WACNs are unverified unless marked, and a wrong one keeps a radio off the system

## License

Expand Down
Loading