Controlling the Kenwood TS-450SAT through a Transceiver Interface

Aus DL8RDS Wiki
Wechseln zu: Navigation, Suche

1 Project Objectives

The Kenwood TS-450SAT (no matter if with a Antenna Tuner or not, so also the TS-450S variant) both have a serial connector. It is located at the left side of the transceiver.

I decided to purchase the BX-120 interface from the German HAM magazine "Funkamateur", because

  • it is a USB device
  • it is supported by Linux
  • it has a galvanic separation between the TRX and the computer circuitry
  • it can control audio and the serial data link plus the key in a single box
  • it can be used with a great number of transceivers
  • there's a good documentation that comes with it

In short, it fulfilled all my requirements.

Being a Linux affiliate, I decided to try and steer my transceiver with Linux programs, notably and firstly with hamlib and secondly with all the applications basing on it. What is hamlib? Hamlib is a library that provides a consolidated interface to all sorts of transceivers. This leads to the comfortable situation that programmers for logging and other software won't need to think about transceiver control any more, but they can just link their software against the hamlib library and support over 1000 transceiver types at once.

The short term objective is to ensure the controllability of the TS-450SAT, the mid-term objective is to guarantee its operability through a low power steering device like the Cisco Linksys WRTSL54GS or the ASUS WL-500gP, and the longterm objective is the deployment of this architecture at DB0MHB.

2 Controllability of the TS-450SAT

It should be noted that the BX-120 requires some special settings: The USB2Serial chip allows for the inversion of the mark/space logic, which is indeed something the 450 needs. FTDI, the producer of the USB2Serial chip provides a configuration program called "MPROG", which can be downloaded from here:

Either you strictly follow the configuration instructions in the documentation from http://www.box73.de/catalog/pdf/BX-120.pdf or you simply download the settings file from the CDROM that comes with the BX-120. You can also download it from this site.

Then, as a next step, you should strictly stick to the cabling plan as given in the file at http://www.box73.de/catalog/pdf/BX-120.pdf You need a DIN-6 and a DIN-13 plug, and for the key you need a 6.3mm stereo or mono plug. Consider the following image, taken from the PDF I'm quoting all the time:

Ts-450-interface-bx120.jpg

Once you have all your cables soldered, you can start to plug it in. For now, don't plug in the DIN-13 plug into the ACC2 socket, and don't plug in the key. If you're using Linux, type the following as root:

tail-f /var/log/messages

Now plug the BX-120 into a USB socket of your computer. You should be able to observe the creation of the /etc/ttyUSB0 device and also the audio device.

Jun 29 00:09:16 laptop kernel: [29132.516503] usb 3-1: new full speed USB device using uhci_hcd and address 9
Jun 29 00:09:16 laptop kernel: [29132.571527] usb 3-1: configuration #1 chosen from 1 choice
Jun 29 00:09:16 laptop kernel: [29132.574392] hub 3-1:1.0: USB hub found
Jun 29 00:09:16 laptop kernel: [29132.576366] hub 3-1:1.0: 4 ports detected
Jun 29 00:09:16 laptop kernel: [29132.752499] usb 3-1.2: new full speed USB device using uhci_hcd and address 10
Jun 29 00:09:16 laptop kernel: [29132.835909] usb 3-1.2: configuration #1 chosen from 1 choice
Jun 29 00:09:16 laptop kernel: [29132.839140] ftdi_sio 3-1.2:1.0: FTDI USB Serial Device converter detected
Jun 29 00:09:16 laptop kernel: [29132.839162] /build/buildd/linux-2.6.24/drivers/usb/serial/ftdi_sio.c: Detected FT232RL
Jun 29 00:09:16 laptop kernel: [29132.839230] usb 3-1.2: FTDI USB Serial Device converter now attached to ttyUSB0
Jun 29 00:09:16 laptop kernel: [29132.964030] usb 3-1.3: new full speed USB device using uhci_hcd and address 11
Jun 29 00:09:17 laptop kernel: [29133.069916] usb 3-1.3: configuration #1 chosen from 1 choice
Jun 29 00:09:17 laptop kernel: [29133.124707] input: Burr-Brown from TI               USB Audio CODEC  
  as /devices/pci0000:00/0000:00:1d.0/usb3/3-1/3-1.3/3-1.3:1.3/input/input16
