AB3AP's Software Control of Elecraft Gear

I enjoy writing software now and then and thought I'd apply that interest to controlling my Elecraft K2 transceiver and W1 power meter through software. An advantage to writing this code in Java is that if you're on a machine that has a Java Virtual Machine - and Windows, MacOS, linux, FreeBSD, Solaris, and others all do - then you can run this software. Yes, that means you must first install Java. But maybe the following will convince you it's worth the minor hassle of doing so. There are separate pages for:

Preview

I'm working on a better version of the K2 control program. It is 100% controllable from the keyboard and the keyer and power knobs work the way I like. The white lines indicate current setting and knob turns are relative to current position, no longer based on absolute position. Keyboard control is also a great addition. It's so nice to simply type "f7030" for direct frequency entry. Also, annunciators work as they do on the real K2. Notice the underlining in the picture linked to just below. I'm also working on other features but at a leisurely enough pace that it'll be a few months before I have much to show.

Sneak peak at the next version.

Feedback

If you find bugs, have suggestions, or want to throw rotten tomatoes, drop me a line by qsl card or email at ab3ap@arrl.net. I'd much prefer your qsl card over or in addition to email since I enjoy collecting them.

Thanks,
Mike ab3ap

How to Download and Run

You must do two things before you can run the programs. The third step is easiest: download my code and run it. I know it's much more fun to simply download an executable and run it straight away but, hey, you built a K2! You can do this. Here are the steps.

  1. Install JRE6 (Java Runtime Environment 6) if you don't already have it. It's free and available for download at Follow the installation instructions linked to on that same page in the JRE6 area.
  2. Install the txrx.org serial link library so that you have serial link capability in Java. It's at

    If you're not on linux, Windows, Solaris, or MacOS, you'll need the ToyBox link. In all cases, read the INSTALL file included in the distribution and it lists the few steps needed for each operating system. Let me know if you have any trouble. The author of the INSTALL file is sometimes a bit concise.

    For Windows users: here's an email from an op who successfully got the software working. He says,

    "I was originally running JRE 1.5 here & the rxtx stuff didn't work with it.
    After downloading & installing v1.6, the java stuff installs in c:\program files\java\jre1.60\ by default.
    I copied rxtxSerial.dll into c:\program files\java\jre1.60\ bin and RXTXcomm.jar into c:\program files\java\jre1.60\lib\ext

    "This was all that was necessary & it works fine for me."

    As versions of Java and rxtx change, please email me if you notice these instructions don't work or can be further improved.

  3. Finally, download my code:

    There is no need to unjar the downloaded w1.jar or k2.jar files. Java will know how to run them on information I put in their manifests. I've been told Windows might rename the files from k2.jar to k2.zip and from w1.jar to w1.zip. If that happens be sure to rename them to .jar files so that Java will recognize them as executable programs.

Please see the K2 parameter retrieval page for details on how to run that program.

How you run the other programs depends on your operating system. If your OS is graphical you can likely just click on the k2 or k2.jar file icon. If your OS is text based, you'll type java -jar k2.jar (or same for w1.jar of course).

Once running, you have one task left. Bring up a pop up menu to choose serial port using mouse button 3. (Right click for right handers.) The pop up menu lists the discovered serial ports on your machine. Choose the one that is hooked up to your K2 or W1 and you should be off and running!

Please let me know if you have any trouble.

Update History

K2

2007-3-25 Corrected S-units bug that prevented K2 from sharing serial port with other apps.
Added support for blinking annunciators (however, K2 doesn't report flashing info when FINE RIT is in progress).
2007-3-24 Added support for S-units.
Increased display update interval to 100 ms.
2007-3-23 Initial release.

W1

2007-3-23Initial release.

K2 Parameter Retrieval

2007-4-5Initial release.

Want an Open Source Project?

If there's enough interest it'd be nice to get a project going on sourceforge. I'm not sure, though, that are enough Java developers within the Elecraft community. If think you'd like to spend some of your off-air spare time further developing Elecraft Java code, please let me know.