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.4.tar.gz (31.5 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.4-py3-none-any.whl (28.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ft991a_control-0.3.4.tar.gz
  • Upload date:
  • Size: 31.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for ft991a_control-0.3.4.tar.gz
Algorithm Hash digest
SHA256 8c052f8d96fa15000400b64f2bd085094ecce9216ea3f09fc05de2dcc78ddad2
MD5 b941d8d1ec9d42138a5a1ed637f27c9f
BLAKE2b-256 d710f47c809ac090012e5223d8b2bf1523e4d2d8ede5b2ed4b6836e75852a300

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ft991a_control-0.3.4-py3-none-any.whl
  • Upload date:
  • Size: 28.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for ft991a_control-0.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 cc9a7ed06ba3156db34e74b429776b72dcd57ba42641261b8902c54f2968e03d
MD5 481ce30d877339a15fe3c1618f8df0c8
BLAKE2b-256 a71e4adb2167e7c9467f394bfb65df7cb35140ba37b168b0464e7f6f07a0399d

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