pluto-siege 2.0.3__tar.gz → 2.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. pluto_siege-2.1.0/PKG-INFO +208 -0
  2. pluto_siege-2.1.0/README.md +186 -0
  3. {pluto_siege-2.0.3 → pluto_siege-2.1.0}/pluto_siege/__main__.py +1 -1
  4. pluto_siege-2.1.0/pluto_siege/cli.py +1407 -0
  5. {pluto_siege-2.0.3 → pluto_siege-2.1.0}/pluto_siege/config.py +139 -62
  6. {pluto_siege-2.0.3 → pluto_siege-2.1.0}/pluto_siege/constants.py +22 -11
  7. {pluto_siege-2.0.3 → pluto_siege-2.1.0}/pluto_siege/device.py +160 -19
  8. {pluto_siege-2.0.3 → pluto_siege-2.1.0}/pluto_siege/engine.py +313 -37
  9. {pluto_siege-2.0.3 → pluto_siege-2.1.0}/pluto_siege/gps.py +23 -1
  10. {pluto_siege-2.0.3 → pluto_siege-2.1.0}/pluto_siege/settings.py +0 -2
  11. {pluto_siege-2.0.3 → pluto_siege-2.1.0}/pluto_siege/sigmf.py +41 -26
  12. pluto_siege-2.1.0/pluto_siege/ui/screens/capture.py +311 -0
  13. {pluto_siege-2.0.3 → pluto_siege-2.1.0}/pluto_siege/ui/screens/loopback.py +5 -2
  14. {pluto_siege-2.0.3 → pluto_siege-2.1.0}/pluto_siege/ui/screens/main_menu.py +121 -51
  15. {pluto_siege-2.0.3 → pluto_siege-2.1.0}/pluto_siege/ui/screens/settings.py +259 -141
  16. {pluto_siege-2.0.3 → pluto_siege-2.1.0}/pluto_siege/ui/screens/transmit.py +62 -22
  17. {pluto_siege-2.0.3 → pluto_siege-2.1.0}/pluto_siege/ui/widgets/framework.py +130 -127
  18. pluto_siege-2.1.0/pluto_siege.egg-info/PKG-INFO +208 -0
  19. {pluto_siege-2.0.3 → pluto_siege-2.1.0}/pluto_siege.egg-info/SOURCES.txt +1 -0
  20. pluto_siege-2.1.0/pluto_siege.egg-info/entry_points.txt +2 -0
  21. {pluto_siege-2.0.3 → pluto_siege-2.1.0}/pyproject.toml +4 -4
  22. pluto_siege-2.1.0/tests/test_config.py +398 -0
  23. pluto_siege-2.1.0/tests/test_engine_and_ui.py +907 -0
  24. pluto_siege-2.1.0/tests/test_gps.py +214 -0
  25. {pluto_siege-2.0.3 → pluto_siege-2.1.0}/tests/test_sigmf.py +41 -5
  26. pluto_siege-2.0.3/PKG-INFO +0 -187
  27. pluto_siege-2.0.3/README.md +0 -165
  28. pluto_siege-2.0.3/pluto_siege/ui/screens/capture.py +0 -226
  29. pluto_siege-2.0.3/pluto_siege.egg-info/PKG-INFO +0 -187
  30. pluto_siege-2.0.3/pluto_siege.egg-info/entry_points.txt +0 -2
  31. pluto_siege-2.0.3/tests/test_config.py +0 -92
  32. pluto_siege-2.0.3/tests/test_engine_and_ui.py +0 -306
  33. pluto_siege-2.0.3/tests/test_gps.py +0 -102
  34. {pluto_siege-2.0.3 → pluto_siege-2.1.0}/LICENSE +0 -0
  35. {pluto_siege-2.0.3 → pluto_siege-2.1.0}/pluto_siege/__init__.py +0 -0
  36. {pluto_siege-2.0.3 → pluto_siege-2.1.0}/pluto_siege/dsp.py +0 -0
  37. {pluto_siege-2.0.3 → pluto_siege-2.1.0}/pluto_siege/sound.py +0 -0
  38. {pluto_siege-2.0.3 → pluto_siege-2.1.0}/pluto_siege/ui/__init__.py +0 -0
  39. {pluto_siege-2.0.3 → pluto_siege-2.1.0}/pluto_siege/ui/screens/__init__.py +0 -0
  40. {pluto_siege-2.0.3 → pluto_siege-2.1.0}/pluto_siege/ui/widgets/__init__.py +0 -0
  41. {pluto_siege-2.0.3 → pluto_siege-2.1.0}/pluto_siege.egg-info/dependency_links.txt +0 -0
  42. {pluto_siege-2.0.3 → pluto_siege-2.1.0}/pluto_siege.egg-info/requires.txt +0 -0
  43. {pluto_siege-2.0.3 → pluto_siege-2.1.0}/pluto_siege.egg-info/top_level.txt +0 -0
  44. {pluto_siege-2.0.3 → pluto_siege-2.1.0}/setup.cfg +0 -0
  45. {pluto_siege-2.0.3 → pluto_siege-2.1.0}/tests/test_dsp.py +0 -0
