
The rig on 40m, VFO A, preamp on, reverse CW. Looks familiar, eh? :-)
I've written a Java program that uses the K2's KIO2 serial port to control the rig from the laptop in my shack. One advantage of Java is the large collection of libraries that makes writing graphically oriented code quick and easy. Another, to use Sun's catch phrase, is that Java is a "write once, run anywhere" language. It's nice to be able to use the same code on many platforms without the need for recompiling.
The rig image is from the front of the K2 pdf manual so using the program is as familiar as using your real K2. Note that the image above isn't a mock up; it's a snapshot of the working interface. A click of the mouse on a button is just like a tap on a real K2 button. A click & hold of the mouse button gives you the secondary button function just like when you hold the button on the K2 for a little longer. Similarly, you can click and hold the mouse cursor on knobs to spin them (with the exceptions of the AF and RF gain knobs because those functions can't be computer controlled). So if you use a K2 you know how to use this program.
Here are short lists of where each has advantages over the other. I strongly recommend using the real K2, not my software, when making any changes to the K2 through MENU or monitoring any measurements related to power.
The K2 has advantages the program does not.
But the software has some advantages, too.
Click briefly on a button to simulate a button tap, and click and hold to simulate a push and hold on the K2. To spin knobs, click and hold the mouse button down anywhere within a knob and then move the mouse. While moving, the mouse doesn't have to remain within the knob area. It's actually helpful for fine adjustments to pull the mouse farther from the knob.
![]() |
![]() |
| Notch filter on/off. | Noise reduction on/off. |
Similarly, phantom buttons appear when the mouse moves over them in the same area of the front panel for FIL (check filter status), AGC (AGC on/off), and RIT (Fine RIT on/off), as shown in the following pictures.
![]() |
![]() |
![]() |
| Filter status. | AGC on/off. | Fine RIT on/off. |
Finally there is the phantom button representing the dual DISPLAY/TUNE combination. It displays the forward and reflected power.
When a phantom button appears - and same goes for the "F" that appears by the BAND buttons - simply click on it like any other button for that function.
As mentioned earlier, I find it handy to have the K2 program running while I'm reading the pdf version of manuals. For the KDSP2 this has especially been the case when trying to become familiar with its many submenus. Reaching between rig and manual gets a little frustrating after a while and using the rig control software saves you that.
Continual polling is used so that the screen display is correct even if the op uses the real buttons rather than the on-screen ones. If we're willing to do away with that consideration, state could be kept internally and polling eliminated. Food for thought.
Other considerations are compensating for times when the K2 DS command doesn't give annunciator info, e.g., underlining during MENU, EDIT, DISPLAY, and the 3 second blink cycle during FINE RIT. At the moment I don't try to compensate for any firmware short comings but just report data as received.