Skip to content

Latest commit

 

History

History
109 lines (79 loc) · 4.13 KB

File metadata and controls

109 lines (79 loc) · 4.13 KB

XML-RPC Server (flrig emulation)

The server emulates flrig on port 12345, allowing software like WSJT-X, JTDX, and JS8Call to control the radio via the flrig XML-RPC protocol.

Note: This implementation has been primarily tested with WSJT-X. Other programs might require additional XML-RPC methods or parameters that are not currently supported by this proxy.

Connection

  • Default Port: 12345
  • Endpoint: POST /RPC2 or POST /
  • Protocol: XML-RPC over HTTP

Supported Methods

Info

Method Description Response
main.get_version flrig version string "2.0.04"
rig.get_xcvr Rig name "Xiegu-G90"
system.listMethods List all supported methods array of method names

Frequency

Method Description Response
rig.get_vfo Current frequency (Hz) "14074000"
rig.get_vfoA Current frequency VFO A (Hz) "14074000"
rig.set_vfo Set frequency (generic alias) 1 (ok) / 0 (error)
rig.set_vfoA Set frequency VFO A 1 (ok) / 0 (error)
rig.set_verify_vfoA Set + verify frequency VFO A 1 (ok) / 0 (error)
rig.set_vfoA_fast Set frequency VFO A (no verify) 1 (ok) / 0 (error)

VFO

Method Description Response
rig.get_AB Active VFO "A" or "B"

Mode

Method Description Response
rig.get_mode Current mode "USB", "LSB", etc.
rig.get_modeA Current mode VFO A "USB", "LSB", etc.
rig.get_modes List of supported modes array
rig.get_bwA Bandwidth VFO A ["N/A", ""]
rig.set_mode Set mode 1 (ok) / 0 (error)
rig.set_modeA Set mode VFO A 1 (ok) / 0 (error)
rig.set_verify_mode Set + verify mode 1 (ok) / 0 (error)

Accepted mode strings: LSB, USB, AM, CW, CWR, PKTLSB (= L-D), PKTUSB (= U-D).

When the digital-sticky option is enabled (HAMPROXY_XMLRPC_DIGITAL_STICKY=true), incoming USB and LSB requests are silently promoted to PKTUSB and PKTLSB respectively, but only while the radio is already in a digital mode. This prevents software like WSJT-X from accidentally pulling the radio out of L-D / U-D. All other modes are unaffected.

Meters

Method Description Response
rig.get_smeter S-Meter raw value (0–241) "128"
rig.get_swrmeter SWR × 10 (e.g. SWR 1.5 → "15") "10"
rig.get_pwrmeter TX power output (W) "15"
rig.get_power TX power output (W) "15"
rig.get_maxpwr Max power (W) 20
rig.get_pwrmeter_scale Power meter scale 1

Power

Method Description Response
rig.set_power Set TX power (W) 1 (ok) / 0 (error)
rig.set_verify_power Set + verify TX power 1 (ok) / 0 (error)

PTT

Method Description Response
rig.get_ptt PTT status "1" (TX) / "0" (RX)
rig.set_ptt Set PTT 1 (ok) / 0 (error)
rig.set_verify_ptt Set + verify PTT 1 (ok) / 0 (error)
rig.set_ptt_fast Set PTT (no verify) 1 (ok) / 0 (error)

State Consistency

After a successful set command (rig.set_vfo*, rig.set_mode*, rig.set_ptt*), the internal cached status is updated immediately. Any subsequent read call (rig.get_vfo, rig.get_mode, rig.get_ptt) will return the new value without waiting for the next polling cycle.

Integration with External Software

WSJT-X / JTDX / JS8Call

  1. Open SettingsRadio.
  2. Select Rig: flrig.
  3. In flrig server: localhost port 12345.
  4. Click Test CAT.

Optional: keep digital mode (FT8, FT4, JS8…)

WSJT-X may send a plain USB/LSB request on connect, pulling the radio out of L-D / U-D. To prevent this, enable digital-sticky:

HAMPROXY_XMLRPC_DIGITAL_STICKY=true ./g90proxy

Example Request

curl -s -X POST http://localhost:12345/RPC2 \
  -H "Content-Type: text/xml" \
  -d '<?xml version="1.0"?><methodCall><methodName>rig.get_vfoA</methodName><params></params></methodCall>'