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 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

  • ๐ŸŒ Web GUI: Real-time web interface with WebSocket updates
  • ๐Ÿ–ฅ๏ธ CLI Tools: Direct command-line control (ft991a-cli)
  • ๐Ÿค– MCP Server: AI integration via Model Context Protocol (ft991a-mcp)
  • ๐Ÿ“ก Full CAT Control: Frequency, mode, power, PTT, S-meter, band switching
  • ๐Ÿ”’ Safety Features: TX lockout, power limits, frequency validation
  • ๐Ÿ“Š Real-time Monitoring: Live status updates and S-meter readings
  • ๐ŸŽ›๏ธ Memory Management: Access programmed memory channels
  • ๐Ÿ”Œ Hardware Interface: USB serial CAT control (38400 baud)

Quick Install

# Install from PyPI
pip install ft991a-control

# Launch web GUI
ft991a-web

# Launch MCP server for AI
ft991a-mcp

# Direct CLI control  
ft991a-cli status

Quick Start Guide

1. Hardware Setup

  1. Connect FT-991A: USB-A to USB-B cable between radio and computer
  2. Enable CAT: Radio Menu โ†’ 031 CAT RATE โ†’ 38400 baud
  3. Check Device: Verify /dev/ttyUSB0 appears (Linux)
  4. Permissions: Add user to dialout group: sudo usermod -a -G dialout $USER

2. Web GUI Mode

# Start web server
ft991a-web

# Open browser
firefox http://localhost:8000

Web Interface Features:

  • Real-time frequency/mode display
  • Click-to-tune frequency control
  • S-meter visualization
  • Mode buttons (LSB/USB/CW/FM/AM/FT8)
  • Power control slider
  • PTT button (with safety confirmation)
  • Band switching buttons

3. Command Line Mode

# Get radio status
ft991a-cli status

# Set frequency (20m FT8)
ft991a-cli freq set 14074000

# Change mode to USB  
ft991a-cli mode set DATA_USB

# Set power to 50W
ft991a-cli power set 50

# Switch to 40m band
ft991a-cli band 40M

# Get S-meter reading
ft991a-cli smeter

4. MCP Server Mode (AI Integration)

# Launch MCP server
ft991a-mcp --port /dev/ttyUSB0 --baud 38400

Available MCP Tools:

  • get_frequency / set_frequency - Tune the radio
  • get_mode / set_mode - Change operating modes
  • get_power / set_power - Control TX power
  • ptt_on / ptt_off - Key/unkey transmitter
  • get_smeter - Read signal strength
  • get_status - Complete radio status
  • set_band - Switch amateur bands
  • get_memories / recall_memory - Memory channels

Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    WebSocket     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   Web Browser   โ”‚โ—„โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค   FastAPI       โ”‚
โ”‚   (ft991a-web)  โ”‚    Real-time     โ”‚   Web Server    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    Updates       โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                             โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                         โ”‚
โ”‚   AI Assistant  โ”‚โ—„โ”€โ”€ MCP Protocol โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚   (Claude, etc) โ”‚                         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                         โ”‚
                                             โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                         โ”‚
โ”‚   CLI Tools     โ”‚โ—„โ”€โ”€ Direct Access โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚   (ft991a-cli)  โ”‚                         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                         โ”‚
                                             โ”‚
                          โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                          โ”‚         FT991A CAT Library        โ”‚
                          โ”‚         (ft991a.cat)             โ”‚
                          โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                           โ”‚ USB Serial
                                           โ”‚ 38400 baud 
                                           โ”‚ ASCII CAT
                                           โ–ผ
                                     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                                     โ”‚  Yaesu FT-991A  โ”‚
                                     โ”‚  Transceiver    โ”‚
                                     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Installation Options

From PyPI (Recommended)

pip install ft991a-control

Development Install

git clone https://github.com/heliosarchitect/lbf-ham-radio.git
cd lbf-ham-radio
pip install -e .

With Optional Dependencies

# Development tools
pip install ft991a-control[dev]

# Audio processing (future)  
pip install ft991a-control[audio]

Configuration

Serial Port Settings

# Default settings
--port /dev/ttyUSB0
--baud 38400

# Custom settings
ft991a-cli --port /dev/ttyACM0 --baud 9600 status
ft991a-web --radio-port /dev/ttyUSB1 --radio-baud 19200
ft991a-mcp --port /dev/serial/by-id/usb-FTDI... --baud 38400

Radio Menu Settings

  • Menu 031 (CAT RATE): Set to 38400 or match --baud parameter
  • Menu 032 (CAT TOT): 10 min or longer for continuous operation
  • Menu 033 (CAT RTS): Enable for hardware flow control

Safety & Best Practices

โš ๏ธ Important Safety Notes:

  • RF Exposure: Observe FCC/IC RF exposure limits
  • Antenna: Always verify proper antenna connection before PTT
  • Power: Start with low power (5-10W) for testing
  • Licensing: Ensure amateur radio license privileges for frequency/mode
  • TX Lock: Use toggle_tx_lock tool to prevent accidental transmission

๐Ÿ”’ Built-in Safety Features:

  • Frequency range validation (30kHz - 56MHz)
  • Power limits (5-100W)
  • Mode validation per frequency
  • TX lockout functionality
  • Serial timeout protection

Troubleshooting

Connection Issues

# Check USB device
lsusb | grep -i ftdi

# Check serial ports  
ls -la /dev/ttyUSB*

# Test permissions
groups $USER | grep dialout

# Manual connection test
ft991a-cli --port /dev/ttyUSB0 status

Common Problems

  • Permission denied: Add user to dialout group, logout/login
  • Device not found: Check USB cable, try different port
  • Radio not responding: Verify CAT enabled (Menu 031), correct baud rate
  • Web GUI not accessible: Check firewall, try --host 0.0.0.0

API Reference

Python Library

from ft991a import FT991A, Mode

# Connect to radio
radio = FT991A(port="/dev/ttyUSB0", baud=38400)
radio.connect()

# Basic operations
freq = radio.get_frequency()
radio.set_frequency(14074000)  # 20m FT8
radio.set_mode(Mode.DATA_USB)
status = radio.get_status()

REST API (Web Server)

  • GET /api/status - Get radio status
  • POST /api/frequency - Set frequency
  • POST /api/mode - Set mode
  • POST /api/power - Set TX power
  • WebSocket /ws - Real-time updates

Contributing

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

# Run tests (Note: tests need API signature updates)
pytest tests/

# Code formatting  
black src/ tests/
isort src/ tests/

# Type checking
mypy src/

Note: Unit tests need to be updated to match the actual FT991A API signatures. Current tests use placeholder signatures and will be fixed in v0.3.1.

License

MIT License - see LICENSE file.

Hardware Support

Tested Hardware:

  • Yaesu FT-991A (primary target)
  • Linux (Ubuntu 22.04+, Debian 11+)
  • USB-A to USB-B cables

Future Hardware:

  • Other Yaesu radios with compatible CAT
  • Windows/macOS support
  • CI-V interface (Icom)

Screenshots

[Screenshots placeholder - will be added after web deployment]

Related Projects

  • Hamlib: Cross-platform radio control library
  • flrig: Rig control GUI by W1HKJ
  • WSJT-X: Weak signal digital modes
  • fldigi: Multi-mode digital modem

73! ๐Ÿ“ก Happy hamming with AI-controlled FT-991A

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.3.0.tar.gz (31.7 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.3.0-py3-none-any.whl (27.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for ft991a_control-0.3.0.tar.gz
Algorithm Hash digest
SHA256 a71d33b64230ed4e63d5d7f26fae68fa3af51d56c8fa2c842e0c76ba1dc57d3d
MD5 a4648cbcd9572f0a0bf924ffccd070b9
BLAKE2b-256 233e2b04cf03f59c7f1c120dc4c5c4ef4a9d1b1b837159ff57fe879343bc22ea

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for ft991a_control-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 899a8b1eaeb5f170d11ad7a0d6ff2f63d2af174e37739484d0b43204ff1dccc0
MD5 8a1c71b6215daddada43d1b6f45a81fa
BLAKE2b-256 e95a5cb8989abb103ad688cd49c5ab595e748d68aa5ca2d42cda70206896e4a0

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