xref: /freebsd/usr.bin/morse/morse.6 (revision 0b3105a37d7adcadcb720112fed4dc4e8040be99)
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 June 7, 2005
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 elps
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
47The
48.Nm
49command reads the given input and reformats it in the form of morse code.
50Acceptable input are command line arguments or the standard input.
51.Pp
52Available options:
53.Bl -tag -width indent
54.It Fl l
55The
56.Fl l
57option produces output suitable for
58.Xr led 4
59devices.
60.It Fl s
61The
62.Fl s
63option produces dots and dashes rather than words.
64.It Fl p
65Send morse the real way.
66This only works if your system has
67.Xr speaker 4
68support.
69.It Fl w Ar speed
70Set the sending speed in words per minute.
71If not specified, the default
72speed of 20 WPM is used.
73.It Fl c Ar speed
74Farnsworth support.
75Set the spacing between characters in words per minute.
76This is independent of the speed
77that the individual characters are sent.
78If not specified, defaults to the effective value of the
79.Fl w
80option.
81.It Fl f Ar frequency
82Set the sidetone frequency to something other than the default 600 Hz.
83.It Fl d Ar device
84Similar to
85.Fl p ,
86but use the RTS line of
87.Ar device
88(which must by a TTY device)
89in order to emit the morse code.
90.It Fl e
91Echo each character before it is sent, used together with either
92.Fl p
93or
94.Fl d .
95.El
96.Pp
97The
98.Fl w , c
99and
100.Fl f
101flags only work in conjunction with either the
102.Fl p
103or the
104.Fl d
105flag.
106.Pp
107Not all prosigns have corresponding characters.
108Use
109.Ql #
110for
111.Em AS ,
112.Ql &
113for
114.Em SK ,
115.Ql *
116for
117.Em VE
118and
119.Ql %
120for
121.Em BK .
122The more common prosigns are
123.Ql =
124for
125.Em BT ,
126.Ql \&(
127for
128.Em KN
129and
130.Ql +
131for
132.Em AR .
133.Pp
134Using the
135.Fl d
136flag,
137it is possible to key an external device, like a sidetone generator with
138a headset for training purposes, or even your ham radio transceiver.
139For
140the latter, simply connect an NPN transistor to the serial port
141.Ar device ,
142emitter connected to ground, base connected through a resistor
143(few kiloohms) to RTS, collector to the key line of your transceiver
144(assuming the transceiver has a positive key supply voltage and is keyed
145by grounding the key input line).
146A capacitor (some nanofarads) between
147base and ground is advisable to keep stray RF away,
148and to suppress the
149minor glitch that is generated during program startup.
150.Sh ENVIRONMENT
151Your
152.Ev LC_CTYPE
153locale codeset determines how
154characters with the high-order bit set
155are interpreted.
156.Pp
157.Bl -tag -width ".Li ISO8859-15" -compact
158.It Li ISO8859-1
159.It Li ISO8859-15
160Interpret characters with the high-order bit set as Western European characters.
161.Pp
162.It Li KOI8-R
163Interpret characters with the high-order bit set as Cyrillic characters.
164.Pp
165.It Li ISO8859-7
166Interpret characters with the high-order bit set as Greek characters.
167.El
168.Sh FILES
169.Bl -tag -width ".Pa /dev/speaker" -compact
170.It Pa /dev/speaker
171.Xr speaker 4
172device file
173.El
174.Sh SEE ALSO
175.Xr speaker 4
176.Sh HISTORY
177Sound support for
178.Nm
179added by
180.An Lyndon Nerenberg (VE6BBM) Aq Mt lyndon@orthanc.ca .
181.Pp
182Ability to key an external device added by
183.An J\(:org Wunsch
184(DL8DTL).
185.Pp
186Farnsworth support for
187.Nm
188added by
189.An Stephen Cravey (N5UUU).
190.Sh BUGS
191Only understands a few European characters
192(German and French),
193no Asian characters,
194and no continental landline code.
195.Pp
196Sends a bit slower than it should due to system overhead.
197Some people would call this a feature.
198