Jun 29 00:09:17 laptop kernel: [29133.178956] input,hidraw3: USB HID v1.00 Device [Burr-Brown from TI               USB Audio CODEC ] on
  usb-0000:00:1d.0-1.3

Upon entering "lsusb", you should see something like the following. If you get different values at the beginning of the lines, it's due to the fact that you have different USB ports. But if you get these messages, your Linux box can see the BX-120.

Bus 003 Device 011: ID 08bb:2902 Texas Instruments Japan
Bus 003 Device 010: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
Bus 003 Device 009: ID 0451:2046 Texas Instruments, Inc. TUSB2046 Hub

Now you can try to connect to the TS-450SAT. The TS-450SAT needs 4800 bit/s 8N2 as serial settings. For a test, you can open Hyperterm or minicom and go try to see something at all. Probably you will only see some rubbish, which is not that bad for now.

If you plug in the ACC and Key plugs you will notice that the trx goes into transmitting mode. This is due to the fact that the Key Down and TX switch are controlled over the CTS and DTR lines of the serial device. The serial interface of the transceiver does not need these lines, so they can be used for something else. The bad thing is that by default they go into signal-on mode as soon as there is a serial connection. This is because most modems take them as steering lines to communicate between the sender and the receiver if transmitting is OK or not.

For our purposes these lines need to be controlled by the according programs, which is partly not always easy. hamlib 1.2.6.2 supports a setting, which is though undocumented: It allows the suppression of these lines right from the start of hamlib.

rigctl -m 203 --rig-file=/dev/ttyUSB0 --ptt-file=/dev/ttyUSB0 --ptt-type=RTS --set-conf=rts_state="OFF",dtr_state="OFF"

Unfortunately only the DTR setting will be controlled, not the CTS setting. But upon starting the rigctl program, you can switch off transmitting by "T" - "0". I have not yet found out if this is a bug, even though I strongly assume that this needs to be corrected by the hamlib developers.

In any case, the kde logging program "klog" neatly co-operates with the TS-450S over hamlib and the BX-120 interface and I'm actually quite happy.

With the rigctl utility it is possible to set the frequency, read out the frequency, set the mode, and many many funny things.

In any case, when you plug in the ACC2 / DIN-13 plug, you will be able to... read the audio value.


3 Steering the TS-450SAT from a embedded device

Firstly I need to refer to OpenWRT and my ASUS WL-500GP at this point, as well as the project "Upgrade an ASUS WL-500gP to control my RIG".

I managed to compile a OpenWRT image which runs on the ASUS device and which supports the HUB, the USB Audio and the FTDI USB2Serial chip in the BX-120. When I plug in the transceiver interface into my ASUS router, and when I issue lsusb, I can see the devices from the transceiver interface. So theoretically, I can control the TS-450 perfectly fine.

The only reason why it does not work yet is that the HAMLIB library and the rigctl utility has not yet been ported to OpenWRT. That's another obystacle in the way. But basically it already works. See my project "Compiling a Hamlib package for OpenWRT".

4 Experiences with KLOG on Ubuntu i386 Linux

I can confirm that the HAMLIB library provides perfect access to the TS-450 on my Ubuntu Linux i386 notebook. The utility rigctl works fine. But also with KLOG, a logging software for linux, I can read out the QRGs and modes and do all sorts of things with the transceiver. The only problem I have seen - if you consider it a problem at all - is a certain latency of perhaps 1 second between the triggering of a QRG change on the TS-450 and the display within KLOG. I assume this is due to timing intervals in the serial interface of the transceiver... But it is not a critical obstacle.