Skip to content

Latest commit

 

History

History
80 lines (60 loc) · 3.03 KB

File metadata and controls

80 lines (60 loc) · 3.03 KB

Hamlib TCP Emulation (rigctld)

Beta: This feature is currently in beta.

The go-g90proxy server emulates the rigctld (Hamlib) TCP protocol, allowing external software to control the radio.

Connection

  • Default Port: 4532
  • Protocol: Text-based over TCP

Supported Commands

Both short form and long form (\get_freq, \set_freq, etc.) are supported.

Short Long form Description Response
f \get_freq Read frequency (Hz) 14070000
F <Hz> \set_freq <Hz> Set frequency RPRT 0
m \get_mode Read mode and bandwidth USB\n1
M <mode> 0 \set_mode <mode> 0 Set mode RPRT 0
t \get_ptt Read PTT status 0 or 1
T <0|1> \set_ptt <0|1> Set PTT RPRT 0
v \get_vfo Read active VFO VFOA
V <VFO> \set_vfo <VFO> Set VFO (VFOA, VFOB) RPRT 0
s \get_strength Read signal strength (dBm) -73
\get_powerstat Radio power state 1
\dump_state Rig capabilities (multiline)
\chk_vfo VFO check CHKVFO 0
\status Custom: all params at once freq;mode;vfo;ptt;pwr;swr;dbm
q \quit Close connection

Testing & Integration

rigctl (Command Line)

The implementation has been successfully tested using Hamlib 4.5.5 with the official rigctl utility:

rigctl -m 2 -r localhost:4532 f

Telnet

You can also connect and issue commands interactively via raw TCP using telnet:

telnet localhost 4532

Supported Modes

Mode string Description Firmware
LSB Lower Sideband all
USB Upper Sideband all
AM Amplitude Modulation all
CW CW (normal) all
CWR / CW-R CW (reverse) all
PKTLSB / L-D / LSB-D LSB Digital 1.80+
PKTUSB / U-D / USB-D USB Digital 1.80+

Digital modes (firmware 1.79+)

The G90 supports CI-V command 0x26 (extended mode command), which reads and writes mode, data flag, and filter simultaneously in a single transaction:

  • Get: FE FE 88 E0 26 00 FD → response FE FE E0 88 26 00 <mode> <dataFlag> <filter> FD
  • Set: FE FE 88 E0 26 00 <mode> <dataFlag> <filter> FD

The data flag byte distinguishes digital from analog:

  • dataFlag = 0x00 → analog (USB / LSB)
  • dataFlag = 0x01 → digital (U-D / L-D)

The legacy 0x04 command returns only the base mode byte and cannot detect digital modes.

The Hamlib names PKTUSB / PKTLSB are used for wire compatibility; the radio display and on-air software (WSJT-X, JTDX) show them as U-D / L-D.

Known limitations for digital modes

Since command 0x26 is used for both read and write, switching through analog modes no longer causes loss of state — the server reads back the actual data flag on every poll.

Technical Notes

The server handles multiple clients. Requests are serialized internally to ensure that only one command at a time reaches the radio's physical serial port, preventing collisions.