djcompact vignetteTo be finished...
While setting up my remote station, i quickly have been confronted to the problem of the limitations of the remote ease of use. The first one is the ability to change the VFO frequencies. My logging software LOGGER32 offers a lot of macros and an option to use the mouse wheel to change the frequencies. But during daily traffic or contesting they quickly have shown their limitations.

 On Twitter, i have seen that several hams have been using a small DJ controller for driving SDR receivers and transceivers. So i started thinking to do the same for the TS590s.

 The DJcontrol compact controller is a small and cheap Midi Controller made by Hercules. I quickly ordered and received mine for 49.99€.

This controller is connected via USB to the computer and offers 2 jogs and a lot of buttons, pots and slider. When these are manipulated, a flow of MIDI messages are sent to the USB port. Each adjustement sends a command when turned, pressed and released.
The list of MIDI messages can be found in a document with the mapping of these MIDI controls.

My project was to map each button to a TS590s function. The first one was to have a rotary control like a VFO button. The large 7cm Jog A is perfect for that.
In the mapping document, this Jog is named JOG_DA and the correspondant MIDI message is "Bx 30 Value", the coarse having a 128 incremental steps.

The MIDI message for a JOG A rotation looks like this :

[[176, 48, 127, 0], 13655]

176 is the decimal value for the B0 Hex value which is the global value for the set of sliders, pots and jogs
48 is the decimal value for the 30 Hex value assigned to the JOG A
127 is the decimal value for the 7F Hex value for CCW rotation, it changes to 126 when FAST CCW rotation, 01 for CW rotation and 02 for FAST CW rotation.
0 is not used for this command
13655 is the timestamp starting at 0 when the controller is launched (not used in this project)

Another example, the MIDI message for the SYNC BUTTON is :

[[144, 35, 127, 0], 1185118]

144 is the set of buttons
35 is the SYNC BUTTON
127 is when pressed, 0 when released
0 not used

All the work of the software is to translate these messages to Kenwood CAT commands.

For example, the CW JOG A rotation has to be translated to " UP; " to increase the VFO by one step. CCW JOG A rotation is translated to " DN; ".
When turning the Jog a bit faster, the command send could be " UP5; " for 5 steps up at each incrementation. 

The SYNC button is assigned to select VFO, CUE button to VFOB, etc... A nice button layout can be done, making the controller very easy to use !

The same occurs for all buttons and pots. The limit is imagination !

The software Midi2TS590

Knowing very little in programmation, i choosed to use PYTHON for this project. The learning curve is quite fast when using Python and it indeed took only a few days to complete the project ! I also appreciated the fact that i could modify the software while in use during a contest and adapt it to my needs.
So i started to write a little software that i named

But i was a bit disappointed when i tried to make a executable file to be able to install it on any computer and distribute it... The process creates a large folder with a lot of files and it is probably not the best solution for software distribution...
Using C++ would probably have been a better idea for this, but C or C++ is not as easy to learn as Python...

The MIDI protocol is handled by the PYGAME MIDI library which makes things a little easier to handle !

The DJCompact controller can also be adressed and the backlights of the buttons can be used. I used this to light on the buttons when in use.

At startup, the software looks for a configuration file and when not found, it creates one with a default configuration. The default settings have to be changed in this file according to your needs and particular configuration.

# midi2hamlib config file
# defaults values created by program
mode = CW
vfo = A

devicein = 1
deviceout = 3

model = TS590s
comport = COM2
speed = 57600
bits = 8
stop = 1
parity = N
xonxoff = 0
rtscts = 0
dsrdtr = 0

At startup, all Midi devices found will be displayed on screen. Search for the DJCompact devices and modifiy the [Midi] section in the configuration file in the [Midi] section.
Change the Comport where the TS590 is connected in the [Radio] section, other Radio parameters should be fine.
The default startup mode and VFO are set in the [Default section]

 If something is missing or wrong, a warning message is displayed on screen, waiting to be corrected.

When everything is as awaited, all lights on the controller should blink 3 times and it can be used. Pressing the REC button once will light the red backlight and put the TS590 on power ON. Pressing it again will put the radio OFF.

Here is a page with the defined buttons and settings.

Sharing a COM PORT

In order to use the controller at the same time as your favorite logging software, you need to share the COM port that is used to send the CAT commands to the TS590s.

Under Windows, to be able to see ALL COM ports (including the hidden one and already assigned) in the device manager, you need to do the following :

Type cmd in the search bar, then right click on cmd.exe selecting "Run as Administrator"

From command prompt type; set devmgr_show_non_present_devices=1

Run the device manager, you can do this from the cmd prompt > type : devmgmt.msc

Click View > Show hidden devices.

Using Com0com virtual port

The target is to create 2 virtual ports that will share a physical COM port of the computer.
In my case, i have one physical COM port named COM1. I want to create 2 virtual COM ports COM2 and COM3, both will use a different software like LOGGER32 and the MIDI controller software described here.

1) Create 2 ports with the com2com setup command prompt :

> install PortName=COM2,EmuBR=yes,EmuOverrun=yes -
> install PortName=COM3,EmuBR=yes,EmuOverrun=yes -

2) Check if the created ports have been created by using the "list" command. I got this :

com0com list


I than created a batch file that is launching the com0com emulator. I did put this file in the folder where i installed com0com and hub4com :

  hub4com --baud=57600 --bi-route=0:1 --bi-route=0:2 --octs=off \\.\COM1 \\.\CNCB0 \\.\CNCB1

When the batch file is launched, it will route the COM1 to the virtual ports CNCB0 (COM2) and CNCB1 (COM3), and reverse.

 Logger32 can now use COM2 in the radio setting and midi2ts590 is using COM3. Both software are sharing the COM1 port that is connected to the TS590s COM port at 57600 bauds.

To be done...

For the moment, the software does not "read" the TS590. And sometimes, the in use modes, VFO, etc.. are not corresponding to the highlighted buttons.
I will try to add this function asap and if really needed.


Using this controller and software, the remote capabilities of the TS590s are really shining. The ease of use of the controller makes the daily traffic or during contests a joy to use in remote !
Changing VFO, making SPLIT, etc... is as easy if not easier as on the TS590s itself...


Special thanks to F6FVY for his advices.