1CWDAEMON(8) System Manager's Manual CWDAEMON(8)
2
3
4
6 cwdaemon - morse daemon for the serial or parallel port
7
8
10 cwdaemon [options]
11
12
14 Cwdaemon is a small daemon which uses the pc parallel or serial port
15 and a simple transistor switch to output morse code to a transmitter
16 from a text message sent to it via udp port 6789.
17
18
20 cwdaemon can be configured either through command line arguments on
21 start of the daemon, or through requests (escaped requests) sent over
22 network. Each escaped request starts with ASCII Escape character (deci‐
23 mal 27, hex 1B). The Escape character is represented in the list below
24 by "<ESC>" string. Notice that there are no space characters between
25 parts of escaped requests.
26
27 Some of the arguments and requests require passing a value (e.g. Morse
28 speed [wpm], tone (frequency) [Hz] etc.). Call "cwdaemon -h" to see
29 default values for these arguments/requests, and ranges of accepted
30 values.
31
32 When handling command line arguments, cwdaemon does not accept invalid,
33 malformed, or out-of-range values passed through command line. It won't
34 attempt to guess caller's intentions, it won't try to start with some
35 fallback value of the argument. Instead it will just print a debug mes‐
36 sage and exit. Rejection of bad values and exiting will happen before
37 attempting to fork.
38
39 When handling escaped requests, cwdaemon usually does not accept
40 invalid, malformed or out-of-range vales either. But instead of exiting
41 upon receiving request with such value, it simply prints debug message,
42 ignores the request containing such value, and waits for next request.
43 One exception to the rule is PTT delay: requested delay values that are
44 too large will be clipped to maximal allowed value and then will be
45 used by cwdaemon. Requested negative or malformed values of PTT delay
46 will be ignored.
47
48
49
50 Print help text to stdout and exit
51
52 Command line argument: -h, --help
53
54
55 Escaped request: N/A
56
57
58
59
60 Print version information to stdout and exit
61
62 Command line argument: -V, --version
63
64
65 Escaped request: N/A
66
67
68
69
70 Set hardware keying device
71
72 Command line argument: -d, --cwdevice <device>
73
74
75 Escaped request: <ESC>8<device>
76
77
78 See chapter "DEVICES" below for more information.
79
80
81
82
83 Don't fork daemon, run in foreground
84
85 Command line argument: -n, --nofork
86
87
88 Escaped request: N/A
89
90
91 Debug information will be printed to stdout (unless different
92 debug outut is selected, or debug output is silenced by setting
93 debug output verbosity).
94
95
96
97
98 Set network UDP port
99
100 Command line argument: -p, --port <port number>
101
102
103 Escaped request: <ESC>9<port number>
104
105
106 This escaped request is obsolete and has no effect. Command line
107 argument works as expected.
108
109
110
111
112 Set process priority (niceness)
113
114 Command line argument: -P, --priority <priority>
115
116
117 Escaped request: N/A
118
119
120
121
122 Set Morse speed [wpm]
123
124 Command line argument: -s, --wpm <speed>
125
126
127 Escaped request: <ESC>2<speed>
128
129
130
131
132 Set PTT delay [ms] (TOD, Turn On Delay)
133
134 Command line argument: -t, --pttdelay <delay>
135
136
137 Escaped request: <ESC>d<delay>
138
139
140
141
142 Turn PTT keying on/off
143
144 Command line argument: N/A
145
146
147 Escaped request: <ESC>a<{0|1}>
148
149
150 0 - PTT off, 1 - PTT on
151
152
153
154
155 Set sound system (sound backend)
156
157 Command line argument: -x, --system <system>
158
159
160 Escaped request: <ESC>f<system>
161
162
163 See chapter "SOUND SYSTEM" below for more information.
164
165
166
167
168 Set sound volume for soundcard [%]
169
170 Command line argument: -v, --volume <volume>
171
172
173 Escaped request: <ESC>g<volume>
174
175
176
177
178 Set Morse weighting
179
180 Command line argument: -w, --weighting <weighting>
181
182
183 Escaped request: <ESC>7<weighting>
184
185
186
187
188 Set tone (frequency) of sound [Hz]
189
190 Command line argument: -T, --tone <tone>
191
192
193 Escaped request: <ESC>3<tone>
194
195
196 Notice that sending escaped request with value '0' silences
197 cwdaemon.
198
199
200
201 Increase verbosity of debug output
202
203 Command line argument: -i
204
205
206 Escaped request: N/A
207
208
209 The argument can be repeated up to four times (-iiii) to gradu‐
210 ally increase the verbosity. Alternatively you can use
211 -y/--verbosity option.
212
213
214
215
216 Set verbosity threshold for debug strings
217
218 Command line argument: -y, --verbosity <threshold>
219
220
221 Escaped request: N/A
222
223
224 Alternatively you can use -i option.
225
226
227 See chapter "DEBUGGING" below for more information.
228
229
230
231
232
233
234 Set numeric value of libcw debug flags
235
236 Command line argument: -I, --libcwflags <flags>
237
238
239 Escaped request: N/A
240
241
242
243
244 Set debug output
245
246 Command line argument: -f, --debugfile <output>
247
248
249 Escaped request: N/A
250
251
252 Print debug information to <output> instead of stdout. Value of
253 <output> can be explicitly stated as "stdout" (when not fork‐
254 ing). Value of <output> can be also "stderr" (when not fork‐
255 ing). Special value of <output> being "syslog" is reserved for
256 future use. For now it will be rejected as invalid. Passing
257 path to disc file as value of <output> works in both situations:
258 when forking and when not forking.
259
260
261
262
263
264 Reset some of cwdaemon parameters
265
266 Command line argument: N/A
267
268
269 Escaped request: <ESC>0
270
271
272 The request resets program's parameters to cwdaemon default val‐
273 ues, unless the defaults were overridden with command line argu‐
274 ments - then the values passed in command line are used.
275
276
277
278 Abort currently sent message
279
280 Command line argument: N/A
281
282
283 Escaped request: <ESC>4
284
285
286
287
288 Exit (close) daemon
289
290 Command line argument: N/A
291
292
293 Escaped request: <ESC>5
294
295
296
297
298
299 Set word mode
300
301 Command line argument: N/A
302
303
304 Escaped request: <ESC>6
305
306
307
308
309 Set SSB way
310
311 Command line argument: N/A
312
313
314 Escaped request: <ESC>b<{0|1}
315
316
317 0 - microphone, 1 - soundcard
318
319
320
321
322 Tune for a number of seconds
323
324 Command line argument: N/A
325
326
327 Escaped request: <ESC>c<seconds>
328
329
330 Tune for <seconds> seconds. The tuning is performed by both
331 selected sound system, and by current hardware keying device.
332
333
334
335
336 Set band switch output
337
338 Command line argument: N/A
339
340
341 Escaped request: <ESC>e<value>
342
343
344 This argument sets band switch output on parport bits 9 (MSB),
345 8, 7, 2 (LSB).
346
347
348
349
350
352 Any serial device that supports getting and setting the modem control
353 lines can be used. On Linux, ttyS0, ttyS1, etc. will work. On FreeBSD
354 these devices are known as ttyd0, ttyd1, etc. On OpenBSD, these same
355 devices are known as tty00, tty01, etc., but may vary with platform.
356
357 For parallel ports on Linux try parport0 (default) or parport1, and on
358 FreeBSD, ppi0 (default), ppi1, etc. OpenBSD does not support parallel
359 port operation, and defaults to 'tty00'.
360
361 For completeness, a dummy 'null' device is provided. This device does
362 exactly nothing (no rig keying, no ssb keying, etc.).
363
364
365
366
368 ´sound system´ should be one of following:
369
370 ´c´ - console buzzer (PC speaker) - default system,
371
372 ´o´ - OSS,
373
374 ´a´ - ALSA,
375
376 ´p´ - PulseAudio,
377
378 ´n´ - none - no audio,
379
380 ´s´ - soundcard - autoselect from OSS/ALSA/PulseAudio.
381
382
383
384
386 cwdaemon can print debug strings. Each debug string in cwdaemon has
387 specified verbosity (verbosity level), and can be printed (or not)
388 depending on current verbosity threshold specified for cwdaemon. The
389 verbosity level value for each string can be changed in future versions
390 of cwdaemon. Don't depend on current setup.
391
392 The verbosity threshold can be specified through command line argu‐
393 ments: -i, -y, or --verbosity. -y and --verbosity accept "threshold"
394 value (single character) as specified below:
395
396
397 ´n´ - none
398
399 ´e´ - errors
400
401 ´w´ - warnings (default)
402
403 ´i´ - information
404
405 ´d´ - details
406
407
408 By default the threshold is set to "warnings" - cwdaemon will print all
409 errors and warnings. Changing the threshold to "information" will make
410 the cwdaemon print errors, warnings, and information.
411
412
413 Debug strings can be printed to stdout, stderr, or disc file. Printing
414 to stdout or stderr is available only if cwdaemon has not forked.
415 Printing to disc file is available regardless of whether cwdaemon has
416 forked or not. You can specify intended debug output using -f or
417 --debugfile command line argument. Values "stdout" and "stderr" passed
418 to cwdaemon with these arguments are recognized as special file names.
419 "syslog" value is also treated as special value, but is not supported
420 at the moment. Every other value will be treated as path to disc file.
421 "stdout" is a default debug output for non-forked cwdaemon. You don't
422 have to specify this explicitly through command line arguments, but you
423 can.
424
425
426 Regardless of values passed through -f or --debugfile arguments, cwdae‐
427 mon opens a syslog file and (when forked) prints some (few) messages to
428 the syslog. There is no way to override this at the moment. Which mes‐
429 sages are always printed to syslog, and which can be printed to other
430 file, is settled for now, but may be changed in the future. Don't
431 depend too much on current setup.
432
433
434
435
437 When an escaped request "f" (change sound system) is sent asking for
438 switching to sound system that is generally supported by libcw, but not
439 available on given machine, cwdaemon will not recognize that the sound
440 system is not available. It will close current audio system, and will
441 attempt to open unavailable audio system. That fails, and cwdaemon
442 falls back to Null audio system. If the falling back fails, it will
443 result in cwdaemon working without any sound system, and it may poten‐
444 tially crash the daemon on next attempt to play audio.
445
446
447
448
450 The provided README in /usr/share/cwdaemon for a description of the
451 circuitry, usage and testing of cwdaemon.
452
453
454
455
457 Cwdaemon was written by Joop Stakenborg <pg4i at amsat.org>, Rein
458 Couperus <pa0r at amsat.org>, Wolf-Ruediger Juergens, DL2WRJ <WJuergens
459 at t-online.de> and Ladislav Vaiz, OK1ZIA <ok1zia at nagano.cz>. Cwlib
460 is taken and adapted from the unixcw package, version 2.2 by Simon
461 Baldwin, G0FRD. FreeBSD support mostly done by Diane Bruce, VA3DB.
462 OpenBSD support by Jason L. Wright, AI4JW.
463
464 Since 2012 the main developer is Kamil Ignacak <acerion@wp.pl>.
465
466
467
468ver. 0.10.2 Morse daemon CWDAEMON(8)