Cwdaemon-0.5
============

Cwdaemon is a small daemon which uses the pc parallel or serial port and a 
simple transistor switch to output morse code to a transmitter from a text 
message sent to it via the udp internet protocol.

Cwdaemon is fully compatible with tlf (> 0.7.4), the keyboard routine
works in direct mode.

Cwdaemon  uses the PC speaker to generate a sidetone.
The program is called as root, with "cwdaemon -p <portnumber> -d <device>".
If no portnumber is given, the default portnumber 6789 is used.

Device can be one of ttyS0 (first serial port at 0x3f8), ttyS1 (second serial
port at 0x2f8), lp0 (first parallel port at 0x378), lp1 (second parallel port
at 0x27) or lp2 (at 0x3bc).

lp0 is the default device.

Cwdaemon will only work if it has full access to the port, so you should
unload any parallel (e.g. printer) or serial port drivers.

After starting, the program detaches from its controlling terminal,
after that the program can be controlled via its network udp input port.

The message formats are:
-----------------------
<ESC>"0"                 Reset to default values
<ESC>"2"<"speed value">  Set keying speed (5 ... 60 wpm)
<ESC>"3"<"tone value">   Set sidetone (300 ... 1000 Hz)
<ESC>"3"<"0">            Sound off
<ESC>"4"                 Abort message
<ESC>"5"                 Stop (Exit) the daemon
<ESC>"6"                 Set uninterruptable (word- ) mode for simulator
<ESC>"7"<"weight value"> Set weigthing (-5 ... 5)
<ESC>"8"<"device type">  Set device type (same as -d)
<ESC>"9"<"port number">  Set lp or ttyS port base number (dec or 0xhex)
<ESC>"a"<"0|1">          PTT keying off or on
<ESC>"b"<"0|1">          SSB signal from microphone or soundcard
<ESC>"c"<"x">            Tune x seconds long
<ESC>"d"<"delay">        PTT on delay 0..50 (0 .. 50ms)
Any message              Send morse code message  (max 1 packet!)
qrz de pa0rct ++test--   In- and decrease speed on the fly in 2 wpm steps
de d~l~2~w~r~j pse k     Add half-space delay after each character


Default values:
--------------
Speed = 24 wpm
Tone = 800 Hz
Sound = on
Wordmode = off
Weight = 0
UDP port = 6789
PTT delay = 0


Language characters:
-------------------
The following special language characters are supported:
Ä ä     "A umlaut"      .-.-
Ö ö     "O umlaut"      ---.
Ü ü     "U umlaut"      ..--
Å å     "Ringed A"      .--.-
Ñ ñ     "N tilde"       --.--


Special characters:
------------------
Cwdaemon supports the following special characters:

*	AR
=	BT
<	SK
(	KN
!	SN
&	AS
>	BK


Cwdaemon parallel and serial port circuitry:
--------------------------------------------
See the examples is the schematics directory.


Testing cwdaemon
----------------
Please review and run the cwtest.sh test program. It only works with
netcat installed.

Credits:
--------
GW4PTS Morse tutor for Linux, by Alan Cox (morse.c 1.00, 21/09/93).
Cwbeacon is part of the beaconProject by EA4RJ.
Conversion to stand-alone utility and basic work by PA4TU.
Networking and daemon mode by PA0RCT.
Rework of the device handling by OK1ZIA.
Many contributions by DL2WRJ.

All of this code is distributed under the GNU GPL license.
