Technical Documentation

Deep dive into MRRC system architecture, DSP processing pipeline and advanced feature implementations

πŸ—οΈ System Architecture

Overall Architecture

MRRC System Architecture V5.8.5 Client Layer Mobile UI mobile_modern .html Desktop UI modern.html Voice Asst mobile_voice_ PTT Safety Timeout / Optical HTTPS / WebSocket (Opus / Int16) Service Layer MRRC Main (Tornado / Python 3.12+) /WSCTRX Control + audio (PTT/freq/mode/WDSP/recording) /WSaudioRX RX audio stream (Opus/Int16, RNNoise/WDSP) /WSaudioTX TX audio upload (Opus encode, EQ chain) /WSATR1000 Tuner power/SWR real-time, learning buffer rigctld (Hamlib) IC-M710 @ 4800 baud Transceiver (IC-M710) Hardware Device ATR-1000 Proxy LearningBuffer V5.6 ATR-1000 Tuner Power / SWR Meter PTT Safety System (V5.6+) L1 Browser: touch-move release, visibility-change stop, 30s watchdog L2 Protocol: ACK retry x3 + redundant audio-path fallback | L3 Server: 120s TOT hard limit, persistent 2s retry

Core Components

Component File Function
Main Program MRRC WebSocket server, handles audio streams and control commands
Audio Interface audio_interface.py PyAudio wrapper, supports multiple format decoding
DSP Processing wdsp_wrapper.py WDSP library wrapper, NR2/AGC/ANF
Transceiver Control hamlib_wrapper.py rigctld communication wrapper
Tuner Proxy atr1000_proxy.py ATR-1000 independent proxy process
Voice Assistant voice_assistant_service.py Whisper ASR + Qwen3-TTS

πŸ”Š Audio Processing Pipeline

Receive Audio Chain (RX)

RX Audio Processing Pipeline Transceiver Audio (48kHz Float32) DC Removal + Soft Clipping Protect downstream processing Int16 Convert 48kHz to 16-bit (Optional) WDSP Processing Spectral NR / Noise Blank / Auto Notch / AGC NR2 / NB / ANF / AGC Gain 15–20 dB noise reduction Opus Encode 16kHz / 20kbps WebSocket Transport Browser client delivery AudioWorklet Low-latency playback Audio Buffer

Transmit Audio Chain (TX)

TX Audio Processing Pipeline Microphone Input (48kHz) Anti-Alias Filter 6kHz lowpass Downsample 48kHz to 16kHz TX Equalizer 3-band EQ presets Opus Decode 16kHz to 48kHz WebSocket Transport Send audio to server Transceiver Input CAT PTT control

πŸŽ›οΈ WDSP Digital Signal Processing

WDSP (Warren Pratt's Digital Signal Processing) is a high-performance DSP library from the OpenHPSDR project, widely used in professional amateur radio software.

Feature Modules

Module Function Effect
NR2 Spectral Noise Reduction 15-20dB noise reduction depth
NB Noise Blanker Eliminates impulse interference
ANF Automatic Notch Filter Removes single-tone interference
AGC Automatic Gain Control 4 selectable modes

AGC Modes

  • LONG: Long delay, suitable for stable signals
  • SLOW: Slow response, balanced choice
  • MED: Medium response, default recommendation
  • FAST: Fast response, suitable for rapid QSY

πŸ“Š ATR-1000 Integration

System Architecture

ATR-1000 Integration Architecture Frontend mobile_modern.js WebSocket /WSATR1000 MRRC Main Message routing Unix Socket atr1000_proxy Independent Process WebSocket ATR-1000 Device 192.168.1.63:60001 Power / SWR / Relay Frontend (browser) connects via WebSocket to MRRC Main, which routes commands through Unix Socket to atr1000_proxy. atr1000_proxy communicates with ATR-1000 hardware over TCP and pushes real-time power/SWR/relay data back via WebSocket broadcasts.

Smart ATU Learning

  • Auto Learning: Records frequency-to-tuner parameter mapping during each transmission
  • Quick Tune: Automatically applies learned parameters when frequency changes
  • Persistence: Saves to atr1000_tuner.json

πŸ“ Communication Protocols

WebSocket Commands (WSCTRX)

Command Format Description
Set FrequencysetFreq:14074000In Hz, syncs to ATR-1000
Get FrequencygetFreqRead from rig, broadcast response
Set ModesetMode:USBUSB/LSB/CW/FM/AM
Get ModegetModeRead mode from rig
PTT TXsetPTT:trueKey transmitter (with retry)
PTT RXsetPTT:falseRelease (with ACK protocol, 3x retry)
Get PTTgetPTTRead actual PTT state from hardware
Tunetune:true / tune:falseStart/stop tune tone (5% volume)
CQcq:true / cq:falseStart/stop CQ playback (cq.wav)
WDSP TogglesetWDSPEnabled:trueEnable/disable WDSP processing
NR2 LevelsetWDSPNR2Level:20=OFF, 1=LOW, 2=MED, 3=HIGH, 4=MAX
Noise BlankersetWDSPNB:trueToggle NB (pulse interference)
Auto NotchsetWDSPANF:trueToggle ANF automatic notch filter
Add NotchaddWDSPNotch:1500,200Manual notch (center_hz, width_hz)
AGC ModesetWDSPAGC:30=OFF, 1=LONG, 2=SLOW, 3=MED, 4=FAST
BandpasssetWDSPBandpass:300,2700Low Hz, High Hz
RecordingstartRecording / stopRecordingStereo WAV β†’ MP3 recording
MemorymemLoadAll / memSaveAll:{json}Per-user memory channels (6 slots)
PingPINGLatency check, responds PONG

Need More Help?

Check the installation guide or join community discussion