Hamlib je open-source projekt poskytujúci programátorom konzistentné Application Programming Interface (API) pre ovládanie rádioamatérskych transceiverov, rotátorov a zosilňovačov. Projekt vznikol v roku 2000 a zakladateľmi sú Frank Singleton, VK3FCS/KM5WS, a Stéphane Fillod, F8CFE. Hamlib nie je hotová užívateľská aplikácia, ale softvérová vrstva – knižnica – určená vývojárom logovacích programov, softvéru pre DIGIMODES, vzdialené ovládanie a iné riadiace aplikácie. Vďaka tomu môžu autori softvéru sústrediť úsilie na funkciu programu a logiku rozhrania, nie na implementáciu CAT príkazov pre každé rádio zvlášť.
In the article you will read
What is Hamlib for and why is it important?
Most modern transceivers allow external control via a serial interface. The problem is that the commands are not consistent across models from one manufacturer or between manufacturers. Hamlib solves this problem by presenting applications with a "virtual radio" with a unified API - an abstraction where frequency setting, mode, VFO alebo PTT funguje rovnako bez ohľadu na to, či je na sériovom porte pripojený Yaesu FT-991A, Icom IC-7300, Kenwood TS-590SG or any other supported transceiver.

Without Hamlib, each program would have to implement control of each radio separately. With Hamlib, a developer only needs to have support for the Hamlib API – and they immediately gain access to all the devices that Hamlib supports. When Hamlib adds a new backend, all applications built on it gain support for that radio without having to change their own code.
Hamlib provides language bindings for C, C++, Perl, Python 2 and 3, Lua, and TCL. The stable version at the time of writing is Hamlib 4.7.1. Daily snapshots from both the master branch and the stable branch Hamlib-4.7 are available for Linux (source tarballs) and Windows 32/64 bit.
Supported devices

