1 LINUX DRIVER FOR SOUNDCARDS AS AX.25 MODEMS 2 3 Thomas M. Sailer, HB9JNX/AE4WA, <sailer@ife.ee.ethz.ch> 4 5This driver allows either SoundBlaster (sbc) or Windows Sound System (wss) 6compatible soundcards to be used as either 1200 baud AFSK or 9600 baud FSK 7AX.25 packet radio modems. Only half duplex operation is supported; an 8attempt to include full duplex support failed because the hardware did 9not support it (it appeared that the card only provides one DMA channel, 10although the codec chip would support two channels). The driver needs 11some processing power! A 66 MHz 486 DX2 is a minimum requirement. Otherwise 12interactive performance of the computer may become sluggish. This driver 13does *not* support telephone modem standards, it is intended for radio 14use only. 15 16 17The Interface of the driver 18 19The driver provides kernel network drivers named sm[0-3]. sethdlc 20from the ax25 utilities may be used to set driver states etc. Users 21of userland AX.25 stacks may use the net2kiss utility (also available 22in the ax25 utilities package) to convert packets of a network interface 23to a KISS stream on a pseudo tty. There's also a patch available from 24me for WAMPES which allows attaching a kernel network interface directly. 25 26 27Configuring the driver 28 29Some sound cards need to be initialized before they operate in either 30SoundBlaster or WSS compatibility mode. The driver does _NOT_ do this; 31you may use the standard linux sound driver to initialize the soundcard; 32compile it as a module, and do 33 insmod sound 34 rmmod sound 35The soundcard should then be initialized correctly. If this does not help, 36you'll have to write your own initialization utility. 37 38Every time the driver is inserted into the kernel, it has to know which 39modems it should access at which ports. This can be done with the setbaycom 40utility. If you are only using one modem, you can also configure the 41driver from the insmod command line (or by means of an option line in 42/etc/modules.conf). 43 44Examples: 45 insmod soundmodem mode="sbc:afsk1200" iobase=0x220 irq=5 dma=1 46 sethdlc -i sm0 -p mode "sbc:afsk1200" io 0x220 irq 5 dma 1 47 48Both lines configure the first port to drive a soundblaster card 49in 1200 baud AFSK mode. 50 51The channel access parameters can be set with sethdlc -a or kissparms. 52Note that both utilities interpret the values slightly different. 53 54 55Input and output levels 56 57It is important that the input and output levels are adjusted properly. 58There are two utilities, available in the ax25 utilities distribution, 59to facilitate this: smmixer and smdiag. smdiag allows you to display 60the input signal in an oscilloscope like display or an eye diagram. 61smmixer allows you to adjust input/output levels. See the respective 62man pages. 63 64 65Transmitter keying 66 67Since soundcards do not have a DC coupled output; PTT keying options include 68the following: 69* VOX circuitry 70* Serial port pin 71* Parallel port pin 72* MPU401 MIDI output via a retriggerable monoflop. 73Circuit schematics may be found at 74http://www.ife.ee.ethz.ch/~sailer/pcf/ptt_circ/ptt.html. 75 76 77Compatibility with the rest of the Linux kernel 78 79The sound driver and the soundcard modem driver compete for the same 80hardware resources. Of course only one driver can access a given 81interface at a time. Worse yet, the sound driver grabs the soundcard 82at startup time. Therefore the soundcard modem driver subsequently won't 83be able to access the soundcard. You might therefore find it necessary to 84unload the sound driver before using the soundcard modem driver. 85 86 87 88vy 73s de 89Tom Sailer, sailer@ife.ee.ethz.ch 90hb9jnx @ hb9w.ampr.org 91