patch-2.1.6 linux/Documentation/networking/z8530drv.txt
Next file: linux/MAINTAINERS
Previous file: linux/Documentation/Configure.help
Back to the patch index
Back to the overall index
- Lines: 480
- Date:
Tue Oct 29 15:33:37 1996
- Orig file:
v2.1.5/linux/Documentation/networking/z8530drv.txt
- Orig date:
Fri Apr 12 09:49:29 1996
diff -u --recursive --new-file v2.1.5/linux/Documentation/networking/z8530drv.txt linux/Documentation/networking/z8530drv.txt
@@ -4,24 +4,22 @@
Internet:
=========
-ftp.ucsd.edu:/hamradio/packet/tcpip/incoming/z8530drv-2.0.dl1bke.real.tar.gz
+1. db0bm.automation.fh-aachen.de/incoming/dl1bke/z8530drv-utils-3.0.tar.gz
-[
- if you can't find it there, try:
- .../tcpip/linux/z8530drv-2.0.dl1bke.tar.gz
-
-]
+2. ftp.ucsd.edu:/hamradio/packet/tcpip/incoming/z8530drv-utils-3.0.tar.gz
+ If you can't find it there, try .../tcpip/linux/z8530drv-utils-3.0.tar.gz
and various mirrors (i.e. nic.switch.ch)
----------------------------------------------------------------------------
+Please note that the information in this document may be hopelessly outdated.
+-----------------------------------------------------------------------------
SCC.C - Linux driver for Z8530 based HDLC cards for AX.25
********************************************************************
- (c) 1993,1995 by Joerg Reuter DL1BKE
+ (c) 1993,1996 by Joerg Reuter DL1BKE <jreuter@lykos.oche.de>
portions (c) 1993 Guido ten Dolle PE1NNZ
@@ -37,7 +35,12 @@
1. if compiled as module: loading the module
2. Setup of hardware, MODEM and KISS parameters with sccinit
- 3. Attachment of each channel in the packet software
+ 3. Attach each channel to the Linux kernel AX.25 with "ifconfig"
+
+Unlike the versions below 2.4 this driver is a real network device
+driver. If you want to run xNOS instead of our fine kernel AX.25
+use a 2.x version (available from above sites) or read the
+AX.25-HOWTO on how to emulate a KISS TNC on network device drivers.
1.1 Loading the module
@@ -54,15 +57,14 @@
You should include the insmod in one of the /etc/rc.d/rc.* files,
and don't forget to insert a call of sccinit after that. It
-will read your
+will read your /etc/z8530drv.conf.
-
-1.2. /etc/z8530drv.rc
-=====================
+1.2. /etc/z8530drv.conf
+=======================
To setup all parameters you must run /sbin/sccinit from one
-of your rc.*-files. This has to be done BEFORE the start of
-NET or axattach. Sccinit reads the file /etc/z8530drv.rc
+of your rc.*-files. This has to be done BEFORE you can
+"ifconfig" an interface. Sccinit reads the file /etc/z8530drv.conf
and sets the hardware, MODEM and KISS parameters. A sample file is
delivered with this package. Change it to your needs.
@@ -222,7 +224,7 @@
gencfg 2 0x150 4 2 0 1 0x168 9 4915200
-will print a skeleton z8530drv.rc for the OptoSCC to stdout.
+will print a skeleton z8530drv.conf for the OptoSCC to stdout.
gencfg 2 0x300 2 4 5 -4 0 7 4915200 0x10
@@ -236,11 +238,11 @@
The channel definition is divided into three sub sections for each
channel:
-An example for /dev/scc0:
+An example for scc0:
# DEVICE
-device /dev/scc0 # the device for the following params
+device scc0 # the device for the following params
# MODEM / BUFFERS
@@ -254,10 +256,6 @@
# nrzi = 1k2 MODEM, G3RUH 9k6 MODEM
# nrz = DF9IC 9k6 MODEM
#
-rxbuffers 8 # number of rx buffers allocated
- # (option, default is 4)
-txbuffers 16 # number of tx buffers allocated
- # (option, default is 16)
bufsize 384 # size of buffers. Note that this must include
# the AX.25 header, not only the data field!
# (optional, defaults to 384)
@@ -283,9 +281,10 @@
sections IS important. The MODEM parameters are set with the first
recognized KISS parameter...
-Please note that you can initialize the board only once after boot.
-You can change all parameters but "mode" and "clock" later with the
-Sccparam program or through KISS. Just to avoid security holes...
+Please note that you can initialize the board only once after boot
+(or insmod). You can change all parameters but "mode" and "clock"
+later with the Sccparam program or through KISS. Just to avoid
+security holes...
(1) this divider is usually mounted on the SCC-PBC (PA0HZP) or not
present at all (BayCom). It feeds back the output of the DPLL
@@ -293,71 +292,56 @@
installed will normally result in keying the transceiver until
maxkey expires --- of course without sending anything (useful).
-
2. Attachment of a channel by your AX.25 software
=================================================
-2.1 KA9Q NOS derivates
-======================
+2.1 Kernel AX.25
+================
-When the linux has startup, the SCC driver has been initialized,
-you can attach the channels in your packet software. This is done
-by open the scc devices by using the attach asy command.
-The SCC-drivers emulates the scc devices as serial asy ports,
-this means e.g. that the baudrate can be set in the attach command.
+To set up an AX.25 device you can simply type:
+ ifconfig scc0 44.128.1.1 hw ax25 dl0tha-7
-Example Wampes:
-
-#############################################################################################
-# Wampes device attach
-# NOTE: Interfacename and the device must be the same!!
-# Usage: attach asy 0 0 slip|vjslip|ax25ui|ax25i|nrs|kissui <label> 0 <mtu> <speed> [ip_addr]
-#
-attach asy 0 0 kissi scc0 256 256 1200 # Attach SCC channel 1 in 1200 baud
-attach asy 0 0 kissi scc1 256 256 1200 # Attach SCC channel 2 in 1200 baud
-attach asy 0 0 kissui scc2 256 256 38400 # Attach SCC channel 3 in 38400 baud
-attach asy 0 0 kissui scc3 256 256 9600 # Attach SCC channel 4 in 9600 baud
-# ^^^^
-# for WAMPES 921229 use here: ax25
-#
+This will create a network interface with the IP number 44.128.20.107
+and the callsign "dl0tha". If you do not have any IP number (yet) you
+can use any of the 44.128.0.0 network. Note that you do not need
+axattach. The purpose of axattach (like slattach) is to create a KISS
+network device linked to a TTY. Please read the documentation of the
+ax25-utils and the AX.25-HOWTO to learn how to set the parameters of
+the kernel AX.25.
-Example JNOS:
+2.2 NOS, NET and TFKISS
+=======================
-############################################
-# JNOS device attach
-#
-attach asy scc0 0 ax25 scc0 256 256 1200
-attach asy scc1 0 ax25 scc1 256 256 1200
-attach asy scc2 0 ax25 scc2 256 256 300
-attach asy scc3 0 ax25 scc3 256 256 4800
-#
-#
+Since the TTY driver (aka KISS TNC emulation) is gone you need
+to emulate the old behaviour. The cost using these programs is
+that you probably need to compile the kernel AX.25, regardless
+if you actually use it or not. First setup your /etc/ax25/axports,
+for example:
+ 9k6 dl0tha-9 9600 255 4 9600 baud port (scc3)
+ axlink dl0tha-15 38400 255 4 Link to NOS
-It allows AX.25 communication without a TNC. Only a MODEM is
-needed. The parameters have the same meaning as in KISS mode.
-In fact, the AX.25 mode is emulating an extended KISS TNC, so
-the same commands can be used to set the parameters of the
-interface (see below).
-
-To be able to run fullduplex using an SCC in AX.25 mode, an
-external divider must be available, that divides the baudrate
-generator clock available on the TRxC pin by 32, and puts the
-resulting signal on the RTxC pint of the same channel of the SCC.
-Such a divider is not necessary for normal CSMA packet radio
-operation, but interrupt overhead is slightly reduced if you
-still install it.
+Now "ifconfig" the scc device:
-2.2 Kernel AX.25
-================
+ ifconfig scc3 44.128.1.1 hw ax25 dl0tha-9
+
+You can now axattach a pseudo-TTY:
+
+ axattach /dev/ptys0 axlink
+
+and start your NOS and attach /dev/ptys0 there. The problem is that
+NOS is reachable only via digipeating through the kernel AX.25
+(disasterous on a DAMA controlled channel). To solve this problem,
+configure "rxecho" to echo the incoming frames from "9k6" to "axlink"
+and outgoing frames from "axlink" to "9k6" and start:
-Well, as said before: The driver emulates a KISS TNC, so you
-can simply run
+ rxecho
- axattach -s 1200 /dev/scc0 DL1BKE
+Or simply use "kissbridge" coming with z8530drv-utils:
-to establish the link between kernel AX.25 and z8530drv.
+ ifconfig scc3 hw ax25 dl0tha-9
+ kissbridge scc3 /dev/ptys0
3. Adjustment and Display of parameters
@@ -369,7 +353,7 @@
Once a SCC channel has been attached, the parameter settings and
some statistic information can be shown using the param program:
-dl1bke-u:~$ sccstat /dev/scc0
+dl1bke-u:~$ sccstat scc0
Parameters:
@@ -391,43 +375,35 @@
Status:
-HDLC Z8530 Interrupts Queues
+HDLC Z8530 Interrupts Buffers
-----------------------------------------------------------------------
-Sent : 273 RxOver : 0 RxInts : 125074 RxQueue : 0
-Received : 1095 TxUnder: 0 TxInts : 4684 TxQueue : 0
-RxErrors : 1591 ExInts : 11776 NoSpace : 0
-KissErrors : 0 SpInts : 1503
+Sent : 273 RxOver : 0 RxInts : 125074 Size : 384
+Received : 1095 TxUnder: 0 TxInts : 4684 NoSpace : 0
+RxErrors : 1591 ExInts : 11776
+TxErrors : 0 SpInts : 1503
Tx State : idle
-Memory allocated:
-
-Buffer size: 384
-rx buffers : 4
-tx buffers : 8
-
The status info shown is:
Sent - number of frames transmitted
Received - number of frames received
RxErrors - number of receive errors (CRC, ABORT)
-KissErrors - number of KISS errors (should be zero...)
+TxErrors - number of discarded Tx frames (due to various reasons)
Tx State - status of the Tx interrupt handler: idle/busy/active/tail (2)
RxOver - number of receiver overruns
-TxUnder - number of transmitter underruns
+TxUnder - number of transmitter underruns
RxInts - number of receiver interrupts
TxInts - number of transmitter interrupts
EpInts - number of receiver special condition interrupts
SpInts - number of external/status interrupts
-RxQueue - number of received packets enqueued for this channel
-TxQueue - number of packets enqueued for Tx
-NoSpace - number of times the receiver buffer pool was found empty
-
+Size - maximum size of an AX.25 frame (*with* AX.25 headers!)
+NoSpace - number of times a buffer could not get allocated
An overrun is abnormal. If lots of these occur, the product of
baudrate and number of interfaces is too high for the processing
-power of you computer. If "Space" errors occur, specify a higher
-number of buffers in the "scc.h" file.
+power of you computer. NoSpace errors are unlikely caused by the
+driver or the kernel AX.25.
3.2 Setting Parameters
@@ -436,11 +412,8 @@
The setting of parameters of the emulated KISS TNC is done in the
same way in the SCC driver. You can change parameters by using
-the command param in NET or NOS
-
- param <iface> <paramname> <value>
-
-or use the program "sccparam":
+the kissparms program from the ax25-utils package or use the program
+"sccparam":
sccparam <device> <paramname> <decimal-|hexadecimal value>
@@ -621,32 +594,25 @@
Example: sccparam /dev/scc0 soft on
-slip:
- use slip encoding instead of kiss
-
- Example: sccparam /dev/scc1 slip on
-
-
-
4. Problems
===========
If you have tx-problems with your BayCom USCC card please check
the manufacturer of the 8530. SGS chips have a slightly
-different timing. Try Zilog... I have no information if this
-driver works with baudrates higher than 1200 baud. A solution is
-to write to register 8 instead to the data port, but this won't
-work with the ESCC chips *SIGH!*
+different timing. Try Zilog... A solution is to write to register 8
+instead to the data port, but this won't work with the ESCC chips.
+*SIGH!*
+
+A very common problem is that the PTT locks until the maxkeyup timer
+expires, although interrupts and clock source are correct. In most
+cases #define SCC_DELAY solves the problems. For more hints read
+the (pseudo) FAQ and the documentation coming with z8530drv-utils.
I got reports that the driver has problems on some 386-based systems.
(i.e. Amstrad) Those systems have a bogus AT bus timing which will
lead to delayed answers on interrupts. You can recognize these
problems by looking at the output of Sccstat for the suspected
port. See if it shows under- and overruns you own such a system.
-Perhaps it will help if you simplify the scc_isr() function a bit.
-You'll find a slightly faster version in the files scc_isr_intack
-or scc_isr_novec.
-
Delayed processing of received data: This depends on
@@ -654,127 +620,24 @@
- kernel profiling compiled or not
-- the rather slow receiver in tty_io.c
-
- a high interrupt load
- a high load of the machine --- running X, Xmorph, XV and Povray,
while compiling the kernel... hmm ... even with 32 MB RAM ... ;-)
+ Or running a named for the whole .ampr.org. domain on an 8 MB
+ box...
-- NET's speed itself.
-
+- using information from rxecho or kissbridge.
Kernel panics: please read to /linux/README and find out if it
really occurred within the scc driver.
-If you can't solve a problem, send me
+If you cannot solve a problem, send me
- a description of the problem,
- information on your hardware (computer system, scc board, modem)
- your kernel version
-- the output of sccstat /dev/scc# ("#" is the No. of the channel)
-- the settings of "speed", "clock" and "mode" for that channel
- in /etc/z8530drv.rc
-- your scc_config.h
-
-
-And always remember:
-The 1.1.* kernel series is for alpha tests -- use at your own risk ;-)
-The 1.2.* series should run reliable. This driver perhaps NOT!
-The 1.3.* kernel series is for alpha tests again... you get the idea!
-
-
-3. DRSI Boards
-==============
-
-I still can't test the DRSI board, but this configuration derived from
-the PE1CHL SCC driver configuration should work:
-
-An example of scc_config.h for
-
-One DRSI board installed:
-=========================
-
-/* gencfg 1 0x300 0x10 2 0 1 0 7 4915200 */
-
-/* file generated by $Id: gencfg.c,v 1.2 1994/11/29 21:42:24 JReuter Exp JReuter $ */
-
-#include <linux/scc.h>
-
-int Nchips = 1;
-io_port Vector_Latch = 0x0;
-int Ivec = 7;
-long Clock = 4915200;
-char Board = PA0HZP;
-int Option = 0;
-io_port Special_Port = 0x0;
-
-io_port SCC_ctrl[MAXSCC * 2] =
-{0x302, 0x300, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0};
-
-io_port SCC_data[MAXSCC * 2] =
-{0x303, 0x301, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0};
-
-/* set to '1' if you have and want ESCC chip (8580/85180/85280) support */
-
-/* Chip */
-/* ======== */
-int SCC_Enhanced[MAXSCC] = {0, /* ...one... */
- 0, /* ...two... */
- 0, /* ...three... */
- 0}; /* ...four... */
-
-#define VERBOSE_BOOTMSG 1
-#undef SCC_DELAY /* perhaps a 486DX2 is a *bit* too fast */
-#undef SCC_LDELAY /* slow it even a bit more down */
-#undef DONT_CHECK /* don't look if the SCCs you specified are available */
-
-
-
-Two boards installed:
-=====================
-
-/* file generated by $Id: gencfg.c,v 1.2 1994/11/29 21:42:24 JReuter Exp JReuter $ */
-
-#include <linux/scc.h>
-
-int Nchips = 2;
-io_port Vector_Latch = 0x0;
-int Ivec = 7;
-long Clock = 4915200;
-char Board = PA0HZP;
-int Option = 0;
-io_port Special_Port = 0x0;
-
-io_port SCC_ctrl[MAXSCC * 2] =
-{0x302, 0x300, 0x312, 0x310, 0x0, 0x0, 0x0, 0x0};
-
-io_port SCC_data[MAXSCC * 2] =
-{0x303, 0x301, 0x313, 0x311, 0x0, 0x0, 0x0, 0x0};
-
-/* set to '1' if you have and want ESCC chip (8580/85180/85280) support */
-
-/* Chip */
-/* ======== */
-int SCC_Enhanced[MAXSCC] = {0, /* ...one... */
- 0, /* ...two... */
- 0, /* ...three... */
- 0}; /* ...four... */
-
-#define VERBOSE_BOOTMSG 1
-#undef SCC_DELAY /* perhaps a 486DX2 is a *bit* too fast */
-#undef SCC_LDELAY /* slow it even a bit more down */
-#undef DONT_CHECK /* don't look if the SCCs you specified are available */
-
-
-*****************
-
-You m u s t use "clock dpll" in /etc/z8530drv.rc for operation,
-the on-board baudrate generator is not supported.
-
-*****************
-(mni tnx to Mike Bilow)
-
+- the output of cat /proc/net/z8530
4. Thor RLC100
==============
@@ -788,4 +651,4 @@
Joerg Reuter ampr-net: dl1bke@db0pra.ampr.org
AX-25 : DL1BKE @ DB0ACH.#NRW.DEU.EU
- Internet: jreuter@lykos.tng.oche.de
+ Internet: jreuter@lykos.oche.de
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov