Skip to content

Instantly share code, notes, and snippets.

@relistan
Last active Jul 26, 2022
Embed
What would you like to do?
Enable CAT control for WSJT-X on the (tr)uSDX on macOS

CAT Control on the (tr)uSDX for WSJT-X on macOS

This will enable CAT control on your Mac running WSJT-X with the (tr)uSDX and possibly other USDX rigs as well. WSJT-X uses Hamlib to connecto to and manage CAT on different radios. The problem (thanks to Guido PE1NNZ for identifying), is that Hamlib resets the port when it connects. This causes the radio to reset and then it's not yet available when Hamlib tries to connect. We can work around that by blocking the ability for Hamlib to reset the port. The simplest way to do that is to have the port already in use when Hamlib starts up.

I was not able to achieve that using the Hamlib built into WSJT-X. However, by installing Hamlib separately, and running it in TCP server mode (acts like a network server), I was able to get this all to work.

You need to install hamlib with brew install hamlib. If you don't have brew already, then you will need to either install it, or use a different method for installing hamlib. Once that is installed, you should be able to run rigtctld on its own.

Running It

  1. Connect the (tr)USDX to external power first
  2. Connect the USB cable to the rig
  3. Copy the shell script above into your path (e.g. /usr/local/bin)
  4. Run chmod 755 <where you put it> to make it executable
  5. Run the script with urig if it's in your path or ./urig if it's in the current directory

Once that says 'rigctld' running, you can start WSJT-X. Configure WSJT-X like the screenshot included in this gist.

#!/bin/sh
PORT=`ls -tr /dev/tty.usbserial-1* | tail -1`
if [ -z $PORT ]; then
echo "No suitable USB serial port found"
exit 1
else
echo "Found USB serial port named ${PORT}"
fi
cat $PORT &
CAT_PID=$!
echo "Starting 'rigctld'"
rigctld --model=2028 --listen-addr=127.0.0.1 --port=7006 -s 38400 -r $PORT &
RIG_PID=$!
echo "Waiting for radio initialization to complete"
sleep 3
echo "Stopping 'cat' command"
kill $CAT_PID
echo "'rigctld' running"
wait $RIG_PID
@relistan
Copy link
Author

relistan commented Jul 25, 2022

Screen Shot 2022-07-22 at 5 43 52 PM

How to set the settings in WSJT-X UI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment