2008-01-06 22:41:02 +00:00
. \" Hey, EMACS: -*- nroff -*-
. \"
2018-04-30 03:41:50 +00:00
. \" For layout and available macros, see man(7), man-pages(7), groff_man(7)
. \" Please adjust the date whenever revising the manpage.
. \"
. \" Note: Please keep this page in sync with the source, rigctld.c
. \"
2020-09-10 13:36:57 +00:00
.TH RIGCTLD "1" "2020-09-09" "Hamlib" "Hamlib Utilities"
2018-04-30 03:41:50 +00:00
.
.
2008-01-06 22:41:02 +00:00
.SH NAME
2018-04-30 03:41:50 +00:00
.
rigctld \- TCP radio control daemon
.
.
2008-01-06 22:41:02 +00:00
.SH SYNOPSIS
2018-04-30 03:41:50 +00:00
.
.SY rigctld
.OP \- hlLouV
.OP \- m id
.OP \- r device
.OP \- p device
.OP \- d device
.OP \- P type
.OP \- D type
.OP \- s baud
.OP \- c id
.OP \- T IPADDR
.OP \- t number
.OP \- C parm=val
2020-03-02 04:48:46 +00:00
.OP \- X seconds
2018-04-30 03:41:50 +00:00
.RB [ \- v [ \- Z ]]
.YS
.
.
2008-01-06 22:41:02 +00:00
.SH DESCRIPTION
2018-04-30 03:41:50 +00:00
.
The
.B rigctld
program is a radio control daemon that handles client requests via TCP
sockets. This allows multiple user programs to share one radio (this needs
more development). Multiple radios can be controlled on different TCP ports
by use of multiple
.B rigctld
2019-12-11 03:49:46 +00:00
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 syntax
of the commands are the same as
2018-04-30 03:41:50 +00:00
.BR rigctl (1).
It is hoped that
.B rigctld
will be especially useful for client authors using languages such as Perl,
Python, PHP, and others.
.
.PP
.B rigctld
communicates to a client through a TCP socket using text commands shared with
.BR rigctl .
The protocol is simple, commands are sent to
.B rigctld
on one line and
.B rigctld
2019-12-11 03:49:46 +00:00
responds to
.B get
commands with the requested values, one per line, when successful, otherwise,
it responds with one line \(lq RPRT x\(rq , where \(oq x\(cq is a negative number
indicating the error code. Commands that do not return values respond with
the line \(lq RPRT x\(rq , where \(oq x\(cq is \(oq 0\(cq when successful,
otherwise is a regative number indicating the error code. Each line is
terminated with a newline \(oq \\ n\(cq character. This protocol is primarily
for use by the
2018-04-30 03:41:50 +00:00
.B NET rigctl
(radio model 2) backend.
.
.PP
A separate
.B 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 \(lq RPRT x\(rq string as the
end of response marker which includes the
.B Hamlib
success or failure value. See the
.B PROTOCOL
2011-06-21 18:42:43 +00:00
section for details. Consider using this protocol for clients that will
2018-04-30 03:41:50 +00:00
interact with
.B rigctld
directly through a TCP socket.
.
2010-01-24 23:24:20 +00:00
.PP
2018-04-30 03:41:50 +00:00
Keep in mind that Hamlib is BETA level software. While a lot of backend
libraries lack complete rotator support, the basic functions are usually well
supported.
.
2008-01-06 22:41:02 +00:00
.PP
2010-01-24 23:24:20 +00:00
Please report bugs and provide feedback at the e-mail address given in the
2018-04-30 03:41:50 +00:00
.B BUGS
section below. Patches and code enhancements sent to the same address are
welcome.
.
.
2008-01-06 22:41:02 +00:00
.SH OPTIONS
2018-04-30 03:41:50 +00:00
.
This program follows the usual GNU command line syntax. Short options that
take an argument may have the value follow immediately or be separated by a
space. Long options starting with two dashes (\(oq \- \(cq ) require an
\(oq =\(cq between the option and any argument.
.
2010-02-08 23:37:07 +00:00
.PP
2008-01-06 22:41:02 +00:00
Here is a summary of the supported options:
2018-04-30 03:41:50 +00:00
.
.TP
.BR \- m ", " \- \- model = \fI id\fP
2021-10-23 13:10:24 +00:00
Select radio model number. Defaults to dummy device.
2018-04-30 03:41:50 +00:00
.IP
See model list (use \(lq rigctl -l\(rq ).
.IP
.BR Note :
.B rigctl
(or third party software using the C API) will use radio model 2 for
.B NET rigctl
(this model number is not used for rigctld even though it shows in the model
list).
.
.TP
.BR \- r ", " \- \- rig\-file = \fI device\fP
Use
.I device
as the file name of the port connected to the radio.
.IP
Often a serial port, but could be a USB to serial adapter. Typically
.IR /dev/ttyS0 ", " /dev/ttyS1 ", " /dev/ttyUSB0 ,
etc. on Linux,
.IR COM1 ", " COM2 ,
etc. on MS Windows. The BSD flavors and Mac OS/X have their own designations.
See your system's documentation.
.IP
The special string \(lq uh\- rig\(rq may be given to enable micro-ham device
support.
.
.TP
.BR \- p ", " \- \- ptt\-file = \fI device\fP
Use
.I device
as the file name of the Push-To-Talk device using a device file as described
above.
.
.TP
.BR \- d ", " \- \- dcd\-file = \fI device\fP
Use
.I device
as the file name of the Data Carrier Detect device using a device file as
described above.
.
.TP
.BR \- P ", " \- \- ptt\-type = \fI type\fP
Use
.I type
of Push-To-Talk device.
.IP
Supported types are \(oq RIG\(cq (CAT command), \(oq DTR\(cq , \(oq RTS\(cq ,
\(oq PARALLEL\(cq , \(oq NONE\(cq , overriding PTT type defined in the rig's
backend.
.IP
Some side effects of this command are that when type is set to DTR, read
PTT state comes from the
.B 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.
.
.TP
.BR \- D ", " \- \- dcd\-type = \fI type\fP
Use
.I type
of Data Carrier Detect device.
.IP
Supported types are \(oq RIG\(cq (CAT command), \(oq DSR\(cq , \(oq CTS\(cq ,
\(oq CD\(cq , \(oq PARALLEL\(cq , \(oq NONE\(cq .
.
.TP
.BR \- s ", " \- \- serial\-speed = \fI baud\fP
Set serial speed to
.I baud
rate.
.IP
Uses maximum serial speed from radio backend capabilities (set by
.B -m
above) as the default.
.
.TP
.BR \- c ", " \- \- civaddr = \fI id\fP
Use
.I id
as the CI-V address to communicate with the rig.
.IP
Only useful for Icom and some Ten-Tec rigs.
.IP
.BR Note :
The
.I id
is in decimal notation, unless prefixed by
.IR 0 x ,
in which case it is hexadecimal.
.
.TP
.BR \- T ", " \- \- listen\-addr = \fI IPADDR\fP
Use
.I IPADDR
as the listening IP address.
.IP
2020-09-10 13:36:57 +00:00
The default is ANY (0.0.0.0).
2020-06-23 04:42:01 +00:00
.IP
2020-09-10 13:36:57 +00:00
.B rigctld
can be run and connected to like this:
.
2020-06-23 04:42:01 +00:00
.IP
2020-09-10 13:36:57 +00:00
.EX
2020-06-23 04:42:01 +00:00
rigctld
2020-09-10 13:36:57 +00:00
.
.in +4n
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)
.in
.
.IP
2020-06-23 04:42:01 +00:00
rigctld -T 127.0.0.1
2020-09-10 13:36:57 +00:00
.in +4n
rigctl -m 2
rigctl -m 2 -r 127.0.0.1
.EE
Exceptions:
.EX
rigctl -m 2 -r localhost (only works if localhost is IPV4 address)
.EE
.in
.
.IP
.EX
2020-06-23 04:42:01 +00:00
rigctld -T localhost (will set up on IPV4 or IPV6 based on localhost)
2020-09-10 13:36:57 +00:00
.in +4n
rigctl -m 2
rigctl -m 2 -r localhost
rigctl -m 2 ip6-localhost
.EE
Exceptions:
.EX
rigctl -m 2 -r 127.0.0.1 (only works if localhost is IPV4 address)
rigctl -m 2 -r ::1 (only works localhost is IPV6 address)
.EE
.in
.
.IP
On Linux only where ip6-localhost is fe00::0:
.EX
2020-06-23 04:42:01 +00:00
rigctld -T ip6-localhost
2020-09-10 13:36:57 +00:00
.in +4n
rigctl -m 2 -r ip6-localhost
.in
.EE
2018-04-30 03:41:50 +00:00
.
.TP
.BR \- t ", " \- \- port = \fI number\fP
Use
.I number
as the TCP listening port.
.IP
The default is 4532.
.IP
.BR Note :
As
.BR rotctld 's
default port is 4533, it is advisable to use even numbered ports for
.BR rigctld ,
e.g. 4532, 4534, 4536, etc.
.
.TP
.BR \- L ", " \- \- show\-conf
List all config parameters for the radio defined with
.B \- m
above.
.
.TP
.BR \- C ", " \- \- set\-conf = \fI parm=val\fP [ \fI ,parm=val\fP ]
Set radio configuration parameter(s), e.g.
.IR stop_bits=2 .
.IP
Use the
.B -L
option above for a list of configuration parameters for a given model number.
.
.TP
.BR \- u ", " \- \- dump\-caps
Dump capabilities for the radio defined with
.B -m
above and exit.
.
.TP
.BR \- l ", " \- \- list
List all model numbers defined in
.B Hamlib
and exit.
.IP
The list is sorted by model number.
.IP
.BR Note :
In Linux the list can be scrolled back using
.BR 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
.BR more (1)
or
.BR less (1),
e.g. \(lq rigctl -l | more\(rq .
.
.TP
.BR \- o ", " \- \- vfo
Enable vfo mode.
.IP
An extra VFO argument will be required in front of each appropriate command
(except
.BR set_vfo ).
Otherwise, \(oq currVFO\(cq is used when this option is not set and an extra
VFO argument is not used.
.IP
See
.B chk_vfo
2010-02-04 00:53:56 +00:00
below.
2018-04-30 03:41:50 +00:00
.
.TP
.BR \- v ", " \- \- verbose
Set verbose mode, cumulative (see
.B DIAGNOSTICS
below).
.
.TP
2020-10-22 21:04:53 +00:00
.BR \- W ", " \- \- twiddle_timeout = \fI seconds\fP
Fix spelling errors
Fixed using the following command:
codespell --write-changes --summary --skip=*.m4 --ignore-words-list="develope,get's,quitt,setts,som,ue,vektor"
codespell --write-changes --summary --skip=aclocal.m4,lib --ignore-words-list="develope,get's,quitt,setts,som,ue,vektor"
Codespell home page: https://github.com/codespell-project/codespell
2020-07-24 07:02:12 +00:00
Enables timeout when VFO twiddling is detected. Some functions will be ignored.
2020-03-02 04:48:46 +00:00
.IP
Should only be needed when controlling software should be "paused"
so you can move the VFO. Continuous movement extends the timeout.
.
.TP
2020-10-23 16:52:00 +00:00
.BR \- x ", " \- \- uplink=option
1=Sub, 2=Main
.IP
For GPredict use to ignore get_freq for Sub or Main uplink VFO.
.IP
Should allow downlink VFO movement without confusing GPredict or the uplink
.
.TP
2018-04-30 03:41:50 +00:00
.BR \- Z ", " \- \- debug\-time\-stamps
Enable time stamps for the debug messages.
.IP
Use only in combination with the
.B -v
option as it generates no output on its own.
.
.TP
.BR \- h ", " \- \- help
2008-01-06 22:41:02 +00:00
Show a summary of these options and exit.
2018-04-30 03:41:50 +00:00
.
2008-01-06 22:41:02 +00:00
.TP
2018-04-30 03:41:50 +00:00
.BR \- V ", " \- \- version
Show version of
.B rigctl
and exit.
.
2008-01-06 22:41:02 +00:00
.PP
2018-04-30 03:41:50 +00:00
.BR Note :
Some options may not be implemented by a given backend and will return an
error. This is most likely to occur with the
.B \- \- set\-conf
and
.B \- \- show\-conf
options.
.
2009-11-03 20:47:15 +00:00
.PP
2011-06-21 18:42:43 +00:00
Please note that the backend for the radio to be controlled, or the radio
2018-04-30 03:41:50 +00:00
itself may not support some commands. In that case, the operation will fail
with a
.B Hamlib
error code.
.
.
2008-01-10 14:11:58 +00:00
.SH COMMANDS
2018-04-30 03:41:50 +00:00
.
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 \(oq \\ n\(cq terminated
line. See
.BR PROTOCOL .
.
2008-01-10 14:11:58 +00:00
.PP
2018-04-30 03:41:50 +00:00
Since most of the
.B Hamlib
operations have a
.BR set " and a " get
method, an upper case letter will be used for
.B set
methods whereas the corresponding lower case letter refers to the
.B get
method. Each operation also has a long name; prepend a backslash, \(oq \\ \(cq ,
to send a long command name.
.
2008-01-10 14:11:58 +00:00
.PP
2018-04-30 03:41:50 +00:00
Example (Perl): \(lq print $socket "\\ \\ dump_caps\\ n";\(rq to see what the
radio's backend can do
.RB ( Note :
In Perl and many other languages a \(oq \\ \(cq will need to be escaped with a
preceding \(oq \\ \(cq so that even though two backslash characters appear in
the code, only one will be passed to
.BR rigctld .
This is a possible bug, beware!).
.
2008-01-10 14:11:58 +00:00
.PP
2018-04-30 03:41:50 +00:00
.BR 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
.B Hamlib
error message.
.
2008-01-10 14:11:58 +00:00
.PP
2018-04-30 03:41:50 +00:00
Here is a summary of the supported commands (In the case of
.B set
commands the quoted italicized string is replaced by the value in the
description. In the case of
.B get
commands the quoted italicized string is the key name of the value returned.):
.
.TP
.BR F ", " set_freq " \(aq" \fI Frequency\fP \(aq
Set
.RI \(aq Frequency \(aq ,
in Hz.
.IP
Frequency may be a floating point or integer value.
.
.TP
.BR f ", " get_freq
Get
.RI \(aq Frequency \(aq ,
in Hz.
.IP
2020-03-20 13:22:40 +00:00
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.
2018-04-30 03:41:50 +00:00
.
.TP
.BR M ", " set_mode " \(aq" \fI Mode\fP "\(aq \(aq" \fI Passband\fP \(aq
Set
.RI \(aq Mode \(aq
and
.RI \(aq Passband \(aq .
.IP
Mode is a token: \(oq USB\(cq , \(oq LSB\(cq , \(oq CW\(cq , \(oq CWR\(cq ,
\(oq RTTY\(cq , \(oq RTTYR\(cq , \(oq AM\(cq , \(oq FM\(cq , \(oq WFM\(cq , \(oq AMS\(cq ,
\(oq PKTLSB\(cq , \(oq PKTUSB\(cq , \(oq PKTFM\(cq , \(oq ECSSUSB\(cq ,
\(oq ECSSLSB\(cq , \(oq FA\(cq , \(oq SAM\(cq , \(oq SAL\(cq , \(oq SAH\(cq ,
\(oq DSB\(cq .
.IP
Passband is in Hz as an integer, or \(oq 0\(cq for the radio backend default.
.IP
.BR Note :
Passing a \(oq ?\(cq (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.
.
.TP
.BR m ", " get_mode
Get
.RI \(aq Mode \(aq
and
.RI \(aq Passband \(aq .
.IP
Returns Mode as a token and Passband in Hz as in
.B set_mode
above.
.
.TP
.BR V ", " set_vfo " \(aq" \fI VFO\fP \(aq
Set
.RI \(aq VFO \(aq .
.IP
VFO is a token: \(oq VFOA\(cq , \(oq VFOB\(cq , \(oq VFOC\(cq , \(oq currVFO\(cq ,
2021-12-19 19:17:03 +00:00
\(oq VFO\(cq , \(oq MEM\(cq , \(oq Main\(cq , \(oq Sub\(cq , \(oq TX\(cq , \(oq RX\(cq ,
\(oq MainA\(cq , \(oq MainB\(cq , \(oq MainC\(cq , \(oq SubA\(cq , \(oq SubB\(cq \(oq SubC\(cq .
2018-04-30 03:41:50 +00:00
.IP
In VFO mode (see
.B \- \- vfo
option above) only a single VFO parameter is required:
.
2020-09-10 13:36:57 +00:00
.IP
.in +4n
2018-04-30 03:41:50 +00:00
.EX
$ rigctl -m 229 -r /dev/rig -o
Rig command: V
VFO: VFOB
Rig command:
.EE
2020-09-10 13:36:57 +00:00
.in
2018-04-30 03:41:50 +00:00
.
.TP
.BR v ", " get_vfo
Get current
.RI \(aq VFO \(aq .
.IP
Returns VFO as a token as in
.B set_vfo
above.
.
.TP
.BR J ", " set_rit " \(aq" \fI RIT\fP \(aq
Set
.RI \(aq RIT \(aq .
.IP
RIT is in Hz and can be + or -. A value of \(oq 0\(cq resets RIT (Receiver
Incremental Tuning) to match the VFO frequency.
.IP
.BR Note :
RIT needs to be explicitly activated or deactivated with the
.B set_func
command. This allows setting the RIT offset independently of its activation
and allows RIT to remain active while setting the offset to \(oq 0\(cq .
.
.TP
.BR j ", " get_rit
Get
.RI \(aq RIT \(aq
in Hz.
.IP
Returned value is an integer.
.
.TP
.BR Z ", " set_xit " \(aq" \fI XIT\fP \(aq
Set
.RI \(aq XIT \(aq .
.IP
XIT is in Hz and can be + or -. A value of \(oq 0\(cq resets XIT (Transmitter
Incremental Tuning) to match the VFO frequency.
.IP
.BR Note :
XIT needs to be explicitly activated or deactivated with the
.B set_func
command. This allows setting the XIT offset independently of its activation
and allows XIT to remain active while setting the offset to \(oq 0\(cq .
.
.TP
.BR z ", " get_xit
Get
.RI \(aq XIT \(aq
in Hz.
.IP
Returned value is an integer.
.
.TP
.BR T ", " set_ptt " \(aq" \fI PTT\fP \(aq
Set
.RI \(aq PTT \(aq .
.IP
PTT is a value: \(oq 0\(cq (RX), \(oq 1\(cq (TX), \(oq 2\(cq (TX mic), or
\(oq 3\(cq (TX data).
.
.TP
.BR t ", " get_ptt
Get
.RI \(aq PTT \(aq
status.
.IP
Returns PTT as a value in
.B set_ptt
above.
.
.TP
.BR S ", " set_split_vfo " \(aq" \fI Split\fP "\(aq \(aq" "\fITX VFO\fP" \(aq
Set
.RI \(aq Split \(aq
mode.
.IP
Split is either \(oq 0\(cq = Normal or \(oq 1\(cq = Split.
.IP
Set
.RI \(aq "TX VFO" \(aq .
.IP
TX VFO is a token: \(oq VFOA\(cq , \(oq VFOB\(cq , \(oq VFOC\(cq , \(oq currVFO\(cq ,
\(oq VFO\(cq , \(oq MEM\(cq , \(oq Main\(cq , \(oq Sub\(cq , \(oq TX\(cq , \(oq RX\(cq .
.
.TP
.BR s ", " get_split_vfo
Get
.RI \(aq Split \(aq
mode.
.IP
Split is either \(oq 0\(cq = Normal or \(oq 1\(cq = Split.
.IP
Get
.RI \(aq "TX VFO" \(aq .
.IP
TX VFO is a token as in
.B set_split_vfo
above.
.
.TP
.BR I ", " set_split_freq " \(aq" "\fITx Frequency\fP" \(aq
Set
.RI \(aq "TX Frequency" \(aq ,
in Hz.
.IP
Frequency may be a floating point or integer value.
.
.TP
.BR i ", " get_split_freq
Get
.RI \(aq "TX Frequency" \(aq ,
in Hz.
.IP
Returns an integer value.
.
.TP
.BR X ", " set_split_mode " \(aq" "\fITX Mode\fP" "\(aq \(aq" "\fITX Passband\fP" \(aq
Set
.RI \(aq "TX Mode" \(aq
and
.RI \(aq "TX Passband" \(aq .
.IP
TX Mode is a token: \(oq USB\(cq , \(oq LSB\(cq , \(oq CW\(cq , \(oq CWR\(cq ,
\(oq RTTY\(cq , \(oq RTTYR\(cq , \(oq AM\(cq , \(oq FM\(cq , \(oq WFM\(cq , \(oq AMS\(cq ,
\(oq PKTLSB\(cq , \(oq PKTUSB\(cq , \(oq PKTFM\(cq , \(oq ECSSUSB\(cq ,
\(oq ECSSLSB\(cq , \(oq FA\(cq , \(oq SAM\(cq , \(oq SAL\(cq , \(oq SAH\(cq ,
\(oq DSB\(cq .
.IP
TX Passband is in Hz as an integer, or \(oq 0\(cq for the radio backend
default.
.IP
.BR Note :
Passing a \(oq ?\(cq (query) as the first argument instead of a TX Mode token
2013-01-24 00:42:10 +00:00
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.
2018-04-30 03:41:50 +00:00
.
.TP
.BR x ", " get_split_mode
Get
.RI \(aq "TX Mode" \(aq
and
.RI \(aq "TX Passband" \(aq .
.IP
Returns TX Mode as a token and TX Passband in Hz as in
.B set_split_mode
above.
.
.TP
.BR Y ", " set_ant " \(aq" \fI Antenna\fP \(aq
Set
.RI \(aq Antenna \(aq
number (\(oq 0\(cq , \(oq 1\(cq , \(oq 2\(cq , ...).
2020-09-17 13:20:51 +00:00
.IP
.IP
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.
.IP
For the IC-7851 (and perhaps others) it means this:
.IP
.in +4n
.EX
1 = TX/RX = ANT1
2 = TX/RX = ANT2
3 = TX/RX = ANT3
4 = TX/RX = ANT1/ANT4
5 = TX/RX = ANT2/ANT4
6 = TX/RX = ANT3/ANT4
.EE
.in
2018-04-30 03:41:50 +00:00
.
.TP
.BR y ", " get_ant
Get
.RI \(aq Antenna \(aq
number (\(oq 0\(cq , \(oq 1\(cq , \(oq 2\(cq , ...).
.
.TP
.BR b ", " send_morse " \(aq" \fI Morse\fP \(aq
Send
.RI \(aq Morse \(aq
symbols.
.
.TP
.BR 0 x8b ", " get_dcd
Get
.RI \(aq DCD \(aq
(squelch) status: \(oq 0\(cq (Closed) or \(oq 1\(cq (Open).
.
.TP
.BR R ", " set_rptr_shift " \(aq" "\fIRptr Shift\fP" \(aq
Set
.RI \(aq "Rptr Shift" \(aq .
.IP
Rptr Shift is one of: \(oq +\(cq , \(oq -\(cq , or something else for
\(oq None\(cq .
.
.TP
.BR r ", " get_rptr_shift
Get
.RI \(aq "Rptr Shift" \(aq .
.IP
Returns \(oq +\(cq , \(oq -\(cq , or \(oq None\(cq .
.
.TP
.BR O ", " set_rptr_offs " \(aq" "\fIRptr Offset\fP" \(aq
Set
.RI \(aq "Rptr Offset" \(aq ,
in Hz.
.
.TP
.BR o ", " get_rptr_offs
Get
.RI \(aq "Rptr Offset" \(aq ,
in Hz.
.
.TP
.BR C ", " set_ctcss_tone " \(aq" "\fICTCSS Tone\fP" \(aq
Set
.RI \(aq "CTCSS Tone" \(aq ,
in tenths of Hz.
.
.TP
.BR c ", " get_ctcss_tone
Get
.RI \(aq "CTCSS Tone" \(aq ,
in tenths of Hz.
.
.TP
.BR D ", " set_dcs_code " \(aq" "\fIDCS Code\fP" \(aq
Set
.RI \(aq "DCS Code" \(aq .
.
.TP
.BR d ", " get_dcs_code
Get
.RI \(aq "DCS Code" \(aq .
.
.TP
.BR 0 x90 ", " set_ctcss_sql " \(aq" "\fICTCSS Sql\fP" \(aq
Set
.RI \(aq "CTCSS Sql" \(aq
tone, in tenths of Hz.
.
.TP
.BR 0 x91 ", " get_ctcss_sql
Get
.RI \(aq "CTCSS Sql" \(aq
tone, in tenths of Hz.
.
.TP
.BR 0 x92 ", " set_dcs_sql " \(aq" "\fIDCS Sql\fP" \(aq
Set
.RI \(aq "DCS Sql" \(aq
code.
.
.TP
.BR 0 x93 ", " get_dcs_sql
Get
.RI \(aq "DCS Sql" \(aq
code.
.
.TP
.BR N ", " set_ts " \(aq" "\fITuning Step\fP" \(aq
Set
.RI \(aq "Tuning Step" \(aq ,
in Hz.
.
.TP
.BR n ", " get_ts
Get
.RI \(aq "Tuning Step" \(aq ,
in Hz.
.
.TP
.BR U ", " set_func " \(aq" \fI Func\fP "\(aq \(aq" "\fIFunc Status\fP" \(aq
Set
.RI \(aq Func \(aq
and
.RI \(aq "Func Status" \(aq .
.IP
Func is a token: \(oq FAGC\(cq , \(oq NB\(cq , \(oq COMP\(cq , \(oq VOX\(cq ,
\(oq TONE\(cq , \(oq TSQL\(cq , \(oq SBKIN\(cq , \(oq FBKIN\(cq , \(oq ANF\(cq ,
\(oq NR\(cq , \(oq AIP\(cq , \(oq APF\(cq , \(oq MON\(cq , \(oq MN\(cq , \(oq RF\(cq ,
\(oq ARO\(cq , \(oq LOCK\(cq , \(oq MUTE\(cq , \(oq VSC\(cq , \(oq REV\(cq ,
\(oq SQL\(cq , \(oq ABM\(cq , \(oq BC\(cq , \(oq MBC\(cq , \(oq RIT\(cq , \(oq AFC\(cq ,
\(oq SATMODE\(cq , \(oq SCOPE\(cq , \(oq RESUME\(cq , \(oq TBURST\(cq , \(oq TUNER\(cq ,
\(oq XIT\(cq .
.IP
Func Status is a non null value for \(lq activate\(rq or \(lq de-activate\(rq
otherwise, much as TRUE/FALSE definitions in the C language (true is non-zero
and false is zero, \(oq 0\(cq ).
.IP
.BR Note :
Passing a \(oq ?\(cq (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 supported functions of a given radio backend.
.
.TP
.BR u ", " get_func " \(aq" \fI Func\fP \(aq
Get
.RI \(aq "Func Status" \(aq .
.IP
Returns Func Status as a non null value for the Func token given as in
.B set_func
above.
.IP
.BR Note :
Passing a \(oq ?\(cq (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 supported functions of a given radio backend.
.
.TP
.BR L ", " set_level " \(aq" \fI Level\fP "\(aq \(aq" "\fILevel Value\fP" \(aq
Set
.RI \(aq Level \(aq
and
.RI \(aq "Level Value" \(aq .
.IP
Level is a token: \(oq PREAMP\(cq , \(oq ATT\(cq , \(oq VOX\(cq , \(oq AF\(cq ,
\(oq RF\(cq , \(oq SQL\(cq , \(oq IF\(cq , \(oq APF\(cq , \(oq NR\(cq , \(oq PBT_IN\(cq ,
2020-12-16 23:47:49 +00:00
\(oq PBT_OUT\(cq , \(oq CWPITCH\(cq , \(oq RFPOWER\(cq , \(oq RFPOWER_METER\(cq , \(oq RFPOWER_METER_WATTS\(cq , \(oq MICGAIN\(cq ,
2018-04-30 03:41:50 +00:00
\(oq KEYSPD\(cq , \(oq NOTCHF\(cq , \(oq COMP\(cq , \(oq AGC\(cq , \(oq BKINDL\(cq ,
\(oq BAL\(cq , \(oq METER\(cq , \(oq VOXGAIN\(cq , \(oq ANTIVOX\(cq ,
\(oq SLOPE_LOW\(cq , \(oq SLOPE_HIGH\(cq , \(oq RAWSTR\(cq , \(oq SWR\(cq ,
\(oq ALC\(cq , \(oq STRENGTH\(cq .
.IP
The Level Value can be a float or an integer value. For the AGC token the
value is one of \(oq 0\(cq = OFF, \(oq 1\(cq = SUPERFAST, \(oq 2\(cq = FAST,
\(oq 3\(cq = SLOW, \(oq 4\(cq = USER, \(oq 5\(cq = MEDIUM, \(oq 6\(cq = AUTO.
.IP
.BR Note :
Passing a \(oq ?\(cq (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.
.
.TP
.BR l ", " get_level " \(aq" \fI Level\fP \(aq
Get
.RI \(aq "Level Value" \(aq .
.IP
Returns Level Value as a float or integer for the Level token given as in
.B set_level
above.
.IP
.BR Note :
Passing a \(oq ?\(cq (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.
.
.TP
.BR P ", " set_parm " \(aq" \fI Parm\fP "\(aq \(aq" "\fIParm Value\fP" \(aq
Set
.RI \(aq Parm \(aq
and
.RI \(aq "Parm Value" \(aq .
.IP
Parm is a token: \(oq ANN\(cq , \(oq APO\(cq , \(oq BACKLIGHT\(cq , \(oq BEEP\(cq ,
\(oq TIME\(cq , \(oq BAT\(cq , \(oq KEYLIGHT\(cq .
.IP
.BR Note :
Passing a \(oq ?\(cq (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.
.
.TP
.BR p ", " get_parm " \(aq" \fI Parm\fP \(aq
Get
.RI \(aq "Parm Value" \(aq .
.IP
Returns Parm Value as a float or integer for the Parm token given as in
.B set_parm
above.
.IP
.BR Note :
Passing a \(oq ?\(cq (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.
.
.TP
.BR B ", " set_bank " \(aq" \fI Bank\fP \(aq
Set
.RI \(aq Bank \(aq .
.IP
Sets the current memory bank number.
.
.TP
.BR E ", " set_mem " \(aq" \fI Memory#\fP \(aq
Set
.RI \(aq Memory# \(aq
channel number.
.
.TP
.BR e ", " get_mem
Get
.RI \(aq Memory# \(aq
channel number.
.
.TP
.BR G ", " vfo_op " \(aq" "\fIMem/VFO Op\fP" \(aq
Perform a
.RI \(aq "Mem/VFO Op" \(aq .
.IP
Mem/VFO Operation is a token: \(oq CPY\(cq , \(oq XCHG\(cq , \(oq FROM_VFO\(cq ,
\(oq TO_VFO\(cq , \(oq MCL\(cq , \(oq UP\(cq , \(oq DOWN\(cq , \(oq BAND_UP\(cq ,
\(oq BAND_DOWN\(cq , \(oq LEFT\(cq , \(oq RIGHT\(cq , \(oq TUNE\(cq , \(oq TOGGLE\(cq .
.IP
.BR Note :
Passing a \(oq ?\(cq (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.
.
.TP
.BR g ", " scan " \(aq" "\fIScan Fct\fP" "\(aq \(aq" "\fIScan Channel\fP" \(aq
Perform a
.RI \(aq "Scan Fct" \(aq
on a
.RI \(aq "Scan Channel" \(aq .
.IP
Scan Function is a token: \(oq STOP\(cq , \(oq MEM\(cq , \(oq SLCT\(cq ,
\(oq PRIO\(cq , \(oq PROG\(cq , \(oq DELTA\(cq , \(oq VFO\(cq , \(oq PLT\(cq .
.IP
. \" FIXME: What is a scan channel value?
Scan Channel is an integer (maybe?).
.IP
.BR Note :
Passing a \(oq ?\(cq (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
2013-01-24 00:42:10 +00:00
backend.
2018-04-30 03:41:50 +00:00
.
.TP
.BR H ", " set_channel " \(aq" \fI Channel\fP \(aq
Set memory
.RI \(aq Channel \(aq
data.
.IP
Not implemented yet.
.
.TP
2020-09-17 15:37:22 +00:00
.BR h ", " get_channel " \(aq" \fI readonly\fP \(aq
Get channel memory.
2018-04-30 03:41:50 +00:00
.IP
2020-09-17 15:37:22 +00:00
If readonly!=0 then only channel data is returned and rig remains on the current channel. If readonly=0 then rig will be set to the channel requested.
data.
2018-04-30 03:41:50 +00:00
.
.TP
.BR A ", " set_trn " \(aq" \fI Transceive\fP \(aq
Set
.RI \(aq Transceive \(aq
mode.
.IP
Transcieve is a token: \(oq OFF\(cq , \(oq RIG\(cq , \(oq POLL\(cq .
.IP
Transceive is a mechanism for radios to report events without a specific call
for information.
.IP
.BR Note :
Passing a \(oq ?\(cq (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.
.
.TP
.BR a ", " get_trn
Get
.RI \(aq Transceive \(aq
mode.
.IP
Transceive mode (reporting event) as in
.B set_trn
above.
.
.TP
.BR * ", " reset " \(aq" \fI Reset\fP \(aq
Perform rig
.RI \(aq Reset \(aq .
.IP
Reset is a value: \(oq 0\(cq = None, \(oq 1\(cq = Software reset, \(oq 2\(cq =
VFO reset, \(oq 4\(cq = Memory Clear reset, \(oq 8\(cq = Master reset.
.IP
Since these values are defined as a bitmask in
.IR include/hamlib/rig.h ,
it should be possible to AND these values together to do multiple resets at
once, if the backend supports it or supports a reset action via rig control at
all.
.
.TP
.BR 0 x87 ", " set_powerstat " \(aq" "\fIPower Status\fP" \(aq
Set
.RI \(aq "Power Status" \(aq .
.IP
Power Status is a value: \(oq 0\(cq = Power Off, \(oq 1\(cq = Power On,
\(oq 2\(cq = Power Standby.
.
.TP
.BR 0 x88 ", " get_powerstat
Get
.RI \(aq "Power Status" \(aq
as in
.B set_powerstat
above.
.
.TP
.BR 0 x89 ", " send_dtmf " \(aq" \fI Digits\fP \(aq
Set DTMF
.RI \(aq Digits \(aq .
.
.TP
.BR 0 x8a ", " recv_dtmf
Get DTMF
.RI \(aq Digits \(aq .
.
.TP
.BR _ ", " get_info
2021-04-28 12:03:10 +00:00
Get misc information about the rig.
.
.TP
.BR 0 xf5 ", " get_rig_info "
Get misc information about the rig vfos and other info.
.
.TP
.BR 0 xf3 ", " get_vfo_info " \(aq" "\fIVFO\fP" \(aq
Get misc information about a specific vfo.
2018-04-30 03:41:50 +00:00
.
2008-01-10 14:11:58 +00:00
.TP
2020-03-06 18:09:42 +00:00
.B dump_state
Return certain state information about the radio backend.
.
.TP
2018-04-30 03:41:50 +00:00
.BR 1 ", " dump_caps
2010-01-24 23:24:20 +00:00
Not a real rig remote command, it just dumps capabilities, i.e. what the
2018-04-30 03:41:50 +00:00
backend knows about this model, and what it can do.
.IP
TODO: Ensure this is in a consistent format so it can be read into a hash,
dictionary, etc. Bug reports requested.
.IP
.BR 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.
.IP
2010-02-06 15:05:17 +00:00
VFO parameter not used in 'VFO mode'.
2018-04-30 03:41:50 +00:00
.
.TP
.BR 2 ", " power2mW " \(aq" "\fIPower [0.0..1.0]\fP" "\(aq \(aq" \fI Frequency\fP "\(aq \(aq" \fI Mode\fP \(aq
Returns
.RI \(aq "Power mW" \(aq .
.IP
Converts a Power value in a range of
.IR 0 .0 ... 1 .0
to the real transmit power in milli-Watts (integer).
.IP
.RI \(aq Frequency \(aq
and
.RI \(aq Mode \(aq
also need to be provided as output power may vary according to these values.
.IP
VFO parameter is not used in VFO mode.
.
.TP
.BR 4 ", " mW2power " \(aq" "\fIPower mW\fP" "\(aq \(aq" \fI Frequency\fP "\(aq \(aq" \fI Mode\fP \(aq
Returns
.RI \(aq "Power [0.0..1.0]" \(aq .
.IP
2010-02-06 15:05:17 +00:00
Converts the real transmit power in milli-Watts (integer) to a Power value in
2018-04-30 03:41:50 +00:00
a range of
.IR "0.0 ... 1.0" .
.IP
.RI \(aq Frequency \(aq
and
.RI \(aq Mode \(aq
also need to be provided as output power may vary according to these values.
.IP
VFO parameter is not used in VFO mode.
2021-12-01 17:50:33 +00:00
.TP
.BR set_clock " \(aq" \fI DateTime\fP \(aq
Set
.RI \(aq DateTime \(aq
.IP
Sets rig clock -- note that some rigs do not handle seconds or milliseconds.
If you try to set that you will get a debug warning message.
Format is ISO8601.
.EX
Formats accepted
YYYY-MM-DDTHH:MM:SS.sss+ZZ (where +ZZ is either -/+ UTC offset)
YYYY-MM-DDTHH:MM:SS+ZZ
YYYY-MM-DDTHH:MM+ZZ
YYYY-MM-DD (sets date only)
.EE
.
.TP
.BR get_clock
Get
.RI \(aq RigTime \(aq
.IP
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
2018-04-30 03:41:50 +00:00
.
2010-02-04 00:53:56 +00:00
.TP
.B chk_vfo
2021-10-18 16:34:05 +00:00
Returns \(lq 1\\ n\(rq (single line only) if
2018-04-30 03:41:50 +00:00
.B rigctld
was invoked with the
.BR \- o / \- \- vfo
2021-10-18 16:34:05 +00:00
option and \(lq 0\\ n\(rq if not.
2018-04-30 03:41:50 +00:00
.IP
When in VFO mode the client will need to pass
.RI \(aq VFO \(aq
as the first parameter to
.B set
or
.B get
commands. VFO is one of the strings defined in
.B set_vfo
above.
.
2020-05-27 17:21:41 +00:00
.TP
.BR set_vfo_opt " \(aq" \fI Status\fP \(aq
Set
.RI \(aq Status \(aq
.IP
Set vfo option Status 1=on or 0=off
2020-09-10 13:36:57 +00:00
This is the same as using the -o switch for rigctl and ritctld.
2020-05-27 17:21:41 +00:00
This can be dyamically changed while running.
.
2018-04-30 03:41:50 +00:00
.
2008-01-10 14:11:58 +00:00
.SH PROTOCOL
2018-04-30 03:41:50 +00:00
.
There are two protocols in use by
.BR rigctld ,
the
.B Default Protocol
and the
.BR "Extended Response Protocol" .
.
2010-02-18 00:18:54 +00:00
.PP
2018-04-30 03:41:50 +00:00
The
.B Default Protocol
is intended primarily for the communication between
.B Hamlib
library functions and
.B rigctld
(\(lq NET rigctl\(rq , available using radio model \(oq 2\(cq ).
.
.PP
The
.B Extended Response Protocol
is intended to be used with scripts or other programs interacting directly
with
.B rigctld
as consistent feedback is provided.
.
.
.SS Default Protocol
.
The
.B 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 character, \(oq \\ n\(cq .
.
.PP
2020-09-10 13:36:57 +00:00
Example set frequency and mode commands (Perl code (typed text shown in bold)):
2018-04-30 03:41:50 +00:00
.
2020-09-10 13:36:57 +00:00
.PP
.in +4n
2018-04-30 03:41:50 +00:00
.EX
2020-09-10 13:36:57 +00:00
\fB print $socket "F 14250000\\ n";\fP
\fB print $socket "\\ \\ set_mode LSB 2400\\ n";\fP # escape leading '\\ '
2018-04-30 03:41:50 +00:00
.EE
2020-09-10 13:36:57 +00:00
.in
2018-04-30 03:41:50 +00:00
.
2008-01-10 14:11:58 +00:00
.PP
2018-04-30 03:41:50 +00:00
A one line response will be sent as a reply to
.B set
commands, \(lq RPRT \fI x\fP \\ n\(rq where
.I x
is the Hamlib error code with \(oq 0\(cq indicating success of the command.
.
2008-01-10 14:11:58 +00:00
.PP
2018-04-30 03:41:50 +00:00
Responses from
.B rigctld
.B get
commands are text values and match the same tokens used in the
.B set
commands. Each value is returned on its own line. On error the string \(lq RPRT
\fI x\fP \\ n\(rq is returned where
.I x
is the Hamlib error code.
.
.PP
Example get frequency (Perl code):
.
2020-09-10 13:36:57 +00:00
.PP
.in +4n
2018-04-30 03:41:50 +00:00
.EX
2020-09-10 13:36:57 +00:00
\fB print $socket "f\\ n";\fP
2008-01-10 14:11:58 +00:00
"14250000\\ n"
2018-04-30 03:41:50 +00:00
.EE
2020-09-10 13:36:57 +00:00
.in
2018-04-30 03:41:50 +00:00
.
2008-01-10 14:11:58 +00:00
.PP
2018-04-30 03:41:50 +00:00
Most
.B get
functions return one to three values. A notable exception is the
.B dump_caps
command which returns many lines of
\fB key\fR :\fI value\fR
pairs.
.
2010-02-18 00:18:54 +00:00
.PP
2018-04-30 03:41:50 +00:00
This protocol is primarily used by the \(lq NET rigctl\(rq (rigctl model 2)
2011-06-21 18:42:43 +00:00
backend which allows applications already written for Hamlib's C API to take
2018-04-30 03:41:50 +00:00
advantage of
.B rigctld
without the need of rewriting application code. An application's user can
select rotator model 2 (\(lq NET rigctl\(rq ) and then set
.B rig_pathname
to \(lq localhost:4532\(rq or other network
.IR host : port
(set by the
.BR \- T / \- t
options, respectively, above).
.
.
.SS Extended Response Protocol
.
The Extended Response protocol adds several rules to the strings returned by
.B rigctld
and adds a rule for the command syntax.
.
2010-01-24 23:24:20 +00:00
.PP
2018-04-30 03:41:50 +00:00
1. The command received by
.B 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.
.
2010-01-24 23:24:20 +00:00
.PP
2018-04-30 03:41:50 +00:00
2. The last record of each block is the string \(lq RPRT \fI x\fP \\ n\(rq where
.I x
is the numeric return value of the Hamlib backend function that was called by
the command.
.
2010-01-24 23:24:20 +00:00
.PP
2018-04-30 03:41:50 +00:00
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. \(lq Frequency:
14250000\\ n\(rq when the command was prepended by \(oq +\(cq .
.
2010-01-24 23:24:20 +00:00
.PP
2018-04-30 03:41:50 +00:00
4. All commands received will be acknowledged by
.B rigctld
with records from rules 1 and 2. Records from rule 3 are only returned when
data values must be returned to the client.
.
2010-01-24 23:24:20 +00:00
.PP
2018-04-30 03:41:50 +00:00
An example response to a
.B set_mode
command sent from the shell prompt (note the prepended \(oq +\(cq ):
.
2020-09-10 13:36:57 +00:00
.PP
.in +4n
2018-04-30 03:41:50 +00:00
.EX
2020-09-10 13:36:57 +00:00
$ \fB echo "+M USB 2400" | nc -w 1 localhost 4532\fP
2010-01-24 23:24:20 +00:00
set_mode: USB 2400
RPRT 0
2018-04-30 03:41:50 +00:00
.EE
2020-09-10 13:36:57 +00:00
.in
2018-04-30 03:41:50 +00:00
.
2010-01-24 23:24:20 +00:00
.PP
2011-06-21 18:42:43 +00:00
In this case the long command name and values are returned on the first line
2018-04-30 03:41:50 +00:00
and the second line contains the end of block marker and the numeric radio
2011-06-21 18:42:43 +00:00
backend return value indicating success.
2018-04-30 03:41:50 +00:00
.
2010-01-24 23:24:20 +00:00
.PP
2018-04-30 03:41:50 +00:00
An example response to a
.B get_mode
query:
.
2020-09-10 13:36:57 +00:00
.PP
.in +4n
2018-04-30 03:41:50 +00:00
.EX
2020-09-10 13:36:57 +00:00
$ \fB echo "+\\ get_mode" | nc -w 1 localhost 4532\fP
2010-01-24 23:24:20 +00:00
get_mode:
2010-02-08 23:37:07 +00:00
Mode: USB
2010-01-24 23:24:20 +00:00
Passband: 2400
RPRT 0
2018-04-30 03:41:50 +00:00
.EE
2020-09-10 13:36:57 +00:00
.in
2019-12-11 03:49:46 +00:00
.
2018-04-30 03:41:50 +00:00
.IP
.BR Note :
The \(oq \\ \(cq is still required for the long command name even with the ERP
character.
.
2010-01-24 23:24:20 +00:00
.PP
2018-04-30 03:41:50 +00:00
In this case, as no value is passed to
.BR 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.
.
2010-01-24 23:24:20 +00:00
.PP
2018-04-30 03:41:50 +00:00
Invoking the Extended Response Protocol requires prepending a command with a
punctuation character. As shown in the examples above, prepending a \(oq +\(cq
2010-02-18 00:18:54 +00:00
character to the command results in the responses being separated by a newline
2018-04-30 03:41:50 +00:00
character (\(oq \\ n\(cq ). Any other punctuation character recognized by the C
.BR ispunct ()
function except \(oq \\ \(cq , \(oq ?\(cq , or \(oq _\(cq will cause that character
to become the response separator and the entire response will be on one line.
.
2010-02-18 00:18:54 +00:00
.PP
Separator character summary:
.TP
2018-04-30 03:41:50 +00:00
.RB \(oq + \(cq
Each record of the response is appended with a newline (\(oq \\ n\(cq ).
.
2010-02-18 00:18:54 +00:00
.TP
2018-04-30 03:41:50 +00:00
.RB \(oq ; "\(cq, \(oq" | "\(cq, or, \(oq" , \(cq
2010-02-18 00:18:54 +00:00
Each record of the response is appended by the given character resulting in
entire response on one line.
2018-04-30 03:41:50 +00:00
.IP
These are common record separators for text representations of spreadsheet
data, etc.
.
.TP
.RB \(oq ? \(cq
Reserved for help in
.BR rigctl .
.
.TP
.RB \(oq _ \(cq
Reserved for
.B get_info
short command
.
.TP
.RB \(oq # \(cq
Reserved for comments when reading a command file script.
.IP
.BR Note :
2010-02-18 00:18:54 +00:00
Other punctuation characters have not been tested! Use at your own risk.
2018-04-30 03:41:50 +00:00
.
2010-02-18 00:18:54 +00:00
.PP
2018-04-30 03:41:50 +00:00
For example, invoking a
.B get_mode
query with a leading \(oq ;\(cq returns:
.
2020-09-10 13:36:57 +00:00
.PP
.in +4n
2018-04-30 03:41:50 +00:00
.EX
2010-02-18 00:18:54 +00:00
get_mode:;Mode: USB;Passband: 2400;RPRT 0
2018-04-30 03:41:50 +00:00
.EE
2020-09-10 13:36:57 +00:00
.in
2018-04-30 03:41:50 +00:00
.
.PP
Or, using the pipe character \(oq |\(cq returns:
.
2020-09-10 13:36:57 +00:00
.PP
.in +4n
2018-04-30 03:41:50 +00:00
.EX
2010-02-18 00:18:54 +00:00
get_mode:|Mode: USB|Passband: 2400|RPRT 0
2018-04-30 03:41:50 +00:00
.EE
2020-09-10 13:36:57 +00:00
.in
2018-04-30 03:41:50 +00:00
.
.PP
And a
.B set_mode
command prepended with a \(oq |\(cq returns:
.
2020-09-10 13:36:57 +00:00
.PP
.in +4n
2018-04-30 03:41:50 +00:00
.EX
2010-02-18 00:18:54 +00:00
set_mode: USB 2400|RPRT 0
2018-04-30 03:41:50 +00:00
.EE
2020-09-10 13:36:57 +00:00
.in
2018-04-30 03:41:50 +00:00
.
2010-02-18 00:18:54 +00:00
.PP
2012-08-22 02:54:50 +00:00
Such a format will allow reading a response as a single event using a preferred
2010-02-18 00:18:54 +00:00
response separator. Other punctuation characters have not been tested!
2018-04-30 03:41:50 +00:00
.
2010-02-18 00:18:54 +00:00
.PP
2011-06-21 18:42:43 +00:00
The following commands have been tested with the Extended Response protocol and
2018-04-30 03:41:50 +00:00
the included
.B testctld.pl
Perl script:
.IP
.BR set_freq ,
.BR get_freq ,
.BR set_split_freq ,
.BR get_split_freq ,
.BR set_mode ,
.BR get_mode ,
.BR set_split_mode ,
.BR get_split_mode ,
.BR set_vfo ,
.BR get_vfo ,
.BR set_split_vfo ,
.BR get_split_vfo ,
.BR set_rit ,
.BR get_rit ,
.BR set_xit ,
.BR get_xit ,
.BR set_ptt ,
.BR get_ptt ,
.BR power2mW ,
.BR mW2power ,
.BR dump_caps .
.
.
.SH DIAGNOSTICS
.
The
.BR \- v ,
.B \- \- verbose
option allows different levels of diagnostics
to be output to
.B stderr
and correspond to \- v for
.BR BUG ,
\- vv for
.BR ERR ,
\- vvv for
.BR WARN ,
\- vvvv for
.BR VERBOSE ,
or \- vvvvv for
.BR TRACE .
.
2010-01-24 23:24:20 +00:00
.PP
2018-04-30 03:41:50 +00:00
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.
.
.
2020-09-10 13:36:57 +00:00
.SH EXAMPLES
2018-04-30 03:41:50 +00:00
.
Start
.B rigctld
for a Yaesu FT-920 using a USB-to-serial adapter and backgrounding:
.
2020-09-10 13:36:57 +00:00
.PP
.in +4n
2018-04-30 03:41:50 +00:00
.EX
2020-09-10 13:36:57 +00:00
.RB $ " rigctld -m 1014 -r /dev/ttyUSB1 &"
2018-04-30 03:41:50 +00:00
.EE
2020-09-10 13:36:57 +00:00
.in
2018-04-30 03:41:50 +00:00
.
2010-01-24 23:24:20 +00:00
.PP
2018-04-30 03:41:50 +00:00
Start
.B rigctld
for a Yaesu FT-920 using a USB-to-serial adapter while setting baud rate and
stop bits, and backgrounding:
.
2020-09-10 13:36:57 +00:00
.PP
.in +4n
2018-04-30 03:41:50 +00:00
.EX
2020-09-10 13:36:57 +00:00
.RB $ " rigctld -m 1014 -r /dev/ttyUSB1 -s 4800 -C stop_bits=2 &"
2018-04-30 03:41:50 +00:00
.EE
2020-09-10 13:36:57 +00:00
.in
2018-04-30 03:41:50 +00:00
.
2010-01-24 23:24:20 +00:00
.PP
2018-04-30 03:41:50 +00:00
Start
.B rigctld
for an Elecraft K3 using COM2 on MS Windows:
.
2020-09-10 13:36:57 +00:00
.PP
.in +4n
2018-04-30 03:41:50 +00:00
.EX
2020-09-10 13:36:57 +00:00
.RB $ " rigctld -m 2029 -r COM2"
2018-04-30 03:41:50 +00:00
.EE
2020-09-10 13:36:57 +00:00
.in
2018-04-30 03:41:50 +00:00
.
2013-09-19 20:24:52 +00:00
.PP
2018-04-30 03:41:50 +00:00
Connect to the already running
.B rigctld
and set the frequency to 14.266 MHz with a 1 second read timeout using the
default protocol from the shell prompt:
.
2020-09-10 13:36:57 +00:00
.PP
.in +4n
2018-04-30 03:41:50 +00:00
.EX
2020-09-10 13:36:57 +00:00
$ \fB echo "\\ set_freq 14266000" | nc -w 1 localhost 4532\P
2018-04-30 03:41:50 +00:00
.EE
2020-09-10 13:36:57 +00:00
.in
2018-04-30 03:41:50 +00:00
.
2012-05-13 02:11:52 +00:00
.PP
2018-04-30 03:41:50 +00:00
Connect to a running
.B rigctld
with
.B rigctl
on the local host:
.
2020-09-10 13:36:57 +00:00
.PP
.in +4n
2018-04-30 03:41:50 +00:00
.EX
2020-09-10 13:36:57 +00:00
.RB $ " rigctl -m2"
2018-04-30 03:41:50 +00:00
.EE
2020-09-10 13:36:57 +00:00
.in
2018-04-30 03:41:50 +00:00
.
.
2008-01-06 22:41:02 +00:00
.SH SECURITY
2018-04-30 03:41:50 +00:00
.
2010-01-24 23:24:20 +00:00
No authentication whatsoever; DO NOT leave this TCP port open wide to the
2018-04-30 03:41:50 +00:00
Internet. Please ask if stronger security is needed or consider using a
Secure Shell
.RB ( ssh (1))
tunnel.
.
2010-02-08 23:37:07 +00:00
.PP
2018-04-30 03:41:50 +00:00
As
.B rigctld
does not need any greater permissions than
.BR rigctl ,
it is advisable to not start
.B rigctld
as \(lq root\(rq or another system user account in order to limit any
vulnerability.
.
.
2008-01-06 22:41:02 +00:00
.SH BUGS
2018-04-30 03:41:50 +00:00
.
2008-01-06 22:41:02 +00:00
The daemon is not detaching and backgrounding itself.
2010-02-18 00:18:54 +00:00
.PP
2018-04-30 03:41:50 +00:00
No method to exit the daemon so the
.BR kill (1)
command must be used to terminate it.
.
.PP
Multiple clients using the daemon may experience contention with the connected
2019-12-11 03:49:46 +00:00
radio.
2018-04-30 03:41:50 +00:00
.
2010-02-18 00:18:54 +00:00
.PP
2018-04-30 03:41:50 +00:00
Report bugs to:
.IP
.nf
.MT hamlib\-developer@lists.sourceforge.net
Hamlib Developer mailing list
.ME
.fi
.
.
.SH COPYING
.
This file is part of Hamlib, a project to develop a library that simplifies
2019-12-11 03:49:46 +00:00
radio, rotator, and amplifier control functions for developers of software
primarily of interest to radio amateurs and those interested in radio
communications.
2018-04-30 03:41:50 +00:00
.
2010-02-18 00:18:54 +00:00
.PP
2010-03-07 14:00:34 +00:00
Copyright \(co 2000-2010 Stephane Fillod
2010-02-18 00:18:54 +00:00
.br
2018-04-30 03:41:50 +00:00
Copyright \(co 2000-2018 the Hamlib Group (various contributors)
2010-02-18 00:18:54 +00:00
.br
2020-09-10 13:36:57 +00:00
Copyright \(co 2011-2020 Nate Bargmann
2018-04-30 03:41:50 +00:00
.
2008-01-06 22:41:02 +00:00
.PP
2018-04-30 03:41:50 +00:00
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.
.
.
2008-01-06 22:41:02 +00:00
.SH SEE ALSO
2018-04-30 03:41:50 +00:00
.
.BR kill (1),
2008-01-06 22:41:02 +00:00
.BR rigctl (1),
2018-04-30 03:41:50 +00:00
.BR ssh (1),
.BR hamlib (7)
.
.
.SH COLOPHON
.
Links to the Hamlib Wiki, Git repository, release archives, and daily snapshot
2020-09-10 13:36:57 +00:00
archives are available via
.
2018-04-30 03:41:50 +00:00
.UR http://www.hamlib.org
hamlib.org
.UE .