Tlf RTTY howto

2016, Ervin Hegedus, HA2OS

This is a guide for Tlf, how to use it with Fldigi in RTTY mode,
especially in FSK, LSB or USB modulations. Tlf got a new Fldigi
interface, here is what you need to know.

To work in RTTY, you need to solve two problems: read and demodulate
RTTY signals (RX), and send your messages (TX). To demodulate the
signals, we use the Fldigi, the most popular software for digital
modes. Fldigi also can modulate, but there are several solutions,
eg. MFJ 1278, or any other modems, which can be work through serial
port.


Let's see, how works the TX direction with Fldigi.

Important: if you set up your Fldigi instance, don't set up your
RIG! Tlf needs to handle the RIG, because it needs to tune the VFO,
to use the bandmap.

Starting with TLF-1.3 there are two ways to comunicate with Fldigi -
the old GMFSK interface and the actual XMLRPC one.

Note: Using the new interface ist recommended. The old GMFSK interface 
will be no longer maintained and will go away soon.

GMFSK interface
===============

First you need to create some filesin your $HOME directory:

~$ touch TLFfldigi
~$ touch gmfsk_autofile

The TLFfldigi file indicates to Fldigi, that it needs to listen
the gmfsk_autofile file. Tlf writes its RTTY messages to
that file, and Fldigi reads the messages from it. 

In your logcfg.dat, you had to set up the following lines:

RTTYMODE
GMFSK=/home/YOURUSER/gMFSK.log
DIGIMODEM=/home/YOURUSER/gmfsk_autofile

Note, that GMFSK directive tells Tlf, that it can read the
output of modem, and it can be shown in its own modem window.
(The miniterm window opens when you type the ":miniterm" command
in callsign field.)

If you want to use a serial port driven FSK modem, just replace
the DIGIMODEM value for your modem path. Eg. I've build an FSK
modem with the Arduino board, which reads the serial port of my
PC. So, I've set it up like this:

DIGIMODEM=/dev/ttyS0

XMLRPC interface
================

The only thing to do is to set the following command into your 
logcfg.dat

FLDIGI

That will work as long as your Fldigi is compiled with the XMLRPC 
interface and you do use the standard port for it.

If you run fldigis XMLRPC on a different port (or machine) use 

FLDIGI=http://<host>:<portnumber>/RPC2

That's it. Tlf will realizes that you have Fldigi, and will
communicate through XMLRPC.

You can still read of Fldigi RX window (top) in Tlf own terminal,
just use ":miniterm" command in callsign field.

IMPORTANT: The FLDIGI command sets the XMLRPC interface as keyer for
both CW and DIGIMODE. That means you can not have FLDIGI and NETKEYER 
(first for Ddigimode, second for CW) at the same time. That limitation
will go away in next versions of tlf.

The RX mode is a slightly difficult. I don't want to expose that
here, I suppose that anybody knows that, if works in RTTY. I had
a "big" problem with Tlf: when I've worked in AFSK, and I moved the
Fldigi carrier, I could't know exactly, what is the correct QRG of
my RIG. And it was the problem, because I could't use the cluster
info, moreover the grabbed spots! So, when I grabbed a station, TLF
stored it to the currently QRG, but it didn't stored the Fldigi
carrier shift! So, now the Tlf follows this philosophy below.

The "native" mode is FSK. If you turn on your RIG, and switch to
FSK mode, tune the VFO to an RTTY station. If you want to see its
signals in Fldigi, you have to move the Fldigi carrier to 2210Hz.
Note, that 2210Hz calculated from the space and mark frequency. The
space is 2125Hz, the mark is 2295Hz. 2295-2125 = 170, 170/2 = 85,
and 2125+85 = 2210. This value is indicated at bottom-middle of
Fldigi window.

Note, that you have to swith the Fldigi to reverse mode, so you need
to push the [Rv] button.

From now on if you find a station on the bandmap, and press the
CTRL-G (grab the spot), Tlf will tune to VFO that frequency, and
you can hear the station. That's it. Almost :). In FSK mode, there
isn't too easy to tune the VFO to the correct QRG. But if Tlf can
detect, that your RIG is in FSK mode (through CAT system), then
if you move the Fldigi carrier to an another station (which exists
eg. on 1000Hz), then Tlf calculates the new VFO frequency, tune the
RIG to there, and tune Fldigi's carrier to back, 2210Hz.

If you're working in AFSK, then the used modulation is LSB (or USB).
In this case, you can move the Fldigi's carrier anywhere you want
(from 85Hz to 2915Hz), Tlf only catch's the Fldigi carrrier's value,
and calculates the accurate QRG, which indicated on left-middle part
in Tlf window. If you want to grab a spot (with CTRL-G), then leave
the Fldigi carrier's as it exists, and grab the next spot. Tlf will
calculates the requested QRG from the different of the spot and
Fldigi carrier's frequency, and tune the RIG. That's it.

More new feature in Fldigi interface:
- when Tlf sends a message throug Fldigi, it switches Fldigi to TX mode.
- similar to CW mode, if you press ESC while Fldigi sends the message,
  Tlf will stop it.
- if the connection between Tlf and Fldigi breaks (eg. you close
  Fldigi, or you start Tlf before Fldigi), then Tlf realizes it,
  and handles as correctly. You will lost the Fldigi functions (no
  TX/RX, QRG align), but Tlf runs away. If you start Fldigi again,
  after a few seconds, Tlf will work with it again

73, Ervin
HA2OS

