FreeBSD Manual Pages
RIGCTLD(1) Hamlib Utilities RIGCTLD(1) NAME rigctld - TCP radio control daemon 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]] DESCRIPTION The rigctld program is a radio control daemon that handles client re- quests via TCP sockets. This allows multiple user programs to share one radio (this needs more development). Multiple radios can be con- trolled on different TCP ports by use of multiple rigctld processes. Note that multiple processes/ports are also necessary if some clients use extended responses and/or vfo mode. So up to 4 processes/ports may be needed for each combination of extended response/vfo mode. The syn- tax of the commands are the same as rigctl(1). It is hoped that rigctld will be especially useful for client authors using languages such as Perl, Python, PHP, and others. rigctld communicates to a client through a TCP socket using text com- mands shared with rigctl. The protocol is simple, commands are sent to rigctld on one line and rigctld responds to get commands with the re- quested values, one per line, when successful, otherwise, it 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. Each line is terminated with a new- line `\n' character. This protocol is primarily for use by the NET rigctl (radio model 2) backend. A separate Extended Response Protocol extends the above behavior 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. See the PROTOCOL section for details. Consider using this protocol for clients that will interact with rigctld directly through a TCP socket. Keep in mind that Hamlib is BETA level software. While a lot of back- end libraries lack complete rig support, the basic functions are usu- ally well supported. 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. OPTIONS This program follows the usual GNU command line syntax. Short options that take an argument may have the value follow immediately or be sepa- rated by a space. Long options starting with two dashes (`-') require an `=' between the option and any argument. Here is a summary of the supported options: -m, --model=id Select radio model number. Defaults to dummy rig. See model list (use "rigctld -l"). Note: 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 in the model list). -r, --rig-file=device Use device as the file name of the port connected to the radio. Typically /dev/ttyS0, /dev/ttyS1, /dev/ttyUSB0, etc. on Linux, COM1, COM2, etc. on MS Windows. The BSD flavors and Mac OS/X have their own designations. See your system's documentation. Can be a network address:port, e.g. 127.0.0.1:12345 The special string "uh-rig" may be given to enable micro-ham de- vice support. -p, --ptt-file=device Use device as the file name of the Push-To-Talk device using a device file as described above. -d, --dcd-file=device Use device as the file name of the Data Carrier Detect device using a device file as described above. -P, --ptt-type=type Use type of Push-To-Talk device. Supported types are `RIG' (CAT command), `DTR', `RTS', `PARAL- LEL', `CM108', `GPIO', `GPION', `NONE', overriding PTT type de- fined in the rig's backend. Some side effects of this command are that 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 even if rig backend supports reading/setting PTT status from the rig. -D, --dcd-type=type Use 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 serial speed to baud rate. Uses maximum serial speed from radio backend capabilities (set by -m above) as the default. -c, --civaddr=id Use id as the CI-V address to communicate with the rig. Only useful for Icom and some Ten-Tec rigs. Note: The id is in decimal notation, unless prefixed by 0x, in which case it is hexadecimal. -S, --separator=char Use char as separator instead of line feed. The default is `\n'. Recommend using $ or @ as they work on both Unix and Windows. -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 -t, --port=number Use number as the TCP listening port. The default is 4532. Note: As rotctld's default port is 4533, it is advisable to use even numbered ports for rigctld, e.g. 4532, 4534, 4536, etc. -L, --show-conf List all 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. -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 ter- minal 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 appro- priate 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. -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 as it generates no output on its own. -A, --password Sets 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) -R, --rigctld-idle Will make rigctld close the rig when no clients are connected. Normally remains connected to speed up connects. -b, --bind-all Will make rigctld try to bind to 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 occur with the --set-conf and --show-conf options. Please note that the backend for the radio to be controlled, or the ra- dio itself may not support some commands. In that case, the operation will fail with a Hamlib error code. COMMANDS 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' ter- minated line. See PROTOCOL. Since most of the Hamlib operations have a set and a get method, a sin- gle upper case letter will be used for set methods whereas the corre- sponding single lower case letter refers to the get method. Each oper- ation also has a long name; prepend a backslash, `\', to send a long command name all in lower case. Example (Perl): "print $socket "\\dump_caps\n";" to see what the ra- dio'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 back- slash characters appear in the code, only one will be passed to rigctld. This is a possible bug, beware!). 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. Here is a summary of the supported commands (In the case of set com- mands the quoted italicized string is replaced by the value in the de- scription. In the case of get commands the quoted italicized string is the key name of the value returned.): F, set_freq 'Frequency' Set 'Frequency', in Hz. Frequency may be a floating point or integer value. 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 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, set_mode 'Mode' 'Passband' Set 'Mode' and 'Passband'. Mode is a token: `USB', `LSB', `CW', `CWR', `RTTY', `RTTYR', `AM', `FM', `WFM', `AMS', `PKTLSB', `PKTUSB', `PKTFM', `EC- SSUSB', `ECSSLSB', `FA', `SAM', `SAL', `SAH', `DSB'. Passband is in Hz as an integer, -1 for no change, or `0' for the radio backend default. 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. m, get_mode Get 'Mode' and 'Passband'. Returns Mode as a token and Passband in Hz as in set_mode above. V, set_vfo '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, get_vfo Get current 'VFO'. Returns VFO as a token as in set_vfo above. J, set_rit 'RIT' Set 'RIT'. RIT is in Hz and can be + or -. A value of `0' resets RIT (Re- ceiver 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 inde- pendently of its activation and allows RIT to remain active while setting the offset to `0'. j, get_rit Get 'RIT' in Hz. Returned value is an integer. Z, set_xit '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 inde- pendently of its activation and allows XIT to remain active while setting the offset to `0'. z, get_xit Get 'XIT' in Hz. Returned value is an integer. T, set_ptt 'PTT' Set 'PTT'. PTT is a value: `0' (RX), `1' (TX), `2' (TX mic), or `3' (TX data). t, get_ptt Get 'PTT' status. Returns PTT as a value in set_ptt above. S, set_split_vfo '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, get_split_vfo 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, set_split_freq 'Tx Frequency' Set 'TX Frequency', in Hz. Frequency may be a floating point or integer value. i, get_split_freq Get 'TX Frequency', in Hz. Returns an integer value. K, set_split_freq_mode 'TX Frequency' 'TX Mode' 'TX Passband' Set 'TX Frequency' , 'TX Mode' and 'TX Passband'. See set_split_mode for more information. k, get_split_freq_mode Get the current split settings. X, set_split_mode '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', `EC- SSUSB', `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 back- end supported TX Modes. Use this to determine the supported TX Modes of a given radio backend. x, get_split_mode Get 'TX Mode' and 'TX Passband'. Returns TX Mode as a token and TX Passband in Hz as in set_split_mode above. Y, set_ant 'Antenna' 'Option' Set 'Antenna' and 'Option'. Number is 1-based antenna# (`1', `2', `3', ...). Option depends on rig. For Icom it probably sets the Tx & Rx an- tennas as in the IC-7851. See your manual for rig specific op- tion 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, get_ant '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, send_morse '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, stop_morse Stop sending the current morse code. 0xbc, wait_morse Wait for morse to finish -- only works on full break-in. 0x94, send_voice_mem 'Msgnum' Have rig transmit internal message 'Msgnum' 0xab, stop_voice_mem Stop transmission of internal message 0x8b, get_dcd Get 'DCD' (squelch) status: `0' (Closed) or `1' (Open). 0x8d, set_twiddle 'Timeout' Set the twiddle 'Timeout' in seconds. 0x8e, get_twiddle Get the twiddle 'Timeout' in seconds. R, set_rptr_shift 'Rptr Shift' Set 'Rptr Shift'. Rptr Shift is one of: `+', `-', or something else for `None'. r, get_rptr_shift Get 'Rptr Shift'. Returns `+', `-', or `None'. O, set_rptr_offs 'Rptr Offset' Set 'Rptr Offset', in Hz. o, get_rptr_offs Get 'Rptr Offset', in Hz. C, set_ctcss_tone 'CTCSS Tone' Set 'CTCSS Tone', in tenths of Hz. c, get_ctcss_tone Get 'CTCSS Tone', in tenths of Hz. D, set_dcs_code 'DCS Code' Set 'DCS Code'. d, get_dcs_code Get 'DCS Code'. 0x90, set_ctcss_sql 'CTCSS Sql' Set 'CTCSS Sql' tone, in tenths of Hz. 0x91, get_ctcss_sql Get 'CTCSS Sql' tone, in tenths of Hz. 0x92, set_dcs_sql 'DCS Sql' Set 'DCS Sql' code. 0x93, get_dcs_sql Get 'DCS Sql' code. 0x95, set_cache 'Timeout' Set cache timeout in ms. 0x96, get_cache Get cache timeout in ms. 0x97, uplink 'Uplink' Set the uplink VFO to 'Uplink' (1=Sub, 2=Main). N, set_ts 'Tuning Step' Set 'Tuning Step', in Hz. n, get_ts Get 'Tuning Step', in Hz. U, set_func 'Func' 'Func Status' Set 'Func' and 'Func Status'. 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'. 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'). Note: Passing a `?' (query) as the first argument instead of a Func token will return a space separated list of radio backend supported set function tokens. Use this to determine the sup- ported functions of a given radio backend. u, get_func 'Func' Get 'Func Status'. Returns Func Status as a non null value for the Func token given as in set_func 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 determine the sup- ported functions of a given radio backend. L, set_level 'Level' 'Level Value' Set 'Level' and 'Level Value'. Level is a token: `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_ME- TER_WATTS', `SLOPE_HIGH', `SLOPE_LOW', `SPECTRUM_ATT', `SPEC- TRUM_AVG', `SPECTRUM_EDGE_HIGH', `SPECTRUM_EDGE_LOW', `SPEC- TRUM_MODE', `SPECTRUM_REF', `SPECTRUM_SPAN', `SPECTRUM_SPEED', `SQL', `STRENGTH', `SWR', `TEMP_METER', `USB_AF', `USB_AF_IN- PUT', `VD_METER', `VOXDELAY', `VOXGAIN'. The Level Value can be a float or an integer value. For the AGC token the value is one of `0' = OFF, `1' = SUPERFAST, `2' = FAST, `3' = SLOW, `4' = USER, `5' = MEDIUM, `6' = AUTO. Note that not all values work on all rigs. To list usable values do rigctl -m MODEL_ID -u | grep "AGC levels" or for 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 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 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 Level Value as a float or integer for the Level token given as in set_level above. 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', `KEYER- TYPE', `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 sup- ported parameters of a given radio backend. 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 Parm Value as a float or integer for the Parm token given as 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 sup- ported parameters of a given radio backend. B, set_bank 'Bank' Set 'Bank'. Sets the current memory bank number. 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 is a channel number to program with G otherwise not used. Scan Option for Kenwood rigs is not used. Note: Passing a `?' (query) as the first argument instead of a Scan Fct token will return a space separated list of radio back- end 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 h, get_channel 'Channel' 'readonly' Get channel memory. If readonly!=0 then only channel data is returned and rig re- mains on the current channel. If readonly=0 then rig will be set to the channel requested. 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. 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/ham- lib/rig.h, it should be possible to OR these values together to do multiple resets at once, if the backend supports it or sup- ports 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'. 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. 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. 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. VFO parameter is not used in 'VFO mode'. 2, power2mW 'Power [0.0..1.0]' 'Frequency' 'Mode' Returns 'Power mW'. Converts a Power value in a range of 0.0...1.0 to the real transmit power in milli-Watts (integer). 'Frequency' and 'Mode' also need to be provided as output power may vary according to these values. VFO parameter is not used in VFO mode. 3, dump_conf Not a real rig remote command, it just dumps the current config- uration with allowed ranges of values. 4, mW2power 'Power mW' 'Frequency' 'Mode' Returns 'Power [0.0..1.0]'. Converts the real transmit power in milli-Watts (integer) to a Power value in a range of 0.0 ... 1.0. 'Frequency' and 'Mode' also need to be provided as output power may vary according to these values. VFO parameter is not used in VFO mode. w, send_cmd 'Cmd' Send a raw command string to the radio. This is useful for testing and troubleshooting radio commands and responses when developing a backend. For binary protocols enter values as \0xAA\0xBB. Expect a 'Re- ply' 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). If you are testing a protocol like SmartSDR where there are spaces in the commands use quote, e.g. w "C0|set slice 0 tx=1" 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. W, send_cmd_rx 'Cmd' nbytes_or_terminator_char Send a raw command string to the radio and expect nbytes re- turned or the terminator char (e.g. ;). This is useful for testing and troubleshooting radio commands and responses when developing a backend. If the # of bytes re- quested is <= the number actually returned no timeout will oc- cur. If a char is provided it will be used to terminate reading the string so ';' is popular for Kenwood/Yaesu commands for ex- ample. The command argument can have no spaces in it. For binary pro- tocols enter values as \0xAA\0xBB. Expect a 'Reply' from the radio which will likely be a binary block or an ASCII string de- pending on the radio's protocol (see your radio's computer con- trol documentation). 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 'DateTime' Set 'DateTime' Sets rig clock -- note that some rigs do not handle seconds or milliseconds. If you try to set sec/msec and rig does not sup- port it you will get a debug warning message. Format is ISO8601. 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...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 ei- ther clock in the future Note: Kenwood rigs only allow setting local clock, and then only if not autoset by NTP. Trying to set clock when NTP is in use will set the offset, but not the time - and no error status will be returned. Time displayed on the auxiliary clock is solely determined by UTC and the aux offset. get_clock Get 'RigTime' Gets rig clock -- note that some rigs do not 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 vfo option is on and 0 if vfo option is off. This command reflects the -o switch for rigctl and rigctld and can be dynamically changed by set_vfo_opt. set_vfo_opt 'Status' Set 'Status' Set vfo option Status 1=on or 0=off This is the same as using the -o switch for rigctl and rigctld. This can be dynamically changed while running. set_separator 'SeparatorChar' Set 'SeparatorChar' Change rigctld response to use a special char instead of newline (recommend #). Handy for node-red's tcprequest node. This can be dynamically changed while running. get_separator Get 'SeparatorChar' Shows the current SeparatorChar. pause 'Seconds' Pause for the given whole (integer) number of 'Seconds' before sending the next command to the radio. password 'Password' Sends password to rigctld when rigctld has been secured with -A. Must use the 32-char shared secret from rigctld. (NOT IMPLE- MENTED) set_lock_mode 'Locked' Turns mode lock on(1) or off(0) (only when using rigctld). Turning 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 "set_lock_mode 1" when CW Skimmer is started and "set_lock_mode 0" when CW Skimmer is stopped. get_lock_mode Returns current lock mode status 1=On, 2=Off (only useful when using rigctld) send_raw 'Terminator' 'String' Can send ASCII string or 0xnn values or xnn values -- there can be no spaces in the command string. Possible terminator values are CR, LF, ;, ICOM, 0-100 (bytes to read), or -1 meaning un- known (will timeout on read) Examples (note that a ; must be es- caped 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 'String' Client can send its version to rigctld and get feedback on com- patibility, deprecation, and alternatives hamlib_version Returns Hamlib version with ISO8601 date/time test Performs test routines. Under development. set_gpio 'GPIO#' '0/1' Sets GPIO1, GPIO2, GPIO3, GPIO4 on the GPIO ptt port Can also use 1,2,3,4 get_gpio 'GPIO#' Reads GPIO1, GPIO2, GPIO3, GPIO4 on the GPIO ptt port Can also use 1,2,3,4 skip_init Skips rig initialization -- useful when executing commands with rigctl to speed up things PROTOCOL There are two protocols in use by rigctld, the Default Protocol and the Extended Response Protocol. The Default Protocol is intended primarily for the communication be- tween Hamlib library functions and rigctld ("NET rigctl", available us- ing radio model `2'). The Extended Response Protocol is intended to be used with scripts or other programs interacting directly with rigctld as consistent feedback is provided. Default Protocol The Default Protocol is intentionally simple. Commands are entered on a single line with any needed values. In practice, reliable results are obtained by terminating each command string with a newline charac- ter, `\n'. Example set frequency and mode commands (Perl code (typed text shown in bold)): print $socket "F 14250000\n"; print $socket "\\set_mode LSB 2400\n"; # escape leading '\' A one line response will be sent as a reply to set commands, "RPRT x\n" where x is the Hamlib error code with `0' indicating success of the command. Responses from rigctld get commands are text values and match the same tokens used in the set commands. Each value is returned 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. This protocol is primarily used by the "NET rigctl" (rigctl model 2) backend which allows applications already written for Hamlib's C API to take advantage of rigctld without the need of rewriting application code. An application's user can select rotator model 2 ("NET rigctl") and then set rig_pathname to "localhost:4532" or other network host:port (set by the -T/-t options, respectively, above). Extended Response Protocol The Extended Response protocol adds several rules to the strings re- turned by rigctld and adds a rule for the command syntax. 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 re- sponse. 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. "Fre- quency: 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 and the nu- meric radio backend return value indicating success. 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. In this case, as 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, prepend- ing a `+' character to the command results in the responses being sepa- rated 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: `+' 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 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. 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! The following commands have been tested with the Extended Response pro- tocol 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 allows different levels of diagnostics to be output to stderr and correspond to -v for BUG, -vv for ERR, -vvv for WARN, -vvvv for VERBOSE, or -vvvvv for TRACE. A given verbose level is useful for providing needed debugging informa- tion 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 de- velopers. 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; 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. As rigctld does not need any greater permissions than rigctl, it is ad- visable to not start rigctld as "root" or another system user account in order to limit any vulnerability. BUGS The daemon is not detaching and backgrounding itself. Multiple clients using the daemon may experience contention with the connected radio. Report bugs to: Hamlib Developer mailing list <hamlib-developer@lists.sourceforge.net> COPYING This file is part of Hamlib, a project to develop a library that sim- plifies radio, rotator, and amplifier control functions for developers of software primarily of interest to radio amateurs and those inter- ested in radio communications. Copyright (C) 2000-2010 Stephane Fillod Copyright (C) 2000-2018 the Hamlib Group (various contributors) Copyright (C) 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. SEE ALSO kill(1), rigctl(1), ssh(1), hamlib(7) COLOPHON Links to the Hamlib Wiki, Git repository, release archives, and daily snapshot archives are available via hamlib.org <http://www.hamlib.org>. Hamlib 2026-01-06 RIGCTLD(1)
NAME | SYNOPSIS | DESCRIPTION | OPTIONS | COMMANDS | PROTOCOL | DIAGNOSTICS | EXAMPLES | SECURITY | BUGS | COPYING | SEE ALSO | COLOPHON
Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=rigctld&sektion=1&manpath=FreeBSD+Ports+15.1.quarterly>
