z8530drv-utils/README100644 764 764 4003 6274237643 14026 0ustar jreuterjreuter SCC.C - Linux driver for Z8530 based HDLC cards for AX.25 Version 3.0 Kernel versions below 2.1.6 are not supported! For the English documentation read (sic!) doc/scc_eng.doc =============== (*) New features (relative to 2.4): - I removed the KISS TNC emulator (TTY driver) - Uses sk_buffer memory anagement - Doesn't have own queues anymore - Reduced overhead of /proc/net/z8530drv output - Streamlined quite a lot things - Invented brand new, never seen before bugs... ;-) (*) The driver does NOT support a simple BayCom MODEM. It needs a Z8530 based controller board. (*) It should at least work with the following Z8530-SCC boards and connected MODEMs - BayCom USCC - PA0HZP card with and without ESCC and/or external clock divider (up to 19200 baud (loopback)) - TCM3105 modem, 4k8 modem, 9k6 DF9IC modem (loopback), HAPN 4k8 modem (connected to a SCC board, of course!) The full copyright (-left?) notice is in Copying.Z8530DRV (please read it, too) ***** Kernel-Versionen unterhalb 2.1.6 werden nicht untersttzt! Die deutsche Version der Dokumentation befindet sich in doc/scc_ger.doc =============== Bitte VORHER LESEN! (*) Neu in Version 3.0: Siehe oben... (*) Der Treiber untersttzt kein BayCom-Einfachstmodem. Er bentigt eine Einsteck-Karte mit dem Z8530 SCC chip. (*) Der Treiber sollte zumindest mit den folgenden Z8530-SCC Karten und MODEMs zusammenarbeiten: - BayCom USCC - PA0HZP-Karte mit und ohne ESCC-Chip und/oder Vollduplex-Teiler (bis 19200 baud im Loopback getestet) - TCM 3105 modem, 4k8 modem, 9k6 DF9IC modem (loopback), HAPN 4k8 modem (natrlich an eine SCC-Karte angeschlossen!) Der vollstndige Copyright-Vermerk befindet sich in Copying.Z8530DRV (bitte auch lesen!) ----- Joerg Reuter ampr-net: dl1bke@db0pra.ampr.org AX-25 : DL1BKE @ DB0ACH.#NRW.DEU.EU Internet: jreuter@lykos.oche.de z8530drv-utils/Makefile100664 764 764 3223 6274240064 14602 0ustar jreuterjreuterVERSION = 3.0-1 DIRECTORY = z8530drv-utils KERNEL = `cat /proc/version | cut -d" " -f3` CCOPT = -O2 -m486 -Wall -Wstrict-prototypes # -DCONFIG_SCC_STANDALONE all: utils install utils: sccparam sccstat sccinit gencfg kissbridge sccparam: sccparam.c gcc ${CCOPT} sccparam.c -o $@ sccstat: sccstat.c gcc ${CCOPT} sccstat.c -o $@ sccinit: sccinit.c gcc ${CCOPT} sccinit.c -o $@ gencfg: gencfg.c gcc ${CCOPT} gencfg.c -o $@ kissbridge: kissbridge.c gcc ${CCOPT} kissbridge.c -o $@ install: install -g root -o root -m 0755 -s sccstat /sbin/sccstat install -g root -o root -m 0700 -s sccinit /sbin/sccinit install -g root -o root -m 0700 -s sccparam /sbin/sccparam install -g root -o root -m 0700 -s kissbridge /usr/sbin/kissbridge install -g root -o root -m 0644 z8530drv.conf /etc/z8530drv.conf.ex clean: rm -f *.o *~ doc/*~ distrib: ( cd .. && tar zcvvf z8530drv-utils-${VERSION}.tar.gz \ z8530drv-utils/README z8530drv-utils/Makefile \ z8530drv-utils/doc z8530drv-utils/*.c z8530drv-utils/*.h \ z8530drv-utils/sccinit z8530drv-utils/sccparam z8530drv-utils/sccstat \ z8530drv-utils/gencfg z8530drv-utils/kissbridge \ z8530drv-utils/z8530drv.conf z8530drv-utils/*.lsm) lharc: ( cd .. && lharc a z8530drv-utils-${VERSION}.lzh \ z8530drv-utils/README z8530drv-utils/Makefile \ z8530drv-utils/doc z8530drv-utils/*.c z8530drv-utils/*.h \ z8530drv-utils/sccinit z8530drv-utils/sccparam z8530drv-utils/sccstat \ z8530drv-utils/gencfg z8530drv-utils/kissbridge \ z8530drv-utils/z8530drv.conf z8530drv-utils/*.lsm) dep: gcc ${CCOPT} -M sccstat.c sccinit.c sccparam.c kissbridge.c gencfg.c >.depend ifeq (.depend,$(wildcard .depend)) include .depend endif z8530drv-utils/doc/ 40755 764 764 0 6274237526 13621 5ustar jreuterjreuterz8530drv-utils/doc/scc_eng.doc100664 764 764 54003 6274237117 16026 0ustar jreuterjreuter!! Version 3.0 !! !! Deutscher Text siehe scc_ger.doc (Vorsicht: veraltet!) !! !! Please note that the information in this document may be hopelessly !! outdated. !! !! BTW: REAL programmers don't document... !! SCC.C - Linux driver for Z8530 based HDLC cards for AX.25 ******************************************************************** Copyright 1993-1997 by Joerg Reuter DL1BKE portions (c) 1993 Guido ten Dolle PE1NNZ for the complete copyright notice see >> Copying.Z8530DRV << ******************************************************************** 0. Quickstart ============= To compile the utilities, type make dep ; make sccinit - reads /etc/z8530drv.conf and initializes the driver sccstat - shows the status of a channel sccparam - sets KISS parameters for a channel It will install these utilities in /sbin/ and an example configuration file as /etc/z8530drv.conf.ex. Rename this file to /etc/z8530drv.conf and edit it according to chapter 1.2. Please note that since version 3.0 of this driver the driver itself does not come with this package (hence the package name "z8530drv-*.*-utils.tar.gz"). ===== Now configure the Linux kernel to prepare the compilation of the driver. If you are using menuconfig or xconfig select: Network device support Radio network interfaces (CONFIG_NET_RADIO): "Y" Z8530 SCC driver for AX.25 (CONFIG_SCC): "Y" or "M" Do not forget to select other AX.25 devices you probably need, and do not forget to include the kernel AX.25 / NET/ROM / Rose stuff as well. Please read the AX.25-HOWTO for details. Save your new kernel configuration and either rebuild your kernel now (if you selected "Y" for CONFIG_SCC), or rebuild your modules (if you selected "M"). 1. Initialization of the driver =============================== To use the driver, 3 steps must be performed: 1. if compiled as module: loading the module 2. Setup of hardware, MODEM and KISS parameters with sccinit 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 ====================== (If you're going to compile the driver as a part of the kernel image, skip this chapter and continue with 1.2) Before you can use a module, you'll have to load it with insmod scc please read 'man insmod' that comes with modutils. 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 /etc/z8530drv.conf. 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 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. The file itself consists of two main sections. 1.2.1 configuration of hardware parameters ========================================== The hardware setup section defines the following parameters for each Z8530: chip 1 data_a 0x300 # data port A ctrl_a 0x304 # control port A data_b 0x301 # data port B ctrl_b 0x305 # control port B irq 5 # IRQ No. 5 pclock 4915200 # clock board BAYCOM # hardware type escc no # enhanced SCC chip? (8580/85180/85280) vector 0 # latch for interrupt vector special no # address of special function register option 0 # option to set via sfr chip - this is just a delimiter to make sccinit a bit simpler to program. A parameter has no effect. data_a - the address of the data port A of this Z8530 (needed) ctrl_a - the address of the control port A (needed) data_b - the address of the data port B (needed) ctrl_b - the address of the control port B (needed) irq - the used IRQ for this chip. Different chips can use different IRQs or the same. If they share an interrupt, it needs to be specified within one chip-definition only. pclock - the clock at the PCLK pin of the Z8530 (option, 4915200 is default), measured in Hertz board - the "type" of the board: SCC type value --------------------------------- PA0HZP SCC card PA0HZP EAGLE card EAGLE PC100 card PC100 PRIMUS-PC (DG9BL) card PRIMUS BayCom (U)SCC card BAYCOM escc - if you want support for ESCC chips (8580, 85180, 85280), set this to "yes" (option, defaults to "no") vector - address of the vector latch (aka "intack port") for PA0HZP cards. There can be only one vector latch for all chips! (option, defaults to 0) special - address of the special function register on several cards. (option, defaults to 0) option - The value you write into that register (option, default is 0) You can specify up to four chips (8 channels). If this is not enough, just change #define MAXSCC 4 to a higher value. Example for the BayCom USCC: ---------------------------- chip 1 data_a 0x300 # data port A ctrl_a 0x304 # control port A data_b 0x301 # data port B ctrl_b 0x305 # control port B irq 5 # IRQ No. 5 (#) board BAYCOM # hardware type (*) # # SCC chip 2 # chip 2 data_a 0x302 ctrl_a 0x306 data_b 0x303 ctrl_b 0x307 board BAYCOM An example for a PA0HZP card: ----------------------------- 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 A DRSI would should probably work with this: -------------------------------------------- (actually: two DRSI cards...) chip 1 data_a 0x303 data_b 0x301 ctrl_a 0x302 ctrl_b 0x300 irq 7 pclock 4915200 board DRSI escc no # # # chip 2 data_a 0x313 data_b 0x311 ctrl_a 0x312 ctrl_b 0x310 irq 7 pclock 4915200 board DRSI escc no Note that you cannot use the on-board baudrate generator off DRSI cards. Use "mode dpll" for clock source (see below). This is based on information provided by Mike Bilow (and verified by Paul Helay) The utility "gencfg" -------------------- If you only know the parameters for the PE1CHL driver for DOS, run gencfg. It will generate the correct port addresses (I hope). Its parameters are exactly the same as the ones you use with the "attach scc" command in net, except that the string "init" must not appear. Example: gencfg 2 0x150 4 2 0 1 0x168 9 4915200 will print a skeleton z8530drv.conf for the OptoSCC to stdout. gencfg 2 0x300 2 4 5 -4 0 7 4915200 0x10 does the same for the BayCom USCC card. I my opinion it is much easier to edit scc_config.h... 1.2.2 channel configuration =========================== The channel definition is divided into three sub sections for each channel: An example for scc0: # DEVICE device scc0 # the device for the following params # MODEM / BUFFERS speed 1200 # the default baudrate clock dpll # clock source: # dpll = normal halfduplex operation # external = MODEM provides own Rx/Tx clock # divider = use fullduplex divider if # installed (1) mode nrzi # HDLC encoding mode # nrzi = 1k2 MODEM, G3RUH 9k6 MODEM # nrz = DF9IC 9k6 MODEM # bufsize 384 # size of buffers. Note that this must include # the AX.25 header, not only the data field! # (optional, defaults to 384) # KISS (Layer 1) txdelay 36 # (see chapter 1.4) persist 64 slot 8 tail 8 fulldup 0 wait 12 min 3 maxkey 7 idle 3 maxdef 120 group 0 txoff off softdcd on slip off The order WITHIN these sections is unimportant. The order OF these 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 (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 (digital pll) as transmit clock. Using this mode without a divider 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 Kernel AX.25 ================ To set up an AX.25 device you can simply type: ifconfig scc0 44.128.1.1 hw ax25 dl0tha-7 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. 2.2 NOS, NET and TFKISS ======================= 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 Now "ifconfig" the scc device: 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: rxecho Or simply use "kissbridge" coming with this package: ifconfig scc3 hw ax25 dl0tha-9 kissbridge scc3 /dev/ptys0 There's a similar program called net2kiss coming with the AX.25 utilities which does basicly the same (but the source looks better than mine...) and is better documented. 3. Adjustment and Display of parameters ======================================= 3.1 Displaying SCC Parameters: ============================== Once a SCC channel has been attached, the parameter settings and some statistic information can be shown using the param program: dl1bke-u:~$ sccstat scc0 Parameters: speed : 1200 baud txdelay : 36 persist : 255 slottime : 0 txtail : 8 fulldup : 1 waittime : 12 mintime : 3 sec maxkeyup : 7 sec idletime : 3 sec maxdefer : 120 sec group : 0x00 txoff : off softdcd : on SLIP : off Status: HDLC Z8530 Interrupts Buffers ----------------------------------------------------------------------- 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 The status info shown is: Sent - number of frames transmitted Received - number of frames received RxErrors - number of receive errors (CRC, ABORT) 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 RxInts - number of receiver interrupts TxInts - number of transmitter interrupts EpInts - number of receiver special condition interrupts SpInts - number of external/status interrupts 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. NoSpace errors are not likely caused by the driver or the kernel AX.25. 3.2 Setting Parameters ====================== The setting of the channel access parameters is done in the same way as a KISS TNC. You can change parameters by using the kissparms program from the ax25-utils package or use the program "sccparam": sccparam You can change the following parameters: param : value ------------------------ speed : 1200 txdelay : 36 persist : 255 slottime : 0 txtail : 8 fulldup : 1 waittime : 12 mintime : 3 maxkeyup : 7 idletime : 3 maxdefer : 120 group : 0x00 txoff : off softdcd : on SLIP : off The parameters have the following meaning: speed: The baudrate on this channel in bits/sec Example: sccparam scc3 speed 9600 txdelay: The delay (in units of 10ms) after keying of the transmitter, until the first byte is sent. This is usually called "TXDELAY" in a TNC. When 0 is specified, the driver will just wait until the CTS signal is asserted. This assumes the presence of a timer or other circuitry in the MODEM and/or transmitter, that asserts CTS when the transmitter is ready for data. A normal value of this parameter is 30-36. Example: sccparam scc0 txd 20 persist: This is the probability that the transmitter will be keyed when the channel is found to be free. It is a value from 0 to 255, and the probability is (value+1)/256. The value should be somewhere near 50-60, and should be lowered when the channel is used more heavily. Example: sccparam scc2 persist 20 slottime: This is the time between samples of the channel. It is expressed in units of 10ms. About 200-300 ms (value 20-30) seems to be a good value. Example: sccparam scc0 slot 20 tail: The time the transmitter will remain keyed after the last byte of a packet has been transferred to the SCC. This is necessary because the CRC and a flag still have to leave the SCC before the transmitter is keyed down. The value depends on the baudrate selected. A few character times should be sufficient, e.g. 40ms at 1200 baud. (value 4) The value of this parameter is in 10ms units. Example: sccparam scc2 4 full: The full-duplex mode switch. This can be one of the following values: 0: The interface will operate in CSMA mode (the normal half-duplex packet radio operation) 1: Fullduplex mode, i.e. the transmitter will be keyed at any time, without checking the received carrier. It will be unkeyed when there are no packets to be sent. 2: Like 1, but the transmitter will remain keyed, also when there are no packets to be sent. Flags will be sent in that case, until a timeout (parameter 10) occurs. Example: sccparam scc0 fulldup off wait: The initial waittime before any transmit attempt, after the frame has been queue for transmit. This is the length of the first slot in CSMA mode. In fullduplex modes it is set to 0 for maximum performance. The value of this parameter is in 10ms units. Example: sccparam scc1 wait 4 maxkey: The maximal time the transmitter will be keyed to send packets, in seconds. This can be useful on busy CSMA channels, to avoid "getting a bad reputation" when you are generating a lot of traffic. After the specified time has elapsed, no new frame will be started. Instead, the trans- mitter will be switched off for a specified time (parameter min), and then the selected algorithm for keyup will be started again. The value 0 as well as "off" will disable this feature, and allow infinite transmission time. Example: sccparam scc0 maxk 20 min: This is the time the transmitter will be switched off when the maximum transmission time is exceeded. Example: sccparam scc3 min 10 idle This parameter specifies the maximum idle time in fullduplex 2 mode, in seconds. When no frames have been sent for this time, the transmitter will be keyed down. A value of 0 is has same result as the fullduplex mode 1. This parameter can be disabled. Example: sccparam scc2 idle off # transmit forever maxdefer This is the maximum time (in seconds) to wait for a free channel to send. When this timer expires the transmitter will be keyed IMMEDIATELY. If you love to get trouble with other users you should set this to a very low value ;-) Example: sccparam scc0 maxdefer 240 # 2 minutes txoff: When this parameter has the value 0, the transmission of packets is enable. Otherwise it is disabled. Example: sccparam scc2 txoff on group: It is possible to build special radio equipment to use more than one frequency on the same bad, e.g. using several receivers and only one transmitter that can be switched between frequencies. Also, you can connect several radios that are active on the same band. In these cases, it is not possible, or not a good idea, to transmit on more than one frequency. The SCC driver provides a method to lock transmitters on different interfaces, using the "param group " command. This will only work when you are using CSMA mode (parameter full = 0). The number must be 0 if you want no group restrictions, and can be computed as follows to create restricted groups: is the sum of some OCTAL numbers: 200 This transmitter will only be keyed when all other transmitters in the group are off. 100 This transmitter will only be keyed when the carrier detect of all other interfaces in the group is off. 0xx A byte that can be used to define different groups. Interfaces are in the same group, when the logical AND between their xx values is nonzero. Examples: When 2 interfaces use group 201, their transmitters will never be keyed at the same time. When 2 interfaces use group 101, the transmitters will only key when both channels are clear at the same time. When group 301, the transmitters will not be keyed at the same time. Don't forget to convert the octal numbers into decimal before you set the parameter. Example: (to be written) softdcd: use a software dcd instead of the real one... Useful for a very slow squelch. Example: sccparam scc0 soft 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... 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. Delayed processing of received data: This depends on - the kernel version - kernel profiling compiled or not - 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... - 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 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 cat /proc/net/z8530 4. Thor RLC100 ============== Mysteriously this board seems not to work with the driver. Anyone got it up-and-running? 5. Appendix =========== The fullduplex mode 3 works as follows: 1. The protocol layer sends a KISS command [PARAM_RTS] [TX_ON] to key up the transmitter. Then it sends the data frame(s) to the driver. When all frames are sent, the driver will send the KISS command [PARAM_HWEVENT] [HWEV_ALL_SENT]. The protocol layer may now key down the transmitter with [PARAM_RTS] [TX_OFF] or send more frames. Note that the maxkeyup timer may expire and key down the transceiver before everything is sent. 2. The driver sends [PARAM_HWEVENT] [HWEV_DCD_ON] or [PARAM_HWEVENT] [HWEV_DCD_OFF] if the status of the DCD changes. 3. The protocol layer can send [PARAM_HWEVENT] 0 the driver will reply with one of the DCD status messages. Note that KISS command doesn't necessarily mean that the enclosed data is SLIP encoded. In network driver mode the driver does not encode/decode SLIP, but it will still distinguish between a data and a command packet by the leading byte, just like in 'real' KISS mode. Note that this feature may vanish without a notice. 6. Thanks ========= Many thanks to everyone who contributed to this project with ideas, error reports and bug fixes. Special thanks to Linus Torvalds and Alan Cox for including the driver in the Linux standard distribution and their support. Joerg Reuter ampr-net: dl1bke@db0pra.ampr.org AX-25 : DL1BKE @ DB0ACH.#NRW.DEU.EU Internet: jreuter@lykos.oche.de z8530drv-utils/doc/scc_ger.doc100664 764 764 53650 6274237136 16042 0ustar jreuterjreuterGerman documentation. English text in scc_eng.doc !! NET/NOS steht fuer ka9q NET oder ka9q NOS und seinen !! Derivaten (WAMPES, NETCHL, JNOS, etc...) !! !! !! (Fehler-) Berichte zu dieser Version (z8530drv-3.0.dl1bke) bitte direkt !! an mich! !! !! !! Uebrigens: !! !! Dieser Treiber funktioniert bei mir mit !! !! - einer BayCom USCC bei 1200 und 9600 baud !! - einem 486DX2/66 !! - Linux Kernel AX.25 !! !! Berichte ueber andere Konfigurationen sind immer willkommen! !! !! DIESE DOKUMENTATION IST HOFFNUNGSLOS VERALTET !! ============================================= !! und bezieht sich auf Version 2.4 des Treibers. !! !! !! vy 73 de Joerg DL1BKE @ DB0ACH.#NRW.DEU.EU !! dl1bke@db0pra.ampr.org (smtp) !! dl1bke@lykos.oche.de ******************************************************************** Z8530 SCC kernel driver fr Linux --- Version 2.4 ******************************************************************** Copyright 1993-1997 by Jrg Reuter DL1BKE portions (c) 1993 Guido ten Dolle PE1NNZ Dieses Programm ist freie Software (free software); sie darf weiterverbreitet und/oder gendert werden unter Magabe der (modifizierten) GNU General Public License, welche als Teil des LinuX Kernel Quelltextes mitgeliefert wird. Dieses Programm wurde entwickelt in der Hoffnung, da es von Nutzen sei, jedoch OHNE JEDE GEWHRLEISTUNG; ebenso ohne jede wie auch immer implizierte Aussage der Nutzbarkeit fr einen bestimmten Zweck. Nhere Details befinden sich in der GNU Genereal Public License. Eine Kopie jener Nutzungslizenz sollte sich in englischer Sprache in /usr/src/linux/COPYING befinden. Bei diesem Programm handelt es sich um ein "Freizeitprodukt". Das Programm befindet sich noch in der ENTWICKLUNG, das heit: NUTZUNG AUF EIGENE GEFAHR! Der Autor lehnt jede Haftung fr die Folgen des Einsatzes dieser Software ab. Siehe auch Copying.Z8530DRV fr weitere Details. ******************************************************************** 0. Installation =============== Da Sie diesen Text lesen, haben Sie das Archiv ja schon erfolgreich ausgepackt :-) Sie sollten sich jetzt Gedanken darber machen, ob Sie den Treiber als Modul oder Teil des Kernels kompilieren wollen. Um ein Modul zu erstellen, rufen Sie make module auf. Es werden scc.c und die Utilities sccinit - liest /etc/z8530drv.conf und initialisiert den Treiber sccstat - gibt den Status eines Kanals aus sccparam - stellt die KISS-Parameter ein. kompiliert und installiert. Anmerkung: Make berschreibt eine schon vorhandene z8530drv.conf in /etc, bitte sichern Sie diese Datei vor dem Aufruf! 1. Initialisierung ================== Drei Schritte sind notwendig: 1. Laden des Moduls 2. Initialisieren des Treibers Die Hardwareparameter sind fuer die Initialisierung der SCCs und des Interrupt-Treibers notwendig. 1.1 Laden des Moduls ==================== Bevor auf ein Modul zugegriffen werden kann, mu es ersteinmal geladen werden. Dies geschieht mit insmod scc.o Lesen Sie bitte 'man insmod', die Manualpage ist Bestandteil der 'modutils'. Obiger Aufruf von 'insmod' sollte in eine der /etc/rc.d/rc.*-Dateien eingefgt werden, und anschlieend ein Aufruf von /sbin/sccinit erfolgen. 1.2 Initialisierung des Treibers ================================ Der Aufruf von /sbin/sccinit mu vor dem Start von NET oder 'ifconfig' erfolgen. Sccinit liest die Datei /etc/z8530drv.conf und stellt die Hardware, MODEM und KISS Paramter des Treibers ein. Eine Beispieldatei ist selbstverstndlich auch in diesem Archiv. Passen Sie es einfach an Ihre Situation an. /etc/z8530drv.conf besteht aus zwei Teilen. 1.2.1 Konfiguration der Hardware Parameter ========================================== Die Einstellung der Hardware-Parameter geschieht durch folgende Eintrge fr jeden Z8530: chip 1 data_a 0x300 # Datenport A ctrl_a 0x304 # Controlport A data_b 0x301 # Datenport B ctrl_b 0x305 # Controlport B irq 5 # IRQ Nr. 5 pclock 4915200 # Takt board BAYCOM # Welche Karte? escc no # Enhanced SCC chip? (8580/85180/85280) vector 0 # Adresse des INTACK-Latch special no # Adresse eines Special Function Register option 0 # Wert, der in dieses Register geschrieben # wird chip - Dient nur zur Trennung der Eintrge der Chips. (Parameter ohne Bedeutung). data_a - Adresse des Datenports A dieses Z8530 (bentigt) ctrl_a - Adresse des Control Port A (bentigt) data_b - Adresse des Datenports B (bentigt) ctrl_b - Adresse des Control Port B (bentigt) irq - Der verwendete IRQ fr diesen Chip. Unterschiedliche Chips knnen unterschiedliche IRQs oder einen gemeinsamen benutzen. Wenn sie sich einen IRQ teilen, braucht diese nur einmal angegeben werden. pclock - Der Takt am PCLK Pin des Z8530 gemessen in Hertz (optional) Die SCC-Chips bekommen in der Regel einen Takt von 4.9152 MHz. Falls bei Ihrer Karte gerade nicht: Hier eintragen. (Der Quarz der USCC schwingt auf 9.8304 MHz, die Frequenz wird aber noch durch zwei geteilt, d.h. an der SCC liegen 4.9152 MHz an) board - Der Typ der SCC-Karte, nach folgender Tabelle: SCC Typ Wert ------------------------------ PA0HZP SCC card PA0HZP EAGLE card EAGLE PC100 card PC100 PRIMUS-PC (DG9BL) card PRIMUS BayCom (U)SCC card BAYCOM escc - Sollen die erweiterten Mglichkeiten von ESCC chips (8580, 85180, 85280) ausgenutzt werden, tragen Sie hier "yes" ein. (Option, Defaults ist "no") vector - Adresse des Vector-Latch (alias "INTACK-Port") von PA0HZP Karten. Es kann nur einen geben! (Fr alle Chips) (Option, Default ist 0) special - Adresse des SFR einiger Karten (Option, Default ist 0) option - Der Wert, der in dieses Register geschrieben wird (Option, Default ist 0) Es knnen bis zu vier Chips (acht Kanle) definiert werden. Wenn dies nicht ausreicht, kann in scc.c #define MAXSCC 4 hochgesetzt werden. Beispiel fr die BayCom USCC: ----------------------------- chip 1 data_a 0x300 # data port A ctrl_a 0x304 # control port A data_b 0x301 # data port B ctrl_b 0x305 # control port B irq 5 # IRQ No. 5 (#) board BAYCOM # hardware type (*) # # SCC chip 2 # chip 2 data_a 0x302 ctrl_a 0x306 data_b 0x303 ctrl_b 0x307 board BAYCOM Ein Beispiel fr eine PA0HZP card: ---------------------------------- chip 1 data_a 0x153 ctrl_a 0x152 data_b 0x151 ctrl_b 0x150 irq 9 pclock 4915200 board PA0HZP vector 0x168 escc no # # # chip 2 data_a 0x157 ctrl_a 0x156 data_b 0x155 ctrl_b 0x154 irq 9 pclock 4915200 board PA0HZP vector 0x168 escc no Die PE1PET Karte ist angeblich PA0HZP kompatibel. Sie ist leider schlechter designed: Offensichtlich wird IORDY auf dem AT-Bus nicht verzgert, so da der Z8530 vom Treiber "berfahren" wird und sich aufhngt. Fr diese Karte mu SCC_DELAY in scc.c #define'd werden. Fr eine DRSI-Karte knnte es so aussehen: ------------------------------------------ (tatschlich wohl eher ZWEI Karten...) chip 1 data_a 0x303 ctrl_a 0x302 data_b 0x301 ctrl_b 0x300 irq 7 pclock 4915200 board DRSI escc no # # # chip 2 data_a 0x313 ctrl_a 0x312 data_b 0x311 ctrl_b 0x310 irq 7 pclock 4915200 board DRSI escc no Beachten Sie bitte, da Sie den Baudrate-Generator auf der Platine nicht nutzen knnen. Benutzen Sie stattdessen den internen Takt- generator des Z8530, also 'mode dpll' (siehe unten). (Basierend auf einer Information von Mike Bilow, und laut Paul Healy funktioniert es auch...) Hinweis: ======== Sind nur die Aufruf-Parameter fuer den PE1CHL SCC-Treiber unter DOS bekannt, so kann man mit gencfg die Portadressen berechnen. Der Aufruf entspricht dem "attach scc # init"-Kommando, es ist lediglich das "init" wegzulassen. Beispiele: gencfg 2 0x150 4 2 0 1 0x168 9 4915200 gibt ein "Skelet" fuer die OptoSCC-Karte nach stdout aus. gencfg 2 0x300 2 4 5 -4 0 7 4915200 0x10 macht das gleiche fuer die BayCom USCC Karte. Ich meine, es ist viel einfacher, z8530drv.conf zu editieren, als sich mit der Bedeutung der uebergebenen Parameter herumzuaergern. 1.2 Konfiguration der Kanle ============================ Jede Kanal-Definition ist in drei Abschnitte aufgeteilt. Fuer /dev/scc0 zum Beispiel: # DEVICE device /dev/scc0 # das Device fuer die folgenden Parameter # MODEM speed 1200 # die Default-Baudrate clock dpll # Welche Taktquelle wird benutzt: # dpll = normaler Halbduplex-Betrieb # external = das MODEM liefert eigenen Takt # divider = der sog. Vollduplex-Teiler wird # benutzt (1) mode nrzi # HDLC encoding Modus # nrzi = 1k2 MODEM, G3RUH 9k6 MODEM # nrz = DF9IC 9k6 MODEM # KISS (Layer 1) txdelay 36 # (siehe Abschnitt 1.4) persist 64 slot 8 tail 8 fulldup 0 wait 12 min 3 maxkey 7 idle 3 maxdef 120 group 0 txoff off softdcd on Die Reihenfolge INNERHALB der drei Abschnitte ist unwichtig. Die Reihenfolge DER drei Abschnitte aber nicht. Die MODEM-Parameter werden gesetzt, sobald das erste KISS-Kommando erkannt wird. Beachten Sie bitte, da Sccinit nur einmal nach dem Booten aufgerufen werden kann. Alle Parameter auer "mode" und "clock" knnen jedoch mit Sccparam bzw. ber KISS-Kommandos verndert werden. (1) Dieser Teiler ist normalerweise auf der SCC-Platine (PA0HZP) oder ueberhaupt nicht montiert. Er fuehrt das Ausgangssignal der digitalen PLL als Sendetakt zum Z8530 zurueck. Die Wahl dieses Modus ohne installierten Treiber fuehrt normalerweise dazu, dass die PTT bis zum Ablauf von Maxkey getastet wird -- ohne allerdings irgendetwas (sinnvolles) zu senden. 2. Ansprechen der Kanle durch die AX.25-Software ================================================= Der Treiber stellt aus Sicht der AX.25-Software einen KISS-TNC an einer seriellen Schnittstelle da. 2.1 KA9Q-Derivate ================= !! Siehe englische Doku !! Es ist also AX.25 ohne TNC moeglich. Lediglich ein MODEM wird gebraucht, wobei auf der BayCom USCC schon drei auf der Platine sind. Fuer Vollduplexbetrieb ist uebrigens ein externer Teiler noetig, der den Takt des Baudratengenerators TRxC und an RTxC des selben Kanals legt. Dieser Teiler ist fuer normalen (CSMA) Betrieb nicht noetig, reduziert dort allerdings das Interrupt-Aufkommen etwas. (Die USCC hat diesen Teiler nicht, die PA0HZP Karte hat ihn in der Regel bestueckt, was einer von zwei Gruenden ist, warum der PE1CHL- Treiber mit der USCC so ohne weiteres nicht zusammenarbeitet. Der andere Grund ist die Freischaltung des CTS-Interrupts, welcher zu einem Totalabsturz des Rechners fuehrt.) 2.2 Kernel-AX.25 ================ Der Treiber arbeitet als Netzwerk-Treiber mit dem Linux Kernel AX.25 zusammen. Verbunden wird das Interface mit dem Kernel-AX.25 einfach durch ifconfig scc0 dl0tha.ampr.org hw ax25 DL0THA Natrlich ist noch einiges an Konfiguration fr das Kernel-AX.25 notwendig, lesen Sie dazu bitte die entsprechende Dokumentation. Achtung bei Verwendung des Treibers als TTY-Treiber im Zusammenhang mit axattach: Es mu der SLIP-Treiber in den Kernel mit einkompiliert werden. 3. Aenderung der SCC-Parameter ============================== 3.1 SCC Parameter: ------------------ Die KISS-Parameter koennen genauso veraendert werden wie bei einem normalen KISS-TNC, und zwar durch Verwendung des "param"-Befehls in NET/NOS. Es gibt noch die Moeglichkeit, die Parameter ueber das Programm Sccparam von aussen zu setzen (mehr UN*X like) Aufruf des param-Kommandos in NET/NOS: param Aufruf des Programms Sccparam: sccparam wobei den SCC-Port bezeichnet scc0, scc1, ... einen der Namen, die unten aufgefuehrt sind Wert des Parameters Folgende Parameter sind veraenderlich: Parameter Wert --------------------- speed 1200 txdelay 36 persist 128 slot 16 tail 8 fulldup 0 wait 48 maxkey 7 min 3 idle 30 maxdefer 120 group 193 txoff off softdcd on --------------------- Die Paramter haben folgende Bedeutung: txdelay: Die Verzoegerung (in 10ms) von Tastung der PTT bis zur Aussendung des ersten Bytes. Wird 0 angegeben, wartet der Treiber auf ein CTS vom MODEM --- allerdings nicht bei der BayCom USCC --- das setzt natuerlich einen Timer auf dem MODEM voraus, der die Verzoegerung erzeugt. Ein normaler Wert ist 20-36 persist: Der Treiber generiert, sobald der Kanal frei ist, vor jeder Aussendung eine Zufallszahl zwischen 0 und 255 und vergleicht diese mit der Persistance. Ist die Zufallszahl kleiner, wird die PTT getastet. Ein guter Persistance-Wert liegt zwischen 40 und 60 bei maessigem Betrieb, oder sogar niedriger. Bei DAMA-Betrieb sollte dieser Parameter auf 255 stehen. slot: Ist der Zufallswert groesser als persist, wartet der Treiber die Slottime ab, prueft dann wieder DCD und bildet einen neuen Zufallswert... Dieser Parameter wird auch in 10ms angegeben, ein guter wert liegt zwischen 20 und 30. tail: Dies ist die Verzoegerung (in 10ms), mit der die PTT nach dem letzten Datenbyte noch getastet bleibt. Dies ist notwendig, weil ja noch der CRC und ein Flag gesendet werden muessen. Der Wert haengt von der Baudrate und der Abfallverzoegerung des des Tranceivers ab. Der Standardwert in der Tabelle ist fuer 1200 baud brauchbar. full: Damit kann man die Auswertung der DCD umschalten. Fuer echten Vollduplex-Betrieb kann dieser Parameter auf eins oder zwei stehen, sonst immer auf Null (auch auf sog. "Duplex"-Digis!) [Ausnahme: DAMA] Die Werte bedeuten: 0: CSMA-Betrieb (normal) 1: DCD wird nicht ausgewertet, der Sender wird nach dem letzten Frame wieder abgeschaltet 2: wie 1, nur dass der Sender getastet bleibt, bis Idle abgelaufen ist 3: wie 2, nur dass der Sender getastet bleibt, bis via ioctl()- oder KISS-Kommando "PARAM_RTS 0" die PTT wieder abgeschaltet wird. wait: Wartezeit, nach der ein neu in die Sendeliste eingehaengtes Frame gesendet wird (in 10ms), damit evtl. unmittelbar folgende Frames im gleichen Durchgang gesendet werden koennen. (DWAIT) min: Wenn Maxkeyup (s.u.) abgelaufen ist, ist dies die Zeit (in s), die mindestens bis zu einem neuen Sendeversuch gewartet wird. maxkey: Maxkeyup ist die Zeit, die der Sender maximal getastet ist (in s). Verwendung als "watchdog" um beim Absturz des SCC-Chips den Uebertragungskanal nicht zu lange zu blockieren. (Auch in den Vollduplex-Modi). Sollte aus verstaendlichen Gruenden nicht Null werden. Kann abgeschaltet werden. idle: Dieser Parameter bestimmt die maximale Leerlaufzeit im Vollduplex-Modus 2. Danach wird der Sender abgschaltet. Ist dieser Parameter 0, entspricht dies fulldup=1. Kann abgeschaltet werden, d.h. der Sender laeuft dann bis Ablauf von maxkeyup weiter maxdefer: Ist die maximale Zeit, die auf einen freien Kanal gewartet wird. Laeuft der Timer ab, wird sofort gesendet (Bitte keinen Unfug damit treiben. Dies ist ein Timer, der einen Speicherberlauf verhindern soll, nicht andere Leute rgern) txoff: Damit laesst sich die PTT abschalten :-) group: Dies ist fuer mehrere Baudraten auf einer Frequenz nuetzlich, es laessen sich die Aussendungen der einzelnen Ports gegenseitig verriegeln. Moeglich ist dies uebrigens nur im CSMA-Betrieb... Die Erklaerung ist etwas kompliziert: Der Parameter ist ein Byte. Es setzt sich wie folgt zusammen: mgg sei eine eine Oktal-Zahl. Dann sind die letzten beiden Stellen ("gg") die Gruppen-Nummer, die erste Stelle (m) ergibt die Sendeerlaubnis fuer diesen Port. Hierzu wird der Zustand der Ports mit der gleichen Gruppen-Nummer herangezogen. m = 0: Zugriff auf die Frequenz unbeschraenkt m = 1: Zugriff nur wenn kein DCD auf einem der anderen Ports dieser Gruppe. m = 2: Zugriff nur wenn kein anderer Port dieser Gruppe sendet m = 3: Zugriff nur wenn keiner DCD meldet und auch keiner sendet in dieser Gruppe Beispiele: param scc0 group 301 -- scc0 ist in Gruppe 1 und sendet nur, wenn scc1 nichts empfaengt und auch nicht sendet param scc1 group 101 -- scc1 ist auch in Gruppe 1 und sendet solange scc0 nichts empfaengt, "doppelt" aber evtl. mit der Aussendung von scc0 param scc2 group 211 -- scc2 sendet, wenn scc3 nicht sendet, kuemmert sich aber nicht um DCD von scc3 param scc3 group 011 -- scc3 sendet unabhaengig von scc2 param scc4 group 000 -- scc4 sendet unabhaengig von anderen softdcd: es ist moeglich, eine Software-DCD zu verwenden. 3.2 SCC Status: --------------- Mit sccstat /dev/scc0 wird neben der aktuellen Einstellung der oben beschriebenen Parameter der Status des SCC-Treibers fuer diesen Port angezeigt: Status: HDLC Z8530 Interrupts Queues ----------------------------------------------------------------------- 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 Tx State : idle Memory allocated: Buffer size: 384 rx buffers : 4 tx buffers : 8 ...bedeutet: Sent = Anzahl der gesendeten Frames Received = Anzahl der empfangenen Frames RxErrors = Anzahl der Empfangsfehler (CRC, ABORT) KissErrors = Anzahl fehlerhaft an den Treiber gesendeter KISS-Frames TxState = Status der Tx-Sendeschleife: idle - Schleife leer busy - bin mit DWait/Slottime/TxDelay/Tail beschftigt active - daten werden gesendet ? - darf nicht erscheinen RxOver = Anzahl der Empfangsueberlaeufe TxUnder = Anzahl der Sender-Unterlaeufe Rxints = Anzahl der Empfangsinterrupts Txints = Anzahl der Senderinterrupts Exints = Anzahl der Externer-Status-Ints (ABORT, CTS, DCD) Spints = Anzahl der "special condition" Interrupts (Frame-Ende, Rx-Ueberlauf) RxQueue = Anzahl der in der Warteschleife stehenden Emfangspackete TxQueue = Anzahl der in der Warteschleife stehenden Sendepackete NoSpace = Anzahl der vergeblich angeforderten Puffer Buffer size= Puffergre rx buffers = Anzahl der Empfangspuffer tx buffers = Anzahl der Sendepuffer Ueber/Unterlaeufe duerfen nicht auftreten. Ist dies doch der Fall, dann ist der Computer fuer die Anzahl der Ports zu langsam... 2. Probleme =========== 2.1 Womit man sonst noch spielen kann ===================================== In linux/drivers/char/scc.c finden sich noch einige DEFINES, die man bei Problemen ndern kann... #define MAXSCC 4 /* number of max. supported chips */ #define TPS 25 /* scc_timer(): Ticks Per Second */ #undef SCC_DELAY /* perhaps a 486DX2 is a *bit* too fast */ #undef SCC_LDELAY /* slow it even a bit more down */ MAXSCC gibt die maximale Anzahl an SCC-Chips an. Werden Karten verwendet, die mehr als 4 Z8530 benutzen, bzw. mehrere Karten benutzt, ist dieser Wert entsprechend anzupassen. SCC_DELAY und SCC_LDELAY koennen bei Timing-Problemen (PE1PET-Karte) definiert werden. Bei SCC_DELAY werden statt den Makros inb()/outb() die Makros inb_p()/outb_p() verwendet, bei SCC_LDELAY werden in die Funktionen OutReg() und InReg() ein paar udelay(5) eingestreut. Bei der BayCom-USCC ist dies nicht notwendig, da die Karte selbst IORDY verzgert. 2.2 Andere Probleme =================== Bei Tx-Problemen mit der BayCom USCC bitte ueberpruefen, von welchem Hersteller die SCC-Chips kommen. SGS Chips haben ein etwas anderes Timing. Versuche es dann mit Zilog-Typen. Ich habe Berichte erhalten, da es bei einigen 386er-Systemen zu Over- und Underruns kommen kann. Diese Systeme haben ein inkompatibles AT-Bus-Timing. In diesem Fall mit SCC_DELAY oder SCC_LDELAY spielen. Das Problem, da Empfangsdaten nur verzgert durch das aufrufende Programm (Wampes, KA9Q-net, PE1CHL-net) bearbeitet werden, liegt begrndet in 1. Der Kernel-Version 2. Eingeschalteter Debugging-Code bei der Kompilierung des Kernels (verlangsamt malloc() und free() erheblich!) 3. Die relativ langsame bergabe der Daten an das lesende Programm durch tty_io.c (je nach Kernel-Version) 4. Hohe Interrupt-Last des Rechners 5. Hohe Belastung des Rechners mit etlichen anderen Prozessen (z.B. XFree86, mit Xmorph und XV und noch Povray, whrend der Kernel gerade neu kompiliert wird. Das kann selbst mit 32 MB RAM nicht gutgehen!) 6. NETs Geschwindigkeit selbst. Bei unlsbaren Problemen bitte Mail an mich mit den folgenden Angaben: - eine Beschreibung des Problems - Informationenen zur Hardware (Computer, SCC-Karte, MODEMs) - Kernel Version - Die Ausgabe von sccstat -p scc# (wobei fr "#" die Nummer des fraglichen Kanals eingesetzt werden mu) Ich mchte auerdem noch einmal daran erinnern, da die Kernel- Versionen der Reihe 1.3.* Alpha-Versionen sind. Benutzung auf eigene Gefahr. Mir liegen Informationen vor, da der Treiber auch mit der BayCom USCC Karte bei 9600 baud funktioniert. Ich kann das hier leider nur im loopback nachprfen. Text: pe1nnz et al. (freie) Uebersetzung, Kapitel 2 und Tippfehler: dl1bke -- Joerg Reuter ampr-net: dl1bke@db0pra.ampr.org AX-25 : DL1BKE @ DB0ACH.#NRW.DEU.EU Internet: jreuter@lykos.tng.oche.de z8530drv-utils/doc/FAQ100664 764 764 11635 6235670552 14275 0ustar jreuterjreuterHere are some answers to frequently asked questions regarding z8530drv... vy 73, Joerg Reuter ampr-net: dl1bke@db0pra.ampr.org AX-25 : DL1BKE @ DB0ACH.#NRW.DEU.EU Internet: jreuter@lykos.oche.de * I have a question... Read the documentation included in this package, read this FAQ. If your problems cannot be solved, feel free to ask me. If you find something wrong, _tell me_, please don't complain to others. Please report bugs, I'll fix them as soon as possible. * I tried to compile version 3.0 of this driver with Linux kernel 1.3.x or prior and it failed. Try Linux kernel version 2.0.0 or higher. Note that some things may change in 2.1.x and the driver may or may not compile... * I tried the utilities included in your package with the driver included in the Linux 2.0.0 (or prior) kernel source. They don't work. Due to the misdesign of the I/O address range I had to change one important structure. Since this broke the old utilities anyway, I fixed some other things as well. Every new version new utilities. SIGH. Always use the utilities with the driver of the same version. * Sccinit complains about a missing /etc/z8530drv.rc but it's there... No, sccinit complains about /etc/z8530drv.conf missing. Just rename /etc/z8530drv.rc to /etc/z8530drv.conf. * Sccinit complains about "slip", "rxbuffers" and/or "txbuffers" unsupported now... Ignore it or remove the entries in /etc/z8530drv.conf * Sccstat shows that I've got NoSpace errors. What's that? This happens if the kernel runs out of network buffers. It is very unlikely that z8530drv or the kernel AX.25 is responsible for this, your machine is probably under very heavy network load. * Sccstat shows TxErrors. What exactly does this mean? The timer 'maxkeyup' expired. If you are using IP in datagram mode you should increase TCP IRTT (see 'man route') and perhaps 'maxkeyup', too. * Maxkeyup behaves funny, the first time the PTT stays up for 'maxkeyup' seconds and the driver resumes transmission after 'mintime' correctly, the second time it goes down after few seconds, starts transmission again immediately and keys down after three seconds again. Avoid the driver running into transmission timeouts, if possible (see last question). This phenomena is a bit complicated to explain, basicly the hardware watchdog for RTS on your MODEM interferes with the software watchdog. It is not for the short drop of the PTT, though. But: something is wrong with the timing parameters of the network or link layer if you see this behaviour. * The driver does not find the SCC ports. Check the command and data register addresses. * The register addresses are correct, it still does not find the ports. You are using a PE1PET card, right? This, and some other concepts, "forget" to delay the IORDY signal, thus the driver must insert some wait states itself. #define SCC_DELAY in scc.c. This is not defined by default, I am not willing to do the dirty work for lazy hardware designers. * Help, the driver finds my card, but it won't generate interrupts. Are you sure you specified the right IRQ? Have you tried to #define SCC_DELAY? * On transmission the PTT remains keyed for maxkeyup seconds, sccstat shows exactly one tx interrupt. Receive is okay. Check the "clock" entry in /etc/z8530drv.conf. You probably specified the wrong clock source. Try "DPLL" for a start. If this doesn't help, #define SCC_DELAY in scc.c. * The PTT only occasionally remains keyed for maxkeyup seconds, everything else seems to be okay, apart from some transmission underruns This appears to be a bug of the Z8530. It sometimes doesn't generate the ABORT interrupt when an underrun occurs. * Other stations sometimes have problems to decode my frames. Under DOS everything is okay. Sccstat shows nothing special. Increase txdelay and tailtime by 1 (10 msec). This has technical reasons. Linux has a timer granulity of 10 msec (at least for i386 architectures), thus setting "tailtime" to 10 msec means the timer routine gets called with the next timer tick, happens most likely before the 10 millisecods have expired. * Axattach complains about "TIOCSETD: Invalid argument" Sorry, the support for the KISS TNC emulation is gone. You don't need it for kernel AX.25 anyway. Just set up your interface with ifconfig scc0 44.128.20.107 hw ax25 dl0xxx * Huh? I insmod'ed the driver, sccinit set it up without complaints, sccstat shows statistics, but accessing /dev/scc0 gives a ENODEV error. As I said, there is no KISS TNC emulation anymore. If you really do not want to benefit from Linux kernel AX.25 ;-) and still want to run xNOS, you can use kissbridge to link an AX.25 network device to a pseudo TTY. Note that you'll have to compile kernel AX.25 to use it. Or you can try version 2.4 of z8530drv. z8530drv-utils/doc/Copying.Z8530DRV100644 764 764 7623 6274237175 16365 0ustar jreuterjreuter ******************************************************************** * SCC.C - Linux driver for Z8530 based HDLC cards for AX.25 * ******************************************************************** Version 3.0 General notes ============= (or: my point of view) The driver and the programs in this archive are UNDER CONSTRUCTION. The code is very likely to fail, and so your kernel could --- even a whole network. So you'd better follow some advices: 1. Do not use it on systems which run processes vital for human life or are connected to such systems. 2. Do not use it on systems containing any important data, or connected to systems with such data. 3. If you connect a radio transmitter to your SCC card (that's what I suppose), remember that YOU are responsible for any transmission. Well, it's YOUR computer, not mine. It's YOUR data, not mine. I warned you... (*) This driver is intended for Amateur Radio use. If you are running it for commercial purposes, please drop me a note. I am nosy... ...BUT: ! You m u s t recognize the appropriate legislations of your country ! ! before you connect a radio to the SCC board and start to transmit or ! ! receive. The GPL allows you to use the d r i v e r, NOT the RADIO! ! (and that is A FACT, not someone's point of view!) For non-Amateur-Radio use please note that you might need a special allowance/licence from the designer of the SCC Board and/or the MODEM. Also read the disclaimer of warrenty and fitness, please... Copyright notice ================ ******************************************************************** * SCC.C - Linux driver for Z8530 based HDLC cards for AX.25 * ******************************************************************** ******************************************************************** Copyright 1993, 1997 by Joerg Reuter DL1BKE portions (c) 1993 Guido ten Dolle PE1NNZ ******************************************************************** The driver and the programs in this archive are UNDER CONSTRUCTION. The code is likely to fail, and so your kernel could --- even a whole network. This driver is intended for Amateur Radio use. If you are running it for commercial purposes, please drop me a note. I am nosy... ...BUT: ! You m u s t recognize the appropriate legislations of your country ! ! before you connect a radio to the SCC board and start to transmit or ! ! receive. The GPL allows you to use the d r i v e r, NOT the RADIO! ! For non-Amateur-Radio use please note that you might need a special allowance/licence from the designer of the SCC Board and/or the MODEM. This program is free software; you can redistribute it and/or modify it under the terms of the (modified) GNU General Public License delivered with the LinuX kernel source. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should find a copy of the GNU General Public License in /usr/src/linux/COPYING; ******************************************************************** ...If you find any portions of the code that are copyrighted to you, and you don't want to see in here, please send me a private (!) message to my internet site. I will change it as soon as possible. Please don't flame to the tcp-group or anywhere else. Thanks! Joerg Reuter ampr-net: dl1bke@db0pra.ampr.org AX-25 : DL1BKE @ DB0ACH.#NRW.DEU.EU Internet: jreuter@lykos.oche.de (*) Gert Doering, author of Mgetty + Sendfax, on his software: "Use it at your own risk, there is n o warranty. If it erases all the data on your hard disk, damges your hardware, or kills your dog, that is entirely your problem." ----------------- z8530drv-utils/gencfg.c100664 764 764 14440 6235670553 14571 0ustar jreuterjreuter/* gencfg.c - Generate z8530drv.conf from PE1CHL driver params Copyright 1994-1996, by Joerg Reuter dl1bke@lykos.oche.de This program is intended for Amateur Radio use. If you are running it for commercial purposes, please drop me a note. I am nosy... ! You m u s t recognize the appropriate legislations of your country ! ! before you connect a radio to the SCC board and start to transmit or ! ! receive. The GPL allows you to use the d r i v e r, NOT the RADIO! ! For non-Amateur-Radio use please note that you might need a special allowance/licence from the designer of the SCC Board and/or the MODEM. This program is free software; you can redistribute it and/or modify it under the terms of the (modified) GNU General Public License delivered with the LinuX kernel source. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should find a copy of the GNU General Public License in /usr/src/linux/COPYING; */ #include #include #include #include #include #ifdef CONFIG_SCC_STANDALONE #include "scc.h" #else #include #endif #define RCS_ID "$Id: gencfg.c,v 1.4 1995/11/17 01:11:27 jreuter Exp jreuter $" /* yes, it IS awkward... */ int devices, chan, address, spacing, Aoff, Boff, Dataoff, intack, vector, hdwe, param, sp, chip; char *board; int cs(unsigned char *s) { unsigned char k[40]; int x; strcpy(k, s); for (x = 0; k[x]; x++) k[x] = toupper(k[x]); s = k; if (*s == '0') { s++; if (*s == 'X') { s++; sscanf(s,"%x",&x); return x; } return 0; } if (!strcmp(s,"PA0HZP") || !strcmp(s,"SCC")) return PA0HZP; if (!strcmp(s,"EAGLE")) return EAGLE; if (!strcmp(s,"PC100")) return PC100; if (!strcmp(s,"PRIMUS")) return PRIMUS; if (!strcmp(s,"DRSI")) return DRSI; if (!strcmp(s,"BAYCOM")) return BAYCOM; return atoi(s); } int main (int argc, char **argv) { long unsigned clock; if (argc < 10) { fprintf(stderr,"usage: gencfg
\n"); fprintf(stderr," [hdwe] [param]\n\n"); if (argc < 2) { fprintf(stderr,": number of chips installed\n"); fprintf(stderr,"
: base address of the first SCC chip\n"); fprintf(stderr,": the spacing between the SCC chip base addresses\n"); fprintf(stderr," : offset from a chip's base address to its channel A ctrl register\n"); fprintf(stderr," : offset from a chip's base address to its channel B ctrl register\n"); fprintf(stderr,": offset from each channel's ctrl register to its data register\n"); fprintf(stderr," : the address of the INTACK Vector port. If none, specify 0\n"); fprintf(stderr," : the CPU interrupt vector for all connected SCCs\n"); fprintf(stderr," : the clock frequency (PCLK) of all SCCs in Hertz\n"); fprintf(stderr,"[hdwe] : (optional) hardware type\n"); fprintf(stderr,"[param] : (optional) extra param\n\n"); fprintf(stderr,"Notes:\n"); fprintf(stderr,"(1) use this program ONLY if you configured the PE1CHL SCC driver under\n"); fprintf(stderr," DOS before. It is much EASIER to edit /etc/z8530drv.conf and setup the\n"); fprintf(stderr," needed params there.\n\n"); fprintf(stderr,"(2) all parameters must be specified in hex (0x300) or decimal (10).\n\n"); fprintf(stderr,"(3) means the clock on the PClk pin. If you are using a DRSI\n"); fprintf(stderr," card set the \"clock\" parameter in /etc/z8530drv.conf to \"external.\"\n\n"); } fprintf(stderr,"expample for the PA0HZP card:\n"); fprintf(stderr,"gencfg 2 0x150 4 2 0 1 0x168 9 4915200 0 0 >z8530drv.conf\n\n"); return 1; } devices = cs(argv[1]); address = cs(argv[2]); spacing = cs(argv[3]); Aoff = cs(argv[4]); Boff = cs(argv[5]); Dataoff = cs(argv[6]); intack = cs(argv[7]); vector = cs(argv[8]); clock = atol(argv[9]); if (argc > 10) hdwe = cs(argv[10]); else hdwe = 0; if (argc > 11) param = cs(argv[11]); else param = 0; switch(hdwe) { case PA0HZP: board = "PA0HZP"; sp = 0; break; case EAGLE: board = "EAGLE"; sp = address + 4; break; case PC100: board = "PC100"; sp = address; break; case PRIMUS: board = "PRIMUS"; sp = address + 4; break; case DRSI: board = "DRSI"; sp = address + 7; break; case BAYCOM: board = "BAYCOM"; sp = 0; break; default: sprintf(board,"0x%2.2x", hdwe); sp = 0; } printf("# z8530drv.conf\n"); printf("# file generated by %s\n#\n#\n", RCS_ID); for (chip = 0; chip < devices; chip++) { printf("chip %d\n", chip+1); printf("data_a 0x%3.3x\n", address + spacing*chip + Aoff + Dataoff); printf("data_b 0x%3.3x\n", address + spacing*chip + Boff + Dataoff); printf("ctrl_a 0x%3.3x\n", address + spacing*chip + Aoff); printf("ctrl_b 0x%3.3x\n", address + spacing*chip + Boff); printf("irq %d\n", vector); printf("pclock %lu\n", clock); printf("board %s\n", board); if (intack) printf("vector 0x%3.3x\n", intack); if (sp) { printf("special 0x%3.3x\n", sp); printf("option 0x%2.2x\n", param); } printf("escc no\n#\n#\n#\n"); } printf("# the following is a skelleton of the MODEM and KISS parameter\n"); printf("# definitions. Adjust to your situation.\n"); printf("#\n"); for (chan = 0; chan < devices * 2; chan++) { printf("device /dev/scc%d\n", chan); printf("speed 1200\t# baudrate\n"); printf("clock dpll\t# clock source\n"); printf("mode nrzi\t# NRZI or NRZ\n"); printf("#\n"); printf("txdelay 36\n"); printf("persist 64\n"); printf("slot 8\n"); printf("tail 8\n"); printf("fulldup 0\n"); printf("wait 12\n"); printf("min 3\n"); printf("maxkey 7\n"); printf("idle 3\n"); printf("maxdef 120\n"); printf("group 0\n"); printf("txoff off\n"); printf("softdcd on\n"); printf("#\n#\n#\n"); } printf("# EOF\n"); return 0; } z8530drv-utils/kissbridge.c100644 764 764 7666 6235733362 15456 0ustar jreuterjreuter/* $Id: kissbridge.c,v 1.2 1996/08/08 20:04:46 jreuter Exp jreuter $ */ /* KISSbridge --- emulates a KISS TNC for access to a AX.25 Network Device * * Copyright (c) 1996 Jrg Reuter * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * */ #include #include #include #include #include #include #include #include #include #include #include #define MAXMTU 1024 /* maximum frame length we support */ char *ax25_dev; #define KISS_FEND 192 #define KISS_FESC 219 #define KISS_TFEND 220 #define KISS_TFESC 221 enum KISS_states {KISS_START, KISS_DATA, KISS_ESC}; void kiss_encode(int fd, unsigned char *buf, int len) { int cnt, cnt2; unsigned char mybuf[2*MAXMTU+2]; if (len > MAXMTU) return; cnt2 = 0; mybuf[cnt2++] = KISS_FEND; for (cnt = 0; cnt < len; cnt++) { switch(buf[cnt]) { case KISS_FESC: mybuf[cnt2++] = KISS_FESC; mybuf[cnt2++] = KISS_TFESC; break; case KISS_FEND: mybuf[cnt2++] = KISS_FESC; mybuf[cnt2++] = KISS_TFEND; break; default: mybuf[cnt2++] = buf[cnt]; } } write(fd, mybuf, cnt2); } void kiss_decode(int fd, unsigned char *buf, int len) { static unsigned char mybuf[MAXMTU]; static int kiss_state = KISS_START; static int cnt2 = 0; struct sockaddr saddr; int cnt, addrlen; for (cnt = 0; cnt < len; cnt++) { switch (kiss_state) { case KISS_START: if (buf[cnt] == KISS_FEND) kiss_state = KISS_DATA; break; case KISS_DATA: switch(buf[cnt]) { case KISS_FEND: kiss_state = KISS_START; addrlen = sizeof(saddr); strcpy(saddr.sa_data, ax25_dev); saddr.sa_family = AF_AX25; sendto(fd, mybuf, cnt2, 0, &saddr, addrlen); cnt2 = 0; break; case KISS_FESC: kiss_state = KISS_ESC; break; default: mybuf[cnt2++] = buf[cnt]; } break; case KISS_ESC: switch(buf[cnt]) { case KISS_TFEND: mybuf[cnt2++] = KISS_FEND; break; case KISS_TFESC: mybuf[cnt2++] = KISS_FESC; break; default: mybuf[cnt2++] = buf[cnt]; } kiss_state = KISS_DATA; break; } } } int main(int argc, char **argv) { int sock_fd, pty_fd; struct sockaddr saddr; int addrlen; unsigned char buf[2*MAXMTU+2]; int len; fd_set fdset; struct timeval t; if (argc < 3) { fprintf(stderr,"usage: %s \n", argv[0]); return 1; } ax25_dev = argv[1]; sock_fd = socket(AF_INET, SOCK_PACKET, htons(ETH_P_AX25)); if (sock_fd < 0) { perror("open socket"); return 1; } pty_fd = open(argv[2], O_RDWR); if (pty_fd < 0) { perror("open pTTY"); return 1; } if (fork()) return 0; while(1) { FD_ZERO(&fdset); FD_SET(pty_fd, &fdset); FD_SET(sock_fd,&fdset); t.tv_sec = 0; t.tv_usec = 0; if (select(pty_fd+1, &fdset, NULL, NULL, NULL) < 0) { perror("select"); return 1; } if (FD_ISSET(sock_fd, &fdset)) { addrlen = sizeof(saddr); len = recvfrom(sock_fd, buf, sizeof(buf), 0, &saddr, &addrlen); if (len < 0 && errno != EINTR) { perror("recvfrom"); return 1; } if (len > 0 && !strcmp(ax25_dev, saddr.sa_data)) kiss_encode(pty_fd, buf, len); } if (FD_ISSET(pty_fd, &fdset)) { len = read(pty_fd, buf, sizeof(buf)); if (len < 0) { perror("read"); return 1; } if (len) kiss_decode(sock_fd, buf, len); } } } z8530drv-utils/sccinit.c100644 764 764 22613 6235670553 14773 0ustar jreuterjreuter/* sccinit.c - Initialize the z8530 SCC driver Copyright 1994-1996, by Joerg Reuter dl1bke@lykos.oche.de This program is intended for Amateur Radio use. If you are running it for commercial purposes, please drop me a note. I am nosy... ! You m u s t recognize the appropriate legislations of your country ! ! before you connect a radio to the SCC board and start to transmit or ! ! receive. The GPL allows you to use the d r i v e r, NOT the RADIO! ! For non-Amateur-Radio use please note that you might need a special allowance/licence from the designer of the SCC Board and/or the MODEM. This program is free software; you can redistribute it and/or modify it under the terms of the (modified) GNU General Public License delivered with the LinuX kernel source. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should find a copy of the GNU General Public License in /usr/src/linux/COPYING; */ #include #include #include #include #include #include #include #include #include #ifdef CONFIG_SCC_STANDALONE #include "scc.h" #else #include #endif #include #include #include #include #include "sccutils.h" #define RCS_ID "$Id: sccinit.c,v 1.7 1995/11/17 01:10:17 jreuter Exp jreuter $" struct cmds { char *name; int token; }; #define I_DEVICE 0x80 #define I_MODE 0x81 #define I_CLOCK 0x82 #define I_SPEED 0x83 #define I_BOARD 0x84 #define I_CTRLPA 0x85 #define I_CTRLPB 0x86 #define I_DATAPA 0x87 #define I_DATAPB 0x88 #define I_ESCC 0x89 #define I_IRQ 0x8a #define I_OPTION 0x8b #define I_PCLOCK 0x8c #define I_SPECIAL 0x8d #define I_VECTOR 0x8e #define I_CHIP 0x8f #define I_BUFSIZE 0x90 #define I_RXBUFFERS 0x91 #define I_TXBUFFERS 0x92 #define I_WARN 0x93 #define P_OFF -1 #define P_NULL 0 #define P_ON 1 #define P_YES 1 #define P_NRZ 4 #define P_NRZI 5 #define P_DEVICE 6 struct cmds clist[] = {{"#", 0}, {"board", I_BOARD}, {"bufsize", I_BUFSIZE}, {"chip", I_CHIP}, {"clocksrc", I_CLOCK}, {"ctrl_a", I_CTRLPA}, {"ctrl_b", I_CTRLPB}, {"data_a", I_DATAPA}, {"data_b", I_DATAPB}, {"device", I_DEVICE}, {"escc", I_ESCC}, {"fullduplex", PARAM_FULLDUP}, {"group", PARAM_GROUP}, {"idletime", PARAM_IDLE}, {"irq", I_IRQ}, {"maxdefer", PARAM_MAXDEFER}, {"maxkeyup", PARAM_MAXKEY}, {"mintime", PARAM_MIN}, {"mode", I_MODE}, {"option", I_OPTION}, {"pclock", I_PCLOCK}, {"persistence", PARAM_PERSIST}, {"rxbuffers", I_WARN}, {"slottime", PARAM_SLOTTIME}, {"slip", I_WARN}, {"special", I_SPECIAL}, {"speed", I_SPEED}, {"softdcd", PARAM_SOFTDCD}, {"tailtime", PARAM_TXTAIL}, {"txbuffers", I_WARN}, {"txdelay", PARAM_TXDELAY}, {"txoff", PARAM_TX}, {"txtailtime", PARAM_TXTAIL}, {"vector", I_VECTOR}, {"waittime", PARAM_WAIT}, {"", 0} }; struct cmds plist[] = { {"divider", CLK_DIVIDER}, {"dpll", CLK_DPLL}, {"external", CLK_EXTERNAL}, {"no", P_OFF}, {"normal", CLK_DPLL}, {"nrz", P_NRZ}, {"nrzi", P_NRZI}, {"off", P_OFF}, {"on", P_ON}, {"yes", P_ON}, {"pa0hzp", PA0HZP}, {"eagle", EAGLE}, {"pc100", PC100}, {"primus", PRIMUS}, {"drsi", DRSI}, {"baycom", BAYCOM}, {"", 0} }; char Board = 0; io_port Vector = 0; long Clock = 4915200; int Irq = 0; int parse_param(struct cmds *list, char *s) { struct cmds *c; if (!*s) return 0; for (c = &list[0]; *(c->name) != '\0' ; c++) { if (!strncmp(s, c->name, strlen(s))) return c->token; } return -2; } #define IS_WHITESPACE(x) ((x == ' ') || (x == '\t')) void scan_line(char *s, char *cmd, char *par) { char *p, *q; char buf[256]; int k, n; *cmd='\0'; *par='\0'; p=s; while(*p) { *p=tolower(*p); p++; } for (p=s, k=0; k < 2; k++) { n = 0; while (*p) { if (!IS_WHITESPACE(*p)) break; p++; } if (!*p) return; q = p; while (*p) { if (IS_WHITESPACE(*p) || *p == '\n') break; p++; n++; } if (!n) return; n = (n>19? 19:n); strncpy(buf, q, n); buf[n] = '\0'; strcpy(k? par:cmd, buf); } } #define ISDIGIT(x) ((x >= '0') && (x <= '9')) #define WRNGPARA "sccinit(): wrong parameter '%s' to '%s' in line %u\n" int main(int argc, char **argv) { FILE *fp; int fd; char s[80]; char cmd[20]; char val[20]; char flag, hwinit; int k, command, param; struct scc_modem modem; struct scc_hw_config hwcfg; struct scc_mem_config memcfg; struct scc_kiss_cmd kcmd; struct ifreq ifr; check_version(); fp = fopen(CONFIGFILE,"r"); fd = 0; flag = 1; hwinit = 1; memset(&hwcfg, 0, sizeof(hwcfg)); memset(&memcfg, 0, sizeof(memcfg)); memset(&modem, 0, sizeof(modem)); fd = socket(AF_AX25, SOCK_DGRAM, 0); strcpy(ifr.ifr_name, "scc0"); k = 0; while (!feof(fp)) { k++; fgets(s, 255, fp); scan_line(s, cmd, val); if ((command = parse_param(clist, cmd)) < 0) { printf("sccinit(): unknown command %s in line %u\n", cmd, k); continue; } if (command == 0) continue; if (!*val) { printf("sccinit(): parameter is missing in line %u\n", k); continue; } if (ISDIGIT(*val)) { if (*(val+1) == 'x') sscanf(val, "%x", ¶m); else param = atoi(val); } else { param = parse_param(plist, val); if ((param < -1) && (command != I_DEVICE)) { printf(WRNGPARA, val, cmd, k); continue; } } if (command == I_DEVICE) { if (hwinit) { ifr.ifr_data = (caddr_t) &hwcfg; ioctl(fd, SIOCSCCCFG, &ifr); ifr.ifr_data = (caddr_t) &k; if (ioctl(fd, SIOCSCCINI, &ifr)) { perror("SIOCSCCINI: "); exit(1); } hwinit = 0; } if (*val == '/') strcpy(ifr.ifr_name, val+5); else strcpy(ifr.ifr_name, val); } if (command == I_CLOCK) { switch (param) { case CLK_DPLL: case CLK_EXTERNAL: case CLK_DIVIDER: break; case P_OFF: param = CLK_DPLL; break; default: printf(WRNGPARA, val, cmd, k); param=0; continue; } } if (command == I_MODE) { switch (param) { case P_NRZI: param=0; break; case P_NRZ: param=1; break; default: printf(WRNGPARA, val, cmd, k); param=0; continue; } } switch(param) { case P_OFF: switch(command) { case PARAM_MAXKEY: case PARAM_MIN: case PARAM_MAXDEFER: case PARAM_IDLE: param = TIMER_OFF; break; case PARAM_PERSIST: param = 255; break; default: param = 0; } break; case P_NULL: switch(command) { case PARAM_MAXKEY: case PARAM_MIN: case PARAM_MAXDEFER: param = TIMER_OFF; break; } break; } if (fd) { if (hwinit) { switch (command) { case I_CHIP: if (!flag) { ifr.ifr_data = (caddr_t) &hwcfg; if (ioctl(fd, SIOCSCCCFG, &ifr) < 0) { perror("FATAL: ioctl(SIOCSCCCFG) on scc0: "); fprintf(stderr,"Sccinit aborted\n"); exit(1); } } memset(&hwcfg, 0, sizeof(hwcfg)); hwcfg.irq = Irq; hwcfg.brand = Board; hwcfg.vector_latch = Vector; hwcfg.clock = Clock; flag = 0; break; case I_BOARD: Board = (char) param; hwcfg.brand = (char) param; break; case I_CTRLPA: hwcfg.ctrl_a = (io_port) param; break; case I_CTRLPB: hwcfg.ctrl_b = (io_port) param; break; case I_DATAPA: hwcfg.data_a = (io_port) param; break; case I_DATAPB: hwcfg.data_b = (io_port) param; break; case I_PCLOCK: hwcfg.clock = (long) param; break; case I_IRQ: Irq = (int) param; hwcfg.irq = Irq; break; case I_SPECIAL: hwcfg.special = (io_port) param; break; case I_OPTION: hwcfg.option = (char) param; break; case I_VECTOR: hwcfg.vector_latch = (io_port) param; break; case I_ESCC: hwcfg.escc = (char) param; break; default: /* error */ } } else { switch (command) { case I_DEVICE: flag = 0; memset(&modem, 0, sizeof(modem)); break; case I_MODE: modem.nrz = (char) param; break; case I_CLOCK: modem.clocksrc = (char) param; break; case I_SPEED: modem.speed = (long) param; break; case I_BUFSIZE: memcfg.bufsize = (unsigned int) param; break; case I_WARN: fprintf(stderr, "Warning: parameter '%s' now unsupported\n", cmd); break; default: if (!flag) { if (!modem.speed) modem.speed=1200; ifr.ifr_data = (caddr_t) &modem; ioctl(fd, SIOCSCCCHANINI, &ifr); if (!memcfg.bufsize) memcfg.bufsize = 384; ifr.ifr_data = (caddr_t) &memcfg; ioctl(fd, SIOCSCCSMEM, &ifr); memset(&memcfg, 0, sizeof(memcfg)); flag = 1; } kcmd.command = command; kcmd.param = (long) param; ifr.ifr_data = (caddr_t) &kcmd; ioctl(fd, SIOCSCCSKISS, &ifr); } } } else { printf("no device: %s ignored",s); } } fclose(fp); return 0; } z8530drv-utils/sccparam.c100644 764 764 12567 6235670553 15137 0ustar jreuterjreuter/* sccparam.c - Set Z8530 SCC driver parameters Copyright 1994-1996, by Joerg Reuter dl1bke@lykos.oche.de This program is intended for Amateur Radio use. If you are running it for commercial purposes, please drop me a note. I am nosy... ! You m u s t recognize the appropriate legislations of your country ! ! before you connect a radio to the SCC board and start to transmit or ! ! receive. The GPL allows you to use the d r i v e r, NOT the RADIO! ! For non-Amateur-Radio use please note that you might need a special allowance/licence from the designer of the SCC Board and/or the MODEM. This program is free software; you can redistribute it and/or modify it under the terms of the (modified) GNU General Public License delivered with the LinuX kernel source. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should find a copy of the GNU General Public License in /usr/src/linux/COPYING; */ #include #include #include #include #include #include #include #include #include #include #ifdef CONFIG_SCC_STANDALONE #include "scc.h" #else #include #endif #include #include #include #include "sccutils.h" #define RCS_ID "$Id: sccparam.c,v 1.7 1995/11/17 01:10:47 jreuter Exp jreuter $" struct cmds { char *name; int token; }; #define C_BUFSIZE 0x80 #define C_RXBUFFERS 0x81 #define C_TXBUFFERS 0x82 struct cmds clist[] = {{"bufsize", C_BUFSIZE}, {"fullduplex", PARAM_FULLDUP}, {"group", PARAM_GROUP}, {"idletime", PARAM_IDLE}, {"maxdefer", PARAM_MAXDEFER}, {"maxkeyup", PARAM_MAXKEY}, {"mintime", PARAM_MIN}, {"persistence", PARAM_PERSIST}, {"slottime", PARAM_SLOTTIME}, {"speed", PARAM_SPEED}, {"softdcd", PARAM_SOFTDCD}, {"tailtime", PARAM_TXTAIL}, {"txdelay", PARAM_TXDELAY}, {"txoff", PARAM_TX}, {"txtailtime", PARAM_TXTAIL}, {"waittime", PARAM_WAIT}, {"", 0} }; struct cmds plist[] = {{"no", -1}, {"off", -1}, {"normal", -1}, {"on", 1}, {"yes", 1}, {"hwctrl", 1}, {"", 0}}; int parse_param(struct cmds *list, char *s) { struct cmds *c; for (c = &list[0]; *(c->name) != '\0' ; c++) { if (!strncmp(s, c->name, strlen(s))) return c->token; } return -2; } void handle_error(int error, char *op, char *par) { char buf[30]; switch(error) { case -ENODATA: fprintf(stderr,"Error: parameter %s not supported\n", par); exit(1); case -ENODEV: fprintf(stderr,"Error: Channel not attached\n"); exit(1); default: sprintf(buf, "Error: ioctl() failed on %s", op); perror(buf); exit(1); } } #define ISDIGIT(x) ((x >= '0') && (x <= '9')) int main(int argc, char **argv) { int fd; int param, val; struct scc_kiss_cmd cmd; struct scc_stat stat; struct scc_mem_config memcfg; int error; struct ifreq ifr; check_version(); if (argc < 3) { fprintf(stderr, "\nusage: %s dev param [value]\n", argv[0]); fprintf(stderr, "example: %s scc1 txdelay 20\n\n", argv[0]); exit(1); } fd = socket(AF_AX25, SOCK_DGRAM, 0); strcpy(ifr.ifr_name, argv[1]); ifr.ifr_data = (caddr_t) &stat; if (ioctl(fd, SIOCSCCGSTAT, &ifr) < 0) { perror("ERROR: Cannot get device\n"); exit(1); } if (ISDIGIT(*argv[2])) { param=atoi(argv[2]); } else { if ((param = parse_param(clist, argv[2])) < 0) { fprintf(stderr,"error: unknown command %s\n",argv[2]); exit(1); } } if (argc < 4) { if (param < 0x80) { cmd.command = param; ifr.ifr_data = (caddr_t) &cmd; error = ioctl(fd, SIOCSCCGKISS, &ifr); if (error < 0) handle_error(error, "SIOCSCCGKISS", argv[2]); if (cmd.param == NO_SUCH_PARAM) handle_error(-ENODATA, "SIOCSCCGKISS", argv[2]); printf("%s %u\n", argv[2], cmd.param); } } else { if (ISDIGIT(*argv[3])) { if (*(argv[3]+1) == 'x') sscanf(argv[3], "%x", &val); else val = atoi(argv[3]); } else { val = parse_param(plist, argv[3]); if (val < -1) { fprintf(stderr,"error: wrong parameter %s ", argv[3]); exit(1); } } if (val < 0) { switch(param) { case PARAM_MAXKEY: case PARAM_MIN: case PARAM_MAXDEFER: case PARAM_IDLE: val = TIMER_OFF; break; case PARAM_PERSIST: val = 255; break; default: val = 0; } } else if (val == 0) { switch(param) { case PARAM_MAXKEY: case PARAM_MIN: case PARAM_MAXDEFER: val = TIMER_OFF; break; } } if (param >= 0x80) { ifr.ifr_data = (caddr_t) &stat; error = ioctl(fd, SIOCSCCGSTAT, &ifr); if (error < 0) { perror("Can't get channel status: "); exit(1); } memcfg.bufsize = stat.bufsize; switch(param) { case C_BUFSIZE: memcfg.bufsize = val; break; } ifr.ifr_data = (caddr_t) &memcfg; error = ioctl(fd, SIOCSCCSMEM, &ifr); if ( error < 0) handle_error(error, "SIOCSCCSMEM", ""); } else { cmd.command = param; cmd.param = val; ifr.ifr_data = (caddr_t) &cmd; error = ioctl(fd, SIOCSCCSKISS, &ifr); if (error < 0) handle_error(error, "SIOCSCCSKISS", argv[2]); } } close(fd); return 0; } z8530drv-utils/sccstat.c100644 764 764 24074 6235712315 14777 0ustar jreuterjreuter/* sccstat.c - Get Z8530 SCC driver statistics Copyright 1994-1996, by Joerg Reuter dl1bke@lykos.oche.de This program is intended for Amateur Radio use. If you are running it for commercial purposes, please drop me a note. I am nosy... ! You m u s t recognize the appropriate legislations of your country ! ! before you connect a radio to the SCC board and start to transmit or ! ! receive. The GPL allows you to use the d r i v e r, NOT the RADIO! ! For non-Amateur-Radio use please note that you might need a special allowance/licence from the designer of the SCC Board and/or the MODEM. This program is free software; you can redistribute it and/or modify it under the terms of the (modified) GNU General Public License delivered with the LinuX kernel source. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should find a copy of the GNU General Public License in /usr/src/linux/COPYING; */ #include #include #include #include #include #include #include #include #include #ifdef CONFIG_SCC_STANDALONE #include "scc.h" #else #include #include #endif #include #include #include #include #include "sccutils.h" #define RCS_ID "$Id: sccstat.c,v 1.9 1995/11/17 01:10:36 jreuter Exp jreuter $" struct ifreq ifr; struct scc_stat stat; const char * get_tx_status(int tx_state) { switch(tx_state) { case TXS_IDLE: return "idle"; break; case TXS_BUSY: return "busy"; break; case TXS_ACTIVE: return "active"; break; case TXS_NEWFRAME: return "kick"; break; case TXS_IDLE2: return "keyed"; break; case TXS_WAIT: return "wait"; break; case TXS_TIMEOUT: return "timeout"; } return "?"; } void print_param(int fd, char *name, char *form, int command) { struct scc_kiss_cmd kiss_cmd; char s[80]; int error; kiss_cmd.command = command; ifr.ifr_data = (caddr_t) &kiss_cmd; error = ioctl(fd, SIOCSCCGKISS, &ifr); if (error == 0) { if (*form == '*') { printf("%-12s: %s", name, kiss_cmd.param? "on":"off"); } else { if (kiss_cmd.param == TIMER_OFF) printf("%-12s: off\n", s); else { sprintf(s, "%-12s: ", name); strcat(s, form); printf(s, kiss_cmd.param); } } } printf("\n"); } void print_statistics(int fd) { printf("\nParameters:\n\n"); print_param(fd, "speed", "%u baud", PARAM_SPEED); print_param(fd, "txdelay", "%u", PARAM_TXDELAY); print_param(fd, "persist", "%u", PARAM_PERSIST); print_param(fd, "slottime", "%u", PARAM_SLOTTIME); print_param(fd, "txtail", "%u", PARAM_TXTAIL); print_param(fd, "fulldup", "%u", PARAM_FULLDUP); print_param(fd, "waittime", "%u", PARAM_WAIT); print_param(fd, "mintime", "%u sec", PARAM_MIN); print_param(fd, "maxkeyup", "%u sec", PARAM_MAXKEY); print_param(fd, "idletime", "%u sec", PARAM_IDLE); print_param(fd, "maxdefer", "%u sec", PARAM_MAXDEFER); print_param(fd, "group", "0x%2.2x", PARAM_GROUP); print_param(fd, "txoff", "*", PARAM_TX); print_param(fd, "softdcd", "*", PARAM_SOFTDCD); printf("\nStatus:\n\n"); printf("HDLC Z8530 Interrupts Buffers\n"); printf("-----------------------------------------------------------------------\n"); printf("Sent : %7lu RxOver : %5u RxInts : %8lu Size : %4u\n", stat.txframes, stat.rx_over, stat.rxints, stat.bufsize); printf("Received : %7lu TxUnder: %5u TxInts : %8lu NoSpace : %4u\n", stat.rxframes, stat.tx_under, stat.txints, stat.nospace); printf("RxErrors : %7lu ExInts : %8lu\n", stat.rxerrs, stat.exints); printf("TxErrors : %7lu SpInts : %8lu\n", stat.txerrs, stat.spints); printf("Tx State : %7s\n\n", get_tx_status(stat.tx_state)); } /* Driver : z8530drv-3.0 Device : scc0 Hardware : data 300 ctrl 304 irq 10 clock 4915200 brand BAYCOM chip SCC vector 000 special 000 option 00 MODEM : speed 9600 nrzi DPLL softdcd bufsize 386 Interrupts : rx 1234567 tx 1234567 ex 1234567 sp 1234567 Statistics : received 1234567 rxerrs 1234567 overruns 1234567 sent 1234567 txerrs 1234567 underruns 1234567 nospace 1234567 txstate idle KISS-params: tx delay 16 persistence 64 slottime 20 tailtime 2 ... */ static void print_proc_hardware(unsigned char *buf) { char *board, dev[64]; unsigned long data, ctrl, clock, vector, special; int irq, enh, option, brand; sscanf(buf, "%s %lx %lx %d %lu %x %d %lx %lx %x", dev, &data, &ctrl, &irq, &clock, &brand, &enh, &vector, &special, &option); switch(brand) { case PA0HZP: board = "PA0HZP"; break; case EAGLE : board = "Eagle"; break; case PC100: board = "PC100"; break; case PRIMUS: board = "Primus"; break; case DRSI: board = "DRSI"; break; case BAYCOM: board = "BayCom"; break; default: board = "???"; break; } printf("Device : %s\n", dev); printf("Hardware : data %lx ctrl %lx irq %d clock %lu brand %s chip %s\n", data, ctrl, irq, clock, board, enh? "ESCC":"SCC"); if (vector || special || option) { printf(" "); if (vector) printf("vector %lx ", vector); if (special) printf("special %lx ", special); if (option) printf("option %2.2x ", option); printf("\n"); } } static void print_proc_modem(unsigned char *buf) { unsigned long speed; int nrz, clocksrc, softdcd, bufsize; char *ClockSource[] = {"DPLL","external", "divider", "???", "???"}; sscanf(buf, "%lu %d %d %d %d", &speed, &nrz, &clocksrc, &softdcd, &bufsize); printf("MODEM : speed %lu nrz%s %s %s bufsize %d\n", speed, nrz? "":"i", ClockSource[clocksrc], softdcd? "harddcd":"sofdcd", bufsize); } static void print_proc_interrupts(unsigned char *buf) { unsigned long rxints, txints, exints, spints; sscanf(buf, "%lu %lu %lu %lu", &rxints, &txints, &exints, &spints); printf("Interrupts : rx %lu tx %lu ex %lu sp %lu\n", rxints, txints, exints, spints); } static void print_proc_stat(unsigned char *buf) { unsigned long rxframes, rxerrs, txframes, txerrs; int nospace, txstate, rxover, txunder; sscanf(buf, "%lu %lu %d / %lu %lu %d / %d %d", &rxframes, &rxerrs, &rxover, &txframes, &txerrs, &txunder, &nospace, &txstate); printf("Statistics : received %lu rxerrs %lu overruns %d\n", rxframes, rxerrs, rxover); printf(" sent %lu txerrs %lu underruns %d\n", txframes, txerrs, txunder); printf(" nospace %d tx state %s\n", nospace, get_tx_status(txstate)); } static void print_proc_kiss(char *buf) { int txd, pers, slot, tail, ful, wait, min, max, idle, defer, tx, grp; sscanf(buf, "%d %d %d %d %d %d %d %d %d %d %d %d", &txd, &pers, &slot, &tail, &ful, &wait, &min, &max, &idle, &defer, &tx, &grp); printf("KISS-params: tx delay %d\n", txd); printf(" persistence %d\n", pers); printf(" slottime %d\n", slot); printf(" tailtime %d\n", tail); printf(" fullduplex %d\n", ful); printf(" waittime %d\n", wait); printf(" mintime %d sec\n", min); printf(" maxkeyup %d sec\n", max); printf(" idletime %d sec\n", idle); printf(" maxdefer %d sec\n", defer); printf(" txoff %s\n", tx?"on":"off"); printf(" group 0x%2.2x\n", grp); } static void print_proc_wregs(char *buf) { printf("Z8530 WRegs: %s", buf+2); } static void print_proc_rregs(char *buf) { printf("Z8530 RRegs: %s", buf+2); } static void print_proc_debug(char *buf) { printf(" : %s", buf); } #define MSG_NOTINIT "not initialized" #define MSG_NOCHIPS "chips missing" int print_proc_statistics(char *dev) { FILE *fp; unsigned char buf[1024]; int line_no = 0; if ((fp = fopen(PROCFILE, "r")) == NULL) return 1; if (fgets(buf, sizeof(buf), fp) == NULL) return 1; printf("Driver : %s", buf); if (fgets(buf, sizeof(buf), fp) == NULL) return 1; if (!strncmp(buf, MSG_NOTINIT, strlen(MSG_NOTINIT))) { printf("Status : the driver is not initialized.\n"); return 1; } if (!strncmp(buf, MSG_NOCHIPS, strlen(MSG_NOCHIPS))) { printf("Status : the driver did not find any chips.\n"); return 1; } do { if (*buf != '\t' && *buf != ' ') { line_no = 0; if (strncmp(dev, buf, strlen(dev))) continue; print_proc_hardware(buf); line_no = 1; continue; } if (line_no == 0) continue; switch(line_no) { case 1: print_proc_modem(buf); break; case 2: print_proc_interrupts(buf); break; case 3: print_proc_stat(buf); break; case 4: print_proc_kiss(buf); break; case 5: print_proc_wregs(buf); break; case 6: print_proc_rregs(buf); break; default: print_proc_debug(buf); } line_no++; } while (fgets(buf, sizeof(buf), fp) != NULL); printf("\n"); fclose(fp); return 0; } int main(int argc, char **argv) { int fd, cnt; char dev[35], *p, *k; int error, proc = 0; check_version(); if (argc == 1) { fprintf(stderr, "usage: %s [-p] dev [dev...]\n\n", argv[0]); exit(1); } for (cnt = 1; cnt < argc; cnt++) { if (!strcmp(argv[cnt], "-p")) { proc = 1; continue; } strcpy(dev, argv[cnt]); k = dev; p = strrchr(dev, '/'); if (p == NULL) p = dev; else p++; while (*p) *k++ = tolower(*p++); *k='\0'; if (cnt-proc > 1) printf("--------------------\n"); if (!proc || print_proc_statistics(dev)) { char buf[40]; sprintf(buf, "/dev/%s", dev); fd = socket(AF_AX25, SOCK_DGRAM, 0); strcpy(ifr.ifr_name, dev); ifr.ifr_data = (caddr_t) &stat; error = ioctl(fd, SIOCSCCGSTAT, &ifr); if (error < 0) { perror("SIOCSCCGSTAT: "); exit(1); } print_statistics(fd); close(fd); } } return 0; } z8530drv-utils/sccutils.h100664 764 764 744 6235731473 15137 0ustar jreuterjreuter#define PROCFILE "/proc/net/z8530drv" #define CONFIGFILE "/etc/z8530drv.conf" #define VERSION "z8530drv-3.0\n" static inline void check_version(void) { FILE *fp = fopen(PROCFILE,"r"); char buf[1024]; if (fp == NULL) { fprintf(stderr,"sccinit: Warning, is z8530drv really loaded?\n"); return; } fgets(buf, sizeof(buf), fp); if (strcmp(buf, VERSION)) { fprintf(stderr,"sccinit: Warning, this program is for " VERSION", the driver is %s\n", buf); } fclose(fp); } z8530drv-utils/sccinit100775 764 764 21776 6235733700 14562 0ustar jreuterjreuterELF44 (444ԀԀ77888 \\\/lib/ld-linux.so.1!    ȅ"؅("\(:"@TL"ScX(X"_8 io8F{8 H"<X&hx&""I" 8Ȇ؆>@!Dlibc.so.5strcpyioctlprintf_DYNAMIC__strtol_internalfgets_IO_stderr_perrorfeofsocket__environ_init__libc_initenvironfprintf__fpu_controlstrncmpstrncpysscanffopenmemsetfclose_finiatexit_GLOBAL_OFFSET_TABLE_exit__setfpucw__ctype_tolower_etext_edata__bss_start_end<@ $( , 0 48<@DHLPTX; 5% %h%h%h%h% h %$h(%(h0%,h8p%0h@`%4hHP%8hP@%<hX0%@h` %Dhh%Hhp%Lhx%Ph%Th%XhYЃ1UUUPSQ̀D$8<PhzZPw[&&̀&S=t Ѓ;u[Í6ÐUWVSu >u1\t&&CLt&&]0t&&0щHPRV_ƒ t:uԸe[^_]Ðt&UWVSuM M;t6@C;u11;tt< t< uC;u;t^ڐ< t <vCF;utDVRQƄ.QE tEPG~[^_]UWVShh}Ãuh-h%f&ShDV[1t FO)ȃ tRhih Shh ƅƅj$jdPjj

N^n~Άކ  ȃ & 01.0101.0101.01GCC: (GNU) 2.7.2.l.3GCC: (GNU) 2.7.2GCC: (GNU) 2.7.2.l.3.symtab.strtab.shstrtab.interp.hash.dynsym.dynstr.rel.bss.rel.plt.init.plt.text.fini.rodata.data.ctors.dtors.got.dynamic.bss.note.commentԀ#) 1ȃ&9 B KQ@V \bj88pw~X\\`< >^@) !&        1 > I Wdk`  p pp  I<    ȅ"\ ؅("  \"T"c(X""8 ,2{ >8FJ8 RH"Z<  `<n uX&}h  x&""I  "  8D Ȇ ؆>@crtstuff.cgcc2_compiled.__do_global_ctors_aux__CTOR_END__init_dummyforce_to_data__DTOR_END__crt0.Sdone__do_global_dtors_aux__DTOR_LIST__fini_dummy__CTOR_LIST__sccinit.cstrcpyioctlplistprintfscan_line_DYNAMIC_etext__strtol_internalfgets_IO_stderr_perrorfeofsocket__environ_initparse_param__libc_initenvironfprintfclist__fpu_control_startstrncmpstrncpyVector___crt_dummy__sscanffopen__bss_startmemsetIrqmainfcloseClock_finiatexit_edata_GLOBAL_OFFSET_TABLE__endBoardexit__setfpucw__ctype_tolowerz8530drv-utils/sccparam100775 764 764 16101 6235733674 14713 0ustar jreuterjreuterELF44 (444ԀԀ(((/lib/ld-linux.so.1     hx"("((:"@TL"SȅX"Z dPj؅Fv ~"&&""(" 8&"H8ԟXh>x"t libc.so.5strcpyioctlprintf_DYNAMIC__strtol_internalfgets_IO_stderr_perrorsocket__environ_init__libc_initenvironfprintf__fpu_controlstrncmpsscanffopenfclose_finisprintfatexit_GLOBAL_OFFSET_TABLE_exit__setfpucwclose_etext_edata__bss_start_end    $5؟%ܟ%h%h%h%h%h %h(%h0%h8p%h@`%hHP%hP@% hX0%h` %hh%hp%hx% h%$hYЃ1UUUPSQ̀D$PhjjEPg[&&̀&SП=Пt Ѓ;u[Í6ÐUWVSu ]B 0щHPRVƒ uC6&:uƸe[^_]Í&U SEM Ut t&Dt&RhǍhjq6&hhjRv&Qh]SSj,t&UtWVShhÃuhhf&ShV ˌ1t FO)ȃ tRhٌh& S]}N^n~ P   ԟ01.0101.0101.01GCC: (GNU) 2.7.2.l.3GCC: (GNU) 2.7.2GCC: (GNU) 2.7.2.l.3.symtab.strtab.shstrtab.interp.hash.dynsym.dynstr.rel.bss.rel.plt.init.plt.text.fini.rodata.data.ctors.dtors.got.dynamic.bss.note.commentԀ#) 19 B KPPQXX0V\ b rjpğw̟~ԟT((X<>*d) D      P P 1ȟ >p Iğ WПdk   p ̟0 I ğ  @ hx"8 ("(t"T" ȅX" ! +P1@i =؅FI Q"Y _m t&| &""0 (" 8&"H8ԟXh>x"crtstuff.cgcc2_compiled.__do_global_ctors_aux__CTOR_END__init_dummyforce_to_data__DTOR_END__crt0.Sdone__do_global_dtors_aux__DTOR_LIST__fini_dummy__CTOR_LIST__sccparam.cstrcpyioctlplistprintf_DYNAMIC_etext__strtol_internalfgets_IO_stderr_perrorsockethandle_error__environ_initparse_param__libc_initenvironfprintfclist__fpu_control_startstrncmp___crt_dummy__sscanffopen__bss_startmainfclose_finisprintfatexit_edata_GLOBAL_OFFSET_TABLE__endexit__setfpucwclosez8530drv-utils/sccstat100775 764 764 25064 6235733676 14600 0ustar jreuterjreuterELF4@4 (444ԀԀ..000/lib/ld-linux.so.1"   !  ȅ؅"("(".(T:"AX"H0 RX(Fd8l0 tH"|X|h&x&"""P &"8<DȆ؆>"D $$libc.so.5strcpyioctlprintf_DYNAMICfgets_IO_stderr_perrorsocket__environ_init__libc_initstrrchrenvironfprintfstrcat__fpu_controlstrncmpsscanffopenfclose_finisprintfatexitstat_GLOBAL_OFFSET_TABLE_exit__setfpucw__ctype_tolowerclose_etext_edata__bss_start_end(|PTX\`dh l ptx|k5H%L%Ph%Th%Xh%\h%`h %dh(%hh0%lh8p%ph@`%thHP%xhP@%|hX0%h` %hh%hp%hx%h%h%hYЃ1UUUPSQ̀D$0|PhPjZe Pg[&&̀&S@=@t Ѓ;u[Í6ÐUE$Їv& 0@Pt&]Í&]Í&]Í&]Í&]Í& ]Í&]Í&]Í&UXVSU] uEEM hhR8 ul>*u$}tPSh" Fv}uEPh,'t&Sh8]SVSREPSh@e[^]Ív&US]hBj hQhYSjh_hbS $jh_hjSjh_hrS jh_h{Sjh_hS jh_hSjhhS jhhSj hhSo jhhSZj hhŕSH jh˕h͕S3jh˕hӕS! hەhh(xܭPPȭPPhqV ĭPP̭PPh1PPh PPh!ЭPPhS]]Í&UdSUEPEPEPEPEPEPEPEPEPEPhfR+0E$p&Ћ           ^6&N6&>6&.6&6&6&EPhɗ}tėPSEPEPEPEPh͗}u }u}tVhgEtPhREtPh)=EtPh6(h@]]ÍU(UEDEIEREEEPEPEPEPEPhZRMEPr}tjPEDPz}tyPEPh|]Ðt&UUEPEPEPEPhREPEPEPEPh:]Í&&U UEPEPEPEPEPEPEPEPhR(EPEPEPhEPEPEPh7 EPPEPhj]Í&&U0UEPEPEPEPEPEPEPEPEPEPEPEPhR8EPhCEPhЙ5EPh'EPh  EPh'EPhDEPhaEPh EPhEPhĚ}tPhEPh]Í&UEPh$t]Ð&UEPh4T]Ð&UEPhD7]Ít&&UWVS1hXhZRhS taShTRhSt=jhdS* u htt&j hS uhz7&< tF< tB10}HPSUR SRt&F$t& 0@P`&S^&SJN&S>&S .&S &S&S*FRhSl h@GR1[^_]Ít&U4WVSDžhXhZÃu"hmh(Kl&&ShV1t FO)ȃ tRhh( S-}uu Phh(j8Džu9b]܋u uDž &&PSj/S/u*v&A&AG9u+~ ht SKtsShPjjjSh" hhW }h4jt&WJWu91[^_]ÐS4=4t Ѓ;u[Í6Ð+r/proc/net/z8530drvsccinit: Warning, is z8530drv really loaded? z8530drv-3.0 sccinit: Warning, this program is for z8530drv-3.0 , the driver is %s idlebusyactivekickkeyedwaittimeout?onoff%-12s: %s%-12s: off %-12s: Parameters: %u baudspeed%utxdelaypersistslottimetxtailfulldupwaittime%u secmintimemaxkeyupidletimemaxdefer0x%2.2xgroup*txoffsoftdcd Status: HDLC Z8530 Interrupts Buffers ----------------------------------------------------------------------- Sent : %7lu RxOver : %5u RxInts : %8lu Size : %4u Received : %7lu TxUnder: %5u TxInts : %8lu NoSpace : %4u RxErrors : %7lu ExInts : %8lu TxErrors : %7lu SpInts : %8lu Tx State : %7s %s %lx %lx %d %lu %x %d %lx %lx %xPA0HZPEaglePC100PrimusDRSIBayCom???Device : %s ESCCSCCHardware : data %lx ctrl %lx irq %d clock %lu brand %s chip %s vector %lx special %lx option %2.2x DPLLexternaldivider%lu %d %d %d %dharddcdsofdcdiMODEM : speed %lu nrz%s %s %s bufsize %d %lu %lu %lu %luInterrupts : rx %lu tx %lu ex %lu sp %lu %lu %lu %d / %lu %lu %d / %d %dStatistics : received %lu rxerrs %lu overruns %d sent %lu txerrs %lu underruns %d nospace %d tx state %s %d %d %d %d %d %d %d %d %d %d %d %dKISS-params: tx delay %d persistence %d slottime %d tailtime %d fullduplex %d waittime %d mintime %d sec maxkeyup %d sec idletime %d sec maxdefer %d sec txoff %s group 0x%2.2x Z8530 WRegs: %sZ8530 RRegs: %s : %sDriver : %snot initializedStatus : the driver is not initialized. chips missingStatus : the driver did not find any chips. usage: %s [-p] dev [dev...] -p-------------------- /dev/%sSIOCSCCGSTAT: ΅ޅ.>N^n~Άކ  P܃ " D01.0101.0101.01GCC: (GNU) 2.7.2.l.3GCC: (GNU) 2.7.2GCC: (GNU) 2.7.2.l.3.symtab.strtab.shstrtab.interp.hash.dynsym.dynstr.rel.bss.rel.plt.init.plt.text.fini.rodata.data.ctors.dtors.got.dynamic.bss.note.commentԀ#)  1܃"9 B KQ@VD \PPbXXj00p44w<<~DDX$$$<`>!1 x'         18 >@ I4 W@dkp   p < I4 4     pB  P  ` # 4 EȅL؅"R("Yp enDu"{ (T"X"0 (F80 H"X| h& x&"" $Z "%P +&"38:<?$FD\a0 rȆw ؆> "crtstuff.cgcc2_compiled.__do_global_ctors_aux__CTOR_END__init_dummyforce_to_data__DTOR_END__crt0.Sdone__do_global_dtors_aux__DTOR_LIST__fini_dummy__CTOR_LIST__sccstat.cprint_proc_hardwareprint_proc_modemprint_proc_interruptsprint_proc_statprint_proc_kissprint_proc_wregsprint_proc_rregsprint_proc_debugstrcpyioctlprintfprint_param_DYNAMIC_etextfgetsifr_IO_stderr_perrorsocket__environ_init__libc_initstrrchrenvironfprintfstrcat__fpu_control_startstrncmp___crt_dummy__sscanffopen__bss_startmainfclose_finisprintfatexitstat_edata_GLOBAL_OFFSET_TABLE__endprint_statisticsexitprint_proc_statistics__setfpucwget_tx_status__ctype_tolowerclosez8530drv-utils/gencfg100775 764 764 21066 6235733701 14350 0ustar jreuterjreuterELF04t4 (444ԀԀdХХ/lib/ld-linux.so.1   ("Х"4XT@P Zp`Fl tȄ"|؄&" &"8>ԍXXlibc.so.5strcpyprintf_DYNAMIC__strtol_internal_IO_stderr___ctype_toupper__environ_init__libc_initenvironfprintf__fpu_controlsscanf_finisprintfatexit_GLOBAL_OFFSET_TABLE_exit__setfpucw_etext_edata__bss_start_endX    ĥȥ̥; 5%%h%h%h%h%h %h(%h0%ĥh8p%ȥh@`%̥hHPYЃ1UUUPSQ̀D$PDhzPw[&&̀&S=t Ѓ;u[Í6ÐU,WVUREPE}t%vMT)ءD)؋E@EԀ|(uލU؀}0u-}XuOUڍEPhRE&пtu1пu пu yt&пu Yt&п u 9t&пtjj jRw&e^_]Í6UWVSu] {hhXThchXEhhX*hhXhhX hhX hjhXhhXhhXhGhX hhXhhXhhXhhX hhXmhYhX^hhXOhhX@ hhX.hMhXhhX hhXCPئCPC PCPЦCPCPĦCP̦C PC$ jj jPFǃ ~C(Pk  ~!C,PH&&$Љ @PЊpЊЊЊЊЊЊЊЊЊЊȦԦ&Ȧ.t&ȦԦ&ȦԦht&Ȧ ԦHt&ȦԦ-v&PhȦPԦ hh hI =ئ>6@Phe_ЦĦPhn6ĦPh~ ЦPh PhPhWhȦPh“ ̦tPh̓ԦtPhܓkPh[hNئ9h *hL hvܦ ئЅvܦPhyhhhhvhהh hhhh}hsh+ih7_hCU hOHh[>hg4hs*ܦئ9ܦhz1e[^_]ÐS=t Ѓ;u[Í6Ð%xPA0HZPSCCEAGLEPC100PRIMUSDRSIBAYCOMusage: gencfg

[hdwe] [param] : number of chips installed
: base address of the first SCC chip : the spacing between the SCC chip base addresses : offset from a chip's base address to its channel A ctrl register : offset from a chip's base address to its channel B ctrl register : offset from each channel's ctrl register to its data register : the address of the INTACK Vector port. If none, specify 0 : the CPU interrupt vector for all connected SCCs : the clock frequency (PCLK) of all SCCs in Hertz [hdwe] : (optional) hardware type [param] : (optional) extra param Notes: (1) use this program ONLY if you configured the PE1CHL SCC driver under DOS before. It is much EASIER to edit /etc/z8530drv.conf and setup the needed params there. (2) all parameters must be specified in hex (0x300) or decimal (10). (3) means the clock on the PClk pin. If you are using a DRSI card set the "clock" parameter in /etc/z8530drv.conf to "external." expample for the PA0HZP card: gencfg 2 0x150 4 2 0 1 0x168 9 4915200 0 0 >z8530drv.conf 0x%2.2x# z8530drv.conf $Id: gencfg.c,v 1.4 1995/11/17 01:11:27 jreuter Exp jreuter $# file generated by %s # # chip %d data_a 0x%3.3x data_b 0x%3.3x ctrl_a 0x%3.3x ctrl_b 0x%3.3x irq %d pclock %lu board %s vector 0x%3.3x special 0x%3.3x option 0x%2.2x escc no # # # # the following is a skelleton of the MODEM and KISS parameter # definitions. Adjust to your situation. # device /dev/scc%d speed 1200 # baudrate clock dpll # clock source mode nrzi # NRZI or NRZ txdelay 36 persist 64 slot 8 tail 8 fulldup 0 wait 12 min 3 maxkey 7 idle 3 maxdef 120 group 0 txoff off softdcd on # # # # EOF Х΄ބ p  P01.0101.0101.01GCC: (GNU) 2.7.2.l.3GCC: (GNU) 2.7.2GCC: (GNU) 2.7.2.l.3.symtab.strtab.shstrtab.interp.hash.dynsym.dynstr.rel.bss.rel.plt.init.plt.text.fini.rodata.data.ctors.dtors.got.dynamic.bss.note.commentԀ#) 19 B PKppQxxV00\ b jpw~4ХXXX<>  ) ,         1 >Ѝ I Wdk   p Ѕ I    ("Хn ԍĦ XTȦ. 8̦?pEFQ YȄ"ao0 v0 ؄&"ЦXPS  &"8ԦئXܦ>crtstuff.cgcc2_compiled.__do_global_ctors_aux__CTOR_END__init_dummyforce_to_data__DTOR_END__crt0.Sdone__do_global_dtors_aux__DTOR_LIST__fini_dummy__CTOR_LIST__gencfg.cstrcpyspacingprintfBoffparam_DYNAMICaddresscs_etext__strtol_internalDataoff_IO_stderr_board__ctype_toupper__environintack_init__libc_initenvironfprintf__fpu_control_start___crt_dummy__sscanfAoff__bss_startmain_finisprintfatexitspdevices_edata_GLOBAL_OFFSET_TABLE__endchanhdweexit__setfpucwchipvectorz8530drv-utils/kissbridge100775 764 764 14117 6235733703 15246 0ustar jreuterjreuterELF`4 4 (444ԀԀ  T /lib/ld-linux.so.1    X !T-h"4xv"=X"D"K U@[Fg"m uȅ"}؅"v""P 8(8>H"Dlibc.so.5strcpy_DYNAMICerrno_IO_stderr_perrorrecvfromsocketselect__environ_init__libc_initwriteenvironfprintf__fpu_controlreadsendtoforkstrcmp_finiatexit_GLOBAL_OFFSET_TABLE_exit__setfpucwopen_errno_etext_edata__bss_start_endț̛Лԛ؛ܛ  5%ě%țh%̛h%Лh%ԛh%؛h %ܛh(%h0%h8p%h@`%hHP%hP@%hX0%h` %hh%hp%hxYЃ1UUUPSQ̀D$PhPjuPg[&&̀&S=t Ѓ;u[Í6ÐUWVS}vƅ19u~R6} >Ӂtu'@&&@@v@AF9uQP}W[^_]Ð&UWVS} uSMMt6t )t&&6;6=t=t_m&PEPfEjMQjPhMQ} vhv&=t=t-&ƀ 6ƀ6C79e[^_]ÍUWVS] }PhXhqt&Chj jd } hrxvjCPƃ} h~W6Ct1Ol1 ldljjjRNQƒ}h&dl`DžhhQ}WjhPdQƒ}=th&~3EPP\o\uRPV\ lhSVƒ |RSdW h^P[^_]ÐS=t Ѓ;u[Í6Ðusage: %s open socketopen pTTYselectrecvfromread^n~΅ޅ.>N @ P  01.0101.0101.01GCC: (GNU) 2.7.2.l.3GCC: (GNU) 2.7.2GCC: (GNU) 2.7.2.l.3.symtab.strtab.shstrtab.interp.hash.dynsym.dynstr.rel.bss.rel.plt.init.plt.text.fini.rodata.data.ctors.dtors.got.dynamic.bss.note.commentԀ#) 19 B K@@QHHV``\PP bXX Ej p w ~ L  d < > D, D          1 >@ I WdkІ   p  I      X DTh" t xv"X"%", 6@<FH"N Vȅ"^l` s؅"xv"` "0  P 8(8>H"crtstuff.cgcc2_compiled.__do_global_ctors_aux__CTOR_END__init_dummyforce_to_data__DTOR_END__crt0.Sdone__do_global_dtors_aux__DTOR_LIST__fini_dummy__CTOR_LIST__kissbridge.cmybuf.58kiss_state.59cnt2.60strcpy_DYNAMICerrno_etext_IO_stderr_perrorkiss_decoderecvfromsocketselect__environ_init__libc_initwriteenvironfprintf__fpu_control_startreadax25_devsendto___crt_dummy__fork__bss_startmainkiss_encodestrcmp_finiatexit_edata_GLOBAL_OFFSET_TABLE__endexit_errno__setfpucwopenz8530drv-utils/z8530drv.conf100664 764 764 4124 6235670553 15326 0ustar jreuterjreuter# z8530drv.conf - initialization for the Z8530 SCC driver v 2.4 # # Lines must not be longer than 255 bytes! # # # Hardware section # # SCC chip 1 # chip 1 data_a 0x300 # data port A ctrl_a 0x304 # control port A data_b 0x301 # data port B ctrl_b 0x305 # control port B irq 5 # IRQ No. 5 (#) pclock 4915200 # clock (+) board BAYCOM # hardware type (*) escc no # enhanced SCC chip? (8580/85180/85280) (*) vector no # latch for interrupt vector ($) special no # address of special function register (*) option 0 # option to set via sfr (*) # # (*) option, default value is 0 # (+) option, default is 4915200 # # SCC chip 2 # chip 2 data_a 0x302 ctrl_a 0x306 data_b 0x303 ctrl_b 0x307 board BAYCOM # # (#) all chips can share one interrupt, or you may use multiple INTs, # but there must be at least one IRQ defined in this system. # ($) only one Vector Latch for all Chips is allowed. # # # Software section # # The order of entries IS important! # # first : DEVICE # then : MODEM section # after that: Level 1 parameters # # Definition of /dev/scc0 # device /dev/scc0 # # MODEM related stuff # speed 1200 # 1200 baud clock dpll # clock source: use the dpll mode nrzi # normal NRZI operation # # Level 1 parameters # txdelay 36 # You should know about these already! persist 64 slot 8 tail 8 fulldup 0 wait 12 min 3 maxkey 7 idle 3 maxdef 120 group 0 txoff off softdcd on # use software dcd # # # Definition of /dev/scc1 # # device /dev/scc1 # speed 1200 clock dpll mode nrzi # txdelay 36 persist 64 slot 8 tail 8 fulldup 0 wait 12 min 3 maxkey 7 idle 3 maxdef 120 group 0 txoff off softdcd off # # # Definiton of /dev/scc2 # # device /dev/scc2 # speed 4800 clock divider mode nrzi # txdelay 20 persist 64 slot 8 tail 8 fulldup 0 wait 12 min 3 maxkey 7 idle 3 maxdef 120 group 0 txoff off softdcd off # # # Definition of /dev/scc3 # # device /dev/scc3 speed 9600 clock ext mode nrz # txdelay 8 persist 64 slot 8 tail 8 fulldup 0 wait 2 min 3 maxkey 7 idle 3 maxdef 120 group 0 txoff off softdcd off # # End of File # z8530drv-utils/z8530drv-utils-3.0.lsm100664 764 764 1215 6274235534 16625 0ustar jreuterjreuterBegin3 Title: Z8530 kernel driver utilities Version: 3.0.dl1bke Entered-date: 30OCT96 Description: Utilities for the generic Z8530 AX.25 device driver Keywords: ham, amateur, AX.25, KISS, HDLC, SCC, Z8530 Author: jreuter@lykos.oche.de (Joerg Reuter) Maintained-by: Primary-site: ftp.ucsd.edu /hamradio/packet/tcpip/incoming z8530drv-utils-3.0-1.tar.gz Alternate-site: db0bm.automation.fh-aachen.de /pub/incoming/z8530drv/ insl1.etec.uni-karlsruhe.de /pub/hamradio/linux/ Original-site: Platforms: Linux kernel 2.1.6 or above needed, with AX.25 and the Z8530 driver compiled. Copying-policy: GPL End