Skip to content

ESP32-S3 als 13-cm-TX-Gerät (FM und M17), espdr mitgeliefert - #5

Merged
jochenhammes merged 3 commits into
mainfrom
feature/espdr-device
Oct 11, 2026
Merged

jochenhammes merged 3 commits into
mainfrom
feature/espdr-device

Conversation

@jochenhammes

Copy link
Copy Markdown
Owner

Was

Der ESP32-S3 aus esp32-sdr-trx wird als TX-Gerät „ESP32-S3 (13 cm)" (--device espdr) nutzbar: 2320–2450 MHz, Geräterate 80 kHz, nur FM und M17 (konstante Hüllkurve; der Chip sendet polar, Frequenz + Gain mit 40 kHz).

  • espdr/: Kopie des Host-Teils (0BSD, bleibt als LICENSE erhalten) samt Firmware-Images; tools/sync-espdr.sh aktualisiert sie aus dem Upstream (Stand 580a0f7, Branch feature/m17). Der ESP32-Code ist damit auch ohne separate Installation vorhanden.
  • pluto_tx/devices/espdr.py: EspdrDevice + EspdrSink (Echtzeit-Drosselung im Leerlauf, Streamer beim Senden, PTT über pre_key/post_unkey, Thermalmodell, force_safe_state, Lizenzhinweis muss akzeptiert sein).
  • Neu: supported_modes pro Gerät (Basisklasse, Flowgraph-Fallback, CLI-Ablehnung, GUI-Ausgrauen); LoRa-/File-Broadcast-Zweige werden für Geräte ohne Unterstützung nicht gebaut (80 kHz).
  • 13-cm-Band in DE_AMATEUR_BANDS_HZ, GUI-Beschriftung für das Gerät, install-espdr.sh (esptool 5 per pipx, udev-Regel), README-Abschnitt.
  • Betrifft andere Geräte nicht: Änderungen an bestehenden Pfaden sind das optionale supported_modes und die Guards für die LoRa-/File-Zweige.

Getestet

  • python3 -m unittest discover tests: 383 Tests OK (1 übersprungen); neue tests/test_espdr_device.py (23 Tests, u. a. FM/M17 durch den Flowgraph gegen den Simulator, M17-Dekodierung von „DA2JH").
  • Web-TRX-Backend: 193 bestanden, 1 übersprungen.
  • Auf Sendung (ein Board, PlutoSDR als Empfänger, 2345 MHz): M17 über pluto-cli dekodiert (18 Frames), FM ok, SSB wird abgelehnt, 5 PTT-Zyklen sauber, 120 s ohne Underrun.

Nicht getestet / bekannte Grenzen

  • Web-TRX kann den ESP32 noch nicht als Sender wählen (Whitelist); Empfangszweig kommt später.
  • install-espdr.sh nur als --dry-run, GUI nur offscreen, ein einziges Board.
  • Latenz ≥ 100 ms; Frequenz ohne Kalibrierung einige kHz daneben, ca. 10 % der Frequenzen wegen Firmware-Rand (TX_LOW_MARGIN) um wenige kHz verschoben; Leistung nicht kalibriert.
  • Der Upstream-Branch feature/m17 in esp32-sdr-trx ist noch nicht in dessen main.

jochenhammes and others added 3 commits October 11, 2026 19:19
…a copy, synchronised by a script)

pluto-tx gets a TX device for an ESP32-S3 board (next commit). Its host code is the `espdr` package of
https://github.com/jochenhammes/esp32-sdr-trx (Zero-Clause BSD licence), and pluto-tx must work on an installation that has nothing else of that
project, so the package is shipped in this repository as ./espdr, together with the firmware images it loads into the board's RAM (build
products of that repository: rx.bin, tx.bin, bootloader.bin, partition-table.bin), its LICENSE and NOTICE. espdr/UPSTREAM records the commit
and the SHA-256 sums of the images.

* tools/sync-espdr.sh makes the copy from a checkout of esp32-sdr-trx (--from, --ref) and refuses to continue if the images are not staged.
  The copy is not edited here: changes go to esp32-sdr-trx, then the script runs again.
* install-espdr.sh (optional, like install-m17.sh): numpy, pyserial and pipx from apt, esptool 5 with pipx (the distribution's esptool is
  version 4 and does not work with the firmware loader; pip may not write to the system Python), the board's udev rule; --dry-run shows what it does.

Copied at esp32-sdr-trx commit 580a0f7 (branch feature/m17).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0169WJPJyKnnBSQ5ufZR9qqj
…f the modes it can carry

The ESP32-S3 has no I/Q output; it steers the carrier of its Wi-Fi test tone in frequency 40 000 times a second. A signal with a constant
envelope is fully described by its frequency, so the device takes the complex baseband the flowgraph produces, keeps its instantaneous
frequency (espdr.polar) and sends that to the chip (espdr.txlink.Streamer). FM and M17 work as they are; SSB, PSK31, FT8 and every other mode
with amplitude modulation do not.

* pluto_tx/devices/espdr.py: EspdrDevice ("ESP32-S3 (13 cm)", 2320..2450 MHz, 80 kHz, one power stage "gain" in dB, default ceiling -12 dB) and
  its sink. A session is opened by pre_key() (PLL setup in the chip, thermal model of the board if there is one, chip temperature read first)
  and ended by post_unkey(), which waits until the chip has played everything; "off" is the end of the session. The sink drops samples at the real-time
  rate while no session runs, and is slowed down by the chip while one does. The frequency cannot change during a session (applied at the next key).
* TxDevice.supported_modes (None = all) and supports_mode(): the flowgraph falls back to FM for a mode the device cannot carry, pluto-cli refuses it with
  a message, the GUI greys it out with a tooltip and restores the entries when the device changes. PlutoTxFlowgraph.MODE_NAMES maps the modes to the
  names the CLI uses.
* The LoRa branch of the flowgraph is built per device (only for devices that can carry LoRa), and the File Broadcast filter gets a placeholder for devices
  that cannot: both filters cannot be designed for a device that runs at 80 kHz, which made the flowgraph fail to build.
* config: 13cm band for the amateur-band warning; GUI: connection label and tooltip of the ESP32 device; pluto-cli: --uri help.
* tests/test_espdr_device.py (23 tests, no hardware): the contract, the mode gating (flowgraph, CLI, GUI offscreen), the sink's pacing, FM and M17
  through the flowgraph against the simulated chip (the M17 test decodes the call sign with the receive chain of pluto-advanced-rx), power and ppm,
  the licence check, and the consistency of the copied package (image sums, UPSTREAM). The whole suite passes (383 tests, 1 skipped).
* README: the device, how to install it, what is known about it (neighbour-channel levels, drift, latency, one board only) and the licence of ./espdr.

On the air with the espdr tool (same package, M17, 2345 MHz, PlutoSDR receiving): decoded, also after 120 s. This device itself has run only against
the simulated chip so far.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0169WJPJyKnnBSQ5ufZR9qqj
…as not

M17 from a WAV file through pluto-cli with the device is decoded (call sign and voice), FM transmits and ends cleanly, five transmissions in a
row leave no carrier behind. The GUI in real use, long microphone sessions, other boards and 600 s transmissions are not tested.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0169WJPJyKnnBSQ5ufZR9qqj
@jochenhammes
jochenhammes merged commit 65a77e6 into main Oct 11, 2026
3 checks passed
@jochenhammes
jochenhammes deleted the feature/espdr-device branch November 1, 2026 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant