Skip to main content

AI-controllable Yaesu FT-991A transceiver interface with web GUI, CLI, and MCP server

Project description

FT-991A Control Package

PyPI version Python Version License: MIT

AI-controllable Yaesu FT-991A transceiver interface with LCARS-themed web GUI, command-line tools, and MCP server for AI integration.

๐Ÿค– AI Assistants: This package exposes FT-991A ham radio control via MCP (Model Context Protocol). Use ft991a-mcp to launch the MCP server, then control frequency, mode, power, PTT, and monitor S-meter readings through standardized MCP tools.

Features

๐ŸŒ LCARS Web GUI (Star Trek Theme)

  • 10+ tabbed interface โ€” VFO Control, Audio/Waterfall, Band Scanner, Memory Channels, System, Config, Status, Diagnostics
  • Audio Waterfall โ€” Real-time spectrogram via PCM2903B USB CODEC + browser-side FFT
  • Spectrum Analyzer โ€” Overlay with gradient fill, grid lines, center frequency marker
  • 5 Color Palettes โ€” RADIO (default), AMBER, BLUE, GREEN, GRAY with pre-computed color LUTs
  • Inline VFO Tuner โ€” Click-to-type frequency entry, UP/DN buttons, step selector (10 Hzโ€“1 MHz), arrow key tuning
  • S-Meter History Chart โ€” Last 120 readings with peak/avg labels and color gradient
  • Band Scanner โ€” Sweep frequency ranges with configurable step size and squelch, click-to-tune results, CSV export
  • Memory Channel Manager โ€” List, recall, store, and clear channels 001-099
  • Antenna Auto-Tune โ€” ATU control button (AC001/AC002 CAT commands)
  • SDR Panadapter โ€” Wideband waterfall via SDRplay RSP2pro (SoapySDR)
  • Audio Streaming โ€” Listen to radio audio directly in the browser
  • WebSocket Real-time Updates โ€” Live frequency, mode, S-meter, TX status
  • Mobile Responsive โ€” Horizontal scrollable tab bar for phone/tablet

๐Ÿ–ฅ๏ธ CLI Tools

  • ft991a-cli status โ€” Get radio status
  • ft991a-cli freq set <hz> โ€” Set frequency
  • ft991a-cli mode set <mode> โ€” Change mode
  • ft991a-cli cw encode/decode/send โ€” Morse code operations

๐Ÿค– MCP Server (AI Integration)

  • Full radio control via Model Context Protocol
  • Compatible with Claude, GPT, and other MCP-capable assistants

๐Ÿ“ก CAT Protocol

  • Complete Yaesu CAT command implementation
  • Frequency, mode, power, PTT, S-meter, band switching
  • Memory channel read/write (MR/MC/MW commands)
  • Antenna tuner control (AC commands)
  • VFO swap, Aโ†’B copy
  • TX lockout safety

Quick Install

# Install from PyPI
pip install ft991a-control

# Launch LCARS web GUI
ft991a-web --host 0.0.0.0 --port 8000 --radio-port /dev/ttyUSB0

# Launch MCP server for AI
ft991a-mcp

# Direct CLI control
ft991a-cli status

Hardware Setup

Required

  1. Yaesu FT-991A with USB-A to USB-B cable
  2. Linux host (tested on Ubuntu 22.04)
  3. Radio Menu โ†’ 031 CAT RATE โ†’ 38400 baud
  4. Add user to dialout group: sudo usermod -a -G dialout $USER

Recommended

  • USB Audio CODEC (e.g., PCM2903B) for audio waterfall
  • SDRplay RSP2pro (or compatible SoapySDR device) for wideband panadapter

Udev Rules (Stable Device Paths)

# /etc/udev/rules.d/99-ft991a.rules
SUBSYSTEM=="tty", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea70", \
  ATTRS{bInterfaceNumber}=="01", SYMLINK+="ft991a-cat"

Then use --radio-port /dev/ft991a-cat for stable access regardless of USB enumeration order.

Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    WebSocket     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   Web Browser   โ”‚โ—„โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บโ”‚   FastAPI        โ”‚
โ”‚   LCARS GUI     โ”‚  Real-time       โ”‚   Web Server     โ”‚
โ”‚                 โ”‚  Audio/FFT       โ”‚   (ft991a-web)   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                              โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                          โ”‚
โ”‚   AI Assistant  โ”‚โ—„โ”€โ”€ MCP Protocol โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚   (Claude, etc) โ”‚                          โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                          โ”‚
                                              โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚   SDRplay       โ”‚    โ”‚   USB Audio     โ”‚   โ”‚
โ”‚   RSP2pro       โ”‚    โ”‚   CODEC         โ”‚   โ”‚
โ”‚   (SoapySDR)    โ”‚    โ”‚   (PCM2903B)    โ”‚   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
         โ”‚ IQ Data              โ”‚ PCM Audio  โ”‚
         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
                                              โ”‚
                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ”‚         FT991A CAT Library          โ”‚
                    โ”‚         (ft991a.cat)                โ”‚
                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                      โ”‚ USB Serial
                                      โ”‚ 38400 baud, 2 stop bits
                                      โ–ผ
                                โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                                โ”‚  Yaesu FT-991A  โ”‚
                                โ”‚  Transceiver    โ”‚
                                โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Web GUI Tabs

