Tuesday, July 09, 2013

Krun - a command line utility

Last week when I posted about using the new dual-mode version of WSJT-X I mentioned a utility I had used to put my Elecraft K3 into split mode before starting WSJT-X and returning it to normal operation after finishing. I've been asked to share information about it, so here you are.

The utility is called KRun, from K-Run. K for Elecraft radios (K2, K3 etc.) and Run because you use it to run another program. It was written to use with my Elecraft transceivers but I see no reason why it should not work with other radios that use a similar CAT command syntax such as Kenwoods. Don't ask me if it can  be used with your Yaesu or Icom radios because I know nothing at all about their command format.

If you run the utility it puts up a window listing its command line parameters.


These command line parameters are what tells KRun what you want it to do, so you'll need to know how to create a shortcut containing command line parameters, or use a batch file. You'll also need to know what CAT commands to use, which will require a degree of familiarity with the Programmer's Reference manual for your radio.

The parameters are:

  • --com=n where n specifies the serial port used by your radio
  • --baud=x where x os the baud rate to use
  • --cmd=string specifying the string of CAT commands to send at startup
  • --wait=s where s is an optional delay in seconds to give the commands time to execute
  • --run="path" the path of the program (e.g. WSJTX) that you want to run
  • --arg="args" optional command line parameters for the program specified above
  • --ucmd=string optional CAT commands to send on closing

An example invocation is:

C:\Ham\krun\krun.exe --com=3 --cmd=FT1; --run=C:\Ham\WSJT-X2\wsjtx.exe --ucmd=FR0;

where:

  • C:\Ham\krun\krun.exe is the location on my computer of the KRun utility
  •  --com=3 specifies the com port to use
  • --cmd=FT1; is the CAT command to set my K3 into split mode (with terminating semicolon)
  • --run=C:\Ham\WSJT-X2\wsjtx.exe is the location on my computer of WSJT-X
  • --ucmd=FR0; is the CAT command to cancel split mode (with terminating semicolon)

To create a shortcut to do this, first create a shortcut to KRun itself, then edit the Target to add the command line parameters as given above.

You can download KRun as a zip file which contains KRun.exe, the utility itself, and WSJTX, a shortcut configured as described above. If you try to use the provided shortcut instead of creating one from scratch yourself you will need to change the program paths to suit your own system.

So there you are. It works for me so hopefully it will work for you. If it doesn't then a better solution would be to persuade K1JT to add these CAT commands to WSJT-X!




No comments: