RIGCTLD(1)

πŸ“¦
version 4.7.2 Β· 5 versions
, in alpine 3.24, arch rolling, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu stonking

🌸 RIGCTLD(1) β€” Hamlib Utilities πŸŽ€

okay bestie, pull up a chair because today we're talking about rigctld from the Hamlib Utilities family (that's section 1 of the manual, iykyk) and honestly?? she's kind of a big deal. ✨


πŸ’– NAME πŸ’–

rigctld β€” TCP radio control daemon, no cap. she sits there, she listens, she controls your radio. iconic behavior fr fr.


πŸ¦‹ SYNOPSIS πŸ¦‹

rigctld [-hlLouV] [-m id] [-r device] [-p device] [-d device] [-P type]
        [-D type] [-s baud] [-c id] [-S char] [-T IPADDR] [-t number]
        [-C parm=val] [-X seconds] [-v[-Z]]

like, that's the whole vibe check right there πŸ’…


🌈 DESCRIPTION 🌈

okay so. the rigctld program is a radio control daemon that handles client requests via TCP sockets. yes literally, she's the group-chat admin of your radios 🫢

this means multiple user programs can share one radio β€” though bestie, lowkey the manpage itself says this needs more development so like, temper your expectations a lil πŸ™ˆ

multiple radios can be controlled on different TCP ports by using multiple rigctld processes. and heads up: multiple processes/ports are also necessary if some clients use extended responses and/or vfo mode. so you might need up to 4 processes/ports for each combination of extended response/vfo mode. yes that's a lot of processes, she's high maintenance and we love that for her πŸ’…

the syntax of the commands are the same as rigctl(1) β€” so if you already know her sister, you're set ✨

the hope (and it's a sweet hope πŸ₯Ί) is that rigctld will be especially useful for client authors using languages such as Perl, Python, PHP, and others. web girlies and script gremlins, this one's for you 🧚


πŸ“‘ the protocol bit πŸ“‘

rigctld communicates to a client through a TCP socket using text commands shared with rigctl. the protocol is simple bestie, like:

  • commands are sent to rigctld on one line
  • rigctld responds to get commands with the requested values, one per line, when successful 🌸
  • otherwise, she responds with one line β€œRPRT x”, where β€˜x’ is a negative number indicating the error code 😭
  • commands that do not return values respond with the line β€œRPRT x”, where β€˜x’ is β€˜0’ when successful, otherwise is a negative number indicating the error code

every single line is terminated with a newline β€˜\n’ character. periodt. πŸ’…

this protocol is primarily for use by the NET rigctl (radio model 2) backend, fyi πŸŽ€


πŸŽ€ the Extended Response Protocol πŸŽ€

there's a whole separate Extended Response Protocol that extends all of the above by:

  • echoing the received command string as a header
  • any returned values as a key: value pair
  • and the β€œRPRT x” string as the end of response marker, which includes the Hamlib success or failure value 🌟

peep the PROTOCOL section for the details, bestie β€” she goes deep.

the manpage says to consider using this protocol for clients that will interact with rigctld directly through a TCP socket. consider it considered. ✨


⚠️ real talk ⚠️

keep in mind that Hamlib is BETA level software. 😭 while a lot of backend libraries lack complete rig support, the basic functions are usually well supported. so like β€” she's in her beta era, be gentle 🫢

please report bugs and provide feedback at the e-mail address given in the BUGS section below. patches and code enhancements sent to the same address are welcome β€” yes she's literally asking, don't be shy, we love a contributor πŸ‘‘


🌸 πŸ’– πŸŽ€ πŸ¦‹ still with me? good, because there's so much more coming πŸ¦‹ πŸŽ€ πŸ’– 🌸

✨ OPTIONS ✨

okay bestie, this is the part where we go through every single flag πŸ’… and there are a LOT, so grab a snack. πŸ“

First, the ground rules of the syntax β€” this program follows the usual GNU command line syntax. Short options that take an argument can have the value right up against them or separated by a space, either one works. Long options that start with two dashes (that's β€˜-’) require an β€˜=’ between the option and any argument. no vibes, just syntax.

Here's the whole summary of supported options, no skips, no "and so on", we're doing all of them:

  • -m, --model=id β€” pick your radio model number. Defaults to dummy rig (yes, it cosplays as a radio if you don't tell it otherwise).

See the model list with rigctld -l.

Heads up: rigctl (or third party software using the C API) will use radio model 2 for NET rigctl β€” this model number is not used for rigctld even though it shows up in the model list. iykyk.
  • -r, --rig-file=device β€” use device as the file name of the port that's connected to the radio.

Typically \/dev\/ttyS0, \/dev\/ttyS1, \/dev\/ttyUSB0, etc. on Linux, or COM1, COM2, etc. on MS Windows. The BSD flavors and Mac OS/X have their own designations β€” go check your system's documentation. 🫢

It can also be a network address:port, like 127.0.0.1:12345.

And there's a special string, uh-rig, which you can pass to enable micro-ham device support. cute name, serious business.

  • -p, --ptt-file=device β€” use device as the file name of the Push-To-Talk device, using a device file described above. πŸŽ™οΈ
  • -d, --dcd-file=device β€” use device as the file name of the Data Carrier Detect device, using a device file described above. πŸ“‘
  • -P, --ptt-type=type β€” set the type of Push-To-Talk device.

The supported types are β€˜RIG’ (CAT command), β€˜DTR’, β€˜RTS’, β€˜PARALLEL’, β€˜CM108’, β€˜GPIO’, β€˜GPION’, β€˜NONE’ β€” and this overrides whatever PTT type was defined in the rig's backend.

Some side effects of this command, and bestie these are real: when type is set to DTR, read PTT state comes from the Hamlib frontend, not read from the radio. When set to NONE, PTT state cannot be read or set at all, even if the rig backend supports reading/setting PTT status from the rig. dead it. πŸ’€

  • -D, --dcd-type=type β€” set the type of Data Carrier Detect device.

Supported types are β€˜RIG’ (CAT command), β€˜DSR’, β€˜CTS’, β€˜CD’, β€˜PARALLEL’, β€˜CM108’, β€˜GPIO’, β€˜GPION’, β€˜NONE’.

  • -s, --serial-speed=baud β€” set the serial speed to baud rate.

It uses the maximum serial speed from the radio backend capabilities (the ones set by -m above) as the default.

  • -c, --civaddr=id β€” use id as the CI-V address to talk to the rig.

Only useful for Icom and some Ten-Tec rigs, bestie. 🌸

Note: the id is in decimal notation, unless it's prefixed by 0x, in which case it's hexadecimal. math is math.
  • -S, --separator=char β€” use char as the separator instead of line feed.

The default is '\n'. Highly recommend using $ or @ because those work on both Unix and Windows. cross-platform slay.

  • -T, --listen-addr=IPADDR β€” use IPADDR as the listening IP address.

The default is ANY (0.0.0.0).

rigctld can be run and connected to like this:

rigctld
    rigctl -m 2
    rigctl -m 2 -r 127.0.0.1
    rigctl -m 2 -r localhost
    rigctl -m 2 -r 192.168.1.1 (local IP address)
    rigctl -m 2 -r ::1 (on Linux rigctld doesn't listen on IPV6 by default)

rigctld -T 127.0.0.1
    rigctl -m 2 (binds to all interfaces)
    rigctl -m 2 -r 127.0.0.1 (bind only to 127.0.0.1)
    Exceptions:
    rigctl -m 2 -r localhost (only works if localhost is IPV4 address)

rigctld -T localhost (will set up on IPV4 or IPV6 based on localhost)
    rigctl -m 2
    rigctl -m 2 -r localhost
    rigctl -m 2 ip6-localhost
    Exceptions:
    rigctl -m 2 -r 127.0.0.1 (only works if localhost is IPV4 address)
    rigctl -m 2 -r ::1 (only works if localhost is IPV6 address)

On Linux only where ip6-localhost is fe00::0:
rigctld -T ip6-localhost
    rigctl -m 2 -r ip6-localhost

that block is the whole vibe check for networking, i fear. 🌈

  • -t, --port=number β€” use number as the TCP listening port.

The default is 4532.

Note: since rotctld's default port is 4533, it's advisable to use even numbered ports for rigctld, e.g. 4532, 4534, 4536, etc. keep the even/odd thing going, it's giving organization. πŸ‘‘
  • -L, --show-conf β€” list all the config parameters for the radio defined with -m above. Will exit if no -r is given. Note the dummy device has no serial parameters. πŸ™ˆ
  • -C, --set-conf=parm=val[,parm=val] β€” set configuration parameter(s). Some common ones are:
    • async:True enables asynchronous data transfer for backends that support it. This allows use of transceive and spectrum data.
    • auto_power_on:True enables compatible rigs to be powered up on open
    • auto_power_off:True enables compatible rigs to be powered down on close
    • auto_disable_screensaver:True enables compatible rigs to have their screen saver disabled on open
    • dcd_type: Data Carrier Detect (or squelch) interface type override
    • dcd_pathname: Path name to the device file of the Data Carrier Detect (or squelch)
    • disable_yaesu_bandselect:True disables the automatic band select on band change for Yaesu rigs
    • dtr_state: ON turns on DTR, OFF turns it off, Unset disables it
    • freq_skip:!=0 skips setting freq on TX_VFO when in RX and on RX_VFO when in TX -- for use with gpredict and rigs that do not have TARGETABLE_VFO
    • lo_freq: Frequency to add to the VFO frequency for use with a transverter
    • post_write_delay: Delay in ms between each command sent out
    • ptt_share:True enables ptt port to be shared with other apps
    • ptt_type: Push-To-Talk interface type override
    • ptt_pathname: Path name to the device file of the Push-To-Talk
    • ptt_bitnum: Push-To-Talk GPIO bit number
    • retry: Max number of retry
    • rts_state: ON turns on DTR, OFF turns it off, Unset disables it
    • twiddle_timeout: For satellite ops when VFOB is twiddled will pause VFOB commands until timeout
    • twiddle_rit: Suppress get_freq on VFOB for RIT tuning satellites
    • timeout: Timeout in ms
    • write_delay: Delay in ms between each byte sent out
    • tuner_control_pathname: Path name to a script/program to control a tuner with 1 argument of 0/1 for Tuner Off/On

Use the -L option above for a list of configuration parameters for a given model number. (and yes, rts_state really does say DTR in its description β€” we're keeping it exactly as printed, no cap. πŸ“)

  • -u, --dump-caps β€” dump capabilities for the radio defined with -m above, and exit. ✨
  • -l, --list β€” list all model numbers defined in Hamlib and exit.

The list is sorted by model number.

Note: in Linux the list can be scrolled back using Shift+PageUp/Shift+PageDown, or using the scrollbars of a virtual terminal in X or the cmd window in Windows. The output can be piped to more(1) or less(1), e.g. rigctld -l | more. πŸ’œ
  • -o, --vfo β€” enable vfo mode.

An extra VFO argument will be required in front of each appropriate command (except set_vfo). Otherwise, β€˜currVFO’ is used when this option is not set and an extra VFO argument is not used.

See chk_vfo below. πŸ‘€

  • -v, --verbose β€” set verbose mode, cumulative (see DIAGNOSTICS below).
  • -W, --twiddle_timeout=seconds β€” enables timeout when VFO twiddling is detected. Some functions will be ignored.

Should only be needed when controlling software should be "paused" so you can move the VFO. Continuous movement extends the timeout. keep twiddling, it'll keep waiting. πŸŒ€

  • -w, --twiddle_rit=seconds β€” suppress VFOB getfreq so RIT can be twiddled. 🎚️
  • -x, --uplink=option β€” 1=Sub, 2=Main

For GPredict use, to ignore get_freq for Sub or Main uplink VFO.

Should allow downlink VFO movement without confusing GPredict or the uplink.

  • -Z, --debug-time-stamps β€” enable time stamps for the debug messages.

Use only in combination with the -v option, because on its own it generates no output at all. it's giving background character without -v. πŸ’€

  • -A, --password β€” sets a password on rigctld which requires hamlib to use rig_set_password and rigctl to use \password to access rigctld. A 32-char shared secret will be displayed to be used on the client side. (NOT IMPLEMENTED)
yes bestie, it says NOT IMPLEMENTED right there in the original. we are not pretending otherwise. 🚫
  • -R, --rigctld-idle β€” will make rigctld close the rig when no clients are connected. Normally it remains connected to speed up connects. efficiency vs. cold starts, pick your fighter.
  • -b, --bind-all β€” will make rigctld try to bind to the first network device available. 🫢
  • -h, --help β€” show a summary of these options and exit.
  • -V, --version β€” show version of rigctld and exit.
Note: some options may not be implemented by a given backend and will return an error. This is most likely to happen with the --set-conf and --show-conf options. not every backend ate, and that's on them.

Please note that the backend for the radio to be controlled, or the radio itself, may not support some commands. In that case the operation will fail with a Hamlib error code. that's just how it is. 😭


πŸ’… COMMANDS πŸ’…

okay so this is the fun part β€” the actual talking-to-the-radio part. πŸŽ€

Commands can be sent over the TCP socket either as a single char, or as a long command name plus the value(s) space separated on one β€˜\n’ terminated line. See PROTOCOL.

Since most of the Hamlib operations have a set and a get method, a single upper case letter will be used for set methods, whereas the corresponding single lower case letter refers to the get method. Each operation also has a long name; prepend a backslash, β€˜\’, to send a long command name all in lower case. uppercase = set, lowercase = get, backslash = long name. periodt. πŸ’…

Example (Perl): print $socket "\\dump_caps\n"; to see what the radio's backend can do.

Note: in Perl and many other languages a β€˜\’ will need to be escaped with a preceding β€˜\’ so that even though two backslash characters appear in the code, only one will be passed to rigctld. This is a possible bug, beware! πŸ› not me warning you about a real one.
Note: the backend for the radio to be controlled, or the radio itself, may not support some commands. In that case, the operation will fail with a Hamlib error message. (same energy as the OPTIONS note, and yes we are saying it twice, because it happens twice. πŸ™ˆ)

Here's a summary of the supported commands. In the case of set commands, the quoted italicized string is replaced by the value in the description. In the case of get commands, the quoted italicized string is the key name of the value returned. iykyk. 🌟

  • F, set_freq 'Frequency' β€” set 'Frequency', in Hz.

Frequency may be a floating point or integer value. math girlies rise. πŸ“

  • f, get_freq β€” get 'Frequency', in Hz.

Returns an integer value and the VFO hamlib thinks is active. Note that some rigs (e.g. all Icoms) cannot track the current VFO, so hamlib can get out of sync with the rig if the user presses rig buttons like the VFO. rigctld clients should ensure they set the intended VFO or use vfo mode. 🌸

M</p>, set_mode</p> 'Mode' 'Passband' πŸ’…

Okay bestie, this is the one that sets both the mode and the passband at the same time. Two for one, we love efficiency.

Mode is a token, and here's the whole roster: β€˜USB’, β€˜LSB’, β€˜CW’, β€˜CWR’, β€˜RTTY’, β€˜RTTYR’, β€˜AM’, β€˜FM’, β€˜WFM’, β€˜AMS’, β€˜PKTLSB’, β€˜PKTUSB’, β€˜PKTFM’, β€˜ECSSUSB’, β€˜ECSSLSB’, β€˜FA’, β€˜SAM’, β€˜SAL’, β€˜SAH’, β€˜DSB’.

Passband is in Hz as an integer, or -1 for no change, or β€˜0’ for the radio backend default. And heads up: IC7300 can use 1,2,3 to select which filter to use. ✨

Note: passing a β€˜?’ (query) as the first argument instead of a Mode token will return a space separated list of radio backend supported Modes. Use this to determine the supported Modes of a given radio backend. It's giving "let the radio tell you what it can do" 🫢

m</p>, get_mode</p>

Get 'Mode' and 'Passband'.

Returns Mode as a token and Passband in Hz as in set_mode above. Simple. Iconic.

V</p>, set_vfo</p> 'VFO'

Set 'VFO'.

VFO is a token: β€˜VFOA’, β€˜VFOB’, β€˜VFOC’, β€˜currVFO’, β€˜VFO’, β€˜MEM’, β€˜Main’, β€˜Sub’, β€˜TX’, β€˜RX’, β€˜MainA’, β€˜MainB’, β€˜MainC’, β€˜SubA’, β€˜SubB’ β€˜SubC’.

In VFO mode (see --vfo option above) only a single VFO parameter is required:

$ rigctl -m 2029 -r /dev/rig -o

Rig command: V
VFO: VFOB

Rig command:

v</p>, get_vfo</p>

Get current 'VFO'.

Returns VFO as a token as in set_vfo above. No cap. πŸ’–


J</p>, set_rit</p> 'RIT'

Set 'RIT'.

RIT is in Hz and can be + or -. A value of β€˜0’ resets RIT (Receiver Incremental Tuning) to match the VFO frequency.

Note: RIT needs to be explicitly activated or deactivated with the set_func command. This allows setting the RIT offset independently of its activation and allows RIT to remain active while setting the offset to β€˜0’. So like, you can zero it out without killing it off β€” she stays on, she's just not offsetting anything. πŸŽ€

j</p>, get_rit</p>

Get 'RIT' in Hz.

Returned value is an integer.

Z</p>, set_xit</p> 'XIT'

Set 'XIT'.

XIT is in Hz and can be + or -. A value of β€˜0’ resets XIT (Transmitter Incremental Tuning) to match the VFO frequency.

Note: XIT needs to be explicitly activated or deactivated with the set_func command. This allows setting the XIT offset independently of its activation and allows XIT to remain active while setting the offset to β€˜0’. Same vibe as RIT, just on the transmit side, and honestly? Slay. πŸ’…

z</p>, get_xit</p>

Get 'XIT' in Hz.

Returned value is an integer.


T</p>, set_ptt</p> 'PTT'

Set 'PTT'.

PTT is a value: β€˜0’ (RX), β€˜1’ (TX), β€˜2’ (TX mic), or β€˜3’ (TX data).

t</p>, get_ptt</p>

Get 'PTT' status.

Returns PTT as a value in set_ptt above.

S</p>, set_split_vfo</p> 'Split' 'TX VFO'

Set 'Split' mode.

Split is either β€˜0’ = Normal or β€˜1’ = Split.

Set 'TX VFO'.

TX VFO is a token: β€˜VFOA’, β€˜VFOB’, β€˜VFOC’, β€˜currVFO’, β€˜VFO’, β€˜MEM’, β€˜Main’, β€˜Sub’, β€˜TX’, β€˜RX’.

s</p>, get_split_vfo</p>

Get 'Split' mode.

Split is either β€˜0’ = Normal or β€˜1’ = Split.

Get 'TX VFO'.

TX VFO is a token as in set_split_vfo above.

I</p>, set_split_freq</p> 'Tx Frequency'

Set 'TX Frequency', in Hz.

Frequency may be a floating point or integer value. Both are valid, we don't gatekeep here. πŸ’œ

i</p>, get_split_freq</p>

Get 'TX Frequency', in Hz.

Returns an integer value.

K</p>, set_split_freq_mode</p> 'TX Frequency' 'TX Mode' 'TX Passband'

Set 'TX Frequency' , 'TX Mode' and 'TX Passband'. See set_split_mode for more information.

k</p>, get_split_freq_mode</p>

Get the current split settings. All of them. In one go. 🫢

X</p>, set_split_mode</p> 'TX Mode' 'TX Passband'

Set 'TX Mode' and 'TX Passband'.

TX Mode is a token: β€˜USB’, β€˜LSB’, β€˜CW’, β€˜CWR’, β€˜RTTY’, β€˜RTTYR’, β€˜AM’, β€˜FM’, β€˜WFM’, β€˜AMS’, β€˜PKTLSB’, β€˜PKTUSB’, β€˜PKTFM’, β€˜ECSSUSB’, β€˜ECSSLSB’, β€˜FA’, β€˜SAM’, β€˜SAL’, β€˜SAH’, β€˜DSB’.

TX Passband is in Hz as an integer, or β€˜0’ for the radio backend default.

Note: passing a β€˜?’ (query) as the first argument instead of a TX Mode token will return a space separated list of radio backend supported TX Modes. Use this to determine the supported TX Modes of a given radio backend. Literally just ask her politely and she'll spill the whole list. ✨

x</p>, get_split_mode</p>

Get 'TX Mode' and 'TX Passband'.

Returns TX Mode as a token and TX Passband in Hz as in set_split_mode above.


Y</p>, set_ant</p> 'Antenna' 'Option'

Set 'Antenna' and 'Option'.

Number is 1-based antenna# (β€˜1’, β€˜2’, β€˜3’, ...). Yeah, we count from one, the math girlies know. πŸŽ€

Option depends on rig. For Icom it probably sets the Tx & Rx antennas as in the IC-7851. See your manual for rig specific option values. Most rigs don't care about the option.

For the IC-7851, FTDX3000 (and perhaps others) it means this:

1 = TX/RX = ANT1  FTDX3000=ANT1/ANT3
2 = TX/RX = ANT2  FTDX3000=ANT2/ANT3
3 = TX/RX = ANT3  FTDX3000=ANT3
4 = TX/RX = ANT1/ANT4
5 = TX/RX = ANT2/ANT4
6 = TX/RX = ANT3/ANT4

y</p>, get_ant</p> 'Antenna'

Get 'Antenna'

A value of 0 for Antenna will return the current TX antenna.

0 is 1-based antenna# (β€˜1’, β€˜2’, β€˜3’, ...).

Option returned depends on rig. For Icom it is likely the RX only flag.

b</p>, send_morse</p> 'Morse'

Send 'Morse' symbols. For Yaesu rigs use memory# (1-5 for most rigs) or up to 50 char message (which will use memory#1).

Example from rigctld socket:

b CQ CQ DE ME

Yaesu example to send message#1 from rigctld socket:

b 1

0xbb</p>, stop_morse</p>

Stop sending the current morse code. Enough. We're done. πŸ’€

0xbc</p>, wait_morse</p>

Wait for morse to finish -- only works on full break-in.

0x94</p>, send_voice_mem</p> 'Msgnum'

Have rig transmit internal message 'Msgnum'

0xab</p>, stop_voice_mem</p>

Stop transmission of internal message

0x8b</p>, get_dcd</p>

Get 'DCD' (squelch) status: β€˜0’ (Closed) or β€˜1’ (Open).

0x8d</p>, set_twiddle</p> 'Timeout'

Set the twiddle 'Timeout' in seconds.

0x8e</p>, get_twiddle</p>

Get the twiddle 'Timeout' in seconds.


R</p>, set_rptr_shift</p> 'Rptr Shift'

Set 'Rptr Shift'.

Rptr Shift is one of: β€˜+’, β€˜-’, or something else for β€˜None’.

r</p>, get_rptr_shift</p>

Get 'Rptr Shift'.

Returns β€˜+’, β€˜-’, or β€˜None’.

O</p>, set_rptr_offs</p> 'Rptr Offset'

Set 'Rptr Offset', in Hz.

o</p>, get_rptr_offs</p>

Get 'Rptr Offset', in Hz.


C</p>, set_ctcss_tone</p> 'CTCSS Tone'

Set 'CTCSS Tone', in tenths of Hz.

c</p>, get_ctcss_tone</p>

Get 'CTCSS Tone', in tenths of Hz.

D</p>, set_dcs_code</p> 'DCS Code'

Set 'DCS Code'.

d</p>, get_dcs_code</p>

Get 'DCS Code'.

0x90</p>, set_ctcss_sql</p> 'CTCSS Sql'

Set 'CTCSS Sql' tone, in tenths of Hz.

0x91</p>, get_ctcss_sql</p>

Get 'CTCSS Sql' tone, in tenths of Hz.

0x92</p>, set_dcs_sql</p> 'DCS Sql'

Set 'DCS Sql' code.

0x93</p>, get_dcs_sql</p>

Get 'DCS Sql' code.


0x95</p>, set_cache</p> 'Timeout'

Set cache timeout in ms.

0x96</p>, get_cache</p>

Get cache timeout in ms.

Set the uplink VFO to 'Uplink' (1=Sub, 2=Main).

N</p>, set_ts</p> 'Tuning Step'

Set 'Tuning Step', in Hz.

n</p>, get_ts</p>

Get 'Tuning Step', in Hz.


U</p>, set_func</p> 'Func' 'Func Status' πŸ‘‘

Set 'Func' and 'Func Status'. This is the big one, bestie, buckle up. πŸ¦‹

Func is a token: β€˜ABM’, β€˜AFC’, β€˜AFLT’, β€˜AIP’, β€˜ANF’, β€˜ANL’, β€˜APF’, β€˜ARO’, β€˜BC2’, β€˜BC’, β€˜COMP’, β€˜CSQL’, β€˜DIVERSITY’, β€˜DSQL’, β€˜DUAL_WATCH’, β€˜FAGC’, β€˜FBKIN’, β€˜LOCK’, β€˜MBC’, β€˜MN’, β€˜MON’, β€˜MUTE’, β€˜NB2’, β€˜NB’, β€˜NR’, β€˜OVF_STATUS’, β€˜RESUME’, β€˜REV’, β€˜RF’, β€˜RIT’, β€˜SATMODE’, β€˜SBKIN’, β€˜SCEN’, β€˜SCOPE’, β€˜SEND_MORSE’, β€˜SEND_VOICE_MEM’, β€˜SPECTRUM’, β€˜SPECTRUM_HOLD’, β€˜SQL’, β€˜SYNC’, β€˜TBURST’, β€˜TONE’, β€˜TRANSCEIVE’, β€˜TSQL’, β€˜TUNER’, β€˜VOX’, β€˜VSC’, β€˜XIT’.

And here's what every single one of them means, no skipping, we don't do that here:

 ABM -- Auto Band Mode
 AFC -- Auto Frequency Control ON/OFF
 AFLT -- AF Filter setting
 AIP -- RF pre-amp (AIP on Kenwood, IPO on Yaesu, etc.)
 ANF -- Automatic Notch Filter (DSP)
 ANL -- Noise limiter setting
 APF -- Audio Peak Filter
 ARO -- Auto Repeater Offset
 BC -- Beat Canceller
 BC2 -- 2nd Beat Cancel
 COMP -- Speech Compression
 CSQL -- DCS Squelch setting
 DIVERSITY -- Diversity receive
 DSQL -- Digital modes squelch
 DUAL_WATCH -- Dual Watch / Sub Receiver
 FAGC -- Fast AGC
 FBKIN -- Full Break-in (CW mode)
 LOCK -- Lock
 MBC -- Manual Beat Canceller
 MN -- Manual Notch
 MON -- Monitor transmitted signal
 MUTE -- Mute
 NB -- Noise Blanker
 NB2 -- 2nd Noise Blanker
 NR -- Noise Reduction (DSP)
 OVF_STATUS -- Read overflow status 0=Off, 1=On
 RESUME -- Scan auto-resume
 REV -- Reverse transmit and receive frequencies
 RF -- RTTY Filter
 RIT -- Receiver Incremental Tuning
 SATMODE -- Satellite mode ON/OFF
 SBKIN -- Semi Break-in (CW mode)
 SCEN -- scrambler/encryption
 SCOPE -- Simple bandscope ON/OFF
 SEND_MORSE -- Send specified characters using CW
 SEND_VOICE_MEM -- Transmit in SSB message stored in memory
 SPECTRUM -- Spectrum scope data output ON/OFF
 SPECTRUM_HOLD -- Pause spectrum scope updates ON/OFF
 SQL -- Turn Squelch Monitor on/off
 SYNC -- Synchronize VFOs
 TBURST -- 1750 Hz tone burst
 TONE -- CTCSS Tone TX
 TRANSCEIVE -- Send radio state changes automatically ON/OFF
 TSQL -- CTCSS Activate/De-activate RX
 TUNER -- Enable automatic tuner
 VOX -- Voice Operated Relay
 VSC -- Voice Scan Control
 XIT -- Transmitter Incremental Tuning

Func Status is a non null value for β€œactivate” or β€œde-activate” otherwise, much as TRUE/FALSE definitions in the C language (true is non-zero and false is zero, β€˜0’). So like, zero means no, anything else means yes. It's giving boolean but make it Unix. πŸ’–


ok bestie real talk: a bunch of these commands have a lil party trick β€” you can drop a ? (query) in as the first argument and the backend will just hand you a space separated list of everything it supports for that token. Use it. It's how you find out what your radio can actually do instead of guessing and crying. πŸ’…

πŸ¦‹ u, get_func 'Func'

Get 'Func Status'.

Hands you back the Func Status as a non null value for the Func token you passed in set_func, same as above.

✨ Note: passing a ? (query) as the first argument instead of a Func token will return a space separated list of radio backend supported get function tokens. Use this to figure out what a given radio backend can actually do.

πŸ’– L, set_level 'Level' 'Level Value'

Set 'Level' and 'Level Value'. Two things, one command, we love efficiency.

Level is a token, and it's a whole menu: AF, AGC, AGC_TIME, ALC, ANTIVOX, APF, ATT, BAL, BAND_SELECT, BKINDL, BKIN_DLYMS, COMP, COMP_METER, CWPITCH, ID_METER, IF, KEYSPD, METER, MGC, MGF, MGL, MICGAIN, MONITOR_GAIN, NB, NOTCHF, NOTCHF_RAW, NR, PBT_IN, PBT_OUT, PREAMP, RAWSTR, RF, RFPOWER, RFPOWER_METER, RFPOWER_METER_WATTS, SLOPE_HIGH, SLOPE_LOW, SPECTRUM_ATT, SPECTRUM_AVG, SPECTRUM_EDGE_HIGH, SPECTRUM_EDGE_LOW, SPECTRUM_MODE, SPECTRUM_REF, SPECTRUM_SPAN, SPECTRUM_SPEED, SQL, STRENGTH, SWR, TEMP_METER, USB_AF, USB_AF_INPUT, VD_METER, VOXDELAY, VOXGAIN.

The Level Value can be a float or an integer. For the AGC token the value is one of 0 = OFF, 1 = SUPERFAST, 2 = FAST, 3 = SLOW, 4 = USER, 5 = MEDIUM, 6 = AUTO. And bestie, not all of those values work on all rigs, that's just how it is 😭. To list the ones your rig actually likes, run:

rigctl -m MODEL_ID -u | grep "AGC levels"

or on Windows:

rigctl -m MODEL_ID -u | find "AGC levels"

Level units

  • 0.0-1.0 where 0=0% and 1.0=100% (except for BAL where 50% is center)
    • AF, ALC, ANTIVOX, BAL, COMP, MICGAIN, MONITOR_GAIN, NOTCHF_RAW, NR, RF, RFPOWER, RFPOWER_METER, USB_AF, VOXGAIN
  • Amps
    • ID_METER(A)
  • dB
    • NL, COMP_METER, PREAMP, ATT, SLOPE_LOW, SLOPE_HIGH, SPECTRUM_REF, SPECTRUM_ATT, STRENGTH
  • Degrees(temperature)
    • TEMP_METER(C)
  • Hz
    • CWPITCH, IF, NOTCHF, PBT_IN, PBT_OUT, SPECTRUM_EDGE_LOW, SPECTRUM_EDGE_HIGH, SPECTRUM_SPAN
  • Seconds
    • VOXDELAY(ds), BKINDL(ms), BKIN_DLYMS(ms)
  • Raw info from rig
    • RAWSTR, BANDSELECT (subject to change -- index right now but may convert to band name)
  • SWR
    • SWR
  • Volts
    • VD_METER
  • Lookup β€” if a level shows 0/0/0 then it's probably a lookup value
    • METER RIG_METER_XXXX 1=SWR, 2=COMP, 4=ALC, 8=IC, 16=DB, 32=PO, 64=VDD, 128=Temp
    • AGC 0=None, 1=SuperFast, 2=Fast, 3=Slow, 4=User, 5=Medium, 6=Auto
      • Note: not all AGC values may be available -- see AGC Level in dumpcaps (e.g. rigctl -m 1035 -u | grep AGC)
    • SPECTRUM_MODE 0=None, 1=Center, 2=Fixed, 3=Center Scroll, 4=Fixed Scroll
    • SPECTRUM_AVG rig specific

METER -- SWR,COMP,ALC,IC/ID,DB,PO,VDD,TEMP or you can use the numbers above in Lookup, l METER returns the meter number=name

  • Watts
    • RFPOWER_METER_WATTS
  • WPM
    • KEYSPD
🌸 Note: passing a ? (query) as the first argument instead of a Level token will return a space separated list of radio backend supported set level tokens. Use this to determine the supported levels of a given radio backend.

πŸŽ€ l, get_level 'Level'

Get 'Level Value'.

Returns the Level Value as a float or integer for the Level token you gave in set_level up there ☝️.

πŸ’œ Note: passing a ? (query) as the first argument instead of a Level token will return a space separated list of radio backend supported get level tokens. Use this to determine the supported levels of a given radio backend.

🌈 P, set_parm 'Parm' 'Parm Value'

Set 'Parm' and 'Parm Value'.

Parm is a token: AFIF, AFIF_ACC, AFIF_LAN, AFIF_WLAN, ANN, APO, BACKLIGHT, BANDSELECT, BAT, BEEP, KEYERTYPE, KEYLIGHT, SCREENSAVER, TIME.

⭐ Note: passing a ? (query) as the first argument instead of a Parm token will return a space separated list of radio backend supported set parameter tokens. Use this to determine the supported parameters of a given radio backend.

And here's the tea on each one πŸ«–:

  • ANN -- "Announce" level, see ann_t
  • APO -- Auto power off, int in minute
  • BACKLIGHT -- LCD light, float [0.0 ... 1.0]
  • BEEP -- Beep on keypressed, int (0,1)
  • TIME -- hh:mm:ss, int in seconds from 00:00:00
  • BAT -- battery level, float [0.0 ... 1.0]
  • KEYLIGHT -- Button backlight, on/off
  • SCREENSAVER -- rig specific timeouts
  • AFIF -- 0=AF audio, 1=IF audio -- see IC-7300/9700/705
  • BANDSELECT -- band name, e.g. BAND160M, BAND80M.... a ? instead of band will show band possibilities
  • KEYERTYPE -- Icom keyer type 0,1,2 or STRAIGHT,BUG,PADDLE

🧚 p, get_parm 'Parm'

Get 'Parm Value'.

Returns the Parm Value as a float or integer for the Parm token you gave in set_parm above.

πŸ“ Note: passing a ? (query) as the first argument instead of a Parm token will return a space separated list of radio backend supported get parameter tokens. Use this to determine the supported parameters of a given radio backend.

πŸ‘‘ B, set_bank 'Bank'

Set 'Bank'.

Sets the current memory bank number. That's the whole vibe.


✨ E, set_mem 'Memory#'

Set 'Memory#' channel number.


πŸ¦‹ e, get_mem

Get 'Memory#' channel number.


πŸ”₯ G, vfo_op 'Mem/VFO Op'

Perform a 'Mem/VFO Op'.

Mem/VFO Operation is a token: CPY, XCHG, FROM_VFO, TO_VFO, MCL, UP, DOWN, BAND_UP, BAND_DOWN, LEFT, RIGHT, TUNE, TOGGLE.

πŸ’– Note: passing a ? (query) as the first argument instead of a Mem/VFO Op token will return a space separated list of radio backend supported Set Mem/VFO Op tokens. Use this to determine the supported Mem/VFO Ops of a given radio backend.

🌸 g, scan 'Scan Function' 'Scan Channel'

Perform a 'Scan Function' on a 'Scan Channel'.

Scan Function is a token: DELTA, MEM, PLT, PRIO, PROG, SLCT, STOP, VFO.

Scan Option is an integer.

  • Scan Option for Yaesu rigs: 0=STOP, 1=UP, 2=DOWN.
  • Scan Option for Icom rigs: it's a channel number to program with G, otherwise not used.
  • Scan Option for Kenwood rigs: not used. King of doing nothing, honestly.
🌈 Note: passing a ? (query) as the first argument instead of a Scan Fct token will return a space separated list of radio backend supported Scan Function tokens. Use this to determine the supported Scan Functions of a given radio backend.

πŸ’… H, set_channel 'Channel'

Set memory 'Channel' data.

Sets memory channel information. That's the mission.


πŸ’œ h, get_channel 'Channel' 'readonly'

Get channel memory.

If readonly!=0 then only channel data is returned and the rig stays exactly where it was, on the current channel, no movement, no drama. If readonly=0 then the rig will be set to the channel requested. Choose wisely bestie 🫢.


⭐ A, set_trn 'Transceive'

Set 'Transceive' mode.

Transceive is a token: OFF, RIG, POLL.

Transceive is a mechanism for radios to report events without a specific call for information. They just tell you unprompted. Main character energy fr fr.

πŸŽ€ Note: passing a ? (query) as the first argument instead of a Transceive token will return a space separated list of radio backend supported Transceive mode tokens. Use this to determine the supported Transceive modes of a given radio backend.

πŸ¦‹ a, get_trn

Get 'Transceive' mode.

Transceive mode (reporting event) as in set_trn above.


πŸ’– *, reset 'Reset'

Perform rig 'Reset'.

Reset is a value: 0 = None, 1 = Software reset, 2 = VFO reset, 4 = Memory Clear reset, 8 = Master reset.

🚨 Since these values are defined as a bitmask in include/hamlib/rig.h, it should be possible to OR these values together to do multiple resets at once, if the backend supports it or supports a reset action via rig control at all.

πŸŽ€ 0x87, set_powerstat 'Power Status'

Set 'Power Status'.

Power Status is a value: 0 = Power Off, 1 = Power On, 2 = Power Standby (enter standby), 4 = Power Operate (leave standby).


✨ 0x88, get_powerstat

Get 'Power Status' as in set_powerstat above.


πŸ”₯ 0x89, send_dtmf 'Digits'

Set DTMF 'Digits'. Dial away 🎢.


🌈 0x8a, recv_dtmf

Get DTMF 'Digits'.


⭐ 0xac, set_conf 'Token' 'Value'

Set 'Token' to 'Value'.


πŸ’œ 0xad, get_conf 'Token'

Get value of 'Token'.


🧚 _, get_info

Get misc information about the rig. The little bits and bobs.


🌸 0xf5, get_rig_info

Get misc information about the rig vfo status and other info.


πŸ’… 0xf1, halt

When issued inside rigctl it quits it; when issued by another client it quits rigctld instead. Same command, different victim 😭.


🫢 0xf3, get_vfo_info 'VFO'

Get misc information about a specific vfo.


πŸ¦‹ 0xf4, get_vfo_list

Get the names of the available VFOs.


πŸŽ€ 0xf6, get_modes

Get all supported bandwidths for all modes.


⭐ 0xf7, get_mode_bandwidths 'Mode'

Get bandwidths of 'Mode'. See also get_modes.


πŸ‘‘ dump_state

Return certain state information about the radio backend.


πŸ”₯ 1, dump_caps

Not a real rig remote command, it just dumps capabilities, i.e. what the backend knows about this model, and what it can do.

πŸ’€ TODO: Ensure this is in a consistent format so it can be read into a hash, dictionary, etc. Bug reports requested.
🚨 Note: This command will produce many lines of output so be very careful if using a fixed length array! For example, running this command against the Dummy backend results in over 5kB of text output. Like, she's chatty. She's giving essay.

And one last thing about that one, bestie: the VFO parameter is not used in 'VFO mode'. That's it, that's the note. 🫢


  • 2, power2mW β€” takes 'Power [0.0..1.0]', 'Frequency', 'Mode' and hands you back 'Power mW'. ✨

Basically it's a glow-up conversion: it turns a Power value somewhere in the range 0.0...1.0 into the actual real transmit power in milli-Watts (as an integer). πŸ’…

You still have to hand over 'Frequency' and 'Mode' too, okay? Because the output power can literally shift depending on those values. So don't skip them. πŸ™ˆ

And again β€” the VFO parameter is not used in VFO mode.

  • 3, dump_conf β€” not a real rig remote command, it's just out here dumping the current config, plus all the allowed ranges of values. It's giving backstage tour energy. πŸŽ€
  • 4, mW2power β€” takes 'Power mW', 'Frequency', 'Mode' and returns 'Power [0.0..1.0]'.

This is the reverse slay πŸ¦‹: it converts the real transmit power in milli-Watts (integer) back into a Power value in the range 0.0 ... 1.0.

Again, 'Frequency' and 'Mode' need to come along, because output power may vary according to those values. Not optional, babe.

VFO parameter is not used in VFO mode. (Yes, this is a recurring theme. It's iconic. πŸ‘‘)

  • w, send_cmd β€” fires a raw command string straight at the radio. 'Cmd'

Lowkey the most useful troubleshooting move ever β€” it's for testing and troubleshooting radio commands and responses while you're developing a backend.

For binary protocols, enter values as \0xAA\0xBB. Expect a 'Reply' from the radio, which will most likely be a binary block or an ASCII string depending on the radio's protocol (go read your radio's computer control documentation, bestie, it knows). And if you're testing a protocol like SmartSDR where there are spaces in the commands, use quotes, like:

w "C0|set slice 0 tx=1"

The command terminator β€” the one set by the send-cmd-term option above β€” will terminate each command string sent to the radio. That character should not be part of the input string. ⚠️

  • W, send_cmd_rx β€” sends a raw command string to the radio and expects nbytes back, or the terminator char (like ;). 'Cmd' nbytes_or_terminator_char

Same troubleshooting/testing vibe as above β€” super handy while developing a backend. Real talk though: if the number of bytes you requested is <= the number actually returned, no timeout will occur. And if you hand it a char, that char will be used to terminate reading the string, so ';' is popular for Kenwood/Yaesu commands, for example. πŸŽ€

Heads up: the command argument can have no spaces in it. For binary protocols, enter values as \0xAA\0xBB. Expect a 'Reply' from the radio, which will likely be a binary block or an ASCII string depending on the radio's protocol (see your radio's computer control documentation).

And once more for the people in the back: the command terminator, set by the send-cmd-term option above, will terminate each command string sent to the radio. This character should not be a part of the input string. πŸ’…

  • set_clock β€” set 'DateTime'. 'DateTime'

This sets the rig clock, and okay, gentle warning: some rigs just do not handle seconds or milliseconds. If you try to set sec/msec and the rig doesn't support it, you'll get a debug warning message. Not a crash, just a lil note. πŸ™ˆ Format is ISO8601. The formats accepted allow for 2-digit or 4-digit time zone:

YYYY-MM-DDTHH:MM:SS.SSS+ZZ (where +ZZ is either -/+ UTC offset HH)
YYYY-MM-DDTHH:MM:SS.SSS+ZZZZ (where +ZZZZ is either -/+ UTC offset HHMM)
YYYY-MM-DDTHH:MM:SS+ZZ
YYYY-MM-DDTHH:MM:SS+ZZZZ
YYYY-MM-DDTHH:MM+ZZ
YYYY-MM-DDTHH:MM+ZZZZ
YYYY-MM-DD (sets date only)
local (sets both clocks to local time)
utc (sets both clocks to utc time)

Note: Icom rigs expect you to set local time and the hours off to UTC. So... a 4PM EST example would be 2021-12-01T16:00:00-0500. But... if you want to display GMT you must set the clock for GMT with zero UTC offset. Hopefully Icom will allow displaying either clock in the future. Fingers crossed, fr fr. 🀞

Note: Kenwood rigs only allow setting the local clock, and then only if it's not autoset by NTP. Trying to set the clock when NTP is in use will set the offset, but not the time β€” and no error status will be returned. Sneaky. Time displayed on the auxiliary clock is solely determined by UTC and the aux offset.

  • get_clock β€” get 'RigTime'.

Grabs the rig clock. Same caveat as before: some rigs don't handle seconds or milliseconds. Format is ISO8601 YYYY-MM-DDTHH:MM:SS.sss+ZZ where +ZZ is either -/+ UTC offset. ⭐

  • chk_vfo β€” get 'Status'.

Returns Status as 1 if the vfo option is on and 0 if the vfo option is off. This command reflects the -o switch for rigctl and rigctld, and it can be dynamically changed by set_vfo_opt. Vibe check on your own settings, basically. πŸ‘‘

  • set_vfo_opt β€” set 'Status'. 'Status'

Sets the vfo option Status: 1 = on, or 0 = off. This is the same as using the -o switch for rigctl and rigctld. And the cute part β€” this can be dynamically changed while running. πŸ”₯

  • set_separator β€” set 'SeparatorChar'. 'SeparatorChar'

Changes the rigctld response to use a special char instead of newline (recommend #). Handy for node-red's tcprequest node. And yes, this can be dynamically changed while running too. πŸ’–

  • get_separator β€” get 'SeparatorChar'.

Shows you the current SeparatorChar. That's it, that's the whole thing.

  • pause β€” pause for the given whole (integer) number of 'Seconds' before sending the next command to the radio. 'Seconds'

Just... a lil breather for your radio. 🧚

  • password β€” sends password to rigctld when rigctld has been secured with -A. 'Password'

Must use the 32-char shared secret from rigctld.

(NOT IMPLEMENTED) β€” yeah bestie, this one isn't actually a thing yet. Don't come for me. πŸ’€
  • set_lock_mode β€” turns mode lock on (1) or off (0) (only when using rigctld). 'Locked'

Turning it on will prevent all clients from changing the rig mode. For example, this is useful when running CW Skimmer in FM mode on an IC-7300. Clicking spots in a spotting program will not change the VFOA mode when lock is on. So you'd do "set_lock_mode 1" when CW Skimmer is started, and "set_lock_mode 0" when CW Skimmer is stopped. Locking the mode down like it's your main character moment. πŸ‘‘

  • get_lock_mode β€” returns the current lock mode status 1=On, 2=Off (only useful when using rigctld).
  • send_raw β€” can send an ASCII string or 0xnn values or xnn values β€” there can be no spaces in the command string. 'Terminator' 'String'

Possible terminator values are CR, LF, ;, ICOM, 0-100 (bytes to read), or -1 meaning unknown (will timeout on read). Examples below β€” and note that a ; must be escaped in Unix/Linux:

For Windows & Unix/Linux we have a new colon-separated format for hex digits

send_raw icom 0xFE:0xFE:0x94:0x03:0xFD Note: colon-separated does not have to be escaped on Unix/Linux
send_raw -1 0xFE:0xFE:0x94:0x03:0xFD
send_raw 14 0xFE:0xFE:0x94:0x03:0xFD
Note that ASCII commands still require escaping the semicolon on Unix/Linux
send_raw \; FA\;MD\;

For Windows:

send_raw ; FA;MD;
send_raw icom 0xFE;0xFE;0x94;0x03;0xFD
send_raw -1 0xFE;0xFE;0x94;0x03;0xFD
send_raw 14 0xFE;0xFE;0x94;0x03;0xFD

For Unix/Linux:

send_raw icom 0xFE;0xFE;0x94;0x03;0xFD
send_raw \; FA\;MD\;
send_raw -1 0xFE;0xFE;0x94;0x03;0xFD
send_raw 14 0xFE;0xFE;0x94;0x03;0xFD
  • client_version β€” the client can send its version to rigctld and get feedback on compatibility, deprecation, and alternatives. 'String'

Like a little "hey are we still compatible?" check-in. Communication slay. πŸ’–

  • hamlib_version β€” returns the Hamlib version with ISO8601 date/time.
  • test β€” performs test routines. Under development.

Don't @ me, it's a work in progress. πŸ™ˆ

  • set_gpio β€” sets GPIO1, GPIO2, GPIO3, GPIO4 on the GPIO ptt port. Can also use 1,2,3,4. 'GPIO#' '0/1'
  • get_gpio β€” reads GPIO1, GPIO2, GPIO3, GPIO4 on the GPIO ptt port. Can also use 1,2,3,4. 'GPIO#'
  • skip_init β€” skips rig initialization β€” useful when executing commands with rigctl to speed up things. Fastest route, no detours. πŸ¦‹

πŸ¦‹ PROTOCOL πŸ¦‹

okay bestie so there are two protocols rigctld speaks (yes she's bilingual, we stan a multitasking queen πŸ’…), and they are the Default Protocol and the Extended Response Protocol.

The Default Protocol is main-character energy aimed at the communication between Hamlib library functions and rigctld (the "NET rigctl", which you get with radio model 2 πŸŽ€).

The Extended Response Protocol is the one you want when your scripts or other programs are talking to rigctld directly, because it gives you consistent feedback every single time. obsessed.

✨ Default Protocol ✨

The Default Protocol is intentionally simple, like it's not trying to be mysterious. Commands go in on a single line with any values they need. In practice, the reliable trick is to terminate every command string with a newline character, \n. no cap.

Example set frequency and mode commands (Perl code (typed text is shown in bold)):

print $socket "F 14250000\n";
print $socket "\\set_mode LSB 2400\n";   # escape leading '\'

A one line response gets sent back as a reply to set commands, RPRT x\n, where x is the Hamlib error code and 0 means the command ate. πŸ’…

Responses from rigctld get commands are text values and they match the same tokens used in the set commands. Each value comes back on its own line. On error, the string RPRT x\n is returned, where x is the Hamlib error code.

Example get frequency (Perl code):

print $socket "f\n";
"14250000\n"

Most get functions return one to three values. A notable exception is the dump_caps command, which returns many lines of key:value pairs β€” she's verbose and she knows it 🫢.

This protocol is primarily used by the "NET rigctl" (rigctl model 2) backend, which lets applications already written for Hamlib's C API take advantage of rigctld without needing to rewrite any application code. Literally the bestie who shows up and does the work for you. An application's user can select rotator model 2 ("NET rigctl") and then set rig_pathname to localhost:4532 or another network host:port (set by the -T/-t options, respectively, above).

🌸 Extended Response Protocol 🌸

The Extended Response protocol adds several rules to the strings returned by rigctld, plus a rule about the command syntax. sit down, it's a list:

  1. The command received by rigctld is echoed with its long command name followed by the value(s) (if any) received from the client, terminated by the specified response separator, as the first record of the response.
  2. The last record of each block is the string RPRT x\n where x is the numeric return value of the Hamlib backend function that was called by the command.
  3. Any records consisting of data values returned by the radio backend are prepended by a string immediately followed by a colon, then a space, and then the value terminated by the response separator. e.g. Frequency: 14250000\n when the command was prepended by +.
  4. All commands received will be acknowledged by rigctld with records from rules 1 and 2. Records from rule 3 are only returned when data values must be returned to the client.

An example response to a set_mode command sent from the shell prompt (note the prepended +):

$ echo "+M USB 2400" | nc -w 1 localhost 4532
set_mode: USB 2400
RPRT 0

In this case, the long command name and values are returned on the first line, and the second line contains the end of block marker plus the numeric radio backend return value indicating success. slay.

An example response to a get_mode query:

$ echo "+\get_mode" | nc -w 1 localhost 4532
get_mode:
Mode: USB
Passband: 2400
RPRT 0
Note: The \ is still required for the long command name even with the ERP character. don't forget it bestie, she WILL not answer πŸ™ˆ

In this case, since no value is passed to rigctld, the first line consists only of the long command name. The final line shows that the command was processed successfully by the radio backend.

Invoking the Extended Response Protocol requires prepending a command with a punctuation character. As shown in the examples above, prepending a + character to the command makes the responses separated by a newline character (\n). Any other punctuation character recognized by the C ispunct() function β€” except \, ?, or _ β€” will cause that character to become the response separator and the entire response will be on one line.

Separator character summary (the vibe check of punctuation πŸ‘‘):

  • + β€” Each record of the response is appended with a newline (\n).
  • ;, |, or , β€” Each record of the response is appended by the given character, resulting in the entire response on one line. These are common record separators for text representations of spreadsheet data, etc.
  • ? β€” Reserved for help in rigctl.
  • _ β€” Reserved for get_info short command
  • # β€” Reserved for comments when reading a command file script.
Note: Other punctuation characters have not been tested! Use at your own risk. seriously, nobody ran the tests, you're on your own πŸ’€

For example, invoking a get_mode query with a leading ; returns:

get_mode:;Mode: USB;Passband: 2400;RPRT 0

Or, using the pipe character | returns:

get_mode:|Mode: USB|Passband: 2400|RPRT 0

And a set_mode command prepended with a | returns:

set_mode: USB 2400|RPRT 0

Such a format will allow reading a response as a single event using a preferred response separator. Other punctuation characters have not been tested! (yes she said it twice, she means it 😭)

The following commands have been tested with the Extended Response protocol and the included testctld.pl Perl script:

set_freq, get_freq, set_split_freq, get_split_freq, set_mode,
get_mode, set_split_mode, get_split_mode, set_vfo, get_vfo,
set_split_vfo, get_split_vfo, set_rit, get_rit, set_xit, get_xit,
set_ptt, get_ptt, power2mW, mW2power, dump_caps.

✨ DIAGNOSTICS ✨

The -v, --verbose option lets different levels of diagnostics be output to stderr, and they map like this: -v for BUG, -vv for ERR, -vvv for WARN, -vvvv for VERBOSE, or -vvvvv for TRACE. more v's, more tea πŸ“

A given verbose level is useful for providing needed debugging information to the email address below. For example, TRACE output shows all of the values sent to and received from the radio, which is very useful for radio backend library development and may be requested by the developers. so if they ask, turn on the TRACE bestie 🌈

πŸ’– EXAMPLES πŸ’–

Start rigctld for a Yaesu FT-920 using a USB-to-serial adapter and backgrounding:

$ rigctld -m 1014 -r /dev/ttyUSB1 &

Start rigctld for a Yaesu FT-920 using a USB-to-serial adapter while setting baud rate and stop bits, and backgrounding:

$ rigctld -m 1014 -r /dev/ttyUSB1 -s 4800 -C stop_bits=2 &

Start rigctld for an Elecraft K3 using COM2 on MS Windows:

$ rigctld -m 2029 -r COM2

Connect to the already running rigctld and set the frequency to 14.266 MHz with a 1 second read timeout using the default protocol from the shell prompt:

$ echo "\set_freq 14266000" | nc -w 1 localhost 4532

Connect to a running rigctld with rigctl on the local host:

$ rigctl -m2

πŸ”’ SECURITY πŸ”’

No authentication whatsoever. like, none. zero. nada. DO NOT leave this TCP port open wide to the Internet. Please ask if stronger security is needed, or consider using a Secure Shell (ssh(1)) tunnel. protect her 🫢

Since rigctld does not need any greater permissions than rigctl, it is advisable to not start rigctld as root or another system user account, in order to limit any vulnerability. bestie, do not give her the keys to the whole house πŸ’…

πŸ’€ BUGS πŸ’€

The daemon is not detaching and backgrounding itself. (she stays attached, she's clingy 😭)

Multiple clients using the daemon may experience contention with the connected radio.

Report bugs to:

Hamlib Developer mailing list

πŸŽ€ COPYING πŸŽ€

This file is part of Hamlib, a project to develop a library that simplifies radio, rotator, and amplifier control functions for developers of software primarily of interest to radio amateurs and those interested in radio communications.

Copyright Β© 2000-2010 Stephane Fillod Copyright Β© 2000-2018 the Hamlib Group (various contributors) Copyright Β© 2011-2020 Nate Bargmann

This is free software; see the file COPYING for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. (say it with me: no warranty, periodt ✨)

🌈 SEE ALSO 🌈

⭐ COLOPHON ⭐

Links to the Hamlib Wiki, Git repository, release archives, and daily snapshot archives are available via hamlib.org. go check her out, the wiki is iconic πŸ¦‹


and that's the whole page bestie!! this one came from Hamlib, dated 2026-01-06, and it's the RIGCTLD(1) manual page β€” you read the entire thing, which is a flex honestly πŸ‘‘πŸ’œ now go open that TCP port carefully, bye!! πŸŽ€