This page summarizes the two test programs, rigctl(1) for testing radio back ends and rotctl(1) for testing rotator back ends and the two network daemons, rigctld(1) and rotcltd(1) for radio and rotator access via network sockets. Also included are three demonstation utilities, rigmem(1), rigsmtr(1), and rigswr(1) which provide functional examples of how Hamlib may be used to accomplish various tasks.
In its most simple use as a command line program, rigctl is used to set frequency and mode by typing commands after any rigctl options:
and then query those values:
Entering interactive mode is a simple matter of not placing any commands after any rigctl options:
Entering interactive mode allows successive commands to be entered without exiting rigctl. Recent additions to rigctl allow command editing and history recall through use of the Readline library.
Interactive mode is indicated by the spartan prompt:
Commands are given at the prompt and follow the general rule that upper case letters set a value and lower case letters query a value:
Rig command: m
Mode: USB
Passband: 2500
Rig command:
An additional prompt is printed when more information is required by the command. For M above, rigctl prompted for the Mode and Passband values. For m above, rigctl returned the Mode and Passband values without further prompts. The command prompt is returned after each command invocation.
The above examples invoked rigctl without specifying a radio model. This is a feature where the Hamlib internal radio model 1 dummy is used instead. The dummy radio provides a way to test Hamlib functions without the need for actual radio hardware. However, to develop the Hamlib backend capability for a given radio, having the actual radio connected to the computer is necessary for debugging.
For example, to quickly set frequency on an Elecraft K3:
and to query the frequency and then mode:
rigctl -m 229 -r /dev/rig m
LSB
2000
Note: the returned values do not have the prompt strings associated with interactive mode as shown above.
The -m option takes a numeric value that corresponds to a given radio back end model. The -r option takes the path to the port device on POSIX and the device name on Microsoft Windows.
Note: A complete list of supported radio models may be seen by use of the -l option:
The list is long so use Shift-PageUp/Shift-PageDown on Linux, ScrollLock then PageUp/PageDown on Free BSD, or use the scrollbar to the virtual terminal window (cmd window on Microsoft Windows) or the output can be piped to more(1) or less(1), e.g. "rigctl -l | more" to scroll back up the list. The list is sorted numerically by model number since Hamlib 1.2.15.1. Model numbers of a manufacturer/protocol family are grouped together.
In its most simple use as a command line program, rotctl is used to set azimuth position and (optionally) elevation by typing commands after any rotctl options:
and then query those values:
Entering interactive mode is a simple matter of not placing any commands after any rotctl options:
Entering interactive mode allows successive commands to be entered without exiting rotctl. Interactive mode allows for command editing and history recall through the use of the Readline library.
Interactive mode is indicated by the spartan prompt:
Commands are given at the prompt:
Rotator command: p
Azimuth: 11.352000
Elevation: 0.000000
Rotator command: p
Azimuth: 27.594000
Elevation: 0.000000
Rotator command:
An additional prompt is printed when more information is required by the command. For M above, rotctl prompted for the Direction and Speed values. For p above, rotctl returned the Azimuth and Elevation values without further prompts. The command prompt is returned after each command invocation.
The above examples invoked rotctl without specifying a rotator model. This is a feature where the Hamlib internal rotator model 1 dummy is used instead. The dummy rotator provides a way to test Hamlib functions without the need for actual rotator hardware. However, to develop back end capability for a given rotator, having the actual controller connected to the computer is necessary for debugging.
For example, to quickly set position for RotorEZ:
and to query the position:
The returned values do not have the prompt strings associated with interactive mode as shown above.
The -m option takes a numeric value that corresponds to a given rotator back end model. The -r option takes the path to the port device on POSIX or the device name on Microsoft Windows.
Note: A complete list of supported rotator models may be seen by use of the -l option:
The list is long so use Shift-PageUp/Shift-PageDown on Linux, ScrollLock then PageUp/PageDown on Free BSD, or use the scrollbar to the virtual terminal window (cmd window on Microsoft Windows) or the output can be piped to more(1) or less(1), e.g. "rotctl -l | more" to scroll back up the list. The list is sorted numerically by model number since Hamlib 1.2.15.1. Model numbers of a manufacturer/protocol family are grouped together.
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. Consider using this protocol for clients that will interact with rigctld directly through a TCP network socket.
Multiple radios can be controlled on different TCP ports by use of multiple rigctld processes each listening on a unique TCP port. It is hoped that rigctld will be especially useful for client authors using languages such as Perl Python PHP Ruby TCL and others.
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. Consider using this protocol for clients that will interact with rotctld directly through a TCP network socket.
Multiple rotators can be controlled on different TCP ports by use of multiple rotctld processes each listening on a unique TCP port. It is hoped that rotctld will be especially useful for client authors using languages such as Perl Python PHP Ruby TCL and others.
To work correctly, rigsmtr needs a radio that could measure S-Meter and a Hamlib backend that is able to retrieve it, connected to a Hamlib supported rotator.
It scans frequencies from start_freq to stop_freq with an optional increment of freq_step (default step is 100 kHz). All values must be entered as an integer in Hertz (cycles per second).
Note: rigswr assumes that start_freq is less than or equal to stop_freq. If it is greater, rigswr will exit without doing anything.
For each frequency, rigswr transmits at 25% of total POWER during 0.5 second in CW mode and reads VSWR.
Frequency and the corresponding VSWR are then printed on stdout.
To work correctly, rigswr needs a radio that can measure VSWR and a Hamlib backend that supports reading VSWR from the radio.
Copyright © 2001-2018 Hamlib Group (various contributors)
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.