@@ -0,0 +1,208 @@
1
+ Metadata-Version: 2.4
2
+ Name: pluto_siege
3
+ Version: 2.1.0
4
+ Summary: PlutoSDR ISM-band RF capture and replay tool (433 MHz, 868 MHz, etc.).
5
+ Author: SketchTurnerDev
6
+ License-Expression: GPL-3.0-or-later
7
+ Project-URL: Homepage, https://github.com/SketchTurnerDev/pluto_siege
8
+ Project-URL: Repository, https://github.com/SketchTurnerDev/pluto_siege.git
9
+ Project-URL: Issues, https://github.com/SketchTurnerDev/pluto_siege/issues
10
+ Keywords: 433mhz,868mhz,adalm-pluto,ham-radio,ism-band,pentesting,pluto-sdr,pluto-siege,plutosdr,plutosiege,python,radio-frequency,red-team,rf-hacking,sdr,security-tools,sigmf,subghz,wireless,wireless-security
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Operating System :: POSIX :: Linux
13
+ Classifier: Environment :: Console :: Curses
14
+ Classifier: Topic :: Communications :: Ham Radio
15
+ Requires-Python: >=3.9
16
+ Description-Content-Type: text/markdown
17
+ License-File: LICENSE
18
+ Requires-Dist: pyadi-iio>=0.0.16
19
+ Requires-Dist: pylibiio<1.0
20
+ Requires-Dist: numpy>=1.20.0
21
+ Dynamic: license-file
22
+
23
+ <h1 align="center">PlutoSiege</h1>
24
+
25
+ <p align="center">
26
+ <strong>ISM-Band RF Capture & Replay Tool for PlutoSDR</strong>
27
+ </p>
28
+
29
+ <p align="center">
30
+ <a href="https://pypi.org/project/pluto-siege/"><img src="https://img.shields.io/pypi/v/pluto-siege?style=for-the-badge&logo=pypi&logoColor=white&color=blue" alt="PyPI"></a>
31
+ <img src="https://img.shields.io/badge/Python-3.9+-3776AB?style=for-the-badge&logo=python&logoColor=white" alt="Python">
32
+ <a href="https://github.com/SketchTurnerDev/pluto_siege/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-GPL--3.0-blueviolet.svg?style=for-the-badge" alt="License"></a>
33
+ <img src="https://img.shields.io/badge/Hardware-ADALM--Pluto-0099FF?style=for-the-badge" alt="Hardware">
34
+ <img src="https://img.shields.io/badge/Format-SigMF-orange?style=for-the-badge" alt="SigMF">
35
+ </p>
36
+
37
+ <p align="center">
38
+ <img src="https://raw.githubusercontent.com/SketchTurnerDev/pluto_siege/main/assets/screenshot.png" alt="PlutoSiege Screenshot" width="100%">
39
+ </p>
40
+
41
+ > **REGULATORY DISCLAIMER**
42
+ > RF transmission is regulated by local authorities. Replay only signals you own or are permitted to transmit, into a dummy load or at the lowest power required.
43
+
44
+ ## About
45
+
46
+ **PlutoSiege** is a terminal application (TUI) and command-line utility (CLI) for recording and replaying short ISM-band RF bursts (e.g. 433 MHz, 868 MHz) from car remotes, garage doors, doorbells, and wireless sensors.
47
+
48
+ Built for the **ADALM-Pluto (AD9363/AD9361)** SDR architecture, it saves recordings in standard **SigMF (Signal Metadata Format)** so they can be opened in other SDR tools like URH, IQEngine, GNU Radio, or Inspectrum.
49
+
50
+ ### Hardware Compatibility
51
+ Fully supports both official **Analog Devices ADALM-Pluto** hardware (Rev. B / Rev. C) and third-party clones/analogues based on the same AD9363/AD9361 transceivers (such as **Pluto Nano**, **Pluto Plus**, and other custom PlutoSDR boards).
52
+
53
+ ## Features
54
+
55
+ - **Single & Continuous Capture**: Capture single RF bursts or enable **Auto capture** (`--auto-capture true`) to loop continuously and save numbered multi-burst recordings with collision-safe filenames.
56
+ - **Level Metering**: Real-time dBFS level meter with saturation (`SAT!`) warning.
57
+ - **Threshold Detection**: Automated noise floor estimation (with optional periodic recalibration for mobile capture) or manual threshold setting.
58
+ - **Pre-Trigger Buffer**: Keeps a ring buffer of history before trigger so preambles are not missed.
59
+ - **SigMF Format**: Saves `.sigmf-meta` and `.sigmf-data` pairs in a configurable recordings directory.
60
+ - **GPS Geotagging**: Records precise coordinates in SigMF metadata via `gpsd` and displays geotags during replay.
61
+ - **Digital Loopback Test**: Built-in internal digital BIST loopback test (at 1 GHz) to check hardware health and SNR without external antennas.
62
+ - **Full CLI & Headless Mode**: Launch any mode or override any setting from the command line, list available recordings, or run completely headless without curses.
63
+ - **Linux Native**: Built and optimized specifically for Linux environments (supports all major distribution families: Debian-based, RPM-based, Arch-based, etc.).
64
+
65
+ ## Installation
66
+
67
+ ### 1. System Drivers (libiio)
68
+ Install the required IIO system drivers for your distribution family:
69
+
70
+ **Debian-based (Ubuntu, Debian, Kali, Mint, etc.):**
71
+ ```bash
72
+ sudo apt update && sudo apt install -y libiio0 libiio-dev libiio-utils
73
+ ```
74
+
75
+ **RPM-based (Fedora, RHEL, CentOS, Rocky, etc.):**
76
+ ```bash
77
+ sudo dnf install -y libiio python3-iio libiio-utils
78
+ ```
79
+
80
+ **Arch-based (Arch Linux, Manjaro, etc.):**
81
+ ```bash
82
+ sudo pacman -S libiio
83
+ ```
84
+
85
+ ### 2. Optional: GPS Support (gpsd)
86
+ If you plan to use GPS geotagging for SigMF recordings, install the `gpsd` daemon and tools:
87
+
88
+ **Debian-based:**
89
+ ```bash
90
+ sudo apt install -y gpsd gpsd-clients
91
+ ```
92
+
93
+ **RPM-based:**
94
+ ```bash
95
+ sudo dnf install -y gpsd gpsd-clients
96
+ ```
97
+
98
+ **Arch-based:**
99
+ ```bash
100
+ sudo pacman -S gpsd
101
+ ```
102
+
103
+ > **Note:** Configure and start the `gpsd` service according to your specific GPS receiver hardware (USB dongle, UART module, Bluetooth, or virtual source) so that it listens on `127.0.0.1:2947`. Once running, enable GPS in PlutoSiege **Settings** (`Enable GPS (gpsd): yes`) or via CLI (`--enable-gps true`).
104
+
105
+ ### 3. Install & Run PlutoSiege
106
+
107
+ #### Option A: Via pip / pipx (Recommended)
108
+ Install directly from PyPI:
109
+ ```bash
110
+ pipx install pluto_siege
111
+ # or: pip install pluto_siege
112
+ ```
113
+
114
+ Launch from any terminal:
115
+ ```bash
116
+ pluto_siege
117
+ ```
118
+
119
+ #### Option B: From Source (Clone Repository)
120
+ Clone the repository and install dependencies:
121
+ ```bash
122
+ git clone https://github.com/SketchTurnerDev/pluto_siege.git
123
+ cd pluto_siege
124
+ pip install -r requirements.txt
125
+ ```
126
+
127
+ Launch via the main script:
128
+ ```bash
129
+ python pluto_siege.py
130
+ # or: python -m pluto_siege
131
+ ```
132
+
133
+ ## Demo
134
+
135
+ <p align="center">
136
+ <img src="https://raw.githubusercontent.com/SketchTurnerDev/pluto_siege/main/assets/demo.gif" alt="PlutoSiege Demo" width="100%">
137
+ </p>
138
+
139
+ ## Application Menu
140
+
141
+ The main menu provides access to all core operations:
142
+
143
+ ### 1. Capture
144
+ Listens for incoming RF bursts on the configured receiver frequency (`rx_freq`).
145
+ - Captures a single burst by default, or loops continuously (numbering saved bursts `[#1]`, `[#2]`, ... until stopped with `Esc` / `Q` in TUI or `Ctrl+C` in headless mode) when **Auto capture** (`--auto-capture true`) is enabled.
146
+ - Real-time dBFS level meter with saturation (`SAT!`) warnings.
147
+ - Automated noise floor estimation or manual threshold detection.
148
+ - Pre-trigger history ring buffer to preserve signal preambles.
149
+ - Saves captures as standard SigMF (`.sigmf-meta` and `.sigmf-data`) pairs with optional GPS geolocation tags.
150
+
151
+ ### 2. Transmit
152
+ Browse and replay saved SigMF recordings from the configured recordings directory (`records_dir`).
153
+ - Displays recorded timestamp, center frequency, sample rate, sample count, and GPS coordinates.
154
+ - Replays signals via the PlutoSDR transmitter at the exact frequency (`core:frequency`) and sample rate (`core:sample_rate`) stored in `.sigmf-meta`.
155
+ - In-place deletion of unwanted recordings (`D` or `Delete`).
156
+
157
+ ### 3. Loopback Test
158
+ Internal hardware diagnostic to verify the SDR transceiver and USB/DMA pipeline.
159
+ - Enables the AD936x internal digital BIST loopback (`loopback = 1`) at 1 GHz without transmitting over the air.
160
+ - Calculates received Signal-to-Noise Ratio (SNR) to confirm hardware health.
161
+
162
+ ### 4. Settings & CLI Parameters
163
+ Configures radio parameters, trigger behavior, GPS integration, and interface preferences. All settings can be edited interactively in the TUI **Settings** screen or passed via command-line flags.
164
+
165
+ | Flags / Parameter | Type | Default | Description |
166
+ | :--- | :--- | :--- | :--- |
167
+ | `--pluto-uri, --pu` | `str` | `usb:` | PlutoSDR `libiio` context URI (`usb:`, `usb:1.4.5`, `ip:192.168.2.1`, `local:`). |
168
+ | `--rx-freq, --rf` | `int` | `433.92M` | Receiver center frequency in Hz; supports `k`/`M`/`G` suffixes and bare MHz shorthand (`70M - 6G`; e.g. `433`, `868`). |
169
+ | `--sample-rate, --sr` | `int` | `2.1M` | Sample rate in SPS; supports `k`/`M` suffixes (`521k - 61.44M`). |
170
+ | `--rf-bandwidth, --rb` | `int` | `0` | Analog RF filter bandwidth in Hz, or `0`/`auto` to follow `--sample-rate`; supports `k`/`M` suffixes (`0` or `200k - 56M`). |
171
+ | `--rx-gain, --rg` | `float` | `15.0` | Manual RX hardware gain in dB (`-10.0 .. 74.5`). |
172
+ | `--tx-gain, --tg` | `float` | `0.0` | Manual TX hardware gain in dB (`-89.75 .. 0.0`). |
173
+ | `--tx-repeats, --tr` | `int` | `1` | Number of consecutive burst transmissions per replay (`1 .. 100`). |
174
+ | `--auto-capture, --ac` | `bool` | `false` | Enable continuous multi-burst capture loop (`true` or `false`). |
175
+ | `--auto-threshold, --at` | `bool` | `true` | Enable automatic noise floor threshold detection (`true` or `false`). |
176
+ | `--auto-trigger-margin, --atm` | `float` | `8.0` | Trigger margin above noise floor in dB (`1.0 .. 30.0`; unused when `--auto-threshold` is `false`). |
177
+ | `--auto-recal-seconds, --ars` | `float` | `0.0` | Periodic noise floor recalibration interval in seconds while listening, or `0` to disable; supports `ms`/`s` suffixes (`0.0 .. 600.0`; unused when `--auto-threshold` is `false`). |
178
+ | `--manual-threshold, --mt` | `float` | `-30.0` | Fixed trigger threshold in dBFS (`-120.0 .. 0.0`; unused when `--auto-threshold` is `true`). |
179
+ | `--pre-trigger-buffers, --ptb` | `int` | `2` | Number of pre-trigger history buffers kept in memory (`1 .. 50`). |
180
+ | `--min-burst-seconds, --mbs` | `float` | `0.0` | Minimum active burst duration in seconds to filter short noise spikes, or `0` to disable; supports `ms`/`s` suffixes (`0.0 .. 5.0`). |
181
+ | `--silence-seconds, --ss` | `float` | `0.8` | Continuous silence duration in seconds to stop recording; supports `ms`/`s` suffixes (`0.01 .. 10.0`). |
182
+ | `--max-post-trigger-seconds, --mpts` | `float` | `4.0` | Maximum recording duration in seconds after trigger; supports `ms`/`s` suffixes (`0.1 .. 30.0`). |
183
+ | `--rx-buffer-size, --rbs` | `int` | `32768` | DMA receive buffer size in samples (`1024 .. 1048576`). |
184
+ | `--enable-gps, --eg` | `bool` | `false` | Enable GPS geolocation tagging via `gpsd` daemon (`true` or `false`). |
185
+ | `--gpsd-host, --gh` | `str` | `127.0.0.1` | `gpsd` daemon hostname or IP address (unused when `--enable-gps` is `false`). |
186
+ | `--gpsd-port, --gp` | `int` | `2947` | `gpsd` daemon TCP port (`1 .. 65535`; unused when `--enable-gps` is `false`). |
187
+ | `--records-dir, --rd` | `str` | `./recordings` | Directory path for saving and loading SigMF recordings (`~/.pluto_siege/recordings` when installed via `pip`/`pipx`). |
188
+ | `--enable-sound, --es` | `bool` | `true` | Enable acoustic sound effect cues (`true` or `false`). |
189
+ | `--enable-mouse, --em` | `bool` | `true` | Enable terminal mouse support in the TUI (`true` or `false`). |
190
+
191
+ ### CLI-Only Options
192
+
193
+ | Flags | Description |
194
+ | :--- | :--- |
195
+ | `--capture, -c` | Start in Capture mode. |
196
+ | `--transmit, --tx` | Start in Transmit mode (pass a recording `#` from `--list`, `.sigmf-data` path, `'latest'`, or omit in TUI). |
197
+ | `--loopback, --lb` | Run the internal digital Loopback Test. |
198
+ | `--list, -l` | List available SigMF recordings in `records-dir` and exit. |
199
+ | `--show-config, --sc` | Show current configuration and exit. |
200
+ | `--headless, --hl` | Run in console text mode without the curses TUI (outputs plain logs without colors or live meter when redirected to a file/pipe; supports `NO_COLOR` / `FORCE_COLOR`). |
201
+ | `--save, -s` | Persist CLI setting changes to `settings.json`. |
202
+ | `--reset, -r` | Reset configuration to defaults and save to `settings.json`. |
203
+ | `--version, -v` | Show program version and exit. |
204
+ | `--help, -h` | Show help message and exit. |
205
+
206
+ ## License
207
+
208
+ Distributed under the **GNU General Public License v3.0** (GPL-3.0). See [`LICENSE`](https://github.com/SketchTurnerDev/pluto_siege/blob/main/LICENSE) for details.
@@ -0,0 +1,186 @@
1
+ <h1 align="center">PlutoSiege</h1>
2
+
3
+ <p align="center">
4
+ <strong>ISM-Band RF Capture & Replay Tool for PlutoSDR</strong>
5
+ </p>
6
+
7
+ <p align="center">
8
+ <a href="https://pypi.org/project/pluto-siege/"><img src="https://img.shields.io/pypi/v/pluto-siege?style=for-the-badge&logo=pypi&logoColor=white&color=blue" alt="PyPI"></a>
9
+ <img src="https://img.shields.io/badge/Python-3.9+-3776AB?style=for-the-badge&logo=python&logoColor=white" alt="Python">
10
+ <a href="https://github.com/SketchTurnerDev/pluto_siege/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-GPL--3.0-blueviolet.svg?style=for-the-badge" alt="License"></a>
11
+ <img src="https://img.shields.io/badge/Hardware-ADALM--Pluto-0099FF?style=for-the-badge" alt="Hardware">
12
+ <img src="https://img.shields.io/badge/Format-SigMF-orange?style=for-the-badge" alt="SigMF">
13
+ </p>
14
+
15
+ <p align="center">
16
+ <img src="https://raw.githubusercontent.com/SketchTurnerDev/pluto_siege/main/assets/screenshot.png" alt="PlutoSiege Screenshot" width="100%">
17
+ </p>
18
+
19
+ > **REGULATORY DISCLAIMER**
20
+ > RF transmission is regulated by local authorities. Replay only signals you own or are permitted to transmit, into a dummy load or at the lowest power required.
21
+
22
+ ## About
23
+
24
+ **PlutoSiege** is a terminal application (TUI) and command-line utility (CLI) for recording and replaying short ISM-band RF bursts (e.g. 433 MHz, 868 MHz) from car remotes, garage doors, doorbells, and wireless sensors.
25
+
26
+ Built for the **ADALM-Pluto (AD9363/AD9361)** SDR architecture, it saves recordings in standard **SigMF (Signal Metadata Format)** so they can be opened in other SDR tools like URH, IQEngine, GNU Radio, or Inspectrum.
27
+
28
+ ### Hardware Compatibility
29
+ Fully supports both official **Analog Devices ADALM-Pluto** hardware (Rev. B / Rev. C) and third-party clones/analogues based on the same AD9363/AD9361 transceivers (such as **Pluto Nano**, **Pluto Plus**, and other custom PlutoSDR boards).
30
+
31
+ ## Features
32
+
33
+ - **Single & Continuous Capture**: Capture single RF bursts or enable **Auto capture** (`--auto-capture true`) to loop continuously and save numbered multi-burst recordings with collision-safe filenames.
34
+ - **Level Metering**: Real-time dBFS level meter with saturation (`SAT!`) warning.
35
+ - **Threshold Detection**: Automated noise floor estimation (with optional periodic recalibration for mobile capture) or manual threshold setting.
36
+ - **Pre-Trigger Buffer**: Keeps a ring buffer of history before trigger so preambles are not missed.
37
+ - **SigMF Format**: Saves `.sigmf-meta` and `.sigmf-data` pairs in a configurable recordings directory.
38
+ - **GPS Geotagging**: Records precise coordinates in SigMF metadata via `gpsd` and displays geotags during replay.
39
+ - **Digital Loopback Test**: Built-in internal digital BIST loopback test (at 1 GHz) to check hardware health and SNR without external antennas.
40
+ - **Full CLI & Headless Mode**: Launch any mode or override any setting from the command line, list available recordings, or run completely headless without curses.
41
+ - **Linux Native**: Built and optimized specifically for Linux environments (supports all major distribution families: Debian-based, RPM-based, Arch-based, etc.).
42
+
43
+ ## Installation
44
+
45
+ ### 1. System Drivers (libiio)
46
+ Install the required IIO system drivers for your distribution family:
47
+
48
+ **Debian-based (Ubuntu, Debian, Kali, Mint, etc.):**
49
+ ```bash
50
+ sudo apt update && sudo apt install -y libiio0 libiio-dev libiio-utils
51
+ ```
52
+
53
+ **RPM-based (Fedora, RHEL, CentOS, Rocky, etc.):**
54
+ ```bash
55
+ sudo dnf install -y libiio python3-iio libiio-utils
56
+ ```
57
+
58
+ **Arch-based (Arch Linux, Manjaro, etc.):**
59
+ ```bash
60
+ sudo pacman -S libiio
61
+ ```
62
+
63
+ ### 2. Optional: GPS Support (gpsd)
64
+ If you plan to use GPS geotagging for SigMF recordings, install the `gpsd` daemon and tools:
65
+
66
+ **Debian-based:**
67
+ ```bash
68
+ sudo apt install -y gpsd gpsd-clients
69
+ ```
70
+
71
+ **RPM-based:**
72
+ ```bash
73
+ sudo dnf install -y gpsd gpsd-clients
74
+ ```
75
+
76
+ **Arch-based:**
77
+ ```bash
78
+ sudo pacman -S gpsd
79
+ ```
80
+
81
+ > **Note:** Configure and start the `gpsd` service according to your specific GPS receiver hardware (USB dongle, UART module, Bluetooth, or virtual source) so that it listens on `127.0.0.1:2947`. Once running, enable GPS in PlutoSiege **Settings** (`Enable GPS (gpsd): yes`) or via CLI (`--enable-gps true`).
82
+
83
+ ### 3. Install & Run PlutoSiege
84
+
85
+ #### Option A: Via pip / pipx (Recommended)
86
+ Install directly from PyPI:
87
+ ```bash
88
+ pipx install pluto_siege
89
+ # or: pip install pluto_siege
90
+ ```
91
+
92
+ Launch from any terminal:
93
+ ```bash
94
+ pluto_siege
95
+ ```
96
+
97
+ #### Option B: From Source (Clone Repository)
98
+ Clone the repository and install dependencies:
99
+ ```bash
100
+ git clone https://github.com/SketchTurnerDev/pluto_siege.git
101
+ cd pluto_siege
102
+ pip install -r requirements.txt
103
+ ```
104
+
105
+ Launch via the main script:
106
+ ```bash
107
+ python pluto_siege.py
108
+ # or: python -m pluto_siege
109
+ ```
110
+
111
+ ## Demo
112
+
113
+ <p align="center">
114
+ <img src="https://raw.githubusercontent.com/SketchTurnerDev/pluto_siege/main/assets/demo.gif" alt="PlutoSiege Demo" width="100%">
115
+ </p>
116
+
117
+ ## Application Menu
118
+
119
+ The main menu provides access to all core operations:
120
+
121
+ ### 1. Capture
122
+ Listens for incoming RF bursts on the configured receiver frequency (`rx_freq`).
123
+ - Captures a single burst by default, or loops continuously (numbering saved bursts `[#1]`, `[#2]`, ... until stopped with `Esc` / `Q` in TUI or `Ctrl+C` in headless mode) when **Auto capture** (`--auto-capture true`) is enabled.
124
+ - Real-time dBFS level meter with saturation (`SAT!`) warnings.
125
+ - Automated noise floor estimation or manual threshold detection.
126
+ - Pre-trigger history ring buffer to preserve signal preambles.
127
+ - Saves captures as standard SigMF (`.sigmf-meta` and `.sigmf-data`) pairs with optional GPS geolocation tags.
128
+
129
+ ### 2. Transmit
130
+ Browse and replay saved SigMF recordings from the configured recordings directory (`records_dir`).
131
+ - Displays recorded timestamp, center frequency, sample rate, sample count, and GPS coordinates.
132
+ - Replays signals via the PlutoSDR transmitter at the exact frequency (`core:frequency`) and sample rate (`core:sample_rate`) stored in `.sigmf-meta`.
133
+ - In-place deletion of unwanted recordings (`D` or `Delete`).
134
+
135
+ ### 3. Loopback Test
136
+ Internal hardware diagnostic to verify the SDR transceiver and USB/DMA pipeline.
137
+ - Enables the AD936x internal digital BIST loopback (`loopback = 1`) at 1 GHz without transmitting over the air.
138
+ - Calculates received Signal-to-Noise Ratio (SNR) to confirm hardware health.
139
+
140
+ ### 4. Settings & CLI Parameters
141
+ Configures radio parameters, trigger behavior, GPS integration, and interface preferences. All settings can be edited interactively in the TUI **Settings** screen or passed via command-line flags.
142
+
143
+ | Flags / Parameter | Type | Default | Description |
144
+ | :--- | :--- | :--- | :--- |
145
+ | `--pluto-uri, --pu` | `str` | `usb:` | PlutoSDR `libiio` context URI (`usb:`, `usb:1.4.5`, `ip:192.168.2.1`, `local:`). |
146
+ | `--rx-freq, --rf` | `int` | `433.92M` | Receiver center frequency in Hz; supports `k`/`M`/`G` suffixes and bare MHz shorthand (`70M - 6G`; e.g. `433`, `868`). |
147
+ | `--sample-rate, --sr` | `int` | `2.1M` | Sample rate in SPS; supports `k`/`M` suffixes (`521k - 61.44M`). |
148
+ | `--rf-bandwidth, --rb` | `int` | `0` | Analog RF filter bandwidth in Hz, or `0`/`auto` to follow `--sample-rate`; supports `k`/`M` suffixes (`0` or `200k - 56M`). |
149
+ | `--rx-gain, --rg` | `float` | `15.0` | Manual RX hardware gain in dB (`-10.0 .. 74.5`). |
150
+ | `--tx-gain, --tg` | `float` | `0.0` | Manual TX hardware gain in dB (`-89.75 .. 0.0`). |
151
+ | `--tx-repeats, --tr` | `int` | `1` | Number of consecutive burst transmissions per replay (`1 .. 100`). |
152
+ | `--auto-capture, --ac` | `bool` | `false` | Enable continuous multi-burst capture loop (`true` or `false`). |
153
+ | `--auto-threshold, --at` | `bool` | `true` | Enable automatic noise floor threshold detection (`true` or `false`). |
154
+ | `--auto-trigger-margin, --atm` | `float` | `8.0` | Trigger margin above noise floor in dB (`1.0 .. 30.0`; unused when `--auto-threshold` is `false`). |
155
+ | `--auto-recal-seconds, --ars` | `float` | `0.0` | Periodic noise floor recalibration interval in seconds while listening, or `0` to disable; supports `ms`/`s` suffixes (`0.0 .. 600.0`; unused when `--auto-threshold` is `false`). |
156
+ | `--manual-threshold, --mt` | `float` | `-30.0` | Fixed trigger threshold in dBFS (`-120.0 .. 0.0`; unused when `--auto-threshold` is `true`). |
157
+ | `--pre-trigger-buffers, --ptb` | `int` | `2` | Number of pre-trigger history buffers kept in memory (`1 .. 50`). |
158
+ | `--min-burst-seconds, --mbs` | `float` | `0.0` | Minimum active burst duration in seconds to filter short noise spikes, or `0` to disable; supports `ms`/`s` suffixes (`0.0 .. 5.0`). |
159
+ | `--silence-seconds, --ss` | `float` | `0.8` | Continuous silence duration in seconds to stop recording; supports `ms`/`s` suffixes (`0.01 .. 10.0`). |
160
+ | `--max-post-trigger-seconds, --mpts` | `float` | `4.0` | Maximum recording duration in seconds after trigger; supports `ms`/`s` suffixes (`0.1 .. 30.0`). |
161
+ | `--rx-buffer-size, --rbs` | `int` | `32768` | DMA receive buffer size in samples (`1024 .. 1048576`). |
162
+ | `--enable-gps, --eg` | `bool` | `false` | Enable GPS geolocation tagging via `gpsd` daemon (`true` or `false`). |
163
+ | `--gpsd-host, --gh` | `str` | `127.0.0.1` | `gpsd` daemon hostname or IP address (unused when `--enable-gps` is `false`). |
164
+ | `--gpsd-port, --gp` | `int` | `2947` | `gpsd` daemon TCP port (`1 .. 65535`; unused when `--enable-gps` is `false`). |
165
+ | `--records-dir, --rd` | `str` | `./recordings` | Directory path for saving and loading SigMF recordings (`~/.pluto_siege/recordings` when installed via `pip`/`pipx`). |
166
+ | `--enable-sound, --es` | `bool` | `true` | Enable acoustic sound effect cues (`true` or `false`). |
167
+ | `--enable-mouse, --em` | `bool` | `true` | Enable terminal mouse support in the TUI (`true` or `false`). |
168
+
169
+ ### CLI-Only Options
170
+
171
+ | Flags | Description |
172
+ | :--- | :--- |
173
+ | `--capture, -c` | Start in Capture mode. |
174
+ | `--transmit, --tx` | Start in Transmit mode (pass a recording `#` from `--list`, `.sigmf-data` path, `'latest'`, or omit in TUI). |
175
+ | `--loopback, --lb` | Run the internal digital Loopback Test. |
176
+ | `--list, -l` | List available SigMF recordings in `records-dir` and exit. |
177
+ | `--show-config, --sc` | Show current configuration and exit. |
178
+ | `--headless, --hl` | Run in console text mode without the curses TUI (outputs plain logs without colors or live meter when redirected to a file/pipe; supports `NO_COLOR` / `FORCE_COLOR`). |
179
+ | `--save, -s` | Persist CLI setting changes to `settings.json`. |
180
+ | `--reset, -r` | Reset configuration to defaults and save to `settings.json`. |
181
+ | `--version, -v` | Show program version and exit. |
182
+ | `--help, -h` | Show help message and exit. |
183
+
184
+ ## License
185
+
186
+ Distributed under the **GNU General Public License v3.0** (GPL-3.0). See [`LICENSE`](https://github.com/SketchTurnerDev/pluto_siege/blob/main/LICENSE) for details.
@@ -17,7 +17,7 @@
17
17
 
18
18
  """Entry point for ``python3 -m pluto_siege``."""
19
19
 
20
- from pluto_siege.ui.screens.main_menu import main
20
+ from pluto_siege.cli import main
21
21
 
22
22
  if __name__ == "__main__":
23
23
  main()