RIGCTLCOM
Section: Hamlib Utilities (1)
Updated: 2020-09-09
Page Index
NAME
rigctlcom - COM port passthru as TS-2000 emulator to your rig
SYNOPSIS
[
-hlLuV ]
[
-m id ]
[
-r device ]
[
-R device ]
[
-p device ]
[
-d device ]
[
-P type ]
[
-D type ]
[
-s baud ]
[
-S baud ]
[
-c id ]
[
-C parm=val ]
[
-v[
-Z]]
DESCRIPTION
Allows programs which can connect to TS-2000 via COM port to use Hamlib
radios. Multiple programs can connect to the radio via FLRig or rigctld.
Virtual serial/COM ports must be set up first using
socat(1)
or similar on POSIX systems (BSD, Linux, OS/X). On Microsoft Windows
available utilities are
com0com
Free Virtual Serial Ports
or
VPSD
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 separated 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.
-
See model list (use "rigctlcom -l").
-
Note:
rigctlcom
(or third party software using the C API) will use radio model 2 for
NET rigctl
(communicating with
rigctld).
- -r, --rig-file=device
-
Use
device
as the file name of the port connected to the radio.
-
Often a serial port, but could be a USB to serial adapter. 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.
-
The special string "uh-rig" may be given to enable micro-ham device
support.
- -R, --rig-file2=device
-
Use
device
as the file name of one of the virtual com ports -- your program will connect
to the other com port of the virtual pair.
-
Virtual serial ports on POSIX systems can be done with
socat(1):
-
$ socat -d -d pty,raw,echo=0 pty,raw,echo=0
-
See this
Stackoverflow answer for using socat
-
On Microsoft Windows available utilities are com0com, Free Virtual Serial
Ports, or VPSD (see
DESCRIPTION
above for WWW links).
- -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',
'PARALLEL', 'NONE', overriding PTT type defined 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', '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.
- -S, --serial-speed2=baud
-
Set serial speed to
baud
rate for virtual com port (see
-R).
-
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.
- -L, --show-conf
-
List all config parameters for the radio defined with
-m
above.
- -C, --set-conf=parm=val[,parm=val]
-
Set radio configuration parameter(s), e.g.
stop_bits=2.
-
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 terminal in X or the cmd window in
Windows. The output can be piped to
more(1)
or
less(1),
e.g. "rigctl -l | more".
- -n, --no-restore-ai
-
On exit
rigctl
restores the state of auto information (AI) on the controlled rig.
-
If this is not desired, for example if you are using
rigctl
to turn AI mode on or off, pass this option.
- -v, --verbose
-
Set verbose mode, cumulative (see
DIAGNOSTICS
below).
- -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.
- -h, --help
-
Show a summary of these options and exit.
- -V, --version
-
Show version of
rigctl
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.
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 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.
EXIT STATUS
rigctlcom
exits with:
- 0
-
if all operations completed normally;
- 1
-
if there was an invalid command line option or argument;
- 2
-
if an error was returned by
Hamlib.
EXAMPLE
Start
rigctlcom
with FLRig as the Hamlib model and virtual com port pair COM9/COM10, e.g.
N1MM Logger+
attaching to COM10 and using the TS-2000 emulator attached to COM9 (assumes
virtual serial/COM ports pipe has been created with the proper utility
as described above):
$ rigctlcom -m 4 -R COM9 -S 115200
The following diagram shows the communications flow that allows N1MM Logger+
to communicate with a radio connected to Flrig:
Flrig -><- rigctlcom -> COM9 <- virt_port_pipe -> COM10 <- N1MM
BUGS
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-2011 Stephane Fillod
Copyright © 2000-2018 the Hamlib Group (various contributors)
Copyright © 2010-2020 Nate Bargmann
Copyright © 2019 Michael Black W9MDB
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
rigctld(1),
rigctl(1),
socat(1),
hamlib(7)
COLOPHON
Links to the Hamlib Wiki, Git repository, release archives, and daily snapshot
archives are available via
hamlib.org