tlf(1)

NAME
tlf - Contest keyer/logging program for Ham Radio

SYNOPSIS
tlf [option]

OPTIONS

-f Start with non-default configuration file (tlf -fPA0R)
    Defaults to logcfg.dat.

-h Show summary of options and exit.

-s Synchronize log with other node ( tlf -suser:password@host/dir/logfilename)

-V Output version information and exit.

-v Verbose startup.

-d Debug rigctl.

-n Start without packet/cluster.

DESCRIPTION
tlf is a console (ncurses) mode general purpose CW keyer, -logging and -contest program for hamradio. It supports the CQWW, the WPX, the ARRL-DX , the ARRL-FD,
 the PACC and the EU SPRINT contests as well as a lot more basic contests, general QSO and DXpedition mode. It interfaces with a morse code generator, a number of radios, and with a DX Cluster. Tlf can project DX cluster data into the excellent Xplanet program, written by Hari Nair.

Contest operation mimics the popular TR-Log program for DOS, the output file is TRlog- as well as CABRILLO compatible.

The program was written for console mode on purpose, to make it run also on smaller machines, or remotely via a modem link. TLF is developed under UBUNTU 0.4.1, with a 2.6.8 version kernel,and tested under SuSE 9.0, kernel version 2.4.19. Beta testers welcome !!!

There is now also a live CD version based on MORPHIX, which uses a USB memory pen for log storage.

Since tlf-0.9.21 the cwdaemon-0.9 is fully supported, featuring direct mode for the keyboard and output to parallel and serial ports and speed and weight control from the keyboard, and band info output on the parallel port.

For rig control tlf works with Hamlib (v. 1.2.3), you find it at Sourceforge.com.

Tlf provides full ip networking between tlf nodes, syncing/distributing log, packet data, frequency data, local talk, serial numbers, time sync etc...

USAGE
Tlf has been written for console mode. If you want to run tlf from a terminal in X, you will probably get the best results if you set TERM=linux and use an linux console terminal. Both KDE and GNOME terminals have a facility to start an X linux console. An Xterm will give unreadable colours, you will have to set different colours in the logcfg.dat file. Also F1 does not work in Xterm, which is not compatible with linux consoles. Other keys (sometimes F4 and F5) may not work in your xterm, YMMV. There are excellent results with the latest KDE and GNOME konsoles (I prefer vi colours). As tlf uses ncurses to format its display you must use a proper font. (The Linux font works o.k. ). If you have problems, try the linux text console first and work from there... Normally you start or restart tlf in fast mode with tlf. During debugging of a logcfg.dat file you can start in verbose mode, to have a look at the startup messages. From version tlf-0.9.3 you can load different config files with tlf -f<filename>. You can stop tlf with the :EXIT command, the :QUIT command or with Ctrl-c or Alt-x. At restart tlf recalculates the score, which may take some time depending on the number of qso's in the logfile and the speed of your system... Tlf takes the points as they are in the log, and calculates the multiplier from either callsign or exchange field (depending on the contest).

