Debian Codegraph @

hdlcutil/sethdlc.8

raw ◀ ▶
1 Debian patch touch this file
1 .\" Copyright 1996 Thomas Sailer ([email protected])
2 .\" May be distributed under the GNU General Public License
3 .\"
4 .\" portions from setserial.8 by Rickard E. Faith ([email protected])
5 .\" "
6 .TH SETHDLC 8 "27 April 2008" "Sethdlc 0.1" "Linux Programmer's Manual"
7 .SH NAME
8 sethdlc \- get/set Linux HDLC packet radio modem driver port information
9 .SH SYNOPSIS
10 .B sethdlc
11 .B "[ \-bdhs ]"
12 .B "[\-i device]"
13
14 .B "sethdlc [\-i device] -c"
15 cal
16
17 .B "sethdlc\ -p"
18 .B "[\-i\ device]"
19 .BR "[\ mode\ " mode "\ ]"
20 .BR "[\ io\ " iobase "\ ]"
21 .BR "[\ irq\ " irq "\ ]"
22 .BR "[\ dma\ " dma "\ ]"
23 .BR "[\ dma2\ " dma2 "\ ]"
24 .BR "[\ serio\ " seriobase "\ ]"
25 .BR "[\ pario\ " pariobase "\ ]"
26 .BR "[\ midiio\ " midiiobase "\ ]"
27 .BR "[\ options\ " options "\ ]"
28
29 .B "sethdlc\ -a"
30 .B "[\-i\ device]"
31 .BR "[\ txd\ " txdelay "\ ]"
32 .BR "[\ txtail\ " txtail "\ ]"
33 .BR "[\ slot\ " slottime "\ ]"
34 .BR "[\ ppersist\ " ppersistence "\ ]"
35 .BR "[\ full\ ]"
36 .BR "[\ half\ ]"
37
38
39 .SH DESCRIPTION
40 .B sethdlc
41 is a program designed to set and/or report the configuration information
42 associated with a soundcard radio modem port. This information includes the
43 modem type, what I/O port, IRQ and DMA channel a particular modem
44 port is using, and where to output a transmitter keying (PTT) signal.
45
46 With the
47 .B \-p
48 option,
49 .B sethdlc
50 sets and/or reports the port configuration.
51
52 With the
53 .B \-a
54 option,
55 .B sethdlc
56 sets and/or reports the AX.25 channel access parameters. These parameters can also
57 be set with the
58 .I kissparms
59 utility.
60
61 With the
62 .B \-c
63 option,
64 .B sethdlc
65 instructs the driver to send a calibration pattern for
66 .I cal
67 seconds.
68
69 Without the
70 .B \-p,
71 .B \-a
72 and
73 .B \-c
74 option,
75 .B sethdlc
76 will stay in the foreground and display received packets. The AX.25 header
77 and eventually a FlexNet compressed header are decoded. CTRL-C terminates
78 .B sethdlc.
79 Specifying additional options,
80 .B sethdlc
81 may display additional information.
82
83
84 .SH OPTIONS
85 .B sethdlc
86 accepts the following options:
87
88 .TP
89 .B \-b
90 Trace the bits at the output of the demodulator, after RX clock recovery.
91 This option is only available if \fBsethdlc\fP
92 and the soundcard modem kernel driver is compiled with debugging support on.
93 This is useful for driver debugging.
94 .TP
95 .B \-d
96 Trace DCD, PTT and other status information on stdout. \fBsethdlc\fP
•97 displays two times per second a line containing this information.
98 .TP
99 .B \-h
100 Display an overview of the available command line parameters and exit.
101 .TP
102 .B \-i
103 The
104 .I device
105 argument specifies the HDLC modem device which should be configured or
106 interrogated. It will usually have the following form:
107 \fIbc[0-3]\fP for the baycom driver and
108 \fIsm[0-3]\fP for the soundcard modem driver.
109 .TP
110 .B \-s
111 Trace the bits at the demodulator output, \fIbefore\fP
112 the RX clock recovery, to stdout. This option is only available the modem driver
113 is compiled with debugging support on. It may not be available on some modem, such
114 as the \fIpar96\fP.
115
116 .SH PARAMETERS
117 The following parameters can be assigned to a soundcard radio modem port.
118
119 All numerical parameter values are assumed to be in decimal unless preceded by "0x".
120
121 The
122 .B mode
123 parameter sets the type of hardware and the operating mode of the driver.
124 \fIser12\fP and \fIpar96\fP are valid modes for the \fBbaycom\fP driver.
125 A star "\fI*\fP" may be added to enable software DCD. The \fBmode\fP string
126 format of the \fBsoundmodem\fP driver is as follows: \fIhw:mode\fP.
127 \fIhw\fP may be either \fIsbc\fP, \fIwss\fP or \fIwssfdx\fP. The first
128 one specifies SoundBlaster compatible soundcards, the second one
129 WindowsSoundSystem compatible hardware, and the third one WSS fullduplex
130 operation (which currently works with Crystal Semiconductor Chipsets
131 CS423[126]). The \fImode\fP portion may be \fIafsk1200\fP or \fIfsk9600\fP.
132 Optionally, the receive and transmit modes may be different
133 (\fIhw:txmode.rxmode\fP).
134
135 The
136 .B ioport
137 parameter sets the I/O port address. Typical values for the \fIser12\fP modem are
138 0x3f8, 0x2f8, 0x3e8 or 0x2e8, for the \fIpar96\fP modem 0x378, 0x278 or 0x3bc, for
139 the \fIsbc\fP modems 0x220 and for the \fIwss\fP modems 0x530, 0x608, 0xe80 or 0xf40.
140
141 The
142 .B irq
143 parameter sets the hardware IRQ number. Typical values for the \fIser12\fP modem are
144 4 and 3, for the \fIpar96\fP modem 7 or 5, for the \fIsbc\fP modems are 7 or 5 and for
145 the \fIwss\fP modems, any free IRQ from the set 2, 7, 9, 10, 11 will do. The driver
146 automatically configures the WSS soundcard to the correct IRQ.
147
148 The
149 .B dma
150 parameter sets the hardware DMA number. Typical values for the \fIsbc\fP modems are
151 1 or 0 and for the \fIwss\fP modems, any free DMA from 0 to 3 (except 2) will do.
152 The driver automatically configures the WSS soundcard to the correct DMA.
153 The Baycom modems do not need DMA.
154
155 The
156 .B dma2
157 parameter sets the second hardware DMA number. This is only needed for
158 full duplex operation with the \fBsoundmodem\fP driver.
159
160 The
161 .B seriobase
162 parameter optionally sets the address of a serial port, where
163 the driver will output a PTT signal at the TxD and RTS pins, and a DCD
164 signal at the DTR pin. As Baycom modems do have their own PTT pin, this
165 parameter is not used by the Baycom modem driver.
166
167 The
168 .B pariobase
169 parameter optionally sets the address of a LPT port where
170 the driver will output a PTT signal on the DATA0 line and a DCD signal
171 on the DATA1 line. As Baycom modems do have their own PTT pin, this
172 parameter is not used by the Baycom modem driver.
173
174 The
175 .B midiiobase
176 parameter optionally sets the address of a MPU401 compatible
177 MIDI port, where the driver will output a PTT signal. Since the MIDI port is
178 effectively an UART and therefore cannot output a DC signal, the output must
179 be fed through a retriggerable monoflop with a period of about 15ms. See
180 .I http://www.ife.ee.ethz.ch/~sailer/pcf/ptt_circ/ptt.html
181 for a sample schematic diagram. As Baycom modems do have their own PTT pin,
182 this parameter is not used by the Baycom modem driver.
183
184 The
185 .B txdelay
186 sets the transmitter keyup delay time. Unlike \fIkissparms\fP, the unit is
187 \fItens of ms\fP. This is the time the transmitter needs to switch its PA
188 on and for its frequency synthesizer to settle. Typical values for a handheld
189 transceiver are 200ms (i.e. 20), and for a good crystal driven transceiver
190 20ms (i.e. 2).
191
192 The
193 .B txtail
194 sets the time PTT is held after the last packet. Unlike \fIkissparms\fP, the unit
195 is \fItens of ms\fP. Do not set this value to 0. Most modems need some extra
196 time to actually clock the last bits out to the transmitter.
197
198 The
199 .B slottime
200 parameter specifies how often the channel access algorithm is executed.
201 Unlike \fIkissparms\fP, the unit is \fItens of ms\fP. Unless you have very
202 specific requirements, set this to 100ms (i.e. 10).
203
204 The
205 .B ppersist
206 sets how "eagerly" the station starts to transmit as soon as the channel
207 gets free. The optimum value is 256 divided by the number of stations on the
208 channel. (This should really be done automatically by the L2)
209
210 .B full
211 sets the modem to full duplex mode. Note that some modems do not actually support
212 full duplex mode, in this case this parameter makes the modem start its transmission
213 as soon as it gets packets from the upper layer, without waiting for the channel
214 to become free. This is needed by some implementations of alternative channel
215 access algorithms, e.g. \fIDAMA\fP.
216
217 .B half
218 sets the modem to half duplex mode.
219
220 .SH CONSIDERATIONS OF CONFIGURING BAYCOM PORTS
221 It is important to note that sethdlc merely tells the Linux kernel
222 where it should expect to find the I/O port and IRQ lines of a
223 particular serial port. It does
224 .I not
225 configure the hardware to use a
226 particular I/O port. In order to do that, you will need to physically
227 program the serial board, usually by setting some jumpers or by
228 switching some DIP switches.
229
230 This section will provide some pointers in helping you decide how you
231 would like to configure your baycom ports.
232
233 The "standard MS-DOS" port associations are given below:
234
235 .nf
236 .RS
237 COM1, port 0x3f8, irq 4
238 COM2, port 0x2f8, irq 3
239 COM3, port 0x3e8, irq 4
240 COM4, port 0x2e8, irq 3
241 LPT1, port 0x378, irq 7
242 LPT1 (on hercules graphics adapter), port 0x3bc, irq 7
243 LPT1, port 0x278, irq 5
244 .RE
245 .fi
246
247 .SH CONSIDERATIONS OF CONFIGURING SOUNDCARD RADIO MODEM PORTS
248 Some cards need to be initialized before they act as a WSS or SoundBlaster
249 compatible card. This driver does \fInot\fP do this. You can use the standard
250 linux sound driver, if compiled as a module. Just load the sound driver
251 (insmod sound) and remove it again (rmmod sound). The card should then be
252 configured for either soundblaster or WSS compatibility. If this does not work
253 for some reason, you'll have to write your own soundcard configuration
254 utility. This is not as complicated as it sounds; it can be done from
255 user space (but requiring root privileges) using \fIioperm\fP and/or \fIiopl\fP.
256
257 It is important that the audio levels of your radio match those of the
258 soundcard. To help achieve this, there are two utilities: \fIsmdiag\fP
259 and \fIsmmixer\fP. See their respective manpage.
260
261 The sound driver and the soundcard modem driver are mutually exclusive, i.e. they
262 cannot both access the same soundcard at the same time. Even worse, the sound driver
263 reserves the soundcard as soon as it gets loaded. The souncard modem driver however
264 reserves the card only when the interface is started, i.e. during ifconfig sm[0-3] up.
265
266 9600 baud may not currently work on SoundBlaster cards with DSP revision 4.x, i.e.
267 SB16 and SB32 AWE. This is because they seem to not be fully backwards compatible.
268
269 .SH CAUTION
270 CAUTION: Using an invalid port can lock up your machine.
271
272 .SH "SEE ALSO"
273 .nf
274 .BR smdiag "\ (8), " smmixer "\ (8), " kissparms "\ (8),"
275 linux/drivers/net/hdlcdrv.c,
276 linux/drivers/net/baycom.c,
277 linux/drivers/net/soundmodem.c
278 .fi
279
280 .SH AUTHOR
281 sethdlc was written by Thomas Sailer, HB9JNX/AE4WA ([email protected]).
282 Inspired by setserial.