Hamlib Wiki divides supported devices into three categories: amateur radio transceivers and receivers (Supported Radios), antenna rotators (Supported Rotators), and linear amplifiers (Supported Amplifiers). The list of supported radios is constantly growing and includes devices from manufacturers such as Yaesu, Icom, Kenwood, Elecraft, FlexRadio, TenTec, Alinco, Aor, Drake, JRC, Lowe, Skanti, Uniden, Vertex, and many others. For rotators, the supported ones include Yaesu G-series, Hy-Gain, SPID, M2 Orion, and others. A list of all available models is displayed by the command rigctl --list respectively. rotctl --list.
The library targets devices with a port and command protocol (CAT, CI-V, etc.) for setting frequency, mode, VFO, PTT, and other parameters. Devices that do not support serial control and only allow memory cloning (most VHF/UHF FM transceivers) are out of Hamlib's scope - the CHIRP project is recommended for them.
FAQ: frequently asked questions
What is Hamlib in short?
Hamlib is a C-based linkable subroutine library developed primarily with GNU tools on Linux, but also compiled and functional on Windows and macOS. The goal is to provide a rig-independent API that allows application authors to write software independent of a specific radio model.
Who is Hamlib intended for?
Primarily for programmers writing applications for Rig control, logovanie a iné rádioamatérske programy. Bežní používatelia Hamlib neinštalujú priamo – zvyčajne ho dostávajú ako závislosť logovacieho programu alebo WSJT-X, Fldigi, CQRLog and similar applications.
Can I use Hamlib on two programs at the same time?
Only one program can access the serial port at a time. The solution is rigctld – a network daemon that accesses the radio and communicates with clients via the TCP protocol. It is started with the command rigctld -m 210 -r /dev/ttyS1 & and then any program connects to it as to model 2 (NET rigctl).
What if there is a timeout on the serial port?
The problem may be caused by a CAT interface powered by RTS/CTS/DTR lines, where when a single-step command is executed, the interface electrolytic capacitors are not yet charged. The solution is a switch -C rts_state=ON, which forces RTS to be turned on and the interface to be powered on before the first command is sent.
How to link your own program to Hamlib?
Hamlib uses pkg-config. Compilation is done, for example, by the command gcc -o myprog `pkg-config --cflags --libs Hamlet` myprog.cFor autoconf/automake projects there is a macro PKG_CHECK_MODULES(Hamlet, Hamlet, ...).
Hamlib utilities: an overview of command line tools
| Utility | Description | Default TCP port |
|---|---|---|
| Rigctl | Interactive or scripted control of the transceiver from the command line. Opens the serial/USB port directly - only one program can use the port at a time. | – |
| rigctld | TCP daemon for transceivers. Opens a serial port and exposes control over a TCP socket. Allows multiple simultaneous client connections. Shared rig control for WSJT-X, Fldigi, CQRlog and more. | 4532 |
| rotctl | Interactive or scripted control of the antenna rotator from the command line. | – |
| rotctld | TCP daemon for rotators. Same principle as rigctld for transceivers. | 4533 |
| ampctl | Controlling a linear amplifier from the command line. | – |
| ampctld | TCP daemon for linear amplifiers. | 4534 |
| rigctlcom | COM port emulation for programs that are unable to connect to rigctld's TCP socket but require a native serial port. | – |
| rigswr | SWR measurement using a radio; scans the frequency range, the transceiver transmits and records the SWR values. | – |
| rigsmtr | Signal level measurement (S-meter) using a radio; scans the frequency range and records the measured values. | – |
| rigma | Backup, restore and manipulate the contents of transceiver memory channels. | – |
Commands for Rigctl and rigctld are shared – a capital letter usually indicates set príkaz (napr. F for set_freq), lowercase get príkaz (napr. f for get_freq). Radio model assignment is done via a switch -m ID, the serial port is specified by the switch -r /dev/ttyUSBx (Linux) or -r COMx (Windows).
Hamlib Network Device Control via TCP
Network control is an integral part of Hamlib. TCP daemons rigctld and rotctld they use a simple text protocol - commands are sent as ASCII strings, responses to get commands are returned as line-by-line values, error conditions as RPRT x kde x is a negative error code number. Daemons allow multiple clients to connect simultaneously.
Practical procedure: starting the daemon for Kenwood K3 on the first USB-serial adapter:
rigctld -m 229 -r /dev/ttyUSB0 &
Subsequently, any Hamlib-compatible program is configured to Net rigctl (model 2) s adresou localhost:4532This way, WSJT-X, Fldigi and CQRlog can share one physical radio without serial port conflict. In addition to the standard protocol, it supports rigctld also the extended Extended Response Protocol, which sends back the received command as a header and values as key:value pairs - suitable for clients that access the daemon directly via a TCP socket without the Hamlib library.
For programmers: applications written on the Hamlib C/C++ API can access daemons via backend models NET rigctl a NET rotctl (model 2 pre oba typy zariadení). Nastavenie zo strany aplikácie pozostáva z výberu modelu 2, zadania hostname:port such as devices and baud rate and stop bits settings when starting the daemon.
Videos
The following video (WA4EFS) demonstrates a GUI client that connects to the rigctld TCP listener and allows interactive testing and utilization of the transceiver's CAT interface:
A video from AG7GN (Western Washington DX Club) covers integrating Hamlib, Fldigi, and FLrig – including setting up rigctld as a common rig control backend for multiple applications at once:
The video shows the installation of Hamlib 4.1 from sources on a Raspberry Pi - a procedure relevant to anyone who wants to have the latest backend before it is available in the distribution repository:
New in Hamlib – selected changes from recent versions
Version 4.6.4 (released July 18, 2025, the 25th anniversary of the Hamlib project) fixed the handling of non-printable characters in Kenwood.c, which caused TM-D710 and TM-V71 using EOM_TH (\r) as a command terminator to break. Fixed a memory leak in rigctl_parse.ca and introduced a unique separator character for each rigctld connection. The release was dedicated to the memory of Michael Black, W9MDB (SK), a long-time contributor and project lead from 2020 to 2025.
Of the recent changes in the master branch (towards version 4.7), the following news are relevant according to the NEWS file:
Hamlib runs a multicast server that sends information about the radio's status (command reception is not yet implemented). Support has been added --bind-all (-b) for rigctld to bind to all available network interfaces – fixes duplicate instances rigctld on Windows. Yaesu transceivers can be send_Morse send keyer messages 1–5 or CW správu do 50 znakov. Príkaz rig set level METER accepts arguments SWR, COMP, ALC, IC/ID, DB, PO, VDD, TEMP pre výber zobrazovaného metra. Pridaný je prístup k GPIO1–4 na CM108 zariadeniach cez get/set_GPIO in Rigctl/rigctldFunction rigctld allows you to optionally start with autopower_on=0, which prevents timeouts on startup when the transceiver is off. Optional password protection has been added for rigctld via switch - and , where the client authenticates with the command \password.
Where to download and how to contribute
The current stable version of Hamlib 4.7.1 is available at GitHub and SourceForge. Packages for Windows 32 and 64 bit are available as ZIP or self-extracting EXE. Daily snapshots of both the master and stable branches are available at hamlib.sourceforge.net/snapshots/. Discussion and technical support are available on the hamlib-developer mailing list (SourceForge) and the #hamlib IRC channel on irc.oftc.net. Fixes are submitted via GitHub pull request or patch to the mailing list.