COMMANDS
:ADIf writes adif file (*.adif) :CHAr Input number of characters for CW auto-start. Default is 0 (off). You can also start sending the first part of the call by hitting 'space' of 'down-arrow'. This works only in CW CONTEST modes. :CHEck, :NOCheck dupe check window on|off :CQDelay Change cqdelay (in 1/2 seconds, with up/down arrow) :CLOff No cluster info (non-assisted contest operation) :CLUster, :MAP, :SPOts Show cluster window or bandmap or last 8 spots :CONtest Toggle contest mode on/off :CTY, :ZONe, :MULt Show country multipliers, zones, multipliers per continent :CWMode, :SSBmode, :DIGimode switch trx to CW|SSB|Digimode mode :DEBug_tty Debug routine for rig links. :EDIt Edit the log with your favourite editor (the editor (vi|joe|e3|MC) can be set in logcfg.dat :EXIt Exit tlf. :FILter Filter cluster info (announce, dx-spots, all) :FREq Show frequency or band/score info... :HELp show online help. :Help dsplays a file help.txt in the working directory. :INFo network status :MESsage Edit cw messages :MODe Toggle trx mode (CW|SSB|DIG) :PACket Switch to the packet terminal (switch back to tlf with ":") :QUIT Quit tlf :REScore Recalculates the values in the score window. :RITclear rit reset on/off :SET, :CFG Set parameters in logcfg.dat file :SCAn Enter SCAN function (return with ESCAPE) :SCOre Toggle score window on/off :SCVolume (0 ... 99) Adjust soundcard volume for sidetone (up/down) :SIMulator Toggle simulator mode. In simulator mode you can work a complete CQWW CW contest in TRlog mode. Set CONTEST=cqww. :SOUnd The SOUND recorder is a utility to record the voice keyer messages and enables you to record the complete contest in chunks of 1 hour to the hard drive. It does this in the directory: ~/tlf/soundlogs. The sound recorder uses a script called soundlog which has to be located in ~/tlf/soundlogs. You find it in the scripts directory. If your soundcard is different from /dev/dsp you can use the SC_DEVICE parameter in the logcfg.dat file (my soundcard is at SC_DEVICE=/dev/dsp1). The file extension is .au, the sun ulaw format. The recorder produces < 60 MB per hour. This means you can record a complete cqww in less than 3 GB. If your disk cannot handle this, ftp the soundfile to a server every hour....

F1 ... F12, s, c will record the voice keyer message for that key.

1:    Start contest recording to ddhhmm.au

2:    Stop contest recording

3:    Play back contest recording ddhh[mm][xx]
    xx is the offset from the start of the file e.g.:
    2110 will start from beginning of the day 21 hr 10:00 file.
    21100013:00 will start from day 21, hh 10, mm 00, + 13 minutes: 0 seconds To make sure you get a new file every hour make a cron job to run every hour with: /usr/bin/pkill -f sox > /dev/null 2> /dev/null If you run this job every 10 minutes you get sound records of 10 minutes long.

Once started the recorder will run until the lock file ~/.VRlock is removed. :SYNc Synchronize the logfile of this node with the logfile pointed to by parameter SYNCFILE=<user:password@host/dir/logfile>. Tlf will wget the logfile from the relevant node, make a dated backup of your local logfile, and merge the 2 files. The score will be recalculated. :TONe Set PC sidetone frequency (300 - 900) :TRXcontrol toggle trxcontrol on/off (default off, only makes sense with rigcontrol capability) :VIEw View the log with LESS :WRIte Write cabrillo file for selected contests (CQ and ARRL contests). Other contests may work, you have to experiment.

KEYS
The keymap refers to the linux text console. It may be slightly different on X terminals. From the X terminals KDE konsole has been proven to work best if you set keyboard to linux, and colour scheme to VIM colours , system colours or linux colours. Moreover on some systems you must set TERM=linux or fBTERM=rxvt. This also works under vnc. Pgup Increase CW speed (from call and exchange fields). If field not empty and CHANGE_RST is set: change rSt value Ctrl-Pgup Increase Auto_CQ delay (1 sec). Set Aut0_CW delay to message length + pause length. This is because tlf does not know when the cwdaemon is ready... Pg-down Decrease CW speed (from call and exchange fields) If field not empty and CHANGE_RST is set: change rSt value. Ctrl-Pgdown Decrease Auto_CQ delay (1 sec). F1-F11 Send CW, RTTY or VOICE message F12 Start Auto_CQ (sends F12 message) Tab Switch between call input and exchange fields + Toggle CQ/S&P mode (TRlog mode) or Send F3 + log qso(CT mode) Left-Arrow Change band if callsign field empty. (enter edit mode if callsign present, leave edit mode with ENTER or ESC) Right-Arrow Change band ENTER Smart key for contest mode: Calls cq, Calls station, Sends exchange, Logs the qso Backslash log qso w/o CW; ; Insert note in log , Keyboard on. This works only when the call input field is empty. use ctrl-k if it isn't. ESCAPE Return to call input field, keyboard off, stop cw, reset call and exchange (universal undo) '"' (double quote) Send talk message to other tlf nodes - (minus) Delete last qso Up-arrow Edit last qso: Insert, overwrite, and delete; + log view = (equal) Confirm last call _ (underscore) Confirm last exchange { In RTTY (DIGIMODE), keyboard mode switch TX on } In RTTY (DIGIMODE), keyboard mode switch TX off (RX) (backslash) In RTTY (DIGIMODE), keyboard mode switch controller to command mode (back to operating mode with 'k enter' # trx qrg -> mem, mem -> trx qrg ! - Get a new shell Ctrl-a switch cluster window Ctrl-b send info to cluster Ctrl-c Quit (Linux cmd) Ctrl-d Stop tlf Ctrl-f Set frequency Ctrl-g grab dx spot Ctrl-k Keyboard (CW and RTTY) Ctrl-p Muf display Ctrl-q xoff (linux terminal function) Ctrl-r Toggle lp0-pin 14 (Mic/Soundcard switch | trx1/trx2 switch) Ctrl-s xon (linux terminal function) Ctrl-t Show talk messages Ctrl-z Stop tlf Alt-0 ... Alt-9 CW messages Alt-a switch cluster window Alt-b Band up Alt-c Countries display Alt-e Enter qso edit mode Alt-g gab (talk) Alt-h help Alt-i Show talk messages Alt-j Show stn frequencies Alt-k Keyboard (CW and RTTY) Alt-m Show multipliers Alt-n Note in log Alt-p Toggle PTT (cwdaemon) Alt-q Exit tlf Alt-r Toggle score window Alt-s Toggle score window Alt-t Tune Alt-v Band down (Change speed in CT compatibility mode) Alt-w CW weight Alt-x Leave tlf Alt-z Show zones worked

PREFERENCES
Tlf can be fully configured by editing the logcfg.dat file. Normally you keep one logcfg.dat file, setting up your call, the logfilename, the ports and addresses for packet, the rig, the network etc., and a separate rules file per contest. The logcfg.dat file can be edited from within tlf by the :CFG or :SET commands. You can set your favourite editor (joe | vi | e3 | MC) in the logcfg.dat file. You connect the rules file by using the statement RULES=<contestname> in logcfg.dat. Tlf will first look in the working directory for a logcfg.dat file, and if it cannot find one it will look in /usr/local/share/tlf. Make sure you edit the logcfg.dat file to hold your call and your preferred system configuration.

LOGCFG.DAT statements
RULES=<contest rules file> Name of the rules file to load. It helps if you name the rules file according to the contest you what to describe. SYNCFILE=user:password@host/dir/syncfile (wget syntax). File on remote host you want to synchronize with. CTCOMPATIBLE Does not use the TRlog qso sequence, but +, Insert and Enter to log the qso. The default is the TRlog sequence which uses "+" to switch between RUN and S&P modes, and just ENTER to call and log the qso. TLFCOLORx=
Defaults:     TLFCOLOR1=23    (Header and footer)
    TLFCOLOR2=67    (Pop up windows)
    TLFCOLOR3=70    (Log window)
    TLFCOLOR4=57    (Markers/dupe colour)
    TLFCOLOR5=43    (Input fields)
    TLFCOLOR6=63    (Window frames)
The numbers in octal, fg/bg or bg/fg (you have to try it). You should only specify these if you don't agree with the standard colours of tlf. In a GNOME Terminal you can set a special profile for tlf with your own colours... Gnome sets TERM=xterm automatically. See the tlf-devel mail archive for the colours. EDITOR=<joe | vi | e3 | mc> Editor used to edit the log or logcfg.dat CALL=<PA0R> Your call used in messages, and used to determine your country, zone and continent. TIME_OFFSET=<0> (0...23) Used to shift the tlf time with respect to the computer clock. Normally 0. TIME_MASTER This node transmits the time over the network (only one master allowed!) ADDNODE=<node address> Adds an ip address to which we broadcast stuff. (WARNING: Only add addresses of other nodes). THISNODE=<A...H> Node designator. If tlf hears it's own node ID on the network it will exit and ask you to pick another one!! LANDEBUG Switches on the debug function. Dumps all tlf net traffic received on this node into a file named "debuglog" in the working directory. This log can be used as a backup log for the whole network, as it is easy to retrieve qso data, cluster messages, gab messages etc. after the contest. I have it on all the time!! NETKEYER Switches the cw keyer on. Only the ip networked keyer cwdaemon is actively supported. You may also need the keyer for PTT or Band info output. NETKEYERPORT=<port number> (default = 6789) NETKEYERHOST=<host address> (default = 127.0.0.1, localhost) MFJ1278_KEYER=<serial port> Switches supprt for the MFJ1278B multi-mode controller on. The 1278 supports CW as well as RTTY contesting. Fixed baud rate 9600 Baud. CWSPEED=<speed in wpm> (4...69) WEIGHT=<-45...50> Only for NETKEYER. TXDELAY=<PTT delay in ms> (0...50) SOUNDCARD Use soundcard for sidetone output SIDETONE_VOLUME=<soundcard volume> (0...99) Set soundcard sidetone volume (default=70) CQDELAY=<Auto_cq delay in 1/2 seconds> (0...60) Use a value which is message length + listening time!! CWTONE=<pc speaker or soundcard sidetone> (0...999) A value of 0 switches the sidetone off. BANDOUTPUT Outputs band information to pins 2, 7, 8, 9 on the parallel port. Output is 1 (160m), 2 (80m) ... 9 (10m). This format is compatible with the standard interface for antenna switches, band filters etc... BANDOUTPUT=124181818 Output pin 2 for 160, 30, 17 and 12, pin 7 for 80, pin 8 for 40, and pin 9 for 20, 15 and 10. This comes in handy when you have 3 dipoles and a 3-band beam (...). NO_BANDSWITCH_ARROWKEYS This will prevent unwanted band switching when you are not using rig control. Band up=alt-b, band down = alt-v (Trlog compatible). TELNETHOST=<cluster address> e.g. claudia.esrac.ele.tue.nl or 131.155.192.179 TELNETPORT=<telnet port of cluster> e.g. 8000 TNCPORT=<serial port> You can use e.g. /dev/ttyS0, /dev/ttyUSB1, etc... anything that looks like a tty. TNCSPEED=<Baud rate> Tlf supports 1200, 2400, 4800 and 9600 Baud FIFO_INTERFACE The fifo interface is used when you want to receive cluster info from the network, of from another source. The fifo interface uses a fifo in the working directory called /fBclfile/fR. Anything you dump into this fifo will be displayed by the packet interface. RADIO_CONTROL Switches the radio interface on. The rig interface makes use of the Hamlib library which supports a lot of different rigs.. RIGMODEL=<rig number> Look at the Hamlib stuff for the NUMBER of your rig... Exception: RIGMODEL=ORION. RIGSPEED=<Baud rate> Speed of the serial port. RIGPORT=<serial port> You can use e.g. /dev/ttyS0, /dev/ttyUSB1, etc... anything that looks like a tty. RPC rig daemon users should have RIGMODEL=1901 and RIGPORT=localhost. In this case RIGSPEED is ignored. RIGCONF= Will send rig configuration parameters to Hamlib E.g.: RIGCONF=civaddr=0x40,retry=3,rig_pathname=/dev/ttyS0 SC_DEVICE= Sound card device for scan function (e.g. /dev/dsp0) S_METER= Audio s-meter calibration values for the scan function e.g. S_METER=20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1 RIT_CLEAR Clears the RIT after logging the qso. This only works if the rig, and the hamlib routine supports it. (It works for the OMNI 6+). SSBMODE Start tlf in ssb mode (default is CW) RTTYMODE Start tlf in RTTY mode (defaul is CW) GMFSK=/home/youruser/gMFSK.log Tell miniterm where to get the data DIGIMODEM=/home/youruser/gmfsk_autofile Tell tlf where to send the macros CLUSTER Show cluster window. CLUSTERLOGIN=yourcall Automatic login for the telnet client. CLUSTER_LOG Write clusterlog to disk. SPOTLIST Show only cluster spots, allow Grab. BANDMAP Shows only spots for this band. SCOREWINDOW Show the score window (same as Alt-R cmd) CHECKWINDOW Show the country/call check window PARTIALS Show a list of possible contest calls USE_PARTIALS Use the auto-complete utility (takes some practise...). Tlf will complete the call as soon as it is unique in the database. This can of course lead to strange effects, but in my experience there are far more hits than misses. Sometimes you must edit the call because it has locked on a unique call.... Try it, and switch it off when you don't like it. MANY_CALLS Some people think 10 calls is not enough. They have time to check 50 calls after a cq... LOGFREQUENCY Put frequency (kHZ) into qso number to enable logging of frequency (only qso and dxped mode IGNOREDUPES Enable to make multiple qsos in a contest SUNSPOTS=<SSN> Set the sunspots value which is used to do a rough calculation of the MUF. If the cluster interface is used the SSN will be updated by WWV or WCY messages. SFI=<Solar flux value> Set SFI used to calculate SSN. The SSN value is used to do a rough calculation of the MUF. If the packet interface is used the SSN will be updated by WWV or WCY messages. CHANGE_RST If set in logcfg.dat, Pg-up and Pg-down will change RST instead of CW speed if field is not empty. Default: off. NOB4 Don't send automatic "qso b4" message (default: on) NOAUTOCQ No automatic cq when pressing enter or F12. MARKERS=<file name> Generate marker file for Xplanet. Xplanet will show the last 8 spots on an azimuthal map. See the relevant xplanet documentation. Use azimuthal projection, and center the map on your qth.

RULES
The contest rules can be put into separate files. Tlf will first look for a directory called "rules/" in the working directory, and a file "<contest_name>". If tlf cannot find that it will look into the directory /usr/local/share/tlf/rules. A rules file contains contest specific content like multipliers, point, messages etc. The rules file overrides the logcfg.dat file. WARNING! It is your own reponsibility to try these rules well BEFORE the contest. The author of tlf cannot possible check all rules for all contests :) and during the contest the author is contesting (we are in it for the fun, remember...). CONTEST=xxxxx Name of the contest (same as the file name). Some contests, like cqww and wpx, are pre-programmed. look for the relevant rules file in /usr/local/share/tlf/rules. LOGFILE=<logfilename> Mandatory CONTEST_MODE Sets contest mode. Uncomment for normal qso logging. CQWW_M2 Put the node ID into the logline (just after the qso number) to support Multi/2 operation where the station logging the qso must be in the cabrillo file. This can also be used for M/1 and M/M, to enable post-contest analysis of the nodes. Macro characters in the messages % = your call, @ = hiscall, # = serial number, [ = RST , + = increase cw speed, - = decrease cw speed , * = AR, '=' = BT, < = SK, ( = KN, ! = SN, & = AS, > = BK F1=<cw message 1> CQ message, (e.g. CQ de PA0R TEST) F2=<cw message 2> S&P call message, (e.g. @ de %) F3=<cw message 3> Exchange message, (e.g. @ ++5NN--#) F4=<cw message 4> TU message, (e.g. TU 73 %) F5=<cw message 5> Call of the other station (@) F6=<cw message 6> Your call ("%") F7=<cw message 7> QSO B4 message (e.g. @ sri qso b4 gl) F8=<cw message 8> AGN F9=<cw message 9> F10=<cw message 10> QRZ message (QRZ?) F11=<cw message 11> QRZ message (QRZ?) F12=<cw message 12> Auto-CQ message (e.g. +++TEST %---) CQ_TU_MSG=<cw message 13> Auto Exchange message in CQ mode (TRlog mode), (e.g. TU %) S&P_TU_MSG=<cw message 14> Auto Exchange message in S&P mode (TRlog mode), (e.g. TU 5NN #) ALT_0=<...> ... ALT_9=<...> 9 further cw messages SHORT_SERIAL Uses short form for serial number (599=5NN, 001=TT1) LONG_SERIAL Uses long form for serial number (default) VKM1=<voice message file name 1> ... VKM12=<voice message file name 12> Like F1 ... F12, for phone. VKSPM=<voice message file name> Auto Exchange voice message in S&P mode (TRlog mode) VKCQM=<voice message file name> Auto Exchange voice message in CQ mode (TRlog mode) ONE_POINT One (1) point per QSO. TWO_POINTS Two points per QSO. THREE_POINTS Three points per QSO SSBPOINTS= Points per SSB QSO CWPOINTS Points per CW QSO MY_COUNTRY_POINTS=<x> Points for own DXCC entity (often zero :-) MY_CONTINENT_POINTS=<x> Points for countries in own continent. DX_POINTS=<x> Points for station in other continents 2EU3DX_POINTS<x> 2 point for own continent, 3 points for other continents (outdated, see MY_CONTINENT_POINTS and DX_POINTS). COUNTRY_LIST_POINTS=<x> Points for countries in country list USE_COUNTRYLIST_ONLY Zero points for countries not in list COUNTRYLIST=<comma separated list of prefixes starting with colon> (e.g. Scandinavia:SM,LA,OZ,OH) COUNTRYLIST=<file name> File with list of prefixes. PORTABLE_MULT_2 Multiply points x2 for portable stations (e.g. R1 field day) LOWBANDS_DOUBLE Double points for lowband qso (40-80-160) (this is the last operation of the score module, and can be combined with any other value). WYSIWYG_MULTIBAND Exchange is multiplier, per band, whatever you enter. Tlf builds its own list of multipliers. WYSIWYG_ONCE Exchange is multiplier, whatever you enter. Counts once for the whole contest (not per band). WAZMULT Multiplier is the CQ zone (per band). ITUMULT Multiplier is the ITU zone (per band). PFX_MULT Multiplier is prefix (once per contest, not per band. COUNTRY_MULT Multiplier is the DXCC entity (per band) MULT_LIST=<file name> Name of multipliers file (often sections, provinces, states, counties). SECTION_MULT Multiplier is section from multipliers file. SERIAL+SECTION Exchange is serial number and section, multipler is section from multiplier file. Mults count per band. SERIAL+GRID4 Exchange is serial number and grid (e.g. JO21QI), multipler is 4-character grid (JO21). Mults count per band. DX_&_SECTIONS Multiplier is DXCC country or section from multiplier file. RECALL_MULTS Exchange can be recycled, will be filled into exchange field when it is known( see also INITIAL_EXCHANGE) INITIAL_EXCHANGE Format: INITIAL_EXCHANGE=exchanges.txt The file must contain a comma-separated list of exchanges, if e.g. the exchange is the name of the operator: PA0R,rein PG4I,joop OK1RR,martin If RECALL_MULTS is set, tlf will look in this list for the exchange and fill it in for you. There are various contests which have a standard exchange, like e.g. the FOC Marathon. The module also recognises embedded calls (CT3/PA0R/QRP). CONTINENT_EXCHANGE Exchange is continent (NA, SA, EU, AS, AF, OC) SERIAL_EXCHANGE Exchange is serial number (formats exchange field) MIXED Station can be worked both in SSB and CW SSBMODE Start tlf in SSB mode

