Tutorial by sramp.com

Installing Hamlib & Connecting It to Your Radio

A step-by-step guide to setting up the Ham Radio Control Library on Windows, testing it with a physical radio, and bridging it with SDR software like SDRUno and SDRconnect.

01

What is Hamlib?

Hamlib — the Ham Radio Control Library — is an open-source project that provides a standardized programming interface (API) for controlling amateur radio transceivers, receivers, rotators, and amplifiers from a computer. It has been under active development since 2000 and supports hundreds of radio models from every major manufacturer.

For end users, Hamlib ships two essential command-line tools:

rigctl lets you send commands to your radio interactively or from a script. It opens the serial/USB connection directly, which means only one program can use it at a time.

rigctld is a network daemon that wraps the same radio control into a TCP server. Multiple applications on the same machine — or even on different machines on your LAN — can connect simultaneously. This is the mode you'll use in production.

Most logging, SDR, and digital-mode programs that support Hamlib (WSJT-X, JS8Call, Gpredict, fldigi, etc.) connect through rigctld using TCP on port 4532 by default. The Hamlib protocol is also used beyond the desktop: our own iOS apps — SWList and an upcoming new app for iPad — connect to rigctld over the local network to control receivers directly from an iPhone or iPad.

02

Prerequisites

Before starting, make sure you have the following ready:

A Windows PC — Windows 10 or 11 (64-bit). Hamlib also runs on Linux and macOS, but this guide focuses on the Windows workflow.

Your radio connected to the PC — via USB, serial cable, or network, depending on the model. For USB-connected radios, ensure the manufacturer's USB driver is installed and check Windows Device Manager for the assigned COM port number (e.g. COM3).

Your radio's CAT/CI-V settings — baud rate, data bits, stop bits, and (for Icom) the CI-V address. These are typically found in your radio's menu system or manual.

03

Download & Install Hamlib on Windows

Get the latest release

Go to the official Hamlib releases page on GitHub:

github.com/Hamlib/Hamlib/releases

Download the Windows 64-bit package. You'll see two options: a .zip archive and a .exe self-extracting installer. Either works — the .exe is slightly more convenient as it will guide you through the extraction path.

The file will be named something like hamlib-w64-4.x.x.zip (where 4.x.x is the current version number).

Extract or run the installer

If you downloaded the .exe, run it and choose an installation folder. A common choice is C:\Program Files\hamlib-w64-4.x.x.

If you downloaded the .zip, extract it to a location of your choice. No administrator rights are strictly required — you can even extract it into your user folder.

After extraction, the executables you'll use (rigctl.exe, rigctld.exe, rigctlcom.exe) will be in the bin subfolder.

Confirm the installation

Open a Command Prompt or PowerShell window, navigate to the bin folder, and run:

Command Promptcmd
C:\hamlib\bin> rigctl --version

You should see output showing the Hamlib version, confirming everything is in place.

Tip: To run Hamlib commands from any directory, add the bin folder to your system's PATH environment variable. Search for "Edit the system environment variables" in Windows Settings.

04

Find Your Radio's Model Number

Hamlib identifies each supported radio with a unique numeric model ID. You need this number to tell Hamlib which protocol to speak when connecting to your equipment.

To list every supported radio, run:

List all supported radioscmd
C:\hamlib\bin> rigctl -l

This outputs a long table. You can filter it to find your radio more quickly:

Filter by manufacturercmd
:: Search for Icom radios
C:\hamlib\bin> rigctl -l | findstr /i "icom"

:: Search for Yaesu radios
C:\hamlib\bin> rigctl -l | findstr /i "yaesu"

:: Search for a specific model
C:\hamlib\bin> rigctl -l | findstr /i "IC-7300"

Take note of the number in the first column — that's your model ID. For example, the Icom IC-7300 is model 3073, and the Yaesu FT-991A is model 1035.

05

Test the Connection with rigctl

Before setting up the daemon, it's wise to verify that Hamlib can actually communicate with your radio using the interactive rigctl tool.

Basic rigctl connectioncmd
C:\hamlib\bin> rigctl -m 3073 -r COM3 -s 115200

Here's what each flag means:

FlagDescription
-m 3073The radio model ID (IC-7300 in this example)
-r COM3The serial port your radio is connected to
-s 115200Baud rate — must match your radio's CAT settings

Once connected, you'll see the Rig command: prompt. Try typing f and pressing Enter to read the current frequency. You should get back the VFO frequency in Hz. Type q to quit.

Example interactive sessionrigctl
Rig command: f
Frequency: 14074000

Rig command: m
Mode: USB
Passband: 3000

Rig command: q

If you see a frequency response, congratulations — Hamlib is correctly communicating with your radio. You can move on to running the daemon.

06

Run rigctld as a Network Daemon

For real-world use, you'll want rigctld running in the background. It opens a TCP server (default port 4532) that any compatible application can connect to.

Start rigctldcmd
C:\hamlib\bin> rigctld -m 3073 -r COM3 -s 115200 -t 4532
FlagDescription
-m 3073Radio model ID
-r COM3Serial port
-s 115200Baud rate
-t 4532TCP port to listen on (4532 is the default)

The terminal window will stay open while rigctld is running. You can now configure any Hamlib-aware application to connect to localhost:4532 (or the machine's IP address if connecting from another device on the LAN).

To verify rigctld is working, open a second terminal and test with:

Quick test via rigctlcmd
:: Connect to rigctld using model 2 (NET rigctl)
C:\hamlib\bin> rigctl -m 2 -r localhost:4532

Model 2 is the special "NET rigctl" model that tells rigctl to connect over TCP instead of directly to hardware. Type f to read the frequency — if it responds, your daemon is up and running.

If you need to control multiple radios, launch a separate instance of rigctld for each one, assigning different TCP ports with the -t flag (e.g. -t 4532 for radio 1 and -t 4533 for radio 2).


07

Bridging Hamlib with SDR Software (SDRUno)

Hamlib can also work with SDR applications, provided the software emulates an existing radio's CAT protocol. A great example of this is SDRUno by SDRplay, which exposes a virtual CAT interface that Hamlib can talk to.

Since SDRUno is a software application — not a physical radio — there is no hardware serial port involved. Instead, we use a virtual COM port pair to bridge the two programs together.

The concept: virtual null-modem cable

A null-modem emulator creates pairs of virtual serial ports on your system. Whatever data is sent to one port of the pair arrives at the other, and vice versa — just like two devices connected by a physical null-modem cable.

SDRUno COM4 COM5 rigctld

SDRUno communicates through COM4. Hamlib connects to COM5 — the other end of the virtual pair. Data flows seamlessly in both directions, forming a complete control chain.

Create virtual COM port pairs

Download com0com — the open-source null-modem emulator — from SourceForge:

sourceforge.net/projects/com0com

Run the installer and follow the wizard. By default, com0com creates a pair with names like CNCA0 and CNCB0. You can rename these to standard COM port names (e.g. COM4 and COM5) using the com0com Setup utility that is installed alongside the driver.

Windows 64-bit note: On 64-bit systems, com0com requires either a signed driver build (version 3.0 includes signed binaries) or enabling test signing mode via bcdedit.exe -set TESTSIGNING ON followed by a reboot. Use the signed build if possible to avoid security implications.

Open the com0com Setup GUI after installation, create or verify your port pair, and take note of the assigned COM numbers. We'll refer to them as COM4 and COM5 in this guide — your numbers may differ depending on existing hardware.

Enable CAT control in SDRUno

Open SDRUno and click the SETT. button on the RX Control panel. Select the CAT tab. Set the COM port to the first port of your virtual pair (e.g. COM4), then check the ENABLE & CONNECT checkbox.

SDRUno will now listen for CAT commands on COM4.

Connect Hamlib to the other end

Now launch rigctld, pointing it at the other virtual COM port and using the SDRUno model number:

rigctld for SDRUnocmd
C:\hamlib\bin> rigctld -m 2051 -r COM5
FlagDescription
-m 2051Model ID for SDRUno (SDRplay SDR application)
-r COM5The second port of the virtual COM pair (COM4 ⟷ COM5)

That's it. Hamlib is now bridged to SDRUno. Any application that connects to rigctld (on localhost:4532 by default) can now read and control the SDR's frequency and mode just as if it were a physical radio.

08

Bridging Hamlib with SDR Software (SDRconnect)

SDRconnect is the newer, cross-platform SDR application from SDRplay, designed as the successor to SDRUno. Just like SDRUno, it can expose a CAT emulator interface on a serial port, so the setup follows the same principle: a virtual COM port pair created with com0com bridges SDRconnect to Hamlib.

If you haven't installed com0com yet, follow Step A from the SDRUno section above to create your virtual COM port pair (e.g. COM4 ⟷ COM5) before proceeding.

SDRconnect COM4 COM5 rigctld

Configure SDRconnect's Rig Control settings

Open SDRconnect and stop the receiver (the CAT emulator settings cannot be changed while the receiver is running).

Go to Settings → Rig Control. Set the CAT emulator switch to ON. Select the first port of your virtual COM pair (e.g. COM4) and set the baud rate to 57600.

You can now restart the receiver. SDRconnect will listen for CAT commands on COM4.

Connect Hamlib to the other end

Launch rigctld, pointing it at the other virtual COM port and using the SDRUno model number (SDRconnect uses the same CAT protocol):

rigctld for SDRconnectcmd
C:\hamlib\bin> rigctld -m 2051 -r COM5 -s 57600
FlagDescription
-m 2051Model ID for SDRplay applications (same as SDRUno)
-r COM5The second port of the virtual COM pair (COM4 ⟷ COM5)
-s 57600Baud rate — must match the value set in SDRconnect

That's it. Hamlib is now bridged to SDRconnect. Any application connecting to rigctld (on localhost:4532 by default) can read and control the SDR's frequency and mode just as if it were a physical radio.

Note: SDRplay also provides a separate application called RigControl for bidirectional synchronization between SDRconnect and a physical transceiver. That is a different use case and will be covered in a dedicated tutorial.

09

Autostart rigctld on Windows Boot

If you want rigctld to start automatically every time you log in to Windows, you can place a simple batch file in the Startup folder.

Create a new text file and paste the following (adjusting the path, model, port, and baud rate to match your setup):

start_hamlib.batbatch
@echo off
start "" "C:\Program Files\hamlib-w64-4.x.x\bin\rigctld.exe" -m 3073 -r COM3 -s 115200

Save it as start_hamlib.bat (make sure the extension is .bat, not .txt).

Then press Win + R, type shell:startup, and press Enter. This opens the Startup folder. Move your .bat file there. rigctld will now launch automatically at login.

10

Troubleshooting

rigctl says "rig_open: error" or cannot connect

Double-check the COM port number in Device Manager. Make sure no other application (SDRUno, WSJT-X, a terminal) is already holding the port open. Only one program can access a COM port at a time — that's exactly why rigctld exists.

Frequency reads as 0 or commands timeout

This usually means a baud rate mismatch. Verify that the -s value matches what's configured in your radio's CAT/CI-V menu. Also check that you have the correct model number (-m).

com0com ports show as CNCA0/CNCB0 instead of COMx

Open the com0com Setup utility and rename the ports to standard COM names. Some applications — including SDRUno — only recognize ports named COMx.

Hamlib does not recognize my radio

Run rigctl -l again to check the full list. If your exact model isn't listed, look for a close variant or a generic backend for the manufacturer. You can also try daily snapshot builds from the Hamlib snapshots page, which may include newer radio support not yet in a stable release.

Windows Firewall blocks rigctld

If you're connecting from another machine on the LAN, Windows Firewall may block the incoming TCP connection. Allow rigctld.exe through the firewall for private networks, or manually open port 4532.

For the most verbose debugging output, add the -vvvvv flag when launching rigctl or rigctld. This prints detailed protocol-level communication that can help diagnose issues.