Using hamlib to Control my Yeasu FT-450D

A couple of years ago, I became VA3JFZ after studying for and passing my amateur radio exam. Since then, I have been building out my shack (ham radio enthusiast lingo for the place where you keep your rigs, er… radios).

As my setup has matured, I’ve started to look for interesting ways to interconnect my equipment. Most amateur radio operators use software packages called loggers to keep track of who they’ve talked to when on the air. I use two different loggers: log4OM is my everyday driver, and N1MM+ is for contesting.

Some of my recent contacts, or QSOs, as recorded in log4om

While contesting, I got used to N1MM+ automatically reading the frequency from my HF (that’s high frequency) radio, making for one less thing that I have to enter into the logger as I work contacts. While trying to figure out how to get log4om to do the same thing, I stumbled on an open source project called hamlib.

You see, while most modern rigs provide some form of CAT (that’s computer aided transceiver) control via an RS-232 serial port, every manufacturer’s radio responds to a slightly different set of commands. The goal of the hamlib project is to create a common interface that any piece of software can use to talk to all kinds of radios without having to re-implement all of their individual peculiarities.

After downloading the release 3.3 and running the exe file, I added the C:\Users\Jonathan Fritz\AppData\Roaming\LogOM\hamlib directory to my PATH and opened Powershell, where the following command started an interactive terminal:

$ rigctl --m 127 --r COM3 --serial-speed=9600

Let’s break down the arguments to this command:

  • rigctl is the name of the program, pronounced “rig control”
  • --m 127 tells rigctl that my radio is a Yeasu FT-450D
  • --r COM3 says that my radio is connected to the COM3 port; and
  • --serial-speed=9600 tells it that my radio expects serial commands at a rate of 9600 baud.

It’s worth noting that your radio might appear on a different COM port when connected to your computer via a RS232 to USB cable, and that you may need to adjust the baud rate of the serial connection to match the settings in your rig’s config menu.

You can find out what COM port your radio is connected to in Windows > Control Panel > Device Manager

Once you’ve started rigctl, there are a few interesting commands that you can run.

Get the frequency of the radio:

Rig command: f
Frequency: 7301000

Get the mode that the radio is in:

Rig command: m
Mode: LSB
Passband: 3000

Ok, that’s a neat party trick, but what’s the point? Well, rigctl can also be used to change your radio’s settings, and can be run in a non-interactive mode where commands are read in from a file.

Non-interactive mode

I started by writing my commands out to a file:

$ echo M LSB 3000 \r\n F 7150000 > 40m.txt

Once again, let’s break this command down:

  • echo prints whatever comes after it to the terminal
  • M LSB 3000 tells the radio to set the mode to lower sideband with a passband of 3000Hz
  • \r\n is a line break in Windows, which separates two commands from one another
  • F 7150000 tells the radio to set the frequency to 7.150.00MHz, the middle of the 40M band
  • > pipes the output of the echo command (the string M LSB 3000 \r\n F 7150000) into a file on disk
  • 40m.txt is the name of the file to pipe the command into

The result is a file called 40m.txt containing two commands that will set the radio to LSB mode and set the frequency to 7.150.00MHz.

Now, we can execute those two commands by running this command:

$ rigctl --m 127 --r COM3 --serial-speed=9600 - < 40m.txt

The first four arguments here are the same ones that we used to open the interactive terminal above. The remaining arguments are:

  • - tells rigctl to read the remaining commands from stdin, letting us pipe them in from a file
  • < the opposite of >, pipes commands in from a file instead of out to a file
  • 40m.txt the name of the file containing the commands that we want to send to the radio

Running this command will set the radio’s mode and frequency, initializing it for operations on the 40m band.

The rigctl manual contains a bunch of other really interesting commands, including the ability to activate the rig’s PTT (push to talk) switch, which could be used to write a script that puts the radio into transmit mode before playing pre-recorded message. That sounds like a very useful feature for contesting.

Finally, if there’s something that your radio can do that rigctl can’t, you can always use the w command to sent CAT control strings directly to the rig. The control strings for most rigs can be found on the manufacturer’s website.

73 (that’s amateur radio speak for “best regards”), and enjoy your newfound power.

Classy Walnut Monitor Risers

In this video, I show you how to make some great looking walnut monitor risers that feature continuous grain up one leg, across the top, and down the other leg, as well as hard maple splines that strengthen the miter joints between leg and top.

Monitor risers are a really simple project that anybody can make to add a little class and a personal touch to an otherwise drab workspace. If you make some of your own, please share them in the comments below, or on social media.

How to Make Harry Potter’s Nimbus 2000

In this video, I tackle my very first prop replica project, recreating Harry Potter’s Nimbus 2000 (before it got whomped by a willow) from Harry Potter and the Philosopher’s Stone. As a source, I used pictures of the replica that a company called CineReplica used to distribute.

My broom is made from red oak (it’s about a third of the cost of mahogany), and is scaled to 5′ (152cm), based on some stills from the first Harry Potter film. My build omits the foot pegs that are shown in the films, since they aren’t mentioned in the books, and I think that the broom looks better without them.

How to Make a Chisel Cabinet

I made this chisel cabinet out of some old barn board that I had kicking around the shop. It hangs on my wall, and gives me a space to store my mortising chisels, marking knife, and engineer’s square. Each of the tools is affixed within the box with a neodymium magnet that keeps it from falling out or knocking against the other tools. The cabinet has two doors that are held closed with a hard drive magnet, and I engraved the doors using my desktop CNC machine.

Derek’s End Tables

My buddy Derek needed some new end tables for his man cave. We sourced some African hardwood called Black Limba and built two beautiful tables to fit the spot that he had in mind. The wood is absolutely gorgeous, and really pops with a couple of coats of polyurethane on it.

SlightlySauced Episode 222: Election Ontario Vote Compass Part 2

On this episode of SlightlySauced, Derek, Jon and Tyler continue to discuss the CBC’s Vote Compass questions for the upcoming Ontario election.

  • Direct Download (right-click and save as, or open in a new tab)
  • On our website (it’s hosted on Tumblr, so follow us there if you use that platform)
  • On iTunes (subscribe on your i-devices)
  • Via RSS (subscribe with your… email client? I don’t know, what uses RSS these days?)

SlightlySauced Episode 221: Election Ontario Vote Compass Part 1

On this episode of SlightlySauced, Kayla, Jon and Tyler discuss the CBC’s Vote Compass questions for the upcoming Ontario election.

  • Direct Download (right-click and save as, or open in a new tab)
  • On our website (it’s hosted on Tumblr, so follow us there if you use that platform)
  • On iTunes (subscribe on your i-devices)
  • Via RSS (subscribe with your… email client? I don’t know, what uses RSS these days?)