Initial import from FreeBSD RELENG_4:
[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 .\"
36 .Dd December 7, 2000
37 .Dt MORSE 6
38 .Os
39 .Sh NAME
40 .Nm morse
41 .Nd reformat input as morse code
42 .Sh SYNOPSIS
43 .Nm
44 .Op Fl p
45 .Op Fl d Ar device
46 .Op Fl e
47 .Op Fl w Ar speed
48 .Op Fl f Ar frequency
49 .Op Fl s
50 .Op Ar string ...
51 .Sh DESCRIPTION
52 The command
53 .Nm
54 read the given input and reformat it in the form of morse code.
55 Acceptable input are command line arguments or the standard input.
56 .Pp
57 Available options:
58 .Bl -tag -width flag
59 .It Fl s
60 The
61 .Fl s
62 option produces dots and dashes rather than words.
63 .It Fl p
64 Send morse the real way. This only works if your system has
65 .Xr speaker 4
66 support.
67 .It Fl w Ar speed
68 Set the sending speed in words per minute. If not specified the default
69 speed of 20 WPM is used.
70 .It Fl f Ar frequency
71 Set the sidetone frequency to something other than the default 600 Hz.
72 .It Fl d Ar device
73 Similar to
74 .Fl p ,
75 but use the RTS line of
76 .Ar device
77 (which must by a tty device)
78 in order to emit the morse code.
79 .It Fl e
80 echo each character before it is sent, used together with either
81 .Fl p
82 or
83 .Fl d .
84 .El
85 .Pp
86 The
87 .Fl w
88 and
89 .Fl f
90 flags only work in conjunction with either the
91 .Fl p
92 or the
93 .Fl d
94 flag.
95 .Pp
96 Not all prosigns have corresponding characters. Use
97 .Ql #
98 for
99 .Em AS ,
100 .Ql @
101 for
102 .Em SK ,
103 .Ql *
104 for
105 .Em VE
106 and
107 .Ql %
108 for
109 .Em BK .
110 The more common prosigns are
111 .Ql =
112 for
113 .Em BT ,
114 .Ql \&(
115 for
116 .Em KN
117 and
118 .Ql +
119 for
120 .Em AR .
121 .Pp
122 Using flag
123 .Fl d Ar device
124 it is possible to key an external device, like a sidetone generator with
125 a headset for training purposes, or even your ham radio transceiver.  For
126 the latter, simply connect an NPN transistor to the serial port
127 .Ar device ,
128 emitter connected to ground, base connected through a resistor
129 (few kiloohms) to RTS, collector to the key line of your transceiver
130 (assuming the transceiver has a positive key supply voltage and is keyed
131 by grounding the key input line).  A capacitor (some nanofarads) between
132 base and ground is advisable to keep stray RF away,
133 and to suppress the
134 minor glitch that is generated during program startup.
135 .Sh FILES
136 .Bl -tag -width /dev/speaker -compact
137 .It Pa /dev/speaker
138 speaker device file
139 .El
140 .Sh ENVIRONMENT
141 If your
142 .Ev LC_CTYPE
143 locale codeset is
144 .Ql KOI8-R ,
145 characters with the high-order bit set are interpreted as
146 Cyrillic characters.  If your
147 .Ev LC_CTYPE
148 locale codeset is
149 .Ql ISO8859-1
150 compatible,
151 they are interpreted
152 as belonging to the
153 .Ql ISO-8859-1
154 character set.
155 .Sh SEE ALSO
156 .Xr speaker 4
157 .Sh HISTORY
158 Sound support for
159 .Nm
160 added by
161 .An Lyndon Nerenberg (VE7TCP/VE6BBM) Aq lyndon@orthanc.com .
162 .Pp
163 Ability to key an external device added by
164 .An J\(:org Wunsch
165 (DL8DTL).
166 .Sh BUGS
167 Only understands a few European characters
168 (German and French),
169 no Asian characters,
170 and no continental landline code.
171 .Pp
172 Sends a bit slower than it should due to system overhead. Some people
173 would call this a feature.