Here are some of the most common questions compiled from the hamlib mailing list and the hamlib documentation.
Check out the supported radio's web page. You could also type 'rigctl --list' after having compiled and/or installed hamlib. It will display a neat list with RigId, Manufacturer, Model number and Version number. Here is an example:
Rig# Mfg Model Vers. 1504 Winradio WR-3100 0.6 352 Optoelectronics OptoScan535 0.2 304 Icom IC-275 0.2 1601 Ten-Tec TT-550 0.1 1505 Winradio WR-3150 0.6 401 Icom IC-PCR1000 0.1 353 Optoelectronics OptoScan456 0.2 209 Kenwood TS-850 0.2 1 Hamlib Dummy 0.1 1506 Winradio WR-3500 0.6 etc.
There is a fairly good description in the README.betatester file, included with the hamlib source code. The first tool to use would be rigctl, which is very powerful in testing basic rig commands. Suppose I own a Kenwood TS-850, which is hooked up to the first serial port.
$ rigctl -r /dev/ttyS0 -m 209Now type 'f' to retrieve the rigs frequency or 'm' to retrieve the mode. There is a full list of supported commands if you type rigctl --help.
You could try and start rigctl in verbose mode and see if you can see the rig output. Here is part of a trace from a Kenwood TS-870:
$ rigctl -vvvvv -r /dev/ttyS0 -m 210 Rig command: f TX 3 bytes 0000 46 52 3b FR; RX 4 characters 0000 46 52 30 3b FR0; TX 3 bytes 0000 46 41 3b FA; RX 14 characters 0000 46 41 30 30 30 31 38 31 31 30 30 30 30 3b FA00018110000; Frequency: 18110000If this fails, try to use a serial port terminal program like minicom and see if you can communicate with your rig with simple commands. You should set your rig to the highest baud-rate it can handle, which is the default for hamlib.
No, you can't. The serial port can only be accessed by one program at the same time. But hamlib has a solution for this, it is called rpcrig. This is a little networking program which accesses your radio and transmits information through the UDP protocol, so any program can use it. You need to run it as root:
$ rpc.rigd -m 210 -r /dev/ttyS1 &Next, you can start you favourite software and select RPC rig or model 1901 to access the information, or simply control it with the following:
$ rigctl -m 1901 -r localhost
Here's an explanation from Wilbert Knol ZL2BSJ:
The problem appears to bite the CAT interface powered from the RTS/CTS/DTR (+10V) and TXD (-10V) lines.
If rigctl is run interactively, the circuit is powered up when the user come
to issue the first command, and all is OK. The rig responds as
expected.
However, when running the command from the shell prompt:
$ rigctl -m 314 -r /dev/ttyUSB1 f f...then the first rig query fails, because the electrolytics in the circuit are in the process of coming up to voltage. All subsequent rig queries work fine. So...there is nothing wrong with hamlib. The hardware needs fixing!
Andrea Borgia IZ4FHT points out also that the previous problem can be fixed by using the rpc.rigd daemon with the "-Crts_state=ON" switch, which will stick the RTS to power on the interface. The DTR signal can be set as well.
rigctl.exe -vvvvv -r com2 -m 117
Hamlib uses pkg-config. Find a package for your favorite distribution and OS, or build it from source. To build your Hamlib program, try
$ gcc -o myprog `pkg-config --cflags --libs hamlib` myprog.cThis process can be integrated into your autoconf/automake build system with pkg.m4, included in the pkg-config package. Just add the line
PKG_CHECK_MODULES(HAMLIB, hamlib, HAVE_HAMLIB=true, HAVE_HAMLIB=false)to your configure.ac. In addition to HAVE_HAMLIB, the variables HAMLIB_LIBS and HAMLIB_CFLAGS will be created. To substitute on them you'll have to AC_SUBST both of them separately.
Eric ka1eec points out that after building hamlib and installing with make install, you need to run ldconfig (as root) to regenerate the dynamic loader cache.
If you have no root priviledge on your system, you can do without it by appending the install library directory to your LD_LIBRARY_PATH environement variable.
Be careful, that kind of minor flaw can make your life a hell. I advise you to have it fixed ;-)
It's easy, it takes only 10mn. Here's how to proceed:
Copyright © 2001-2007 the Hamlib group
Webmaster: The Hamlib group hamlib-developer@lists.sourceforge.net
![]() |
This page last modified June 13, 2007 |