1SETHDLC(8)                 Linux Programmer's Manual                SETHDLC(8)
2
3
4

NAME

6       sethdlc - get/set Linux HDLC packet radio modem driver port information
7

SYNOPSIS

9       sethdlc [ -bdhs ] [-i device]
10
11       sethdlc [-i device] -c cal
12
13       sethdlc -p    [-i device]   [ mode mode ]   [ io iobase ]   [ irq irq ]
14       [ dma dma ]   [ dma2 dma2 ]   [ serio seriobase ]   [ pario pariobase ]
15       [ midiio midiiobase ] [ options options ]
16
17       sethdlc -a  [-i device]  [ txd txdelay ] [ txtail txtail ] [ slot slot‐
18       time ] [ ppersist ppersistence ] [ full ] [ half ]
19
20
21

DESCRIPTION

23       sethdlc is a program designed to set and/or  report  the  configuration
24       information  associated with a soundcard radio modem port.  This infor‐
25       mation includes the modem type, what I/O port, IRQ and  DMA  channel  a
26       particular  modem port is using, and where to output a transmitter key‐
27       ing (PTT) signal.
28
29       With the -p option, sethdlc sets and/or reports the port configuration.
30
31       With the -a option, sethdlc  sets  and/or  reports  the  AX.25  channel
32       access  parameters. These parameters can also be set with the kissparms
33       utility.
34
35       With the -c option, sethdlc instructs the driver to send a  calibration
36       pattern for cal seconds.
37
38       Without  the  -p, -a and -c option, sethdlc will stay in the foreground
39       and display received packets. The AX.25 header and eventually a FlexNet
40       compressed  header  are decoded. CTRL-C terminates sethdlc.  Specifying
41       additional options, sethdlc may display additional information.
42
43
44

OPTIONS

46       sethdlc accepts the following options:
47
48
49       -b     Trace the bits at the output of the demodulator, after RX  clock
50              recovery.   This  option  is  only  available if sethdlc and the
51              soundcard modem kernel driver is compiled with debugging support
52              on.  This is useful for driver debugging.
53
54       -d     Trace  DCD,  PTT and other status information on stdout. sethdlc
55              displays two times per second a line containing  these  informa‐
56              tions.
57
58       -h     Display an overview of the available command line parameters and
59              exit.
60
61       -i     The device argument specifies the HDLC modem device which should
62              be configured or interrogated.  It will usually have the follow‐
63              ing form: bc[0-3] for the baycom  driver  and  sm[0-3]  for  the
64              soundcard modem driver.
65
66       -s     Trace  the  bits  at the demodulator output, before the RX clock
67              recovery, to stdout. This option is  only  available  the  modem
68              driver  is  compiled  with  debugging  support on. It may not be
69              available on some modem, such as the par96.
70
71

PARAMETERS

73       The following parameters can be assigned to  a  soundcard  radio  modem
74       port.
75
76       All numerical parameter values are assumed to be in decimal unless pre‐
77       ceeded by "0x".
78
79       The mode parameter sets the type of hardware and the operating mode  of
80       the  driver.  ser12 and par96 are valid modes for the baycom driver.  A
81       star "*" may be added to enable software DCD. The mode string format of
82       the  soundmodem  driver  is as follows: hw:mode.  hw may be either sbc,
83       wss or wssfdx. The first one specifies SoundBlaster  compatible  sound‐
84       cards,  the  second one WindowsSoundSystem compatible hardware, and the
85       third one WSS fullduplex operation (which currently works with  Crystal
86       Semiconductor Chipsets CS423[126]). The mode portion may be afsk1200 or
87       fsk9600.  Optionally, the receive and transmit modes may  be  different
88       (hw:txmode.rxmode).
89
90       The  ioport parameter sets the I/O port address. Typical values for the
91       ser12 modem are 0x3f8, 0x2f8, 0x3e8  or  0x2e8,  for  the  par96  modem
92       0x378,  0x278 or 0x3bc, for the sbc modems 0x220 and for the wss modems
93       0x530, 0x608, 0xe80 or 0xf40.
94
95       The irq parameter sets the hardware IRQ number. Typical values for  the
96       ser12 modem are 4 and 3, for the par96 modem 7 or 5, for the sbc modems
97       are 7 or 5 and for the wss modems, any free IRQ from the set 2,  7,  9,
98       10,  11  will do. The driver automatically configures the WSS soundcard
99       to the correct IRQ.
100
101       The dma parameter sets the hardware DMA number. Typical values for  the
102       sbc  modems are 1 or 0 and for the wss modems, any free DMA from 0 to 3
103       (except 2) will do.  The driver automatically configures the WSS sound‐
104       card to the correct DMA.  The Baycom modems do not need DMA.
105
106       The  dma2  parameter  sets the second hardware DMA number. This is only
107       needed for full duplex operation with the soundmodem driver.
108
109       The seriobase parameter optionally sets the address of a  serial  port,
110       where  the driver will output a PTT signal at the TxD and RTS pins, and
111       a DCD signal at the DTR pin. As Baycom modems do  have  their  own  PTT
112       pin, this parameter is not used by the Baycom modem driver.
113
114       The pariobase parameter optionally sets the address of a LPT port where
115       the driver will output a PTT signal on the DATA0 line and a DCD  signal
116       on  the  DATA1  line.  As Baycom modems do have their own PTT pin, this
117       parameter is not used by the Baycom modem driver.
118
119       The midiiobase parameter optionally sets the address of a  MPU401  com‐
120       patible MIDI port, where the driver will output a PTT signal. Since the
121       MIDI port is effectively an UART and therefore cannot output a DC  sig‐
122       nal,  the  output  must  be fed through a retriggerable monoflop with a
123       period            of            about             15ms.             See
124       http://www.ife.ee.ethz.ch/~sailer/pcf/ptt_circ/ptt.html  for  a  sample
125       schematic diagram. As Baycom modems do have their  own  PTT  pin,  this
126       parameter is not used by the Baycom modem driver.
127
128       The  txdelay  sets  the transmitter keyup delay time. Unlike kissparms,
129       the unit is tens of ms. This is  the  time  the  transmitter  needs  to
130       switch  its  PA on and for its frequency synthesizer to settle. Typical
131       values for a handheld transceiver are 200ms (i.e. 20), and for  a  good
132       crystal driven transceiver 20ms (i.e. 2).
133
134       The  txtail  sets  the  time  PTT is held after the last packet. Unlike
135       kissparms, the unit is tens of ms. Do not set this  value  to  0.  Most
136       modems  need some extra time to actually clock the last bits out to the
137       transmitter.
138
139       The slottime parameter specifies how often the channel access algorithm
140       is executed.  Unlike kissparms, the unit is tens of ms. Unless you have
141       very specific requirements, set this to 100ms (i.e. 10).
142
143       The ppersist sets how "eagerly" the station starts to transmit as  soon
144       as  the channel gets free. The optimum value is 256 divided by the num‐
145       ber of stations on the channel. (This should really be  done  automati‐
146       cally by the L2)
147
148       full  sets  the modem to full duplex mode. Note that some modems do not
149       actually support full duplex mode, in this case  this  parameter  makes
150       the  modem  start  its transmission as soon as it gets packets from the
151       upper layer, without waiting for the channel to become  free.  This  is
152       needed  by  some  implementations  of  alternative channel access algo‐
153       rithms, e.g. DAMA.
154
155       half sets the modem to half duplex mode.
156
157