Tab Description
VFO Control Frequency display, mode buttons, band presets, power slider, VFO swap/copy, ATU
Audio Audio waterfall, spectrum analyzer, inline tuner, S-meter history, listen button
SDR Wideband panadapter waterfall via SDRplay (click-to-tune, bandwidth selector)
Scanner Band scanner with preset bands, custom range, step sizes, squelch threshold
Memory Memory channel manager โ€” list, recall, store, clear channels 001-099
System Audio device config, WebSocket status, connection info
Config Serial port settings, baud rate, connection test
Status Live radio status, VFO-A/B, mode, power, S-meter, SWR
Diagnostics Error log, raw CAT command testing, system health

CI/CD

GitHub Actions automatically publishes to PyPI on version tag push:

# Bump version in pyproject.toml and __init__.py, then:
git tag v0.6.2
git push github main --tags
# โ†’ GitHub Actions builds and publishes to PyPI

Configuration

Serial Port Settings

ft991a-web --radio-port /dev/ft991a-cat --radio-baud 38400 --host 0.0.0.0 --port 8000

Radio Menu Settings

  • Menu 031 (CAT RATE): 38400 (or match --radio-baud)
  • Menu 032 (CAT TOT): 10 min or longer
  • Menu 033 (CAT RTS): Enable

Safety

โš ๏ธ Important:

  • Always verify proper antenna connection before TX
  • Use TX lockout when not actively transmitting
  • Ensure amateur radio license privileges for frequency/mode
  • Start with low power (5-10W) for testing
  • Never transmit without a licensed operator present

๐Ÿ”’ Built-in Safety:

  • Frequency range validation (30 kHz โ€“ 470 MHz)
  • Power limits (5-100W)
  • TX lockout toggle
  • Mode validation per frequency
  • Serial timeout protection

Python API

from ft991a import FT991A, Mode

radio = FT991A(port="/dev/ft991a-cat", baudrate=38400)
radio.connect()

# Read status
status = radio.get_status()
print(f"Frequency: {status.frequency_a} Hz")
print(f"Mode: {status.mode}")
print(f"S-Meter: {status.s_meter}")

# Tune
radio.set_frequency_a(14_250_000)  # 20m SSB
radio.set_mode(Mode.USB)

# Antenna tuner
radio.tuner_start()  # Auto-tune

# Memory channels
radio.recall_memory(1)
radio.store_memory(5)

REST API

Endpoint Method Description
/api/status GET Radio status (frequency, mode, S-meter, TX)
/api/frequency/a POST Set VFO-A frequency
/api/frequency/b POST Set VFO-B frequency
/api/mode POST Set operating mode
/api/power POST Set TX power
/api/tuner/start POST Start antenna auto-tune
/api/tuner/on POST Turn ATU on
/api/tuner/off POST Turn ATU off
/api/vfo/swap POST Swap VFO-A โ‡„ VFO-B
/api/vfo/a-to-b POST Copy VFO-A โ†’ VFO-B
/api/scan POST Start band scan
/api/scan/stop POST Stop scan
/api/memory/list GET List memory channels
/api/memory/recall POST Recall memory channel
/api/memory/store POST Store to memory channel
/api/memory/clear POST Clear memory channel
/ws WebSocket Real-time status updates
/ws/audio WebSocket Audio FFT stream
/ws/sdr WebSocket SDR wideband FFT stream

Contributing

git clone https://github.com/heliosarchitect/lbf-ham-radio.git
cd lbf-ham-radio
pip install -e .[dev]
pytest tests/

License

MIT License โ€” see LICENSE.

Links


73 de KO4TUV! ๐Ÿ“ก AI-controlled ham radio with LCARS style

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ft991a_control-0.8.1.tar.gz (119.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ft991a_control-0.8.1-py3-none-any.whl (105.7 kB view details)

Uploaded Python 3

File details

Details for the file ft991a_control-0.8.1.tar.gz.

File metadata

  • Download URL: ft991a_control-0.8.1.tar.gz
  • Upload date:
  • Size: 119.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ft991a_control-0.8.1.tar.gz
Algorithm Hash digest
SHA256 94c2119e314ff036d78a9fecd34edde1ad2131edc1c9d7f3dbfa5214e57e6fe4
MD5 6c05a9264df26c1d31d48e8088ef00c3
BLAKE2b-256 9ac5766becc509d360be926f3e8a7c8a01881031b77a5db9118bfe54333fddd3

See more details on using hashes here.

File details

Details for the file ft991a_control-0.8.1-py3-none-any.whl.

File metadata

  • Download URL: ft991a_control-0.8.1-py3-none-any.whl
  • Upload date:
  • Size: 105.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ft991a_control-0.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 49f9302ef5f61d6ea7b250c517f715e71e4a4f5a08cbdaf1ce67f0dcf76d45fe
MD5 f344382f20b70b014173e7a67014158c
BLAKE2b-256 d6d0df7843da100693f4b6ba30f3de6beb80f336f4838ab465b056fe9e6088e0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page