FT-710 CAT Control Suite - Setup & User Guide
=============================================

This application provides bidirectional CAT control and real-time spectrum/waterfall
rendering for the Yaesu FT-710 transceiver on Linux (x64 / ARM64) and Windows (x64).


Table of Contents
-----------------
1. Transceiver Configuration
2. Linux Setup Guide
3. Windows Setup Guide
4. Automatic Configuration (config.toml)
5. Troubleshooting


1. Transceiver Configuration
----------------------------
Before launching the application, verify the following settings on your Yaesu FT-710:
- Press [FUNC] -> [RADIO SETTING] -> [MODE GENERAL]:
  * 030 CAT RATE: 38400 bps (default)
  * 031 CAT TOT: 10 ms (or 100 ms)
  * 032 CAT RTS: OFF
- Connect a standard USB-B to USB-A cable directly from the FT-710 USB port
  to your computer.


2. Linux Setup Guide
--------------------
To allow access to both the CAT serial port and the FT4222 high-speed SPI bridge:

2.1. Serial Port Permissions (CAT Control)
By default, Linux restricts access to serial ports (/dev/ttyUSB*).
Add your current user to the 'dialout' group:

    sudo usermod -aG dialout $USER

(Note: You must log out and log back in, or reboot your computer, for this group
change to take effect).

2.2. Direct USB Access Permissions (Waterfall/Spectrum)
The application needs raw USB access to the internal FT4222 bridge to stream the
real-time spectrum and waterfall data. Create a udev rule to allow user access:

    echo 'SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="601c", MODE="0666", GROUP="plugdev"' | sudo tee /etc/udev/rules.d/99-ft710.rules

(Note: 0403:601c are the standard Vendor and Product IDs for the FT-710's internal
FT4222 interface).

2.3. Apply udev Rules
Reload the udev rules so the changes take effect immediately without rebooting:

    sudo udevadm control --reload-rules && sudo udevadm trigger

2.4. Running the Application
Ensure the binary has execution permissions and run it:

    chmod +x ft710cat_*_linux_x64
    ./ft710cat_*_linux_x64


3. Windows Setup Guide
----------------------
On Windows 10 and Windows 11 (64-bit), the FT-710 requires two drivers:

3.1. CAT Serial Port Driver (Silicon Labs CP2105)
The transceiver integrates a Silicon Labs CP2105 Dual USB-to-UART bridge controller.
- If Windows does not install the driver automatically via Windows Update:
  * Download the "CP210x Universal Windows Driver" from the official Yaesu website
    or from Silicon Labs.
  * Extract the downloaded archive, right-click 'silabser.inf', and select 'Install'.
- Once installed, Windows Device Manager under "Ports (COM & LPT)" will show:
  * "Silicon Labs Dual CP2105 USB to UART Bridge: Enhanced COM Port (COMx)"
    -> This is the main CAT control port (cat1_port).
  * "Silicon Labs Dual CP2105 USB to UART Bridge: Standard COM Port (COMy)"
    -> This is the secondary port for CW/FSK/PTT keying (cat2_port).

3.2. Spectrum & Waterfall Driver (FTDI FT4222H / D2XX)
The transceiver uses an internal FTDI FT4222H USB-to-SPI bridge to extract raw RF data.
- If Windows Device Manager shows "FT4222" with a warning icon under "Other devices":
  * Download the official FTDI D2XX driver (CDM v2.12.36 or higher) from ftdichip.com.
  * Run the installer or install 'ftdibus.inf' via Device Manager.
- Once installed, Device Manager under "Universal Serial Bus controllers" will display:
  * "FT4222H Interface A" (Used by the app for SPI waterfall streaming)
  * "FT4222H Interface B"

3.3. Runtime Libraries
The application package includes 'LibFT4222-64.dll'.
Keep this DLL file in the same directory as the executable ('ft710cat_*.exe').
(Note: 'FTD2XX.dll' is automatically provided by Windows in System32 once the
official FTDI D2XX driver is installed).

3.4. Windows 11 Smart App Control (SAC)
Windows 11 (version 22H2 and newer) introduces "Smart App Control". When active
("Enforced"), it strictly blocks any newly compiled or open-source binary lacking
a commercial digital certificate, displaying:
"Smart App Control blocked an app that might be unsafe".

Unlike classic SmartScreen, Smart App Control provides no bypass button in its UI.
To allow running open-source amateur radio tools on Windows 11, disable SAC via
PowerShell (run as Administrator) and restart:

    Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\CI\Policy' -Name 'VerifiedAndReputablePolicyState' -Value 0 -Type DWord
    Restart-Computer

Values for 'VerifiedAndReputablePolicyState':
  * 0 = Off (Disabled - allows unsigned applications)
  * 2 = Evaluation Mode (Allows unsigned applications while collecting telemetry)

(Note: A computer restart is mandatory for the kernel Code Integrity policy to take effect).

3.5. Running the Application
Extract the entire ZIP archive and run 'ft710cat_*_windows_x64.exe'.


4. Automatic Configuration (config.toml)
----------------------------------------
You do NOT need to manually create 'config.toml' before running the app.
On first launch, if 'config.toml' is not present:
- The application automatically scans connected USB hardware.
- If the FT-710 is plugged in, it detects the CP2105 Enhanced COM port and configures it:
    * Linux:   cat1_port = "/dev/ttyUSB0" (or detected port)
    * Windows: cat1_port = "COM3" (or detected COM port)
- Default connection parameters:
    cat1_baudrate   = 38400      (Must match FT-710 menu setting)
    spi_description = "FT4222 A" (Default SPI interface descriptor)
    cat1_poll_ms    = 15         (Read polling interval in ms)
    ui_target_fps   = 15         (Target rendering frame rate)

Regarding 'ui_target_fps':
- The default value (ui_target_fps = 15) keeps CPU usage very low, suitable for modest systems.
- However, the Yaesu FT-710 transceiver delivers waterfall frames natively at 60 FPS.
- Increasing to 'ui_target_fps = 60' in config.toml provides full native fluidity and avoids
  graphic artifacts when moving the mouse cursor across the waterfall display.

You can customize colors, FPS limits, spectrum smoothing filters, and audio waterfall
settings by editing 'config.toml' with any standard text editor.


5. Troubleshooting
------------------
- "Failed to open CAT port" / Radio not responding:
  * Check that the USB cable is securely connected and the transceiver is turned ON.
  * Confirm that 'cat1_baudrate' in 'config.toml' matches the 030 CAT RATE menu setting.
  * Linux: Verify your user belongs to the 'dialout' group (`groups` or `id -Gn`).
  * Windows: Check Device Manager to confirm the COM number assigned to "Enhanced COM Port".

- "Waterfall / Spectrum not displaying":
  * Linux: Verify the udev rule '/etc/udev/rules.d/99-ft710.rules' is installed and active.
  * Windows: Verify "FT4222H Interface A" is present and healthy in Device Manager.
  * Ensure 'spi_description = "FT4222 A"' in 'config.toml'.

- "Smart App Control blocked an app that might be unsafe" (Windows 11):
  * Windows 11 blocks unsigned executables with zero cloud reputation.
  * Run PowerShell as Administrator, execute the command in Section 3.4, and restart your computer.
