Friday, April 17, 2009

Serial killer

USB killed the serial port. Unfortunately it has not left us with a satisfactory replacement for communicating with radios. USB to serial adapters just don't work, plain and simple.

I have just finished developing a RigCat rig control file for the Juma TRX2 and Fldigi. If you should happen to want it, you can download it from here. (You'll probably have to right-click the link and do a Save As... or your browser will try to read it.) The file requires the TRX2 firmware version 1.06 which is unreleased as of this moment.

As with anything to do with computers, this was much harder to accomplish than you would imagine. The reason being that communication between Fldigi and the TRX2 was not working properly.

Now remember, this was a serial connection that I had used to successfully update the firmware in the radio three times, so I had reasonable expectations of it working. I had an inkling that there could be a problem when I couldn't use HyperTerminal to send commands to the radio manually. However, another terminal program, RealTerm, communicated with it just fine - although it did report that there were "UART framing errors", whatever they are. RealTerm, incidentally, is a much better tool for debugging serial communications problems than HyperTerminal.

Fldigi has a debugging mode that can be useful when problems like this occur. You just run it from a command line and add the switch "--debug-level 9". On closing a status log will be written to its data file in \Documents and Settings\user\fldigi.files. Unfortunately this file doesn't have standard newline characters so it is hard to read in Notepad. I used a programmer's editor. From this I could see that what was coming back from the TRX2 was not what was expected, and not what I was getting back when RealTerm was used either.

In the end I had no alternative but to disconnect my K3 from my one real serial port in order to try that. Everything then worked perfectly. I stole the sound card interface cables from the K3 as well (which is probably now feeling rather unloved and neglected) plugged them straight into the TRX2 and made a couple of PSK31 contacts into Russia using 4 watts output. Hurrah!

So there you have it. It's now possible to use the Juma TRX2 with Fldigi. As long as your computer has a real serial port. I don't know how to make this work if you have a laptop.

But what I find really interesting is that I have proved pretty conclusively that whether or not a USB to serial adapter works depends on the application. Some will work fine, others will receive garbage. It isn't a very satisfactory state of affairs, and one that's almost guaranteed to result in yet more computer-created frustration.
Post a Comment