sethdlc [-i device] -c cal
sethdlc -p [-i device] [ mode mode ] [ io iobase ] [ irq irq ] [ dma dma ] [ dma2 dma2 ] [ serio seriobase ] [ pario pariobase ] [ midiio midiiobase ] [ options options ]
sethdlc -a [-i device] [ txd txdelay ] [ txtail txtail ] [ slot slottime ] [ ppersist ppersistence ] [ full ] [ half ]
With the -p option, sethdlc sets and/or reports the port configuration.
With the -a option, sethdlc sets and/or reports the AX.25 channel access parameters. These parameters can also be set with the kissparms utility.
With the -c option, sethdlc instructs the driver to send a calibration pattern for cal seconds.
Without the -p, -a and -c option, sethdlc will stay in the foreground and display received packets. The AX.25 header and eventually a FlexNet compressed header are decoded. CTRL-C terminates sethdlc. Specifying additional options, sethdlc may display additional information.
All numerical parameter values are assumed to be in decimal unless preceeded by "0x".
The mode parameter sets the type of hardware and the operating mode of the driver. ser12 and par96 are valid modes for the baycom driver. A star "*" may be added to enable software DCD. The mode string format of the soundmodem driver is as follows: hw:mode. hw may be either sbc, wss or wssfdx. The first one specifies SoundBlaster compatible soundcards, the second one WindowsSoundSystem compatible hardware, and the third one WSS fullduplex operation (which currently works with Crystal Semiconductor Chipsets CS423). The mode portion may be afsk1200 or fsk9600. Optionally, the receive and transmit modes may be different (hw:txmode.rxmode).
The ioport parameter sets the I/O port address. Typical values for the ser12 modem are 0x3f8, 0x2f8, 0x3e8 or 0x2e8, for the par96 modem 0x378, 0x278 or 0x3bc, for the sbc modems 0x220 and for the wss modems 0x530, 0x608, 0xe80 or 0xf40.
The irq parameter sets the hardware IRQ number. Typical values for the ser12 modem are 4 and 3, for the par96 modem 7 or 5, for the sbc modems are 7 or 5 and for the wss modems, any free IRQ from the set 2, 7, 9, 10, 11 will do. The driver automatically configures the WSS soundcard to the correct IRQ.
The dma parameter sets the hardware DMA number. Typical values for the sbc modems are 1 or 0 and for the wss modems, any free DMA from 0 to 3 (except 2) will do. The driver automatically configures the WSS soundcard to the correct DMA. The Baycom modems do not need DMA.
The dma2 parameter sets the second hardware DMA number. This is only needed for full duplex operation with the soundmodem driver.
The seriobase parameter optionally sets the address of a serial port, where the driver will output a PTT signal at the TxD and RTS pins, and a DCD signal at the DTR pin. As Baycom modems do have their own PTT pin, this parameter is not used by the Baycom modem driver.
The pariobase parameter optionally sets the address of a LPT port where the driver will output a PTT signal on the DATA0 line and a DCD signal on the DATA1 line. As Baycom modems do have their own PTT pin, this parameter is not used by the Baycom modem driver.
The midiiobase parameter optionally sets the address of a MPU401 compatible MIDI port, where the driver will output a PTT signal. Since the MIDI port is effectively an UART and therefore cannot output a DC signal, the output must be fed through a retriggerable monoflop with a period of about 15ms. See http://www.ife.ee.ethz.ch/~sailer/pcf/ptt_circ/ptt.html for a sample schematic diagram. As Baycom modems do have their own PTT pin, this parameter is not used by the Baycom modem driver.
The txdelay sets the transmitter keyup delay time. Unlike kissparms, the unit is tens of ms. This is the time the transmitter needs to switch its PA on and for its frequency synthesizer to settle. Typical values for a handheld transceiver are 200ms (i.e. 20), and for a good crystal driven transceiver 20ms (i.e. 2).
The txtail sets the time PTT is held after the last packet. Unlike kissparms, the unit is tens of ms. Do not set this value to 0. Most modems need some extra time to actually clock the last bits out to the transmitter.
The slottime parameter specifies how often the channel access algorithm is executed. Unlike kissparms, the unit is tens of ms. Unless you have very specific requirements, set this to 100ms (i.e. 10).
The ppersist sets how "eagerly" the station starts to transmit as soon as the channel gets free. The optimum value is 256 divided by the number of stations on the channel. (This should really be done automatically by the L2)
full sets the modem to full duplex mode. Note that some modems do not actually support full duplex mode, in this case this parameter makes the modem start its transmission as soon as it gets packets from the upper layer, without waiting for the channel to become free. This is needed by some implementations of alternative channel access algorithms, e.g. DAMA.
half sets the modem to half duplex mode.
This section will provide some pointers in helping you decide how you would like to configure your baycom ports.
The "standard MS-DOS" port associations are given below:
It is important that the audio levels of your radio match those of the soundcard. To help achieve this, there are two utilities: smdiag and smmixer. See their respective manpage.
The sound driver and the soundcard modem driver are mutually exclusive, i.e. they cannot both access the same soundcard at the same time. Even worse, the sound driver reserves the soundcard as soon as it gets loaded. The souncard modem driver however reserves the card only when the interface is started, i.e. during ifconfig sm[0-3] up.
9600 baud may not currently work on SoundBlaster cards with DSP revision 4.x, i.e. SB16 and SB32 AWE. This is because they seem to not be fully backwards compatible.
smdiag (8), smmixer (8), kissparms (8), linux/drivers/net/hdlcdrv.c, linux/drivers/net/baycom.c, linux/drivers/net/soundmodem.c