A spectrum analyzer application for the Elad FDM-DUO Software Defined Radio transceiver.
Note: This project is a work in progress.
The FDM-DUO exposes three USB interfaces:
- Sound Card - Audio I/O for transmit/receive audio
- Serial Port - CAT (Computer Aided Transceiver) control commands
- Sampling Data Port - Raw sampled RF data from the antenna (typically 192 KHz bandwidth)
This application provides a spectrum analyzer and waterfall display using the sampling data port, with CAT control for frequency and mode synchronization.
- Live spectrum analyzer with 4096-point FFT
- Waterfall display with time axis
- CAT control via serial port (Kenwood TS-480 compatible)
- Frequency and mode overlay display
- VFO A/B indicator
- Adjustable reference level and dynamic range
- Status indicator (colored circle: green=connected, gray=disconnected)
- Automatic reconnection after radio power cycle
- Dual rotary encoder support for Raspberry Pi (optional)
sudo apt install libgtk-4-dev libusb-1.0-0-dev libfftw3-dev meson ninja-buildsudo apt install libgtk-4-dev libusb-1.0-0-dev libfftw3-dev meson ninja-buildOn Raspberry Pi OS, you may also need:
sudo apt install libwayland-dev libxkbcommon-devFor rotary encoder support (optional):
sudo apt install libgpiod-devmeson setup build
meson compile -C buildTo build a Debian package for installation:
# Install build dependencies
sudo apt install debhelper devscripts
# Build the package
dpkg-buildpackage -us -uc -b
# The .deb file will be created in the parent directory
ls ../*.debInstall the package:
sudo dpkg -i ../elad-spectrum_*.deb# Normal windowed mode (1024x768)
./build/elad-spectrum
# Fullscreen mode
./build/elad-spectrum -f
# Raspberry Pi 5" LCD (800x480)
./build/elad-spectrum -p
# Pi fullscreen (recommended for embedded use)
./build/elad-spectrum -p -f
# Help
./build/elad-spectrum -h| Option | Description |
|---|---|
-f, --fullscreen |
Start in fullscreen mode |
-p, --pi |
Set window size to 800x480 (5" LCD), enable rotary encoder |
-c, --cat-port PORT |
Start TCP CAT server on PORT (e.g., 4532) |
-i, --iq-port PORT |
Start TCP IQ streaming server on PORT (e.g., 4533) |
-l, --cat-listen ADDR |
Server listen address: localhost (default) or any |
-h, --help |
Show help message |
The -p and -f options are designed for running on a Raspberry Pi with a small display. For embedded use with a 5" LCD (800x480), use both options together:
./build/elad-spectrum -p -fThis provides a fullscreen interface optimized for the Pi's display size.
Optional dual GPIO rotary encoders for hands-free control:
- Encoder 1: Parameter control (Ref/Range for spectrum and waterfall)
- Button press cycles through parameters
- Rotation adjusts current parameter value
- Encoder 2: Zoom/Pan control
- Button press toggles zoom/pan mode
- Rotation adjusts zoom level (1x/2x/4x) or pans the display
See CLAUDE.md for detailed GPIO pin assignments and usage.
- Elad FDM-DUO transceiver
- USB connection to the radio
- Serial port access (
/dev/ttyUSB0) for CAT control
The application can stream raw IQ sample data over TCP for external demodulation and analysis:
# Start with IQ server on port 4533 and CAT server on port 4532
./build/elad-spectrum -i 4533 -c 4532The companion elad-demod TUI application connects to this stream for AM/SSB/CW demodulation with audio output. See the elad-demod project.
- USB Audio to Power Amp HAT - Pipe USB audio from the radio to a power amplifier HAT, with optional DSP processing
- USB interfaces may require root access or udev rules for user access
- Serial port requires
dialoutgroup membership or root access - The FDM-DUO FPGA must be initialized before data streaming begins
- Application automatically reconnects if the radio is power cycled (3 second stabilization delay)
This project is provided as-is for amateur radio experimentation.