CWDAEMON(8) | System Manager's Manual | CWDAEMON(8) |
cwdaemon - morse daemon for the serial or parallel port
cwdaemon [options]
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 udp port 6789.
cwdaemon can be configured either through command line arguments on start of the daemon, or through requests (escaped requests) sent over network. Each escaped request starts with ASCII Escape character (decimal 27, hex 1B). The Escape character is represented in the list below by "<ESC>" string. Notice that there are no space characters between parts of escaped requests.
Some of the arguments and requests require passing a value (e.g. Morse speed [wpm], tone (frequency) [Hz] etc.). Call "cwdaemon -h" to see default values for these arguments/requests, and ranges of accepted values.
When handling command line arguments, cwdaemon does not accept invalid, malformed, or out-of-range values passed through command line. It won't attempt to guess caller's intentions, it won't try to start with some fallback value of the argument. Instead it will just print a debug message and exit. Rejection of bad values and exiting will happen before attempting to fork.
When handling escaped requests, cwdaemon usually does not accept invalid, malformed or out-of-range vales either. But instead of exiting upon receiving request with such value, it simply prints debug message, ignores the request containing such value, and waits for next request. One exception to the rule is PTT delay: requested delay values that are too large will be clipped to maximal allowed value and then will be used by cwdaemon. Requested negative or malformed values of PTT delay will be ignored.
Any serial device that supports getting and setting the modem control lines can be used. On Linux, ttyS0, ttyS1, etc. will work. On FreeBSD these devices are known as ttyd0, ttyd1, etc. On OpenBSD, these same devices are known as tty00, tty01, etc., but may vary with platform.
For parallel ports on Linux try parport0 (default) or parport1, and on FreeBSD, ppi0 (default), ppi1, etc. OpenBSD does not support parallel port operation, and defaults to 'tty00'.
For completeness, a dummy 'null' device is provided. This device does exactly nothing (no rig keying, no ssb keying, etc.).
´sound system´ should be one of following:
cwdaemon can print debug strings. Each debug string in cwdaemon has specified verbosity (verbosity level), and can be printed (or not) depending on current verbosity threshold specified for cwdaemon. The verbosity level value for each string can be changed in future versions of cwdaemon. Don't depend on current setup.
The verbosity threshold can be specified through command line arguments: -i, -y, or --verbosity. -y and --verbosity accept "threshold" value (single character) as specified below:
By default the threshold is set to "warnings" - cwdaemon will print all errors and warnings. Changing the threshold to "information" will make the cwdaemon print errors, warnings, and information.
Debug strings can be printed to stdout, stderr, or disc file. Printing to stdout or stderr is available only if cwdaemon has not forked. Printing to disc file is available regardless of whether cwdaemon has forked or not. You can specify intended debug output using -f or --debugfile command line argument. Values "stdout" and "stderr" passed to cwdaemon with these arguments are recognized as special file names. "syslog" value is also treated as special value, but is not supported at the moment. Every other value will be treated as path to disc file. "stdout" is a default debug output for non-forked cwdaemon. You don't have to specify this explicitly through command line arguments, but you can.
Regardless of values passed through -f or --debugfile arguments, cwdaemon opens a syslog file and (when forked) prints some (few) messages to the syslog. There is no way to override this at the moment. Which messages are always printed to syslog, and which can be printed to other file, is settled for now, but may be changed in the future. Don't depend too much on current setup.
When an escaped request "f" (change sound system) is sent asking for switching to sound system that is generally supported by libcw, but not available on given machine, cwdaemon will not recognize that the sound system is not available. It will close current audio system, and will attempt to open unavailable audio system. That fails, and cwdaemon falls back to Null audio system. If the falling back fails, it will result in cwdaemon working without any sound system, and it may potentially crash the daemon on next attempt to play audio.
The provided README in /usr/share/cwdaemon for a description of the circuitry, usage and testing of cwdaemon.
Cwdaemon was written by Joop Stakenborg <pg4i at amsat.org>, Rein Couperus <pa0r at amsat.org>, Wolf-Ruediger Juergens, DL2WRJ <WJuergens at t-online.de> and Ladislav Vaiz, OK1ZIA <ok1zia at nagano.cz>. Cwlib is taken and adapted from the unixcw package, version 2.2 by Simon Baldwin, G0FRD. FreeBSD support mostly done by Diane Bruce, VA3DB. OpenBSD support by Jason L. Wright, AI4JW.
Since 2012 the main developer is Kamil Ignacak <acerion@wp.pl>.
Morse daemon | ver. 0.10.2 |