FILES
/usr/pkg/share/tlf/logcfg.dat is a recent example of the configuration file tlf needs to know what to do. Tlf won't start without one. Copy it into the working directory and edit it before use. You should do your experiments well *before* the contest... It contains e.g. your call, name of the log file, info about ports for cw, packet or rig control, contest rules, points, multipliers etc. etc.. /usr/pkg/share/tlf/rules/contestname contains the rules of the various contests. You can easily write one for your favourite contest making use of the various multiplier and points capabilities.. Check it before the contest and message to tlf-devel@nongnu.org if anything is wrong. /usr/pkg/share/tlf/cty.dat contains a flat ascii data base of info about countries. Tlf-0.9.21 contains a version of 15.11.2003. This is the sxame file as used by CT or TRlog. /usr/pkg/share/tlf/mastercalls contains a flat ascii data base of contest callsigns (> 25.000), which is rather old. section files contain a flat ascii data base of multpliers like states, sections, provinces, d.istricts, names, ages, etc... Some are available at the tlf project download site (http://www.iae.nl/users/reinc/TLF-0.2.html). They are invoked by including MULT_LIST=<sectionfilename> in the rules file.

DOCUMENTATION
An operation manual (mostly not as up-to-date as this man page) is available in html format at the tlf project download page (http://www.wwns.com/tlf) or online via the tlf web page.

AUTHORS
tlf was written by Rein Couperus <pa0r at eudxf.org> aka <rein at couperus.com>. Lots of valuable contributions from PG4I (Joop PA4TU) , PA3FWM, LZ3NY, VA3DB, OM4AA and various anonymous contributors... Tnx all for improving tlf!!

DOCUMENTATION
Bug reports to tlf-devel@nongnu.org