• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

debian/H07-May-2022-516374

doc/H07-Oct-2015-927714

examples/H07-Oct-2015-1,116786

patches/H07-Oct-2015-1,4671,408

src/H07-Oct-2015-4,5002,694

test/H07-Oct-2015-2,9251,167

AUTHORSH A D07-Oct-2015438 109

COPYINGH A D07-Oct-201517.6 KiB342281

ChangeLogH A D07-Oct-20159.8 KiB236198

INSTALLH A D07-Oct-2015627 2013

Makefile.amH A D03-May-20221.9 KiB6748

Makefile.inH A D07-Oct-201526.4 KiB832726

NEWSH A D07-Oct-201511.9 KiB326228

READMEH A D07-Oct-201510 KiB288215

TODOH A D07-Oct-2015763 2015

aclocal.m4H A D07-Oct-201551.1 KiB1,4301,291

compileH A D07-Oct-20156.7 KiB311226

config.guessH A D07-Oct-201542.5 KiB1,4671,256

config.subH A D07-Oct-201531 KiB1,5801,438

configureH A D07-Oct-2015226.3 KiB7,8586,524

configure.acH A D07-Oct-20152.3 KiB8262

cwdaemon.spec.inH A D07-Oct-20151.6 KiB6657

cwsetup.shH A D07-Oct-2015885 5237

depcompH A D07-Oct-201513.5 KiB480304

install-shH A D07-Oct-20157 KiB295169

missingH A D07-Oct-201510 KiB337263

mkinstalldirsH A D07-Oct-20151.9 KiB11285

qa_build_debian.shH A D07-Oct-20152.3 KiB16197

README

1cwdaemon-0.10.2
2===============
3
4Cwdaemon is a small daemon which uses the pc parallel or serial port and a
5simple transistor switch to output morse code to a transmitter from a text
6message sent to it via the udp internet protocol. The program uses the
7soundcard or PC speaker (console buzzer) to generate a sidetone.
8
9It is called as root, with "cwdaemon -p <portnumber> -d <device>". If no
10portnumber is given, the default portnumber 6789 is used. Device can be one of
11the serial (ttyS0, ttyS1, etc) or parallel (parport0, parport1, etc) ports.
12Default is parport0.
13
14For FreeBSD, use ttyd0, ttyd1, etc. for the serial ports and ppi0, ppi1, etc.
15for the parallel ports. Default is the first parallel port.
16
17You can also use dummy device "null" instead of parallel or serial port.
18This device does exactly nothing (no rig keying, no ssb keying, etc.).
19
20Cwdaemon also handles PTT, and band index output for automatic switching of
21antennas, filters etc. Pinout is compatible with the standard (CT, TRlog).
22
23cwdaemon is available on github: https://github.com/acerion/cwdaemon
24cwdaemon's older webpage is http://cwdaemon.sourceforge.net/
25
26
27Please note
28-----------
29BSD and/or Linux are not real-time operating systems. e.g. the timer resolution
30of the kernel is 10 milliseconds. You may especially notice this when using PTT
31and setting the PTT delay value. If you experience timing problems, you might
32try using the -P flag. This will set cwdaemon's priority. The default is zero,
33any negative value will be a higher priority, the maximum being -20.
34
35
36Quickstart
37----------
38On linux run the cwsetup.sh script and next run cwdaemon with the -n flag.
39If this does not work, read the next paragraphs....
40
41
42Setting up parallel port(s) on linux for cwdaemon
43-------------------------------------------------
44You need the parport devices to use cwdaemon. Check if you have them:
45
46  ls -al /dev/parport*
47
48If you don't see any files, create the with MAKEDEV (as root user):
49
50  cd /dev; ./MAKEDEV parport
51
52Next, check whether the parport and parport_pc kernel modules are loaded: when
53you type 'lsmod', you should (on the i386 architecture) see something like:
54
55  parport_pc             23304   0 (autoclean)
56  parport                25992   0 (autoclean) [parport_pc]
57
58The lp module should not be loaded, it is only needed if you want to use a
59printer and it will block the parallel port if you use cwdaemon. You can unload
60it with the command 'rmmod lp' as root.
61
62If you don't see any parport modules please check whether you have the line:
63
64  alias parport_lowlevel parport_pc
65
66in your /etc/modules.conf file and load the modules with:
67
68  modprobe parport
69  modprobe parport_pc
70
71Be sure that parallel port support is enabled in your BIOS! If you use odd
72ioports or interrupts, you can do things like:
73
74  modprobe parport_pc io=0x3bc,0x378,0x278 irq=none,7,auto
75
76which configures 3 parallel ports with the second port using irq 7 and the
77third port some auto-detected irq.
78
79When cwdaemon is run, the ppdev kernel module should be loaded automatically.
80In case it doesn't, just type:
81
82  modprobe ppdev
83
84PLEASE NOTE: you should probably run a 2.4 kernel to use the ppdev device with
85cwdaemon.
86
87Setting up serial port(s) on linux for cwdaemon
88-----------------------------------------------
89Setting up your serial ports is straightforward. Here are some commands to get
90you started:
91
92  setserial -g /dev/ttyS*
93
94will tell you what serial lines are configured. If you see a line with
95"UART: unknown", this probably means there is no serial port for the device.
96
97  setserial /dev/ttyS0 -v autoconfig
98
99will try to autoconfigure your first serial port. You need to run this command
100as root.
101
102Other valid commands are:
103
104  setserial /dev/ttyS1 auto_irq skip_test autoconfig
105  setserial /dev/ttyS3 irq 5 uart 16550A skip_test
106
107Newer distributions use a file called '/etc/serial.conf' where the information
108for your serial ports are stored.
109
110
111Setting up parallel port(s) on FreeBSD for cwdaemon
112---------------------------------------------------
113You will need ppbus and ppi either defined in the kernel or loaded at boot time
114as kernel modules. ppbus and ppi are defined in the GENERIC kernel hence should
115work as is unless you have removed them from your kernel. If not, you can add
116the following in the kernel config, recompiling and reloading a kernel as
117outlined in the FreeBSD handbook.
118
119# Parallel port
120device          ppbus           # Parallel port bus (required)
121device          ppi             # Parallel port interface device
122
123You can also load ppbus.ko and ppi.ko at boot time instead of rebuilding your
124kernel. This is also outlined in the FreeBSD handbook.
125
126e.g. In /boot add
127
128ppbus_load="YES"
129ppi_load="YES"
130
131
132Setting up serial port(s) on FreeBSD for cwdaemon
133-------------------------------------------------
134The serial port driver is loaded by default in the GENERIC kernel. If not
135configured in the kernel, you can add to the kernel config and rebuild the
136kernel as outlined in the FreeBSD handbook.
137
138# Serial (COM) ports
139device          sio             # 8250, 16[45]50 based serial ports
140
141
142How cwdaemon works
143------------------
144
145After starting, the program detaches from its controlling terminal,
146after that the program can be controlled via its network udp input
147port.
148
149You can control cwdaemon by sending requests to it. Recognized
150requests are listed below. Skip the quotes around codes when sending
151actual requests. <ESC> is ASCII escape character (decimal 27, hex 1B).
152Most of the requests are so called "escape requests", because they
153start with Escape character.
154
155<ESC>0                   Reset to default values
156<ESC>2<speed value>      Set keying speed (5 ... 60 wpm)
157<ESC>3<tone value>       Set sidetone (300 ... 1000 Hz)
158<ESC>3<0>                Sound off
159<ESC>4                   Abort message
160<ESC>5                   Stop (Exit) the daemon
161<ESC>6                   Set uninterruptable (word- ) mode for simulator
162<ESC>7<weight value>     Set weighting (-50 ... 50)
163<ESC>8<device>           Set device for keying (same as -d)
164<ESC>9<port number>      Obsolete
165<ESC>a<0|1>              PTT keying off or on
166<ESC>b<0|1>              SSB signal from microphone or soundcard
167<ESC>c<x>                Tune x seconds long (limit = 10 seconds)
168<ESC>d<delay>            PTT on delay 0..50 (0 .. 50ms)
169<ESC>e<bandindex>        Band info output on pins 2, 7, 8, 9 of the parport
170                         (pin 2 = lsb, 9 = msb, e.g. 1000 = 160m, 1001 = 10m)
171<ESC>f<sound system>     Set sound system, same as '-x' command line option.
172                         Recognized values are:
173                         c - console buzzer (PC speaker) - default system,
174                         o - OSS,
175                         a - ALSA,
176                         p - PulseAudio,
177                         n - none - no audio,
178                         s - soundcard - autoselect from OSS/ALSA/PulseAudio.
179                         You may experience few seconds of delay (~4 s) when
180                         switching from ALSA or PulseAudio to OSS audio
181                         system. This is because OSS waits until audio device
182                         stops being blocked by ALSA or PulseAudio.
183<ESC>g<volume>           Set soundcard volume (0 .. 100).
184<ESC>h<text>             This request must be followed by a second request
185                         containing only text to be played by cwdaemon. Once
186			 the cwdaemon finishes playing the text from second
187			 request, it replies to the client with "h"+"text"
188			 from first request.
189
190			 "text" is optional.
191
192			 The reply defined in first request is used by
193			 cwdaemon only once, i.e. only for a single
194			 text request that follows the escape
195			 request. If you want to receive a reply from
196			 the cwdaemon after playing each text request,
197			 you need to send the "<ESC>h" escape request
198			 first, for every text request.
199
200			 Example:
201			 client sends: "<ESC>hcat"
202			 client sends: "purring"
203			 server plays: "purring"
204			 server sends back: "hcat"
205
206			 client sends: "<ESC>hdog"
207			 client sends: "barking"
208			 server plays: "barking"
209			 server sends back: "hdog"
210
211			 client sends: "<ESC>h"
212			 client sends: "whispering"
213			 server plays: "whispering"
214			 server sends back: "h"
215
216			 client sends: "<ESC>hdog"
217			 client sends: "barking"
218			 server plays: "barking"
219			 server sends back: "hdog"
220
221			 client sends: "purring"
222			 server plays: "purring"
223			 server does not send a reply - none was specified this time for "purring"
224
225
226Any message              Send morse code message  (max 1 packet!)
227qrz de pa0rct ++test--   In- and decrease speed on the fly in 2 wpm steps.
228                         Repeated '+' and '-' characters are allowed,
229                         in such cases increase and decrease of speed is
230                         multiple of 2 wpm.
231de d~l~2~w~r~j pse k     Add half-space delay after each character
232
233
234Default startup values
235----------------------
236Speed = 24 wpm
237Tone = 800 Hz
238Sound = on
239Wordmode = off
240Weight = 0
241UDP port = 6789
242PTT delay = 0 (off)
243Device = parport0
244Sound device = console buzzer
245
246
247Cwdaemon supports the following special characters
248--------------------------------------------------
249*	AR
250=	BT
251<	SK
252(	KN
253!	SN
254&	AS
255>	BK
256
257
258Cwdaemon parallel and serial port circuitry
259-------------------------------------------
260See the examples in the schematics directory.
261
262
263Tests and examples
264------------------
265Test scripts in Perl are located in test/ directory.
266Example programs are located in examples/ directory.
267
268
269Platforms
270---------
271cwdaemon 0.10.2 has been compiled and tested on following platforms:
272 - Debian GNU/Linux 8, x86_64, gcc 4.9.2, libcw 6.5.1
273 - Alpine Linux 3.2.0, x86_64, gcc 5.2.0, libcw 6.5.1
274 - FreeBSD 10.0, x86_64, clang 3.3, libcw 6.5.1
275
276
277Credits
278-------
279Conversion to stand-alone utility, basic work, POSIX porting, integration
280with unixcw and initial FreeBSD support by PG4I.
281Networking, daemon mode and band switching by PA0R.
282Rework of the device handling, echo-ing and Debian init.d support by OK1ZIA.
283Many contributions by DL2WRJ. Unixcw library by G0FRD. FreeBSD support by
284Diane Bruce, VA3DB. OpenBSD and multi-platform support by Jason L. Wright,
285AI4JW.
286
287All of this code is distributed under the GNU GPL license.
288