browser icon
You are using an insecure version of your web browser. Please update your browser!
Using an outdated browser makes your computer unsafe. For a safer, faster, more enjoyable user experience, please update your browser today or try a newer browser.

Building a K4 external keypad

Posted by on January 23, 2023


Protect Cover for CP-48I have a belief that the less you touch your hardware, the longer it will last, and the cleaner it will remain…  Sometimes I do contesting, and it occurs to me that during a contest, I might hit the memory button containing my callsign, several thousand times during the course of a contest.  While the button is probably rated for millions of presses, if nothing else, it will get very dirty over time, as I use it over and over…  I very much dislike that, so I developed an external keypad for my Elecraft K3.  Upon updating to the Elecraft K4, I discovered I could not live without the Genovation Keypad, I had been using for years on the K3.

The K4 is fundamentally different in the way it launches macros than the K3.  The K3 launched macros via the SVGA card, (which is an add on to the Elecraft P3 panadaptor), and used an indirect addressing scheme to select which macro was launched.  The K4, on the other hand, uses telnet, and accepts macros directly, in real time!  You just log into the K4 via telnet, and send the macro.  This required a total rethink of the process for communicating with the radio.

K-Pod or Genovation:

If you are looking for a few macros, ease of installation, and matching hardware, then the K-POD from Elecraft is the way to go!  It is a mature, very slick product, matching the K line, built by Elecraft.  It looks nice, and has a number of features the Genovation solution does not as well!  However, if you are looking for a LOT of macros, (read that as, “I contest a lot”),  don’t need a knob, and don’t care about matching hardware, the Genovation is the way to go.  By the time you buy all the parts for the Genovation solution, you are into it for about what the Elecraft K-Pod costs, or maybe a bit more, depending on what you can scrounge.

What’s needed:

The parts for this project are fairly simple, you need a Elecraft K4, a Raspberry Pi, (or any computer you want to dedicate to this project that can run Python), the Genovation keypad, the USB cable from included with the keypad, and my software.  I keep a 7 inch monitor, just to see what the Pi is doing while I am developing the software, you may or may not want a monitor as well, one is not needed for day to day operation, but I recommend you have one.  The computer selected was a Raspberry Pi.  The Pi was selected because of the small size, relatively low cost, and the ability to run Python.  My initial goal was to create a Genovation appliance– an item you just applied power to, and it came up and worked.  Later iterations of the software will include the autostart features.

How it works:

The software runs on the Raspberry Pi, (or any computer running Python that you dedicate to this process), and takes input from the Genovation via STDIO, which is nothing more than a fancy name for the keyboard USB jack on the computer.  The data from the Genovation keypad is sent to the K4, via the Python program, which, on startup, logs into the K4 via telnet, and then fires whatever comes in via the STDIO USB port into the K4, this means ANY keypad that can be programmed to look like a keyboard will work for this project.  I do a slight bit of error checking to insure that the “;”, is on the end of the macro.  If it is not there, the user is alerted, via the monitor connected to the computer.  This program is designed to be the sole item keeping focus on whatever computer is running it, hence the Raspberry Pi, you can dedicate one to this process for not a lot of money.  If you implement this on any computer, this program will need to keep focus at all times.  That means that the computer used can ONLY be used for this program in focus.  You can run other services, or programs, as long as they don’t take focus away from this one…

When you first run the program, you are asked for the IP address of the K4, the software then writes that address to a file imaginatively titled, “ip.txt“, written to the same directory the software is running in.  Once the file is written, the program then logs into the K4, and shoots whatever macro is selected via the Genovation, or a keyboard, at the K4, using telnet.  The next time you run the software, it looks for the file with the IP address in it, and uses that address, skipping the question asking what IP address the K4 is at.

This necessitates the K4 have a permanent IP address on your router.  If you don’t know how to do that, get out the manual for your router and start reading, having the K4 on a known IP address is a must for any number of software packages, not just ths one.

In this iteration of the software, you turn on the Pi, let it boot, then hit the “Start” button on the Genovation.  If you are running Linux, that will start the software, if you are running Windows, you will need to start the program manually.  Once the software is started, you have a working Genovation pad for your K4, with 48 different macros you can fire at will into the K4, as fast as you can press the keys.  If running Linux, to end the program, you hit the shutdown button on the Genovation and that shuts down the Raspberry Pi, you turn the Pi off at the same time you kill the K4 power.  As you can see, this is written for use on a Raspberry Pi.  If you use any other OS, you are pretty much on your own for starting and stopping the software.

You MUST allow the software focus at all times.  Hence the need for a seperate computer.  At some point I will add code to accept input from a dedicated keyboard, and the focus requirement will be at an end– but for now, the Pi can have no other software running that takes focus from the telnet window.  You can however run any service, (like Node-Red), as long as it does not take focus…  For most people the Pi becomes a dedicated computer for the Genovation.  I will be transiting the entire package to a Pi Zero at some point, and then mounting that device into the Genovation case.

The Software:

The software is written in Python, and can be run on almost anything that runs Python.  So Windows, Mac, etc, are not out of the picture here.  I can only support the Linux version however.  I don’t own a Mac, (been there, did that, got the t-shirt), nor do I use Windows much.

The Hardware:

I will leave it up to the user to get the Raspberry Pi up and running.  If you need help in that, there are plenty of groups to help…  Once you have your Pi running, just put the software in the “pi” directory, give it execution privileges, and you are done…  Other systems– you are responsible for figuring out how to make it run…

Putting it together:

Download the Genovation programming software from Genovation, and then use this file as a starting place for programming the buttons of the genovation.  Each button gets a macro, or macro string.  Once the Genovation is programed, test it by plugging it into a USB port of any computer, start a word processor running, and hit a key on the Genovation.  You should see macro string appear as text…  If not, then things are not right…  For testing macros, I open a telnet window to my K4 when programming new macros, and test them in real time.  If they work, I then enter them into the Genovation software, into whatever button I want them in.  Be careful what macros you enter and use, you can place your radio in transmit via this setup, so here comes the disclaimer:



Once I have the Genovation programmed, I plug it into the Raspberry Pi, start the software, make sure the K4, and the Raspberry Pi are on the same subnet, and then answer the IP question, (if it is the first run).  I then press a key, look at the K4 and verify connectivity by looking for a change based on the macro I sent.

If you do not know the IP address for your K4, the software will tell you how to locate that IP address via the K4 menu.  The software will work with anything that can be made to send a macro and look like a keyboard.  There are a number of other keypads out there, if they are programmable, and look like a keyboard in normal use, they will work with this software.  You will not need to connect the genovation to the K4 via wire…  It communicates with the K4 via telnet.


So far I am very happy with this software.  As with all software, it is never finished.  I hope you find this useful…  If so, please feel free to comment below…

0 0 votes
Article Rating

Please feel free to leave a comment.

Inline Feedbacks
View all comments