Friday, May 13, 2005

Free Software and Ham Radio: The Hamlib Project

A great feature of Amateur Radio is the range of activities you can join in. Everyone can find a home with some operating style or technology work. Some of us combine on the air work with computer programming.

I’ve found a particular corner of ham radio called the Hamlib project, initiated in 2000 by Frank Singleton (VK3FCS/KM5WS) and St├ęphane Fillod (F8CFE) and supported by dozens of hams around the world. The Ham Radio Control Libraries are intended “to provide a consistent interface for programmers wanting to incorporate radio control in their programs.” This project is an example of “free and open source software”, developed by a large group of people who volunteer their time. You’ve heard of Linux and the Mozilla and FireFox browsers? They were created the same way.

You may know about “software defined radio” (SDR). That’s not what Hamlib does. Hamlib manages the control functions of radios, including DSP and SDR rigs, but it does not do signal processing itself. Hamlib is largely developed in the C language under Linux, but it is adaptible to other operating systems (MacOS, Windows) and languages (C++, Python, Perl and others).

If you’re a programmer using Hamlib, you can write applications to work with many current and older radio devices that permit computer control. This is a big benefit, because you can spread your time investment over the greatest number of potential users. Most radio control packages today are written for specific devices (“rigs”), but the potential “market” for software for one radio model is always limited. Even hams who write “free” software think about market share!

The Hamlib project is ambitious, aiming to support over 200 rigs and variations, ranging from scanners and shortwave receivers to exotic computer-based DSP transceivers and some antenna rotators. The strategy (Figure 1) is to provide a library that adapts many different radios to a higher-level application program. If you are a typical ham who is not a programmer, you can download a software application package that is built “on top” of Hamlib. A number of Linux applications are already available for digital mode support, logging, etc. Check the Hamlib web site at .

Figure 1: Hamlib is the “glue” that connects applications programs to ham rigs.

Hamlib is tackling a big problem. How do you provide for scanners with a thousand memory channels, priority sampling, and so on in the same program with multi-band VHF transceivers and computer-based DSP HF radios?

The problem is not as bad as it might be, since rigs tend to fall into categories (receivers, VHF transceivers, HF transceivers, scanners, etc.) and into product families that share similar interface protocols (Icom, Ten-Tec, Yaesu, Kenwood, etc.) It is also possible to define a useful subset of each rig's functions -- at minimum. frequency, mode, and transmit/receive. For many rigs and applications, such as QSO logging, that is sufficient.

If you want to write a ham application program to talk to a radio, you have an interesting choice: Should you aim for the best possible interface for a particular rig on a particular operating system? Support a particular rig on multiple operating systems? Support many rigs, as Hamlib does, on a variety of operating systems? It's a trade-off of man-hours, features, and desired market share.

[A shortened version of this article is scheduled for publication as a "Stray" in QST.]

No comments: