]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.bin/morse/morse.6
ping: use the monotonic clock to measure durations
[FreeBSD/FreeBSD.git] / usr.bin / 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. Neither the name of the University nor the names of its contributors
14 .\"    may be used to endorse or promote products derived from this software
15 .\"    without specific prior written permission.
16 .\"
17 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
18 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
21 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 .\" SUCH DAMAGE.
28 .\"
29 .\"     @(#)bcd.6       8.1 (Berkeley) 5/31/93
30 .\" $FreeBSD$
31 .\"
32 .Dd January 5, 2018
33 .Dt MORSE 6
34 .Os
35 .Sh NAME
36 .Nm morse
37 .Nd reformat input as morse code
38 .Sh SYNOPSIS
39 .Nm
40 .Op Fl elrps
41 .Op Fl d Ar device
42 .Op Fl w Ar speed
43 .Op Fl c Ar speed
44 .Op Fl f Ar frequency
45 .Op Ar string ...
46 .Sh DESCRIPTION
47 The
48 .Nm
49 command reads the given input and reformats it in the form of morse code.
50 Acceptable input are command line arguments or the standard input.
51 .Pp
52 Available options:
53 .Bl -tag -width indent
54 .It Fl l
55 The
56 .Fl l
57 option produces output suitable for
58 .Xr led 4
59 devices.
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.
66 This only works if your system has
67 .Xr speaker 4
68 support.
69 .It Fl w Ar speed
70 Set the sending speed in words per minute.
71 If not specified, the default
72 speed of 20 WPM is used.
73 .It Fl c Ar speed
74 Farnsworth support.
75 Set the spacing between characters in words per minute.
76 This is independent of the speed
77 that the individual characters are sent.
78 If not specified, defaults to the effective value of the
79 .Fl w
80 option.
81 .It Fl f Ar frequency
82 Set the sidetone frequency to something other than the default 600 Hz.
83 .It Fl d Ar device
84 Similar to
85 .Fl p ,
86 but use the RTS line of
87 .Ar device
88 (which must be a TTY device)
89 in order to emit the morse code.
90 .It Fl e
91 Echo each character before it is sent, used together with either
92 .Fl p
93 or
94 .Fl d .
95 .It Fl r
96 Decode morse output consisting of dots and dashes (as generated by using
97 the
98 .Fl s
99 option).
100 .El
101 .Pp
102 The
103 .Fl w , c
104 and
105 .Fl f
106 flags only work in conjunction with either the
107 .Fl p
108 or the
109 .Fl d
110 flag.
111 .Pp
112 Not all prosigns have corresponding characters.
113 Use
114 .Ql #
115 for
116 .Em AS ,
117 .Ql &
118 for
119 .Em SK ,
120 .Ql *
121 for
122 .Em VE
123 and
124 .Ql %
125 for
126 .Em BK .
127 The more common prosigns are
128 .Ql =
129 for
130 .Em BT ,
131 .Ql \&(
132 for
133 .Em KN
134 and
135 .Ql +
136 for
137 .Em AR .
138 .Pp
139 Using the
140 .Fl d
141 flag,
142 it is possible to key an external device, like a sidetone generator with
143 a headset for training purposes, or even your ham radio transceiver.
144 For
145 the latter, simply connect an NPN transistor to the serial port
146 .Ar device ,
147 emitter connected to ground, base connected through a resistor
148 (few kiloohms) to RTS, collector to the key line of your transceiver
149 (assuming the transceiver has a positive key supply voltage and is keyed
150 by grounding the key input line).
151 A capacitor (some nanofarads) between
152 base and ground is advisable to keep stray RF away,
153 and to suppress the
154 minor glitch that is generated during program startup.
155 .Sh ENVIRONMENT
156 Your
157 .Ev LC_CTYPE
158 locale codeset determines how
159 characters with the high-order bit set
160 are interpreted.
161 .Pp
162 .Bl -tag -width ".Li ISO8859-15" -compact
163 .It Li ISO8859-1
164 .It Li ISO8859-15
165 Interpret characters with the high-order bit set as Western European characters.
166 .Pp
167 .It Li KOI8-R
168 Interpret characters with the high-order bit set as Cyrillic characters.
169 .Pp
170 .It Li ISO8859-7
171 Interpret characters with the high-order bit set as Greek characters.
172 .El
173 .Sh FILES
174 .Bl -tag -width ".Pa /dev/speaker" -compact
175 .It Pa /dev/speaker
176 .Xr speaker 4
177 device file
178 .El
179 .Sh SEE ALSO
180 .Xr speaker 4
181 .Sh HISTORY
182 Sound support for
183 .Nm
184 added by
185 .An Lyndon Nerenberg (VE6BBM) Aq Mt lyndon@orthanc.ca .
186 .Pp
187 Ability to key an external device added by
188 .An J\(:org Wunsch
189 (DL8DTL).
190 .Pp
191 Farnsworth support for
192 .Nm
193 added by
194 .An Stephen Cravey (N5UUU).
195 .Sh BUGS
196 Only understands a few European characters
197 (German and French),
198 no Asian characters,
199 and no continental landline code.
200 .Pp
201 Sends a bit slower than it should due to system overhead.
202 Some people would call this a feature.