Skip to content

TCI client for xLog #174

Description

@LU5DX

Request preparation

  • I checked for existing issues covering the same feature

Feature Request: TCI (Transceiver Control Interface) client for integration with modern SDR radios and software

What

Add a built-in TCI client to Xlog that connects to any TCI-capable SDR or radio software over the standard TCI protocol (WebSocket on a configurable TCP port, default 40001).

From the user's perspective: you go to Preferences → Rig, select TCI as the connection type, enter the host and port, and Xlog gets full CAT control, PTT, and S-meter readings — all over a single WebSocket connection, with zero additional configuration of virtual serial ports or rigctld processes.


Why

Problem 1 — Too many moving parts for a simple integration

Today, connecting Xlog to a modern SDR (e.g. a FlexRadio running AetherSDR, or an Expert Electronics SunSDR) requires setting up multiple independent channels:

  1. CAT control — via hamlib / rigctld TCP or a PTY virtual serial port
  2. RX audio — via DAX PulseAudio pipe modules (or JACK routing)
  3. TX audio — via a second DAX pipe in the reverse direction
  4. Spots — DX cluster telnet connection managed separately

Each of these is a separate failure point. If one breaks (PulseAudio module doesn't load, PTY disappears, rigctld port conflict), the whole chain falls apart. Linux users are especially affected because DAX audio routing on Linux is inherently more fragile than on Windows (pipe modules, PipeWire compatibility, buffer sizing).

Problem 2 — Growing TCI ecosystem

TCI has become a de facto standard well beyond the Expert Electronics / SunSDR world. Software and radios that already support TCI natively — and that Xlog users are likely running:

  • AetherSDR — the open-source FlexRadio client for Linux, recently added a built-in TCI server
  • ExpertSDR3 (Expert Electronics / SunSDR) — the reference TCI implementation
  • SDC (by Yuri) — TCI server bridging FlexRadio's SmartSDR API to TCI clients
  • JTDX / MSHV — TCI for rig control and audio (common companion apps for DX operators)
  • WSJT-X (via TCI-Hamlib Adapter by DL3NEY) — bridges TCI ↔ Hamlib
  • Log4OM v2 — full TCI client built in, proving the pattern works for general-purpose loggers
  • Not1MM, TRlinux, TLF, CQRLOG, QLog, Hello Contest — fellow open source loggers with open TCI client feature requests
  • HamDeck — Stream Deck automation via TCI
  • Various ESP32/Arduino hardware controllers — TCI for physical knobs and buttons

By adding a TCI client, Xlog becomes compatible with all of these without requiring each SDR vendor to add Xlog-specific support.

Problem 3 — The hamlib/rigctld path is functional but limited

hamlib works well for basic frequency/mode control, but it was designed for traditional rigs. It doesn't carry audio, doesn't handle spot injection natively, and adds latency through an extra process hop (rigctld). TCI gives Xlog a direct, richer channel to the radio — a single connection that covers CAT, PTT, and S-meter over one lightweight WebSocket.

Problem 4 — Xlog's simplicity is a strength; TCI matches that philosophy

Xlog is valued precisely for being lightweight and straightforward. TCI fits that philosophy perfectly: one connection, one configuration entry, no daemons to manage. For portable ops and casual DXers — Xlog's core audience — TCI removes the most common friction point of getting rig control working on Linux.


How Other Software Does It

AetherSDR (FlexRadio client for Linux)

AetherSDR recently shipped a built-in TCI server specifically to enable zero-configuration integration with loggers and digital mode software. It exposes frequency, mode, PTT, S-meter, audio, IQ, CW keying, and spot injection — all over one WebSocket. Xlog adding a TCI client would complete that loop for FlexRadio + Linux operators immediately.

Log4OM v2

Log4OM already implements a full TCI client — CAT control, audio, IQ, and spot injection to the panorama display — demonstrating that a general-purpose logger can integrate TCI cleanly and to great effect.

Not1MM, TRlinux, TLF, CQRLOG, QLog, and Hello Contest

All six open source loggers have open feature requests for TCI client support for the same reasons outlined here. Momentum is building across the entire Linux logging ecosystem toward TCI as the standard radio interface for modern SDR hardware.

TCI-Hamlib Adapter (DL3NEY)

For software that doesn't speak TCI natively, Florian DL3NEY wrote tciadapter — a Go program translating TCI ↔ Hamlib rigctld. That workaround exists precisely because demand for TCI bridging is high. Building native support directly into Xlog eliminates the need for this extra process.


Suggested Behavior

Configuration (Preferences → Rig → TCI)

  • Connection type — add TCI as a selectable option alongside the existing hamlib option
  • Host — text field, default 127.0.0.1
  • Port — spinbox, default 40001
  • TRX index — spinbox (default 0) — selects which transceiver to control when the server exposes multiple
  • Auto-reconnect — checkbox (default: on) — reconnect automatically if the server goes away
  • Connection status — read-only indicator: Disconnected / Connecting / Connected (shows server device name once received, e.g. FlexRadio FLEX-6600)

Startup behavior

  1. User selects TCI as the rig control method and clicks Connect
  2. Xlog opens a WebSocket connection to ws://<host>:<port>
  3. The TCI server sends its initialization burst (PROTOCOL:, DEVICE:, VFO:, MODULATION:, RX_ENABLE:, READY;)
  4. Xlog parses the init sequence to populate its internal radio state (frequency, mode, TX capability)
  5. Status bar shows connection state and device name (e.g. TCI: FlexRadio FLEX-6600)

Runtime behavior

TCI event / command Xlog action
VFO:trx,channel,freq; received → Update displayed frequency, pre-fill QSO band
MODULATION:trx,mode; received → Update mode selector
TRX:trx,true/false; received → Update TX indicator
RX_SMETER:trx,channel,value; received → Update S-meter display
User clicks a DX cluster spot → Send VFO:0,0,<freq>;
User changes mode → Send MODULATION:0,<mode>;
PTT activated → Send TX_ENABLE:0,true; / TX_ENABLE:0,false;

Connection resilience

  • Auto-reconnect with configurable retry interval if the server goes away
  • Graceful handling of READY; — do not consider the connection active until READY; is received
  • Ignore unknown TCI commands silently (forward compatibility with newer protocol versions)

Protocol Hints

TCI client side (needs implementation in Xlog)

  • WebSocket client — Xlog is a C/GTK application; libwebsockets (apt install libwebsockets-dev) is the natural fit — mature, widely packaged, and straightforward to integrate into an autotools or CMake build
  • TCI protocol parser — ASCII commands terminated by ;, trivial to parse in C: strtok() on : for command name, strtok() on , for arguments — a self-contained parser of a few dozen lines
  • Connection sequence — connect → receive init burst → wait for READY; → begin normal operation
  • Reference spec — Full protocol at github.com/ExpertSDR3/TCI, protocol version 1.5+ recommended
  • Reference Python clientgithub.com/ars-ka0s/eesdr-tci — useful for testing and understanding message flow

Xlog side (already available)

Xlog already maintains all the state needed to drive and respond to TCI:

  • Frequency / mode — already retrieved via hamlib; TCI becomes an alternative backend delivering the same data
  • PTT / TX — already supported via hamlib PTT; TCI replaces the transport, not the logic
  • S-meter — already polled via hamlib; TCI pushes it unsolicited, reducing polling overhead
  • Band / mode pre-fill — already done from hamlib frequency; TCI frequency events feed the same pre-fill logic

Suggested implementation phases

  1. Phase 1 — Core CAT: WebSocket client + parse init burst + VFO/mode read-write + PTT → full day-to-day DX logging with a TCI-capable radio, replacing hamlib entirely for supported radios
  2. Phase 2 — S-meter push: Receive RX_SMETER: unsolicited → eliminates hamlib polling for meter updates
  3. Phase 3 — Spot injection (optional): Receive SPOT: from TCI server and display alongside existing cluster spots
  4. Phase 4 — Audio (optional): Route audio via RX_AUDIO_STREAM / TX_AUDIO_STREAM → eliminates PulseAudio/JACK plumbing entirely for supported radios

Additional Context

  • The TCI protocol is open source and MIT-licensed — no legal or licensing concerns
  • AetherSDR recently shipped a built-in TCI server specifically to enable this kind of zero-configuration logger integration — Xlog adding TCI client support would complete that loop for operators who value simplicity above all else, which is exactly Xlog's audience
  • Xlog already abstracts its radio interface behind hamlib; TCI follows the same pattern as a lightweight alternative backend selectable from the same Preferences panel
  • libwebsockets is a single, well-packaged dependency that fits naturally into Xlog's existing C/GTK build — the implementation footprint is minimal and in keeping with Xlog's lightweight character
  • Fellow open source loggers Not1MM, TRlinux, TLF, CQRLOG, QLog, and Hello Contest all have open feature requests for the same capability — this is now a shared priority across the entire Linux amateur radio logging community
  • For portable operators and casual DXers — Xlog's core audience — TCI's single-connection simplicity is arguably more valuable than for any other logger: one setting replaces an entire chain of daemons and pipe modules

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions