Merge from vendor branch SENDMAIL:
[dragonfly.git] / games / morse / morse.6
1 .\" Copyright (c) 2000 Alexey Zelkin.  All rights reserved.
2 .\" Copyright (c) 1988, 1991, 1993
3 .\"     The Regents of the University of California.  All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\"    notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\"    notice, this list of conditions and the following disclaimer in the
12 .\"    documentation and/or other materials provided with the distribution.
13 .\" 3. All advertising materials mentioning features or use of this software
14 .\"    must display the following acknowledgement:
15 .\"     This product includes software developed by the University of
16 .\"     California, Berkeley and its contributors.
17 .\" 4. Neither the name of the University nor the names of its contributors
18 .\"    may be used to endorse or promote products derived from this software
19 .\"    without specific prior written permission.
20 .\"
21 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 .\" SUCH DAMAGE.
32 .\"
33 .\"     @(#)bcd.6       8.1 (Berkeley) 5/31/93
34 .\" $FreeBSD: src/games/morse/morse.6,v 1.4.2.7 2003/01/26 02:57:27 keramida Exp $
35 .\" $DragonFly: src/games/morse/morse.6,v 1.3 2006/02/17 19:33:31 swildner Exp $
36 .\"
37 .Dd December 7, 2000
38 .Dt MORSE 6
39 .Os
40 .Sh NAME
41 .Nm morse
42 .Nd reformat input as morse code
43 .Sh SYNOPSIS
44 .Nm
45 .Op Fl p
46 .Op Fl d Ar device
47 .Op Fl e
48 .Op Fl w Ar speed
49 .Op Fl f Ar frequency
50 .Op Fl s
51 .Op Ar string ...
52 .Sh DESCRIPTION
53 The command
54 .Nm
55 read the given input and reformat it in the form of morse code.
56 Acceptable input are command line arguments or the standard input.
57 .Pp
58 Available options:
59 .Bl -tag -width flag
60 .It Fl s
61 The
62 .Fl s
63 option produces dots and dashes rather than words.
64 .It Fl p
65 Send morse the real way. This only works if your system has
66 .Xr speaker 4
67 support.
68 .It Fl w Ar speed
69 Set the sending speed in words per minute. If not specified the default
70 speed of 20 WPM is used.
71 .It Fl f Ar frequency
72 Set the sidetone frequency to something other than the default 600 Hz.
73 .It Fl d Ar device
74 Similar to
75 .Fl p ,
76 but use the RTS line of
77 .Ar device
78 (which must by a tty device)
79 in order to emit the morse code.
80 .It Fl e
81 echo each character before it is sent, used together with either
82 .Fl p
83 or
84 .Fl d .
85 .El
86 .Pp
87 The
88 .Fl w
89 and
90 .Fl f
91 flags only work in conjunction with either the
92 .Fl p
93 or the
94 .Fl d
95 flag.
96 .Pp
97 Not all prosigns have corresponding characters. Use
98 .Ql #
99 for
100 .Em AS ,
101 .Ql @
102 for
103 .Em SK ,
104 .Ql *
105 for
106 .Em VE
107 and
108 .Ql %
109 for
110 .Em BK .
111 The more common prosigns are
112 .Ql =
113 for
114 .Em BT ,
115 .Ql \&(
116 for
117 .Em KN
118 and
119 .Ql +
120 for
121 .Em AR .
122 .Pp
123 Using flag
124 .Fl d Ar device
125 it is possible to key an external device, like a sidetone generator with
126 a headset for training purposes, or even your ham radio transceiver.  For
127 the latter, simply connect an NPN transistor to the serial port
128 .Ar device ,
129 emitter connected to ground, base connected through a resistor
130 (few kiloohms) to RTS, collector to the key line of your transceiver
131 (assuming the transceiver has a positive key supply voltage and is keyed
132 by grounding the key input line).  A capacitor (some nanofarads) between
133 base and ground is advisable to keep stray RF away,
134 and to suppress the
135 minor glitch that is generated during program startup.
136 .Sh ENVIRONMENT
137 If your
138 .Ev LC_CTYPE
139 locale codeset is
140 .Ql KOI8-R ,
141 characters with the high-order bit set are interpreted as
142 Cyrillic characters.  If your
143 .Ev LC_CTYPE
144 locale codeset is
145 .Ql ISO8859-1
146 compatible,
147 they are interpreted
148 as belonging to the
149 .Ql ISO-8859-1
150 character set.
151 .Sh FILES
152 .Bl -tag -width /dev/speaker -compact
153 .It Pa /dev/speaker
154 speaker device file
155 .El
156 .Sh SEE ALSO
157 .Xr speaker 4
158 .Sh HISTORY
159 Sound support for
160 .Nm
161 added by
162 .An Lyndon Nerenberg (VE7TCP/VE6BBM) Aq lyndon@orthanc.com .
163 .Pp
164 Ability to key an external device added by
165 .An J\(:org Wunsch
166 (DL8DTL).
167 .Sh BUGS
168 Only understands a few European characters
169 (German and French),
170 no Asian characters,
171 and no continental landline code.
172 .Pp
173 Sends a bit slower than it should due to system overhead. Some people
174 would call this a feature.