CONSIDERATIONS OF CONFIGURING BAYCOM PORTS

159       It is important to note that sethdlc  merely  tells  the  Linux  kernel
160       where it should expect to find the I/O port and IRQ lines of a particu‐
161       lar serial port.  It does not configure the hardware to use a  particu‐
162       lar I/O port.  In order to do that, you will need to physically program
163       the serial board, usually by setting some jumpers or by switching  some
164       DIP switches.
165
166       This  section  will provide some pointers in helping you decide how you
167       would like to configure your baycom ports.
168
169       The "standard MS-DOS" port associations are given below:
170
171              COM1, port 0x3f8, irq 4
172              COM2, port 0x2f8, irq 3
173              COM3, port 0x3e8, irq 4
174              COM4, port 0x2e8, irq 3
175              LPT1, port 0x378, irq 7
176              LPT1 (on hercules graphics adapter), port 0x3bc, irq 7
177              LPT1, port 0x278, irq 5
178
179

CONSIDERATIONS OF CONFIGURING SOUNDCARD RADIO MODEM PORTS

181       Some cards need to be initialized before they act as a  WSS  or  Sound‐
182       Blaster  compatible card. This driver does not do this. You can use the
183       standard linux sound driver, if compiled as a  module.  Just  load  the
184       sound driver (insmod sound) and remove it again (rmmod sound). The card
185       should then be configured for either soundblaster or WSS compatibility.
186       If  this  does  not work for some reason, you'll have to write your own
187       soundcard configuration utility. This  is  not  as  complicated  as  it
188       sounds;  it can be done from user space (but requiring root privileges)
189       using ioperm and/or iopl.
190
191       It is important that the audio levels of your radio match those of  the
192       soundcard.  To  help  achieve this, there are two utilities: smdiag and
193       smmixer. See their respective manpage.
194
195       The sound driver and the soundcard modem driver are mutually exclusive,
196       i.e.  they cannot both access the same soundcard at the same time. Even
197       worse, the sound driver reserves the  soundcard  as  soon  as  it  gets
198       loaded.  The  souncard modem driver however reserves the card only when
199       the interface is started, i.e. during ifconfig sm[0-3] up.
200
201       9600 baud may not currently work on SoundBlaster cards with  DSP  revi‐
202       sion  4.x, i.e.  SB16 and SB32 AWE. This is because they seem to not be
203       fully backwards compatible.
204
205

CAUTION

207       CAUTION: Using an invalid port can lock up your machine.
208
209

SEE ALSO

211       smdiag (8), smmixer (8), kissparms (8),
212       linux/drivers/net/hdlcdrv.c,
213       linux/drivers/net/baycom.c,
214       linux/drivers/net/soundmodem.c
215
216

AUTHOR

218       sethdlc    was    written    by     Thomas     Sailer,     HB9JNX/AE4WA
219       (t.sailer@alumni.ethz.ch).  Inspired by setserial.
220
221
222
223Sethdlc 0.1                     1 October 1996                      SETHDLC(8)
Impressum