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