old-www/HOWTO/AX25-HOWTO/x495.html

2899 lines
52 KiB
HTML

<HTML
><HEAD
><TITLE
>Configuring an AX.25 port</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.63
"><LINK
REL="HOME"
TITLE="Linux Amateur Radio AX.25 HOWTO"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="A note on callsigns, addresses and things before we start"
HREF="x235.html"><LINK
REL="NEXT"
TITLE="Configuring an AX.25 interface for TCP/IP"
HREF="x1194.html"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Linux Amateur Radio AX.25 HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x235.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x1194.html"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="AEN495"
>6. Configuring an AX.25 port</A
></H1
><P
>Each of the AX.25 applications read a particular configuration file to obtain
the parameters for the various AX.25 ports configured on your Linux machine.
For AX.25 ports the file that is read is the <TT
CLASS="LITERAL"
>/etc/ax25/axports</TT
> file.
You must have an entry in this file for each AX.25 port you want on your
system.</P
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN499"
>6.1. Creating the AX.25 network device</A
></H2
><P
>The network device is what is listed when you use the `<EM
>ifconfig</EM
>'
command. This is the object that the Linux kernel sends and receives network
data from. Nearly always the network device has a physical port associated
with it, but there are occasions where this isn't necessary. The network
device does relate directly to a device driver.</P
><P
>In the Linux AX.25 code there are a number of device drivers. The most common
is probably the KISS driver, but others are the SCC driver(s), the Baycom
driver and the Soundmodem driver.</P
><P
>Each of these device drivers will create a network device when it is started.</P
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN505"
>6.1.1. Creating a KISS device</A
></H3
><P
><EM
>Kernel Compile Options</EM
>:
<TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>Amateur Radio support ---&#62;
[*] Amateur Radio support
--- Packet Radio protocols
&#60;*&#62; Amateur Radio AX.25 Level 2 protocol
...
AX.25 network device drivers ---&#62;
--- AX.25 network device drivers
&#60;*&#62; Serial port KISS driver
...</PRE
></FONT
></TD
></TR
></TABLE
>&#13;</P
><P
>Probably the most common configuration will be for a KISS TNC on a
serial port. You will need to have the TNC preconfigured and
connected to your serial port. You can use a communications program
like <EM
>minicom</EM
> or <EM
>seyon</EM
> to
configure the TNC into kiss mode.</P
><P
>To create a KISS device you use the <EM
>kissattach</EM
>
program. In it simplest form you can use the
<EM
>kissattach</EM
> program as follows:</P
><P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
># /usr/sbin/kissattach /dev/ttyS0 radio 44.135.96.242
# kissparms -p radio -t 100 -s 100 -r 25</PRE
></FONT
></TD
></TR
></TABLE
></P
><P
>The <EM
>kissattach</EM
> command will create a KISS network
device. These devices are called `<TT
CLASS="LITERAL"
>ax[0-9]</TT
>'. The
first time you use the <EM
>kissattach</EM
> command it
creates `<TT
CLASS="LITERAL"
>ax0</TT
>', the second time it creates
`<TT
CLASS="LITERAL"
>ax1</TT
>' etc. Each KISS device has an associated
serial port.</P
><P
>The <EM
>kissparms</EM
> command allows you to set various
KISS parameters on a KISS device.</P
><P
>Specifically the example presented would create a KISS network device
using the serial device `<TT
CLASS="LITERAL"
>/dev/ttyS0</TT
>' and the entry
from the <TT
CLASS="LITERAL"
>/etc/ax25/axports</TT
> with a port name of
`<TT
CLASS="LITERAL"
>radio</TT
>'. It then configures it with a
<EM
>txdelay</EM
> and <EM
>slottime</EM
> of 100
milliseconds and a <EM
>ppersist</EM
> value of 25.</P
><P
>Please refer to the <EM
>man</EM
> pages for more information.</P
><DIV
CLASS="SECT4"
><H4
CLASS="SECT4"
><A
NAME="AEN535"
>6.1.1.1. Configuring for Dual Port TNC's</A
></H4
><P
>The <EM
>mkiss</EM
> utility included in the ax25-utils
distribution allows you to make use of both modems on a dual port
TNC. Configuration is fairly simple. It works by taking a single
serial device connected to a single multiport TNC and making it look
like a number of devices each connected to a single port TNC. You do
this <EM
>before</EM
> you do any of the AX.25
configuration. The devices that you then do the AX.25 configuration on
are pseudo-TTY interfaces, (<TT
CLASS="LITERAL"
>/dev/ttyq*</TT
>), and not
the actual serial device. Pseudo-TTY devices create a kind of pipe
through which programs designed to talk to tty devices can talk to
other programs designed to talk to tty devices. Each pipe has a master
and a slave end. The master end is generally called
`<TT
CLASS="LITERAL"
>/dev/ptyq*</TT
>' and the slave ends are called
`<TT
CLASS="LITERAL"
>/dev/ttyq*</TT
>'. There is a one to one relationship
between masters and slaves, so <TT
CLASS="LITERAL"
>/dev/ptyq0</TT
> is the
master end of a pipe with <TT
CLASS="LITERAL"
>/dev/ttyq0</TT
> as its
slave. You must open the master end of a pipe before opening the slave
end. <EM
>mkiss</EM
> exploits this mechanism to split a
single serial device into separate devices.</P
><P
>Example: if you have a dual port TNC and it is connected to your
<TT
CLASS="LITERAL"
>/dev/ttyS0</TT
> serial device at 9600 bps, the command:</P
><P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
># /usr/sbin/mkiss -s 9600 /dev/ttyS0 /dev/ptyq0 /dev/ptyq1
# /usr/sbin/kissattach /dev/ttyq0 port1 44.135.96.242
# /usr/sbin/kissattach /dev/ttyq1 port2 44.135.96.242</PRE
></FONT
></TD
></TR
></TABLE
></P
><P
>would create two pseudo-tty devices that each look like a normal
single port TNC. You would then treat <TT
CLASS="LITERAL"
>/dev/ttyq0</TT
>
and <TT
CLASS="LITERAL"
>/dev/ttyq1</TT
> just as you would a conventional
serial device with TNC connected. This means you'd then use the
<EM
>kissattach</EM
> command as described above, on each of
those, in the example for AX.25 ports called <TT
CLASS="LITERAL"
>port1</TT
>
and <TT
CLASS="LITERAL"
>port2</TT
>. You shouldn't use
<EM
>kissattach</EM
> on the actual serial device as the
<EM
>mkiss</EM
> program uses it.</P
><P
>The <EM
>mkiss</EM
> command has a number of optional
arguments that you may wish to use. They are summarized as follows:
<P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
>-c</DT
><DD
><P
>enables the addition of a one byte checksum to each KISS frame.
This is not supported by most KISS implementations, it is supported by the
G8BPG KISS ROM.</P
></DD
><DT
>-s &#60;speed&#62;</DT
><DD
><P
>sets the speed of the serial port.</P
></DD
><DT
>-h</DT
><DD
><P
>enables hardware handshaking on the serial port, it is off by
default. Most KISS implementation do not support this, but some do.</P
></DD
><DT
>-l</DT
><DD
><P
>enables logging of information to the <EM
>syslog</EM
> log file.</P
></DD
></DL
></DIV
></P
></DIV
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN578"
>6.1.2. Creating a 6PACK device</A
></H3
><P
><EM
>Kernel Compile Options</EM
>:
<TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>Amateur Radio support ---&#62;
[*] Amateur Radio support
--- Packet Radio protocols
&#60;*&#62; Amateur Radio AX.25 Level 2 protocol
...
AX.25 network device drivers ---&#62;
--- AX.25 network device drivers
...
&#60;*&#62; Serial port 6PACK driver
...</PRE
></FONT
></TD
></TR
></TABLE
></P
><P
>6PACK is a protocol that is supported by some TNCs as an alternative
to KISS. It is used in a similar fashion to the KISS driver, using the
<TT
CLASS="LITERAL"
>slattach</TT
> command instead of <TT
CLASS="LITERAL"
>kissattach</TT
>.</P
><P
>A mini HOWTO on the 6PACK driver is included in the kernel source code
as the file
<TT
CLASS="LITERAL"
>/usr/src/linux/Documentation/networking/6pack.txt</TT
>.</P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN588"
>6.1.3. Creating a Baycom device</A
></H3
><P
><EM
>Kernel Compile Options</EM
>:
<TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>Amateur Radio support ---&#62;
[*] Amateur Radio support
--- Packet Radio protocols
&#60;*&#62; Amateur Radio AX.25 Level 2 protocol
...
AX.25 network device drivers ---&#62;
--- AX.25 network device drivers
...
&#60;?&#62; BAYCOM ser12 fullduplex driver for AX.25
&#60;?&#62; BAYCOM ser12 halfduplex driver for AX.25
&#60;?&#62; BAYCOM picpar and par96 driver for AX.25
&#60;?&#62; BAYCOM epp driver for AX.25
...</PRE
></FONT
></TD
></TR
></TABLE
></P
><P
><A
HREF="mailto:sailer@ife.ee.ethz.ch"
TARGET="_top"
>Thomas Sailer</A
>,
despite the popularly held belief that it would not work very well,
has developed Linux support for Baycom modems. His driver supports the
<TT
CLASS="LITERAL"
>Ser12</TT
> serial port, <TT
CLASS="LITERAL"
>Par96</TT
> and the
enhanced <TT
CLASS="LITERAL"
>PicPar</TT
> parallel port modems. Further
information about the modems themselves may be obtained from the
<A
HREF="http://www.baycom.de/"
TARGET="_top"
>Baycom Web site</A
>.</P
><P
>Your first step should be to determine the i/o and addresses of the
serial or parallel port(s) you have Baycom modem(s) connected to.
When you have these you must configure the Baycom driver with them.</P
><P
>The Baycom driver creates network devices called:
<TT
CLASS="LITERAL"
>bc0</TT
>, <TT
CLASS="LITERAL"
>bc1</TT
>, <TT
CLASS="LITERAL"
>bc2</TT
>
etc. when it is configured.</P
><P
>The <EM
>sethdlc</EM
> utility allows you to configure the
driver with these parameters, or, if you have only one Baycom modem
installed you may specify the parameters on the
<EM
>insmod</EM
> command line when you load the Baycom
module.</P
><P
>For example, a simple configuration.
Disable the serial driver for COM1: then configure the Baycom driver for a
Ser12 serial port modem on COM1: with the software DCD option enabled:</P
><P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
># setserial /dev/ttyS0 uart none
# insmod hdlcdrv
# insmod baycom mode="ser12*" iobase=0x3f8 irq=4</PRE
></FONT
></TD
></TR
></TABLE
></P
><P
>Par96 parallel port type modem on LPT1: using hardware DCD detection:</P
><P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
># insmod hdlcdrv
# insmod baycom mode="par96" iobase=0x378 irq=7 options=0</PRE
></FONT
></TD
></TR
></TABLE
></P
><P
>This is not really the preferred way to do it. The <EM
>sethdlc</EM
> utility
works just as easily with one device as with many.</P
><P
>The <EM
>sethdlc</EM
> <EM
>man</EM
> page has the
full details, but a couple of examples will illustrate the most
important aspects of this configuration. The following examples assume
you have already loaded the Baycom module using:</P
><P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
># insmod hdlcdrv
# insmod baycom</PRE
></FONT
></TD
></TR
></TABLE
></P
><P
>or that you compiled the kernel with the driver inbuilt.</P
><P
>Configure the <TT
CLASS="LITERAL"
>bc0</TT
> device driver as a Parallel port Baycom modem on LPT1:
with software DCD:</P
><P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
># sethdlc -p -i bc0 mode par96 io 0x378 irq 7</PRE
></FONT
></TD
></TR
></TABLE
></P
><P
>Configure the <TT
CLASS="LITERAL"
>bc1</TT
> device driver as a Serial port Baycom modem on COM1:</P
><P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
># sethdlc -p -i bc1 mode "ser12*" io 0x3f8 irq 4</PRE
></FONT
></TD
></TR
></TABLE
></P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN629"
>6.1.4. Configuring the AX.25 channel access parameters</A
></H3
><P
>The AX.25 channel access parameters are the equivalent of the KISS ppersist,
txdelay and slottime type parameters. Again you use the <EM
>sethdlc</EM
> utility
for this.</P
><P
>Again the <EM
>sethdlc</EM
> man page is the source of the most complete information
but another example of two won't hurt:</P
><P
>Configure the <TT
CLASS="LITERAL"
>bc0</TT
> device with TxDelay of 200 mS, SlotTime of 100 mS,
PPersist of 40 and half duplex:</P
><P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
># sethdlc -i bc0 -a txd 200 slot 100 ppersist 40 half</PRE
></FONT
></TD
></TR
></TABLE
></P
><P
>Note that the timing values are in milliseconds.</P
><DIV
CLASS="SECT4"
><H4
CLASS="SECT4"
><A
NAME="AEN640"
>6.1.4.1. Configuring the Kernel AX.25 to use the Baycom device</A
></H4
><P
>The Baycom driver creates standard network devices that the AX.25
Kernel code can use. Configuration is much the same as that for a PI
or PacketTwin card.</P
><P
>The first step is to configure the device with an AX.25 callsign. The
<EM
>ifconfig</EM
> utility may be used to perform this.</P
><P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
># /sbin/ifconfig bc0 hw ax25 VK2KTJ-15 up</PRE
></FONT
></TD
></TR
></TABLE
></P
><P
>will assign the Baycom device <TT
CLASS="LITERAL"
>bc0</TT
> the AX.25
callsign <TT
CLASS="LITERAL"
>VK2KTJ-15</TT
>. Alternatively you can use the
<EM
>axparms</EM
> command, you'll still need to use the
<EM
>ifconfig</EM
> command to bring the device up though:</P
><P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
># ifconfig bc0 up
# axparms -setcall bc0 vk2ktj-15</PRE
></FONT
></TD
></TR
></TABLE
>&#13;</P
><P
>The next step is to create an entry in the <TT
CLASS="LITERAL"
>/etc/ax25/axports</TT
> file
as you would for any other device. The entry in the <TT
CLASS="LITERAL"
>axports</TT
> file is
associated with the network device you've configured by the callsign you
configure. The entry in the <TT
CLASS="LITERAL"
>axports</TT
> file that has the callsign that
you configured the Baycom device with is the one that will be used to
refer to it.</P
><P
>You may then treat the new AX.25 device as you would any other. You can
configure it for TCP/IP, add it to ax25d and run NET/ROM or ROSE over it
as you please.</P
></DIV
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN659"
>6.1.5. Creating a kernel Soundmodem device</A
></H3
><P
><EM
>Kernel Compile Options</EM
>:
<TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>Amateur Radio support ---&#62;
[*] Amateur Radio support
--- Packet Radio protocols
&#60;*&#62; Amateur Radio AX.25 Level 2 protocol
...
AX.25 network device drivers ---&#62;
--- AX.25 network device drivers
...
&#60;*&#62; Soundcard modem driver
[?] soundmodem support for Soundblaster and compatible cards
[?] soundmodem support for WSS and Crystal cards
[?] soundmodem support for 1200 baud AFSK modulation
[?] soundmodem support for 2400 baud AFSK modulation (7.3728MHz crystal)
[?] soundmodem support for 2400 baud AFSK modulation (8MHz crystal)
[?] soundmodem support for 2666 baud AFSK modulation
[?] soundmodem support for 4800 baud HAPN-1 modulation
[?] soundmodem support for 4800 baud PSK modulation
[?] soundmodem support for 9600 baud FSK G3RUH modulation
...</PRE
></FONT
></TD
></TR
></TABLE
></P
><P
>Thomas Sailer has built a driver for the kernel that allows you to
use your soundcard as a modem. Connect your radio directly to your
soundcard to play packet! Thomas recommends at least a 486DX2/66 if you
want to use this software as all of the digital signal processing is done
by the main CPU.</P
><P
>The driver currently emulates 1200 bps AFSK, 4800 HAPN and 9600 FSK (G3RUH
compatible) modem types. The only sound cards currently supported are
SoundBlaster and Windows Sound System Compatible models. If you have a sound
card of another type, you can try the user-mode soundmodem described later
in this document.</P
><P
>The sound cards require some circuitry to help them drive the
Push-To-Talk circuitry, and information on this is available from
<A
HREF="http://www.baycom.org/~tom/pcf/ptt_circ/ptt.html"
TARGET="_top"
>Thomas's
Soundmodem PTT circuit web page</A
>. There are quite a few
possible options, they are: detect the sound output from the
soundcard, or use output from a parallel port, serial port or MIDI
port. Circuit examples for each of these are on Thomas's site.</P
><P
>The Soundmodem driver creates network devices called:
<TT
CLASS="LITERAL"
>sm0</TT
>, <TT
CLASS="LITERAL"
>sm1</TT
>, <TT
CLASS="LITERAL"
>sm2</TT
> etc when it is configured.</P
><DIV
CLASS="NOTE"
><P
></P
><TABLE
CLASS="NOTE"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/note.gif"
HSPACE="5"
ALT="Note"></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>The Soundmodem driver competes for the same resources as the Linux
sound driver, so if you wish to use the Soundmodem driver you must
ensure that the Linux sound driver is not installed. You can, of
course, compile them both as modules and insert and remove them as you
wish.</P
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="SECT4"
><H4
CLASS="SECT4"
><A
NAME="AEN674"
>6.1.5.1. Configuring the sound card</A
></H4
><P
>The Soundmodem driver does not initialize the sound card. The ax25-utils
package includes a utility to do this called `<EM
>setcrystal</EM
>' that may
be used for sound cards based on the Crystal chip set. If you have some other
card then you will have to use some other software to initialize it.
Its syntax is fairly straightforward:</P
><P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>setcrystal [-w wssio] [-s sbio] [-f synthio] [-i irq] [-d dma] [-c dma2]</PRE
></FONT
></TD
></TR
></TABLE
></P
><P
>So, for example, if you wished to configure a SoundBlaster card at i/o
base address 0x388, irq 10 and DMA 1 you would use:</P
><P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
># setcrystal -s 0x388 -i 10 -d 1</PRE
></FONT
></TD
></TR
></TABLE
></P
><P
>To configure a Window Sound System card at i/o base address 0x534, irq 5, DMA 3
you would use:</P
><P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
># setcrystal -w 0x534 -i 5 -d 3</PRE
></FONT
></TD
></TR
></TABLE
></P
><P
>The <TT
CLASS="LITERAL"
>[-f synthio]</TT
> parameter is the set the synthesizer address, and the
<TT
CLASS="LITERAL"
>[-c dma2]</TT
> parameter is to set the second DMA channel to allow full duplex
operation.</P
></DIV
><DIV
CLASS="SECT4"
><H4
CLASS="SECT4"
><A
NAME="AEN689"
>6.1.5.2. Configuring the Soundmodem driver</A
></H4
><P
>When you have configured the soundcard you need to configure the driver
telling it where the sound card is located and what sort of modem you wish
it to emulate.</P
><P
>The <EM
>sethdlc</EM
> utility allows you to configure the driver with these
parameters, or, if you have only one soundcard installed you may specify
the parameters on the <EM
>insmod</EM
> command line when you load the
Soundmodem module.</P
><P
>For example, a simple configuration, with one SoundBlaster soundcard
configured as described above emulating a 1200 bps modem:</P
><P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
># insmod hdlcdrv
# insmod soundmodem mode="sbc:afsk1200" iobase=0x220 irq=5 dma=1</PRE
></FONT
></TD
></TR
></TABLE
></P
><P
>This is not really the preferred way to do it. The <EM
>sethdlc</EM
> utility
works just as easily with one device as with many.</P
><P
>The <EM
>sethdlc</EM
> man page has the full details, but a couple of examples
will illustrate the most important aspects of this configuration. The
following examples assume you have already loaded the Soundmodem modules
using:</P
><P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
># insmod hdlcdrv
# insmod soundmodem</PRE
></FONT
></TD
></TR
></TABLE
></P
><P
>or that you compiled the kernel with the driver inbuilt.</P
><P
>Configure the driver to support the Windows Sound System card we configured
above to emulate a G3RUH 9600 compatible modem as device <TT
CLASS="LITERAL"
>sm0</TT
> using a
parallel port at 0x378 to key the Push-To-Talk:</P
><P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
># sethdlc -p -i sm0 mode wss:fsk9600 io 0x534 irq 5 dma 3 pario 0x378</PRE
></FONT
></TD
></TR
></TABLE
></P
><P
>Configure the driver to support the SoundBlaster card we configured above
to emulate a 4800 bps HAPN modem as device <TT
CLASS="LITERAL"
>sm1</TT
> using the serial port
located at 0x2f8 to key the Push-To-Talk:</P
><P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
># sethdlc -p -i sm1 mode sbc:hapn4800 io 0x388 irq 10 dma 1 serio 0x2f8</PRE
></FONT
></TD
></TR
></TABLE
></P
><P
>Configure the driver to support the SoundBlaster card we configured above
to emulate a 1200 bps AFSK modem as device <TT
CLASS="LITERAL"
>sm1</TT
> using the serial port
located at 0x2f8 to key the Push-To-Talk:</P
><P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
># sethdlc -p -i sm1 mode sbc:afsk1200 io 0x388 irq 10 dma 1 serio 0x2f8</PRE
></FONT
></TD
></TR
></TABLE
></P
></DIV
><DIV
CLASS="SECT4"
><H4
CLASS="SECT4"
><A
NAME="AEN717"
>6.1.5.3. Configuring the AX.25 channel access parameters</A
></H4
><P
>The AX.25 channel access parameters are the equivalent of the KISS ppersist,
txdelay and slottime type parameters. You use the <EM
>sethdlc</EM
> utility for
this as well.</P
><P
>Again the <EM
>sethdlc</EM
> man page is the source of the most complete information
but another example of two won't hurt:</P
><P
>Configure the <TT
CLASS="LITERAL"
>sm0</TT
> device with TxDelay of 100 mS, SlotTime of 50mS,
PPersist of 128 and full duplex:</P
><P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
># sethdlc -i sm0 -a txd 100 slot 50 ppersist 128 full</PRE
></FONT
></TD
></TR
></TABLE
></P
><P
>Note that the timing values are in milliseconds.</P
></DIV
><DIV
CLASS="SECT4"
><H4
CLASS="SECT4"
><A
NAME="AEN728"
>6.1.5.4. Setting the audio levels and tuning the driver</A
></H4
><P
>It is very important that the audio levels be set correctly for any radio
based modem to work. This is equally true of the Soundmodem.
Thomas has developed some utility programs that make this task easier.
They are called <EM
>smdiag</EM
> and <EM
>smmixer</EM
>.</P
><P
><P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
><EM
>smdiag</EM
></DT
><DD
><P
>provides two types of display, either an oscilloscope
type display or an eye pattern type display.</P
></DD
><DT
><EM
>smmixer</EM
></DT
><DD
><P
>allows you to actually adjust the transmit and
receive audio levels.</P
></DD
></DL
></DIV
>
To start the <EM
>smdiag</EM
> utility in 'eye' mode for the Soundmodem device
<TT
CLASS="LITERAL"
>sm0</TT
> you would use:</P
><P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
># smdiag -i sm0 -e</PRE
></FONT
></TD
></TR
></TABLE
></P
><P
>To start the <EM
>smmixer</EM
> utility for the Soundmodem
device <TT
CLASS="LITERAL"
>sm0</TT
> you would use:</P
><P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
># smmixer -i sm0</PRE
></FONT
></TD
></TR
></TABLE
></P
></DIV
><DIV
CLASS="SECT4"
><H4
CLASS="SECT4"
><A
NAME="AEN754"
>6.1.5.5. Configuring the Kernel AX.25 to use the Soundmodem</A
></H4
><P
>The Soundmodem driver creates standard network devices that the AX.25
Kernel code can use. Configuration is much the same as that for a PI
or PacketTwin card.</P
><P
>The first step is to configure the device with an AX.25 callsign.
The <EM
>ifconfig</EM
> utility may be used to perform this.</P
><P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
># /sbin/ifconfig sm0 hw ax25 VK2KTJ-15 up</PRE
></FONT
></TD
></TR
></TABLE
></P
><P
>will assign the Soundmodem device <TT
CLASS="LITERAL"
>sm0</TT
> the AX.25
callsign <TT
CLASS="LITERAL"
>VK2KTJ-15</TT
>. Alternatively you can use the
<EM
>axparms</EM
> command, but you still need the
<EM
>ifconfig</EM
> utility to bring the device up:</P
><P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
># ifconfig sm0 up
# axparms -setcall sm0 vk2ktj-15</PRE
></FONT
></TD
></TR
></TABLE
></P
><P
>The next step is to create an entry in the <TT
CLASS="LITERAL"
>/etc/ax25/axports</TT
> file
as you would for any other device. The entry in the <TT
CLASS="LITERAL"
>axports</TT
> file is
associated with the network device you've configured by the callsign you
configure. The entry in the <TT
CLASS="LITERAL"
>axports</TT
> file that has the callsign that
you configured the Soundmodem device with is the one that will be used to
refer to it.</P
><P
>You may then treat the new AX.25 device as you would any other. You can
configure it for TCP/IP, add it to ax25d and run NET/ROM or ROSE over it
as you please.</P
></DIV
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN773"
>6.1.6. Creating a user-mode Soundmodem device</A
></H3
><P
><EM
>Kernel Compile Options</EM
>: not applicable&#13;</P
><P
>Thomas Sailer has written a sound modem driver that runs in user-mode
using the kernel sound drivers, so it should work with any sound card
supported under Linux.</P
><P
>The driver is implemented as the user-mode program
<TT
CLASS="LITERAL"
>soundmodem</TT
>. The graphical
<TT
CLASS="LITERAL"
>soundmodemconfig</TT
> program allows configuring and
testing the soundmodem driver. As well as kernel sound support you
need the kernel AX.25 mkiss driver.</P
><P
>The software and documentation can be downloaded from
<A
HREF="http://www.baycom.org/~tom/ham/soundmodem/"
TARGET="_top"
>http://www.baycom.org/~tom/ham/soundmodem</A
>.</P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN783"
>6.1.7. Creating a YAM device</A
></H3
><P
><EM
>Kernel Compile Options</EM
>:
<TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>Amateur Radio support ---&#62;
[*] Amateur Radio support
--- Packet Radio protocols
&#60;*&#62; Amateur Radio AX.25 Level 2 protocol
...
AX.25 network device drivers ---&#62;
--- AX.25 network device drivers
...
&#60;?&#62; YAM driver for AX.25
...</PRE
></FONT
></TD
></TR
></TABLE
></P
><P
>YAM is Yet Another Modem, a 9600 baud modem designed by Nico Palermo.
Information on the Linux driver can be found at
<A
HREF="http://www.teaser.fr/~frible/yam.html"
TARGET="_top"
>http://www.teaser.fr/~frible/yam.html</A
>
while general information on the modem can be found at
<A
HREF="http://www.microlet.com/yam/"
TARGET="_top"
>http://www.microlet.com/yam/</A
></P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN791"
>6.1.8. Creating a PI card device</A
></H3
><P
><EM
>Kernel Compile Options</EM
>:
<TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>General setup ---&#62;
[*] Networking support
Network device support ---&#62;
[*] Network device support
...
[*] Radio network interfaces
[*] Ottawa PI and PI/2 support for AX.25</PRE
></FONT
></TD
></TR
></TABLE
>&#13;</P
><P
>The PI card device driver creates devices named
`<TT
CLASS="LITERAL"
>pi[0-9][ab]</TT
>'. The first PI card detected will be
allocated `<TT
CLASS="LITERAL"
>pi0</TT
>', the second
`<TT
CLASS="LITERAL"
>pi1</TT
>' etc. The `<TT
CLASS="LITERAL"
>a</TT
>' and
`<TT
CLASS="LITERAL"
>b</TT
>' refer to the first and second physical
interface on the PI card. If you have built your kernel to include the
PI card driver, and the card has been properly detected then you can
use the following command to configure the network device:</P
><P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
># /sbin/ifconfig pi0a hw ax25 VK2KTJ-15 up</PRE
></FONT
></TD
></TR
></TABLE
></P
><P
>This command would configure the first port on the first PI card
detected with the callsign <TT
CLASS="LITERAL"
>VK2KTJ-15</TT
> and make it
active. To use the device all you now need to do is to configure an
entry into your <TT
CLASS="LITERAL"
>/etc/ax25/axports</TT
> file with a
matching callsign/ssid and you will be ready to continue on.</P
><P
>The PI card driver was written by
<A
HREF="mailto:dp@hydra.carleton.edu"
TARGET="_top"
>David Perry</A
>.</P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN809"
>6.1.9. Creating a PacketTwin device</A
></H3
><P
><EM
>Kernel Compile Options</EM
>:
<TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>General setup ---&#62;
[*] Networking support
Network device support ---&#62;
[*] Network device support
...
[*] Radio network interfaces
[*] Gracilis PackeTwin support for AX.25</PRE
></FONT
></TD
></TR
></TABLE
>&#13;</P
><P
>The PacketTwin card device driver creates devices named
`<TT
CLASS="LITERAL"
>pt[0-9][ab]</TT
>'. The first PacketTwin card detected
will be allocated `<TT
CLASS="LITERAL"
>pt0</TT
>', the second
`<TT
CLASS="LITERAL"
>pt1</TT
>' etc. The `<TT
CLASS="LITERAL"
>a</TT
>' and
`<TT
CLASS="LITERAL"
>b</TT
>' refer to the first and second physical
interface on the PacketTwin card. If you have built your kernel to
include the PacketTwin card driver, and the card has been properly
detected then you can use the following command to configure the
network device:</P
><P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
># /sbin/ifconfig pt0a hw ax25 VK2KTJ-15 up</PRE
></FONT
></TD
></TR
></TABLE
></P
><P
>This command would configure the first port on the first PacketTwin
card detected with the callsign <TT
CLASS="LITERAL"
>VK2KTJ-15</TT
> and make
it active. To use the device all you now need to do is to configure an
entry into your <TT
CLASS="LITERAL"
>/etc/ax25/axports</TT
> file with a
matching callsign/ssid and you will be ready to continue on.</P
><P
>The PacketTwin card driver was written by
<A
HREF="mailto:csmall@triode.apana.org.au"
TARGET="_top"
>Craig Small</A
>, VK2XLZ.</P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN827"
>6.1.10. Creating a generic SCC device</A
></H3
><P
><EM
>Kernel Compile Options</EM
>:
<TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>General setup ---&#62;
[*] Networking support
Network device support ---&#62;
[*] Network device support
...
[*] Radio network interfaces
[*] Z8530 SCC KISS emulation driver for AX.25</PRE
></FONT
></TD
></TR
></TABLE
>&#13;</P
><P
><A
HREF="mailto:jreuter@poboxes.com"
TARGET="_top"
>Joerg Reuter</A
>, DL1BKE,
has developed generic support for Z8530 SCC based cards. His driver is
configurable to support a range of different types of cards and
present an interface that looks like a KISS TNC so you can treat it as
though it were a KISS TNC.</P
><DIV
CLASS="SECT4"
><H4
CLASS="SECT4"
><A
NAME="AEN834"
>6.1.10.1. Obtaining and building the configuration tool package</A
></H4
><P
>While the kernel driver is included in the standard kernel distribution,
Joerg distributes more recent versions of his driver with the suite of
configuration tools that you will need to obtain as well.</P
><P
>You can obtain the configuration tools package from:
<A
HREF="http://www.qsl.net/dl1bke"
TARGET="_top"
>Joerg's web page</A
>,
<A
HREF="ftp://db0bm.automation.fh-aachen.de/incoming/dl1bke"
TARGET="_top"
>ftp://db0bm.automation.fh-aachen.de/incoming/dl1bke</A
>,
<A
HREF="ftp://insl1.etec.uni-karlsruhe.de/pub/hamradio/linux/z8530"
TARGET="_top"
>ftp://insl1.etec.uni-karlsruhe.de/pub/hamradio/linux/z8530</A
>,
<A
HREF="ftp://ftp.ucsd.edu/hamradio/packet/tcpip/linux"
TARGET="_top"
>ftp://ftp.ucsd.edu/hamradio/packet/tcpip/linux</A
>, or
<A
HREF="ftp://ftp.ucsd.edu/hamradio/packet/tcpip/incoming"
TARGET="_top"
>ftp://ftp.ucsd.edu/hamradio/packet/tcpip/incoming</A
>.</P
><P
>You will find multiple versions, choose the one that best suits the
kernel you intend to use:
<TT
CLASS="LITERAL"
>z8530drv-2.4a.dl1bke.tar.gz</TT
> for 2.0.* kernels and
<TT
CLASS="LITERAL"
>z8530drv-utils-3.0.tar.gz</TT
> for 2.1.6 or later kernels.</P
><P
>The following commands were what I used to compile and install the package
for kernel version 2.0.30:</P
><P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
># cd /usr/src
# gzip -dc z8530drv-2.4a.dl1bke.tar.gz | tar xvpofz -
# cd z8530drv
# make clean
# make dep
# make module # If you want to build the driver as a module
# make for_kernel # If you want the driver to built into your kernel
# make install</PRE
></FONT
></TD
></TR
></TABLE
></P
><P
>After the above is complete you should have three new programs
installed in your <TT
CLASS="LITERAL"
>/sbin</TT
> directory:
<EM
>gencfg</EM
>, <EM
>sccinit</EM
> and
<EM
>sccstat</EM
>. It is these programs that you will use
to configure the driver for your card.</P
><P
>You will also have a group of new special device files created in your
<TT
CLASS="LITERAL"
>/dev</TT
> called
<TT
CLASS="LITERAL"
>scc0</TT
>-<TT
CLASS="LITERAL"
>scc7</TT
>. These will be used
later and will be the `KISS' devices you will end up using.</P
><P
>If you chose to 'make for_kernel' then you will need to recompile your
kernel. To ensure that you include support for the z8530 driver you must be
sure to answer `<TT
CLASS="LITERAL"
>Y</TT
>' to:
`<TT
CLASS="LITERAL"
>Z8530 SCC kiss emulation driver for AX.25</TT
>' when asked during a
kernel `<TT
CLASS="LITERAL"
>make config</TT
>'.</P
><P
>If you chose to 'make module' then the new <TT
CLASS="LITERAL"
>scc.o</TT
> will have been
installed in the appropriate <TT
CLASS="LITERAL"
>/lib/modules</TT
> directory and you do
not need to recompile your kernel. Remember to use the <EM
>insmod</EM
> command
to load the module before your try and configure it.</P
></DIV
><DIV
CLASS="SECT4"
><H4
CLASS="SECT4"
><A
NAME="AEN866"
>6.1.10.2. Configuring the driver for your card</A
></H4
><P
>The z8530 SCC driver has been designed to be as flexible as possible so as
to support as many different types of cards as possible. With this flexibility
has come some cost in configuration.</P
><P
>There is more comprehensive documentation in the package and you should
read this if you have any problems. You should particularly look at
<TT
CLASS="LITERAL"
>doc/scc_eng.doc</TT
> or <TT
CLASS="LITERAL"
>doc/scc_ger.doc</TT
> for more detailed
information. I've paraphrased the important details, but as a result there
is a lot of lower level detail that I have not included.</P
><P
>The main configuration file is read by the <EM
>sccinit</EM
> program and is
called <TT
CLASS="LITERAL"
>/etc/z8530drv.conf</TT
>. This file is broken into two main stages:
Configuration of the hardware parameters and channel configuration. After
you have configured this file you need only add:</P
><P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
># sccinit</PRE
></FONT
></TD
></TR
></TABLE
></P
><P
>into the <TT
CLASS="LITERAL"
>rc</TT
> file that configures your network and the driver will
be initialized according to the contents of the configuration file. You must
do this before you attempt to use the driver.</P
><DIV
CLASS="SECT5"
><H5
CLASS="SECT5"
><A
NAME="AEN879"
>6.1.10.2.1. Configuration of the hardware parameters</A
></H5
><P
>The first section is broken into stanzas, each stanza representing an 8530
chip. Each stanza is a list of keywords with arguments. You may specify up
to four SCC chips in this file by default. The <TT
CLASS="LITERAL"
>#define MAXSCC 4</TT
> in
<TT
CLASS="LITERAL"
>scc.c</TT
> can be increased if you require support for more.</P
><P
>The allowable keywords and arguments are:</P
><P
><P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
>chip</DT
><DD
><P
>the <TT
CLASS="LITERAL"
>chip</TT
> keyword is used to separate stanzas. It will
take anything as an argument. The arguments are not used.</P
></DD
><DT
>data_a</DT
><DD
><P
>this keyword is used to specify the address of the data
port for the z8530 channel `A'. The argument is a hexadecimal number
e.g. 0x300</P
></DD
><DT
>ctrl_a</DT
><DD
><P
>this keyword is used to specify the address of the control
port for the z8530 channel `A'. The arguments is a hexadecimal number
e.g. 0x304</P
></DD
><DT
>data_b</DT
><DD
><P
>this keyword is used to specify the address of the data
port for the z8530 channel `B'. The argument is a hexadecimal number
e.g. 0x301</P
></DD
><DT
>ctrl_b</DT
><DD
><P
>this keyword is used to specify the address of the control
port for the z8530 channel `B'. The arguments is a hexadecimal number
e.g. 0x305</P
></DD
><DT
>irq</DT
><DD
><P
>this keyword is used to specify the IRQ used by the 8530 SCC
described in this stanza. The argument is an integer e.g. 5</P
></DD
><DT
>pclock</DT
><DD
><P
>this keyword is used to specify the frequency of the clock
at the PCLK pin of the 8530. The argument is an integer frequency in Hz which
defaults to 4915200 if the keyword is not supplied.</P
></DD
><DT
>board</DT
><DD
><P
>the type of board supporting this 8530 SCC. The argument is
a character string. The allowed values are:
<P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
>PA0HZP</DT
><DD
><P
>the PA0HZP SCC Card</P
></DD
><DT
>EAGLE</DT
><DD
><P
>the Eagle card</P
></DD
><DT
>PC100</DT
><DD
><P
>the DRSI PC100 SCC card</P
></DD
><DT
>PRIMUS</DT
><DD
><P
>the PRIMUS-PC (DG9BL) card</P
></DD
><DT
>BAYCOM</DT
><DD
><P
>BayCom (U)SCC card</P
></DD
></DL
></DIV
></P
></DD
><DT
>escc</DT
><DD
><P
>this keyword is optional and is used to enable support for the
Extended SCC chips (ESCC) such as the 8580, 85180, or the 85280. The argument
is a character string with allowed values of `yes' or `no'. The default is
`no'.</P
></DD
><DT
>vector</DT
><DD
><P
>this keyword is optional and specifies the address of the
vector latch (also known as "intack port") for PA0HZP cards. There can be only
one vector latch for all chips. The default is 0.</P
></DD
><DT
>special</DT
><DD
><P
>this keyword is optional and specifies the address of the
special function register on several cards. The default is 0.</P
></DD
><DT
>option</DT
><DD
><P
>this keyword is optional and defaults to 0.</P
></DD
></DL
></DIV
></P
><P
>Some example configurations for the more popular cards are as follows:</P
><P
><P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
>BayCom USCC</DT
><DD
><P
>&#13;<TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="90%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>chip 1
data_a 0x300
ctrl_a 0x304
data_b 0x301
ctrl_b 0x305
irq 5
board BAYCOM
#
# SCC chip 2
#
chip 2
data_a 0x302
ctrl_a 0x306
data_b 0x303
ctrl_b 0x307
board BAYCOM</PRE
></FONT
></TD
></TR
></TABLE
>&#13;</P
></DD
><DT
>PA0HZP SCC card</DT
><DD
><P
>&#13;<TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="90%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>chip 1
data_a 0x153
data_b 0x151
ctrl_a 0x152
ctrl_b 0x150
irq 9
pclock 4915200
board PA0HZP
vector 0x168
escc no
#
#
#
chip 2
data_a 0x157
data_b 0x155
ctrl_a 0x156
ctrl_b 0x154
irq 9
pclock 4915200
board PA0HZP
vector 0x168
escc no</PRE
></FONT
></TD
></TR
></TABLE
>&#13;</P
></DD
><DT
>DRSI SCC card</DT
><DD
><P
>&#13;<TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="90%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>chip 1
data_a 0x303
data_b 0x301
ctrl_a 0x302
ctrl_b 0x300
irq 7
pclock 4915200
board DRSI
escc no</PRE
></FONT
></TD
></TR
></TABLE
>&#13;</P
></DD
></DL
></DIV
></P
><P
>If you already have a working configuration for your card under NOS, then
you can use the <EM
>gencfg</EM
> command to convert the PE1CHL NOS driver
commands into a form suitable for use in the z8530 driver configuration
file.</P
><P
>To use <EM
>gencfg</EM
> you simply invoke it with the same parameters as you
used for the PE1CHL driver in NET/NOS. For example:</P
><P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
># gencfg 2 0x150 4 2 0 1 0x168 9 4915200</PRE
></FONT
></TD
></TR
></TABLE
></P
><P
>will generate a skeleton configuration for the OptoSCC card.</P
></DIV
></DIV
><DIV
CLASS="SECT4"
><H4
CLASS="SECT4"
><A
NAME="AEN982"
>6.1.10.3. Channel Configuration</A
></H4
><P
>The Channel Configuration section is where you specify all of the other
parameters associated with the port you are configuring. Again this
section is broken into stanzas. One stanza represents one logical port, and
therefore there would be two of these for each one of the hardware parameters
stanzas as each 8530 SCC supports two ports.</P
><P
>These keywords and arguments are also written to the <TT
CLASS="LITERAL"
>/etc/z8530drv.conf</TT
>
file and must appear <EM
>after</EM
> the hardware parameters section.</P
><P
>Sequence is very important in this section, but if you stick with the suggested
sequence it should work okay. The keywords and arguments are:
<P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
>device</DT
><DD
><P
>this keyword must be the first line of a port definition and
specifies the name of the special device file that the rest of the
configuration applies to. e.g. <TT
CLASS="LITERAL"
>/dev/scc0</TT
></P
></DD
><DT
>speed</DT
><DD
><P
>this keyword specifies the speed in bits per second of the
interface. The argument is an integer: e.g. <TT
CLASS="LITERAL"
>1200</TT
></P
></DD
><DT
>clock</DT
><DD
><P
>this keyword specifies where the clock for the data will
be sourced. Allowable values are:
<P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
>dpll</DT
><DD
><P
>normal halfduplex operation</P
></DD
><DT
>external</DT
><DD
><P
>MODEM supplies its own Rx/Tx clock</P
></DD
><DT
>divider</DT
><DD
><P
>use fullduplex divider if installed.</P
></DD
></DL
></DIV
></P
></DD
><DT
>mode</DT
><DD
><P
>this keyword specifies the data coding to be used. Allowable
arguments are: <TT
CLASS="LITERAL"
>nrzi</TT
> or <TT
CLASS="LITERAL"
>nrz</TT
></P
></DD
><DT
>rxbuffers</DT
><DD
><P
>this keyword specifies the number of receive buffers to
allocate memory for. The argument is an integer, e.g. 8.</P
></DD
><DT
>txbuffers</DT
><DD
><P
>this keyword specifies the number of transmit buffers to
allocate memory for. The argument is an integer, e.g. 8.</P
></DD
><DT
>bufsize</DT
><DD
><P
>this keyword specifies the size of the receive and transmit
buffers. The arguments is in bytes and represents the total length of the
frame, so it must also take into account the AX.25 headers and not just the
length of the data field. This keyword is optional and default to <TT
CLASS="LITERAL"
>384</TT
></P
></DD
><DT
>txdelay</DT
><DD
><P
>the KISS transmit delay value, the argument is an integer in mS.</P
></DD
><DT
>persist</DT
><DD
><P
>the KISS persist value, the argument is an integer.</P
></DD
><DT
>slot</DT
><DD
><P
>the KISS slot time value, the argument is an integer in mS.</P
></DD
><DT
>tail</DT
><DD
><P
>the KISS transmit tail value, the argument is an integer in mS.</P
></DD
><DT
>fulldup</DT
><DD
><P
>the KISS full duplex flag, the argument is an integer.
<TT
CLASS="LITERAL"
>1</TT
>==Full Duplex, <TT
CLASS="LITERAL"
>0</TT
>==Half Duplex.</P
></DD
><DT
>wait</DT
><DD
><P
>the KISS wait value, the argument is an integer in mS.</P
></DD
><DT
>min</DT
><DD
><P
>the KISS min value, the argument is an integer in S.</P
></DD
><DT
>maxkey</DT
><DD
><P
>the KISS maximum keyup time, the argument is an integer in S.</P
></DD
><DT
>idle</DT
><DD
><P
>the KISS idle timer value, the argument is an integer in S.</P
></DD
><DT
>maxdef</DT
><DD
><P
>the KISS maxdef value, the argument is an integer.</P
></DD
><DT
>group</DT
><DD
><P
>the KISS group value, the argument is an integer.</P
></DD
><DT
>txoff</DT
><DD
><P
>the KISS txoff value, the argument is an integer in mS.</P
></DD
><DT
>softdcd</DT
><DD
><P
>the KISS softdcd value, the argument is an integer.</P
></DD
><DT
>slip</DT
><DD
><P
>the KISS slip flag, the argument is an integer.</P
></DD
></DL
></DIV
></P
></DIV
><DIV
CLASS="SECT4"
><H4
CLASS="SECT4"
><A
NAME="AEN1094"
>6.1.10.4. Using the driver</A
></H4
><P
>To use the driver you simply treat the <TT
CLASS="LITERAL"
>/dev/scc*</TT
> devices just as
you would a serial tty device with a KISS TNC connected to it. For example,
to configure Linux Kernel networking to use your SCC card you could use
something like:</P
><P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
># kissattach -s 4800 /dev/scc0 VK2KTJ</PRE
></FONT
></TD
></TR
></TABLE
></P
><P
>You can also use NOS to attach to it in precisely the same way. From JNOS
for example you would use something like:</P
><P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>attach asy scc0 0 ax25 scc0 256 256 4800</PRE
></FONT
></TD
></TR
></TABLE
></P
></DIV
><DIV
CLASS="SECT4"
><H4
CLASS="SECT4"
><A
NAME="AEN1103"
>6.1.10.5. The <EM
>sccstat</EM
> and <EM
>sccparam</EM
> tools</A
></H4
><P
>To assist in the diagnosis of problems you can use the <EM
>sccstat</EM
>
program to display the current configuration of an SCC device. To use it
try:</P
><P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
># sccstat /dev/scc0</PRE
></FONT
></TD
></TR
></TABLE
></P
><P
>you will displayed a very large amount of information relating to the
configuration and health of the <TT
CLASS="LITERAL"
>/dev/scc0</TT
> SCC port.</P
><P
>The <EM
>sccparam</EM
> command allows you to change or modify a configuration
after you have booted. Its syntax is very similar to the NOS <TT
CLASS="LITERAL"
>param</TT
>
command, so to set the <TT
CLASS="LITERAL"
>txtail</TT
> setting of a device to 100mS you
would use:</P
><P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
># sccparam /dev/scc0 txtail 0x8</PRE
></FONT
></TD
></TR
></TABLE
></P
></DIV
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN1119"
>6.1.11. Creating a BPQ ethernet device</A
></H3
><P
><EM
>Kernel Compile Options</EM
>:
<TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>General setup ---&#62;
[*] Networking support
Network device support ---&#62;
[*] Network device support
...
[*] Radio network interfaces
[*] BPQ Ethernet driver for AX.25</PRE
></FONT
></TD
></TR
></TABLE
></P
><P
>Linux supports BPQ Ethernet compatibility. This enables you to run the AX.25
protocol over your Ethernet LAN and to interwork your linux machine with
other BPQ machines on the LAN.</P
><P
>The BPQ network devices are named `<TT
CLASS="LITERAL"
>bpq[0-9]</TT
>'. The
`<TT
CLASS="LITERAL"
>bpq0</TT
>' device is associated with the
`<TT
CLASS="LITERAL"
>eth0</TT
>' device, the `<TT
CLASS="LITERAL"
>bpq1</TT
>' device
with the `<TT
CLASS="LITERAL"
>eth1</TT
>' device etc.</P
><P
>Configuration is quite straightforward. You firstly must have configured
a standard Ethernet device. This means you will have compiled your kernel
to support your Ethernet card and tested that this works. Refer to the
<A
HREF="Ethernet-HOWTO.html"
TARGET="_top"
>Ethernet-HOWTO</A
>
for more information on how to do this.</P
><P
>To configure the BPQ support you need to configure the Ethernet device with
an AX.25 callsign. The following command will do this for you:</P
><P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
># /sbin/ifconfig bpq0 hw ax25 vk2ktj-14 up</PRE
></FONT
></TD
></TR
></TABLE
></P
><P
>Again, remember that the callsign you specify should match the entry in the
<TT
CLASS="LITERAL"
>/etc/ax25/axports</TT
> file that you wish to use for this port.</P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN1138"
>6.1.12. Configuring the BPQ Node to talk to the Linux AX.25 support</A
></H3
><P
>BPQ Ethernet normally uses a multicast address. The Linux implementation does
not, and instead it uses the normal Ethernet broadcast address. The NET.CFG
file for the BPQ ODI driver should therefore be modified to look similar to
this:</P
><P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>LINK SUPPORT
MAX STACKS 1
MAX BOARDS 1
LINK DRIVER E2000 ; or other MLID to suit your card
INT 10 ;
PORT 300 ; to suit your card
FRAME ETHERNET_II
PROTOCOL BPQ 8FF ETHERNET_II ; required for BPQ - can change PID
BPQPARAMS ; optional - only needed if you want
; to override the default target addr
ETH_ADDR FF:FF:FF:FF:FF:FF ; Target address</PRE
></FONT
></TD
></TR
></TABLE
></P
></DIV
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN1143"
>6.2. Creating the <TT
CLASS="LITERAL"
>/etc/ax25/axports</TT
> file</A
></H2
><P
>The <TT
CLASS="LITERAL"
>/etc/ax25/axports</TT
> is a simple text file that you create with
a text editor. The format of the <TT
CLASS="LITERAL"
>/etc/ax25/axports</TT
> file is as follows:</P
><P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>portname callsign baudrate paclen window description</PRE
></FONT
></TD
></TR
></TABLE
></P
><P
>where:</P
><P
><P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
>portname</DT
><DD
><P
>is a text name that you will refer to the port by.</P
></DD
><DT
>callsign</DT
><DD
><P
>is the AX.25 callsign you want to assign to the port.</P
></DD
><DT
>baudrate</DT
><DD
><P
>is the speed at which you wish the port to communicate with
your TNC.</P
></DD
><DT
>paclen</DT
><DD
><P
>is the maximum packet length you want to configure the port
to use for AX.25 connected mode connections.</P
></DD
><DT
>window</DT
><DD
><P
>is the AX.25 window (K) parameter. This is the same as the
<TT
CLASS="LITERAL"
>MAXFRAME</TT
> setting of many TNC's.</P
></DD
><DT
>description</DT
><DD
><P
>is a textual description of the port.</P
></DD
></DL
></DIV
></P
><P
>In my case, mine looks like:</P
><P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
>radio VK2KTJ-15 4800 256 2 4800bps 144.800 MHz
ether VK2KTJ-14 10000000 256 2 BPQ/ethernet device</PRE
></FONT
></TD
></TR
></TABLE
></P
><P
>Remember, you must assign unique callsign/ssid to each AX.25 port you create.
Create one entry for each AX.25 device you want to use, this includes KISS,
Baycom, SCC, PI, PT and Soundmodem ports. Each entry here will describe exactly
one AX.25 network device. The entries in this file are associated with the
network devices by the callsign/ssid. This is at least one good reason for
requiring unique callsign/ssid.</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN1183"
>6.3. Configuring AX.25 routing</A
></H2
><P
>You may wish to configure default digipeaters paths for specific
hosts. This is useful for both normal AX.25 connections and also IP
based connections. The <EM
>axparms</EM
> command enables
you to do this. Again, the <EM
>man</EM
> page offers a
complete description, but a simple example might be:</P
><P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
># /usr/sbin/axparms -route add radio VK2XLZ VK2SUT</PRE
></FONT
></TD
></TR
></TABLE
></P
><P
>This command would set a digipeater entry for
<TT
CLASS="LITERAL"
>VK2XLZ</TT
> via <TT
CLASS="LITERAL"
>VK2SUT</TT
> on the AX.25
port named <TT
CLASS="LITERAL"
>radio</TT
>.</P
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="x235.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x1194.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>A note on callsigns, addresses and things before we start</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Configuring an AX.25 interface for TCP/IP</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>