8.7 Hamlib - rigctl / rigctld - displaying controls supported for your rig
For a full command list, see Hamlib documentation. https://github.com/Hamlib/Hamlib/wiki/Documentation
Before embarking on configuring piWebCAT / Hamlib for your rig, you need to list the available
control functions. This is done using rigctl at the RPi terminal command line as shown below.
I entered rigctl -m 1040 (only the -m parameter is needed here - It selects the rig = FTdx101D = 1040)
All commands have a short form. I could have used U ? instead of \set_func ? .
I have used the long form in piWebCAT example configurations to make the commands easier to understand.
VFOA / VFOB or Main /Sub --vfo mode *** IMPORTANT ****
See also section 2.10 Icom - --vfo mode
--vfo mode is selected at the RPI terminal command line by adding --vfo to the end of rigctl start text:
eg: rigctl -m 1040 -s 38400 -r /dev/ttyUSB0 --vfo
where `1040 = code for FTdx101D, 38400 is baudrate
and /dev/ttyUSB0 is the connection for USB (serial connection is /dev/ttyAMA0 )
--vfo mode in your piWebCAT configuration is selected by setting vfomode=Y in the radios table.
if you are using --vfo mode, then all commands must contain a VFO parameter.
This requirement applies even if the command is not VFO - specific.
eg \get_level VFOA NR (get noise reductions level for VFOA receiver)
and \get_level VFOA RFPOWER - this is not VFO dependant but it needs VFOA as dummy parameter.
Most Icom transceivers and several others do not have CAT access to the background receiver (B or Sub)
All commands act only on the active receiver (A or Main).
For these transceivers I suggest not using --vfo mode.
So the commands are \get_level RFPOWER etc (no VFO parameter needed)
The only command that needs the VFO identity is the command to switch VFOs. eg: \set_vfo VFOA
In the above screen dump, I use \set_vfo ? to find out how Hamlib labels the VFOs for my transceiver
- The return is Sub Main. This was for the FTdx10D.
The FTdx101D has two completely separate receivers with separate settings.
All control commands (eg: noise reduction, gain, bandwidth etc) can be addressed to either receiver, whether
or not it is the current foreground receiver or the background receiver. So we use --vfo mode.
My evolving progression of Transceivers-H-A toC uses --vfo mode. (see Learning section 8).
I discovered that the FTdx101D would accept VFOA/VFOB as alternative to Main/Sub .. with two exceptions.
The exceptions are \set_vfo and get_vfo and \set_mode and \get_mode.
I therefore configured all the Hamlib --vfo example transceivers in this way.
The reason for doing this was so that you would not have to edit numerous instances of Main to VFOA etc.
\set_func ( U ) \get_func ( u )
The commands set and read on / off switches. (Switches with more than two states tend to use \set_level)
In piWebCat, they will usually be assigned to buttons with action = T (on/off toggling).
We set 1 for ON and 0 for OFF.
Examples:
\set_func Main NR 1 \get_func Main NR Set and read noise reduction on / off status
\set_func VFOA VOX 0 \get_func VFOA VOX Set and read VOX on/ off status
In piWebCAT configuration, we use \set_func Main NR # in table catcodeshl.
The # is substituted by the value (0 or 1) assigned in table buttonshl. This is discussed below in more detail.
\set_level ( L ) \get_level ( l )
The commands set and read controls with continuous level or multi-value adjustment.
In piWebCAT, these are used with:
- slider controls
- button groups with more than two states
Examples:
\set_level Main NR 0.500 \get_level Main NR Set and read noise reduction level.
\set_level VFOA VOXGAIN 0.400 \get_func VFOA VOXGAIN Set and read VOX gain.
VOXGAIN is not VFO-specific and so VFOA above is a dummy value. See The --vfo option
Note that rigctl and riigctld use standard ranges which are often 0.000 to 1.000.
The ranges used can be checked at the rigctl command line.
See Checking ranges in rigctl at the command line
Note that piWebCAT's configuration provides for any range to be scaled to the span of a slider control
and for your choice of text displayed value.
In piWebCAT configuration, we use \set_level Main NR # in table slidershl.
The # is substituted by an appropriate value scaled from the slider position.
This is discussed below in more detail
.
\set_vfo ( V ) \get_vfo ( v )
The commands set and read current VFO selection
Examples:
\set_vfo Main \set_vfo Sub \set_vfo VFOA \get_vfo
These options will be linked to the VFOA and VFOB buttons.
These buttons have a fixed code = VFO which must not be changed.
The fixed VFO code links them internally to the Swap VFO button and also connects
them to piWebCAT's audio gain swapping system. See: Audio gain swapping
In the piWebCAT configuration, we use \set_vfo # in table catcodeshl.
The # is substituted by the value (Main, Sub, VFOA etc) assigned in table buttonshl.
This is discussed below in more detail.