18 December 2013

Raspberry Pi, Android and CAT-Control for a Yaesu Rig

It all started some weeks ago when I got the feeling that it was time to get a new rig into my shack. I was thinking of course about an Elecraft KX3 for the K3 was hopelessly out of reach. But the problem was, that I only saw pictures and videos of that rig, but I never managed to lay my hands on that object.

It was a long story and it ended on the short term with that:

Cat-Control of a Yaesu FT-817 on a Nexus

I contacted a lot of hams who owned that little rig and all were full of praise. Of course there were some drawbacks, but these were minor points. One problem rested, at last for me, the price. If I would buy it in Germany I had to pay nearly 1500 Euro. Although I don't have to earn it for my money comes out of an automatic teller ;-) this is more than I can afford (in the moment) and nobody came along to give me the cash.

So I said to myself, the KX3 would be nice to have, but perhaps there would be some way to sell a rig. and I looked at my old Yaesu FT-817, looked up the actual prices and went pale. I would have to sell several of them to get one rig back.

Beside that the Yaesu works well and I used it mostly in digital modes. The reason: I found a complicated way to control it remotely. I don't like the rattle of the relais when doing QSK Cw, the display is very tiny, the knobs are a pain for my big fingers and some settings which you use very often are well hidden in menus, so that you have to carry the manual with you.

So if I could manage to add an external VFO-Knob, a bigger display and some sort of keyboard everything should be ok. I started to search the web, but in vain. I found a knob for the Perseus and a lot of software which presented all settings in big windows. But ... they were all made for Window systems and I had only some Linux machines. So back to square one: I have some Arduinos, a Raspberry Pi, a Nexus and time.

First I found some software libraries for the Arduino to control the FT-817. They looked good, but now I had to search for an interface RS232 to the Arduino. I found it but I was to lazy to order it.

So why not use my Raspberry which worked in the last weeks as a video server. So I had to update and upgrade the software including a new image ... this took some time. But I used to check the ham software for Linux on my other machines. So I found an astonishing library which covered nearly all my desires: ham-lib. (http://sourceforge.net/apps/mediawiki/hamlib/index.php?title=Main_Page)

It is stable and has the ability to control hundreds of different rigs from a lot of manufacturers. Out of experience I did not want to experiment installing these things first on the Raspi. It would have taken too long considering the difficult ways of finding the right path. But it worked. So I downloaded the software to the Raspi and compiled it. It took again some time, but the compilation went without a problem. Well done!

Next thing: I had to connect the Yaesu to the Raspi. Of course the original interface with a RS232 didn't work and I had an USB-Converter attached. Things got complicated. But I found a goos guide for the installation from Tommy: HowTo Conigure Hamlib.
With lsusb I found the right device, made the appropriate entries in the udev section, but I always got time out problems.

Next morning I started again and found out, that the tty device which was attached to my interface was already bound by a process triggered by inittab. My dear, ...
After that everything was easy.

I forgot to tell you one thing: I have no in- or output devices connected to the Raspi. I do all the hard work via a ssh-connection from my Android Nexus. So I could control via the terminal on the Nexus the program rigctl on the Raspi sudo rigctl -m 120 -r /dev/radio -s 9600 which send the right commands to the Yaesu.

But I still had to type a lot and remember all the commands. So I looked for a graphical frontend and found it Grig by OZ9AEC. It was easy to install on the Raspi, but of course it would not run in a text terminal. Again you can do everything you want under Linux. I installed a VNC-Server on the Raspi, a VNC-Client on the Android and saw for the second time in my live the Desktop of the Raspberry Pi --- on the Nexus.

Called Grig, and this is what you saw some lines above. By the way fldigi is also running on the Raspi and shown on the Android.

Stay Tuned!