Claude daa31fb6e5 [feat](trx-wefax): implement WEFAX decoder with full server and frontend integration
Pure Rust WEFAX (Weather Facsimile) decoder supporting 60/90/120/240 LPM,
IOC 288 and 576, with automatic APT tone detection and phase alignment.

Core DSP pipeline:
- Polyphase rational resampler (48k→11025 Hz)
- FM discriminator (Hilbert FIR + instantaneous frequency)
- Goertzel tone detector (300/450/675 Hz APT tones)
- Phase alignment via cross-correlation on phasing signal
- Line slicer with linear interpolation pixel clock recovery
- Image assembler with PNG encoding

State machine: Idle→StartDetected→Phasing→Receiving→Stopping

Server integration:
- WefaxMessage/WefaxProgress in trx-core DecodedMessage
- DecoderConfig, DecoderResetSeqs, RigCommand wefax variants
- DECODER_REGISTRY entry in trx-protocol
- DecoderHistories/DecoderLoggers wefax support
- run_wefax_decoder() async task in trx-server audio.rs
- History persistence in pickledb store

Frontend integration:
- wefax.js plugin with live canvas rendering and gallery
- HTML sub-tab with canvas, gallery, toggle/clear controls
- SSE dispatch for wefax/wefax_progress events
- Decode history worker and restore support
- Toggle/clear API endpoints

19 unit tests covering resampler, FM discriminator, tone detection,
phasing, line slicing, image encoding, and decoder state machine.

https://claude.ai/code/session_019eyxgx3LuhcFZ7T5tr2Trm
Signed-off-by: Claude <noreply@anthropic.com>
2026-04-03 06:50:42 +02:00
2025-11-30 23:54:05 +01:00
2025-11-30 23:54:05 +01:00

trx-rs logo

trx-rs

A modular amateur radio control stack written in Rust.

License

trx-rs splits radio hardware access from user-facing interfaces so you can run rig control, SDR DSP, decoding, audio streaming, and web access as separate, composable pieces.

Backends Yaesu FT-817, Yaesu FT-450D, SoapySDR
Frontends Web UI, rigctl-compatible TCP, JSON-over-TCP
Decoders AIS, APRS, CW, FT8, RDS, VDES, WSPR
Audio Opus streaming between server, client, and browser

Quick Start

1. Install dependencies

Debian / Ubuntu
sudo apt install build-essential pkg-config cmake libopus-dev libasound2-dev
# Optional — SDR support
sudo apt install libsoapysdr-dev
Fedora
sudo dnf install gcc pkg-config cmake opus-devel alsa-lib-devel
# Optional — SDR support
sudo dnf install SoapySDR-devel
Arch Linux
sudo pacman -S base-devel pkgconf cmake opus alsa-lib
# Optional — SDR support
sudo pacman -S soapysdr
macOS (Homebrew)
brew install cmake opus
# Optional — SDR support
brew install soapysdr

See Build Requirements in the wiki for details on each library.

2. Build

cargo build --release

Build without SDR support: cargo build --release --no-default-features

3. Configure

Run the interactive setup wizard to generate config files for your station:

./target/release/trx-configurator

The wizard walks you through rig selection, serial port detection, audio settings, and frontend options, then writes trx-server.toml and trx-client.toml.

Alternatively, generate example configs and edit them by hand:

./target/release/trx-server --print-config > trx-server.toml
./target/release/trx-client --print-config > trx-client.toml

4. Run

./target/release/trx-server --config trx-server.toml
./target/release/trx-client --config trx-client.toml

Open the configured HTTP frontend address in a browser (default http://localhost:8080).

How It Works

graph TD
    SDR1["SDR #1"] & SDR2["SDR #2"] <-->|USB| S1["trx-server A"]
    SDR3["SDR #3"] & FT817["FT-817"] <-->|USB / serial| S2["trx-server B"]

    S1 <-->|"JSON-TCP :4530"| C1["trx-client"]
    S1 -->|"Opus-TCP per rig"| C1
    S2 <-->|"JSON-TCP :4530"| C1
    S2 -->|"Opus-TCP per rig"| C1

    C1 <-->|internal channels| F1["Web UI :8080"]
    C1 <-->|internal channels| F2["rigctl :4532"]

Each trx-server owns one or more rigs and runs DSP, decoding, and audio capture locally. A trx-client connects to any number of servers over TCP and exposes them through a unified set of frontends.

Documentation

Resource Description
User Manual Configuration, features, and usage
Architecture System design, crate layout, data flow, and internals
Optimization Guidelines Performance guidelines for the real-time DSP pipeline
Planned Features Roadmap and design notes
Contributing Commit conventions, workflow, and code style

License

BSD-2-Clause. See LICENSES for bundled third-party license files.

S
Description
Experimental ham rig and SDR controller written in Rust
Readme 31 MiB
Languages
Rust 68.2%
JavaScript 24.1%
CSS 4.6%
HTML 3.1%