162306a36Sopenharmony_ci.. SPDX-License-Identifier: GPL-2.0 262306a36Sopenharmony_ci.. include:: <isonum.txt> 362306a36Sopenharmony_ci 462306a36Sopenharmony_ci========================================================= 562306a36Sopenharmony_ciSCC.C - Linux driver for Z8530 based HDLC cards for AX.25 662306a36Sopenharmony_ci========================================================= 762306a36Sopenharmony_ci 862306a36Sopenharmony_ci 962306a36Sopenharmony_ciThis is a subset of the documentation. To use this driver you MUST have the 1062306a36Sopenharmony_cifull package from: 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_ciInternet: 1362306a36Sopenharmony_ci 1462306a36Sopenharmony_ci 1. ftp://ftp.ccac.rwth-aachen.de/pub/jr/z8530drv-utils_3.0-3.tar.gz 1562306a36Sopenharmony_ci 1662306a36Sopenharmony_ci 2. ftp://ftp.pspt.fi/pub/ham/linux/ax25/z8530drv-utils_3.0-3.tar.gz 1762306a36Sopenharmony_ci 1862306a36Sopenharmony_ciPlease note that the information in this document may be hopelessly outdated. 1962306a36Sopenharmony_ciA new version of the documentation, along with links to other important 2062306a36Sopenharmony_ciLinux Kernel AX.25 documentation and programs, is available on 2162306a36Sopenharmony_cihttp://yaina.de/jreuter 2262306a36Sopenharmony_ci 2362306a36Sopenharmony_ciCopyright |copy| 1993,2000 by Joerg Reuter DL1BKE <jreuter@yaina.de> 2462306a36Sopenharmony_ci 2562306a36Sopenharmony_ciportions Copyright |copy| 1993 Guido ten Dolle PE1NNZ 2662306a36Sopenharmony_ci 2762306a36Sopenharmony_cifor the complete copyright notice see >> Copying.Z8530DRV << 2862306a36Sopenharmony_ci 2962306a36Sopenharmony_ci1. Initialization of the driver 3062306a36Sopenharmony_ci=============================== 3162306a36Sopenharmony_ci 3262306a36Sopenharmony_ciTo use the driver, 3 steps must be performed: 3362306a36Sopenharmony_ci 3462306a36Sopenharmony_ci 1. if compiled as module: loading the module 3562306a36Sopenharmony_ci 2. Setup of hardware, MODEM and KISS parameters with sccinit 3662306a36Sopenharmony_ci 3. Attach each channel to the Linux kernel AX.25 with "ifconfig" 3762306a36Sopenharmony_ci 3862306a36Sopenharmony_ciUnlike the versions below 2.4 this driver is a real network device 3962306a36Sopenharmony_cidriver. If you want to run xNOS instead of our fine kernel AX.25 4062306a36Sopenharmony_ciuse a 2.x version (available from above sites) or read the 4162306a36Sopenharmony_ciAX.25-HOWTO on how to emulate a KISS TNC on network device drivers. 4262306a36Sopenharmony_ci 4362306a36Sopenharmony_ci 4462306a36Sopenharmony_ci1.1 Loading the module 4562306a36Sopenharmony_ci====================== 4662306a36Sopenharmony_ci 4762306a36Sopenharmony_ci(If you're going to compile the driver as a part of the kernel image, 4862306a36Sopenharmony_ci skip this chapter and continue with 1.2) 4962306a36Sopenharmony_ci 5062306a36Sopenharmony_ciBefore you can use a module, you'll have to load it with:: 5162306a36Sopenharmony_ci 5262306a36Sopenharmony_ci insmod scc.o 5362306a36Sopenharmony_ci 5462306a36Sopenharmony_ciplease read 'man insmod' that comes with module-init-tools. 5562306a36Sopenharmony_ci 5662306a36Sopenharmony_ciYou should include the insmod in one of the /etc/rc.d/rc.* files, 5762306a36Sopenharmony_ciand don't forget to insert a call of sccinit after that. It 5862306a36Sopenharmony_ciwill read your /etc/z8530drv.conf. 5962306a36Sopenharmony_ci 6062306a36Sopenharmony_ci1.2. /etc/z8530drv.conf 6162306a36Sopenharmony_ci======================= 6262306a36Sopenharmony_ci 6362306a36Sopenharmony_ciTo setup all parameters you must run /sbin/sccinit from one 6462306a36Sopenharmony_ciof your rc.*-files. This has to be done BEFORE you can 6562306a36Sopenharmony_ci"ifconfig" an interface. Sccinit reads the file /etc/z8530drv.conf 6662306a36Sopenharmony_ciand sets the hardware, MODEM and KISS parameters. A sample file is 6762306a36Sopenharmony_cidelivered with this package. Change it to your needs. 6862306a36Sopenharmony_ci 6962306a36Sopenharmony_ciThe file itself consists of two main sections. 7062306a36Sopenharmony_ci 7162306a36Sopenharmony_ci1.2.1 configuration of hardware parameters 7262306a36Sopenharmony_ci========================================== 7362306a36Sopenharmony_ci 7462306a36Sopenharmony_ciThe hardware setup section defines the following parameters for each 7562306a36Sopenharmony_ciZ8530:: 7662306a36Sopenharmony_ci 7762306a36Sopenharmony_ci chip 1 7862306a36Sopenharmony_ci data_a 0x300 # data port A 7962306a36Sopenharmony_ci ctrl_a 0x304 # control port A 8062306a36Sopenharmony_ci data_b 0x301 # data port B 8162306a36Sopenharmony_ci ctrl_b 0x305 # control port B 8262306a36Sopenharmony_ci irq 5 # IRQ No. 5 8362306a36Sopenharmony_ci pclock 4915200 # clock 8462306a36Sopenharmony_ci board BAYCOM # hardware type 8562306a36Sopenharmony_ci escc no # enhanced SCC chip? (8580/85180/85280) 8662306a36Sopenharmony_ci vector 0 # latch for interrupt vector 8762306a36Sopenharmony_ci special no # address of special function register 8862306a36Sopenharmony_ci option 0 # option to set via sfr 8962306a36Sopenharmony_ci 9062306a36Sopenharmony_ci 9162306a36Sopenharmony_cichip 9262306a36Sopenharmony_ci - this is just a delimiter to make sccinit a bit simpler to 9362306a36Sopenharmony_ci program. A parameter has no effect. 9462306a36Sopenharmony_ci 9562306a36Sopenharmony_cidata_a 9662306a36Sopenharmony_ci - the address of the data port A of this Z8530 (needed) 9762306a36Sopenharmony_cictrl_a 9862306a36Sopenharmony_ci - the address of the control port A (needed) 9962306a36Sopenharmony_cidata_b 10062306a36Sopenharmony_ci - the address of the data port B (needed) 10162306a36Sopenharmony_cictrl_b 10262306a36Sopenharmony_ci - the address of the control port B (needed) 10362306a36Sopenharmony_ci 10462306a36Sopenharmony_ciirq 10562306a36Sopenharmony_ci - the used IRQ for this chip. Different chips can use different 10662306a36Sopenharmony_ci IRQs or the same. If they share an interrupt, it needs to be 10762306a36Sopenharmony_ci specified within one chip-definition only. 10862306a36Sopenharmony_ci 10962306a36Sopenharmony_cipclock - the clock at the PCLK pin of the Z8530 (option, 4915200 is 11062306a36Sopenharmony_ci default), measured in Hertz 11162306a36Sopenharmony_ci 11262306a36Sopenharmony_ciboard 11362306a36Sopenharmony_ci - the "type" of the board: 11462306a36Sopenharmony_ci 11562306a36Sopenharmony_ci ======================= ======== 11662306a36Sopenharmony_ci SCC type value 11762306a36Sopenharmony_ci ======================= ======== 11862306a36Sopenharmony_ci PA0HZP SCC card PA0HZP 11962306a36Sopenharmony_ci EAGLE card EAGLE 12062306a36Sopenharmony_ci PC100 card PC100 12162306a36Sopenharmony_ci PRIMUS-PC (DG9BL) card PRIMUS 12262306a36Sopenharmony_ci BayCom (U)SCC card BAYCOM 12362306a36Sopenharmony_ci ======================= ======== 12462306a36Sopenharmony_ci 12562306a36Sopenharmony_ciescc 12662306a36Sopenharmony_ci - if you want support for ESCC chips (8580, 85180, 85280), set 12762306a36Sopenharmony_ci this to "yes" (option, defaults to "no") 12862306a36Sopenharmony_ci 12962306a36Sopenharmony_civector 13062306a36Sopenharmony_ci - address of the vector latch (aka "intack port") for PA0HZP 13162306a36Sopenharmony_ci cards. There can be only one vector latch for all chips! 13262306a36Sopenharmony_ci (option, defaults to 0) 13362306a36Sopenharmony_ci 13462306a36Sopenharmony_cispecial 13562306a36Sopenharmony_ci - address of the special function register on several cards. 13662306a36Sopenharmony_ci (option, defaults to 0) 13762306a36Sopenharmony_ci 13862306a36Sopenharmony_cioption - The value you write into that register (option, default is 0) 13962306a36Sopenharmony_ci 14062306a36Sopenharmony_ciYou can specify up to four chips (8 channels). If this is not enough, 14162306a36Sopenharmony_cijust change:: 14262306a36Sopenharmony_ci 14362306a36Sopenharmony_ci #define MAXSCC 4 14462306a36Sopenharmony_ci 14562306a36Sopenharmony_cito a higher value. 14662306a36Sopenharmony_ci 14762306a36Sopenharmony_ciExample for the BAYCOM USCC: 14862306a36Sopenharmony_ci---------------------------- 14962306a36Sopenharmony_ci 15062306a36Sopenharmony_ci:: 15162306a36Sopenharmony_ci 15262306a36Sopenharmony_ci chip 1 15362306a36Sopenharmony_ci data_a 0x300 # data port A 15462306a36Sopenharmony_ci ctrl_a 0x304 # control port A 15562306a36Sopenharmony_ci data_b 0x301 # data port B 15662306a36Sopenharmony_ci ctrl_b 0x305 # control port B 15762306a36Sopenharmony_ci irq 5 # IRQ No. 5 (#) 15862306a36Sopenharmony_ci board BAYCOM # hardware type (*) 15962306a36Sopenharmony_ci # 16062306a36Sopenharmony_ci # SCC chip 2 16162306a36Sopenharmony_ci # 16262306a36Sopenharmony_ci chip 2 16362306a36Sopenharmony_ci data_a 0x302 16462306a36Sopenharmony_ci ctrl_a 0x306 16562306a36Sopenharmony_ci data_b 0x303 16662306a36Sopenharmony_ci ctrl_b 0x307 16762306a36Sopenharmony_ci board BAYCOM 16862306a36Sopenharmony_ci 16962306a36Sopenharmony_ciAn example for a PA0HZP card: 17062306a36Sopenharmony_ci----------------------------- 17162306a36Sopenharmony_ci 17262306a36Sopenharmony_ci:: 17362306a36Sopenharmony_ci 17462306a36Sopenharmony_ci chip 1 17562306a36Sopenharmony_ci data_a 0x153 17662306a36Sopenharmony_ci data_b 0x151 17762306a36Sopenharmony_ci ctrl_a 0x152 17862306a36Sopenharmony_ci ctrl_b 0x150 17962306a36Sopenharmony_ci irq 9 18062306a36Sopenharmony_ci pclock 4915200 18162306a36Sopenharmony_ci board PA0HZP 18262306a36Sopenharmony_ci vector 0x168 18362306a36Sopenharmony_ci escc no 18462306a36Sopenharmony_ci # 18562306a36Sopenharmony_ci # 18662306a36Sopenharmony_ci # 18762306a36Sopenharmony_ci chip 2 18862306a36Sopenharmony_ci data_a 0x157 18962306a36Sopenharmony_ci data_b 0x155 19062306a36Sopenharmony_ci ctrl_a 0x156 19162306a36Sopenharmony_ci ctrl_b 0x154 19262306a36Sopenharmony_ci irq 9 19362306a36Sopenharmony_ci pclock 4915200 19462306a36Sopenharmony_ci board PA0HZP 19562306a36Sopenharmony_ci vector 0x168 19662306a36Sopenharmony_ci escc no 19762306a36Sopenharmony_ci 19862306a36Sopenharmony_ciA DRSI would should probably work with this: 19962306a36Sopenharmony_ci-------------------------------------------- 20062306a36Sopenharmony_ci(actually: two DRSI cards...) 20162306a36Sopenharmony_ci 20262306a36Sopenharmony_ci:: 20362306a36Sopenharmony_ci 20462306a36Sopenharmony_ci chip 1 20562306a36Sopenharmony_ci data_a 0x303 20662306a36Sopenharmony_ci data_b 0x301 20762306a36Sopenharmony_ci ctrl_a 0x302 20862306a36Sopenharmony_ci ctrl_b 0x300 20962306a36Sopenharmony_ci irq 7 21062306a36Sopenharmony_ci pclock 4915200 21162306a36Sopenharmony_ci board DRSI 21262306a36Sopenharmony_ci escc no 21362306a36Sopenharmony_ci # 21462306a36Sopenharmony_ci # 21562306a36Sopenharmony_ci # 21662306a36Sopenharmony_ci chip 2 21762306a36Sopenharmony_ci data_a 0x313 21862306a36Sopenharmony_ci data_b 0x311 21962306a36Sopenharmony_ci ctrl_a 0x312 22062306a36Sopenharmony_ci ctrl_b 0x310 22162306a36Sopenharmony_ci irq 7 22262306a36Sopenharmony_ci pclock 4915200 22362306a36Sopenharmony_ci board DRSI 22462306a36Sopenharmony_ci escc no 22562306a36Sopenharmony_ci 22662306a36Sopenharmony_ciNote that you cannot use the on-board baudrate generator off DRSI 22762306a36Sopenharmony_cicards. Use "mode dpll" for clock source (see below). 22862306a36Sopenharmony_ci 22962306a36Sopenharmony_ciThis is based on information provided by Mike Bilow (and verified 23062306a36Sopenharmony_ciby Paul Helay) 23162306a36Sopenharmony_ci 23262306a36Sopenharmony_ciThe utility "gencfg" 23362306a36Sopenharmony_ci-------------------- 23462306a36Sopenharmony_ci 23562306a36Sopenharmony_ciIf you only know the parameters for the PE1CHL driver for DOS, 23662306a36Sopenharmony_cirun gencfg. It will generate the correct port addresses (I hope). 23762306a36Sopenharmony_ciIts parameters are exactly the same as the ones you use with 23862306a36Sopenharmony_cithe "attach scc" command in net, except that the string "init" must 23962306a36Sopenharmony_cinot appear. Example:: 24062306a36Sopenharmony_ci 24162306a36Sopenharmony_ci gencfg 2 0x150 4 2 0 1 0x168 9 4915200 24262306a36Sopenharmony_ci 24362306a36Sopenharmony_ciwill print a skeleton z8530drv.conf for the OptoSCC to stdout. 24462306a36Sopenharmony_ci 24562306a36Sopenharmony_ci:: 24662306a36Sopenharmony_ci 24762306a36Sopenharmony_ci gencfg 2 0x300 2 4 5 -4 0 7 4915200 0x10 24862306a36Sopenharmony_ci 24962306a36Sopenharmony_cidoes the same for the BAYCOM USCC card. In my opinion it is much easier 25062306a36Sopenharmony_cito edit scc_config.h... 25162306a36Sopenharmony_ci 25262306a36Sopenharmony_ci 25362306a36Sopenharmony_ci1.2.2 channel configuration 25462306a36Sopenharmony_ci=========================== 25562306a36Sopenharmony_ci 25662306a36Sopenharmony_ciThe channel definition is divided into three sub sections for each 25762306a36Sopenharmony_cichannel: 25862306a36Sopenharmony_ci 25962306a36Sopenharmony_ciAn example for scc0:: 26062306a36Sopenharmony_ci 26162306a36Sopenharmony_ci # DEVICE 26262306a36Sopenharmony_ci 26362306a36Sopenharmony_ci device scc0 # the device for the following params 26462306a36Sopenharmony_ci 26562306a36Sopenharmony_ci # MODEM / BUFFERS 26662306a36Sopenharmony_ci 26762306a36Sopenharmony_ci speed 1200 # the default baudrate 26862306a36Sopenharmony_ci clock dpll # clock source: 26962306a36Sopenharmony_ci # dpll = normal half duplex operation 27062306a36Sopenharmony_ci # external = MODEM provides own Rx/Tx clock 27162306a36Sopenharmony_ci # divider = use full duplex divider if 27262306a36Sopenharmony_ci # installed (1) 27362306a36Sopenharmony_ci mode nrzi # HDLC encoding mode 27462306a36Sopenharmony_ci # nrzi = 1k2 MODEM, G3RUH 9k6 MODEM 27562306a36Sopenharmony_ci # nrz = DF9IC 9k6 MODEM 27662306a36Sopenharmony_ci # 27762306a36Sopenharmony_ci bufsize 384 # size of buffers. Note that this must include 27862306a36Sopenharmony_ci # the AX.25 header, not only the data field! 27962306a36Sopenharmony_ci # (optional, defaults to 384) 28062306a36Sopenharmony_ci 28162306a36Sopenharmony_ci # KISS (Layer 1) 28262306a36Sopenharmony_ci 28362306a36Sopenharmony_ci txdelay 36 # (see chapter 1.4) 28462306a36Sopenharmony_ci persist 64 28562306a36Sopenharmony_ci slot 8 28662306a36Sopenharmony_ci tail 8 28762306a36Sopenharmony_ci fulldup 0 28862306a36Sopenharmony_ci wait 12 28962306a36Sopenharmony_ci min 3 29062306a36Sopenharmony_ci maxkey 7 29162306a36Sopenharmony_ci idle 3 29262306a36Sopenharmony_ci maxdef 120 29362306a36Sopenharmony_ci group 0 29462306a36Sopenharmony_ci txoff off 29562306a36Sopenharmony_ci softdcd on 29662306a36Sopenharmony_ci slip off 29762306a36Sopenharmony_ci 29862306a36Sopenharmony_ciThe order WITHIN these sections is unimportant. The order OF these 29962306a36Sopenharmony_cisections IS important. The MODEM parameters are set with the first 30062306a36Sopenharmony_cirecognized KISS parameter... 30162306a36Sopenharmony_ci 30262306a36Sopenharmony_ciPlease note that you can initialize the board only once after boot 30362306a36Sopenharmony_ci(or insmod). You can change all parameters but "mode" and "clock" 30462306a36Sopenharmony_cilater with the Sccparam program or through KISS. Just to avoid 30562306a36Sopenharmony_cisecurity holes... 30662306a36Sopenharmony_ci 30762306a36Sopenharmony_ci(1) this divider is usually mounted on the SCC-PBC (PA0HZP) or not 30862306a36Sopenharmony_ci present at all (BayCom). It feeds back the output of the DPLL 30962306a36Sopenharmony_ci (digital pll) as transmit clock. Using this mode without a divider 31062306a36Sopenharmony_ci installed will normally result in keying the transceiver until 31162306a36Sopenharmony_ci maxkey expires --- of course without sending anything (useful). 31262306a36Sopenharmony_ci 31362306a36Sopenharmony_ci2. Attachment of a channel by your AX.25 software 31462306a36Sopenharmony_ci================================================= 31562306a36Sopenharmony_ci 31662306a36Sopenharmony_ci2.1 Kernel AX.25 31762306a36Sopenharmony_ci================ 31862306a36Sopenharmony_ci 31962306a36Sopenharmony_ciTo set up an AX.25 device you can simply type:: 32062306a36Sopenharmony_ci 32162306a36Sopenharmony_ci ifconfig scc0 44.128.1.1 hw ax25 dl0tha-7 32262306a36Sopenharmony_ci 32362306a36Sopenharmony_ciThis will create a network interface with the IP number 44.128.20.107 32462306a36Sopenharmony_ciand the callsign "dl0tha". If you do not have any IP number (yet) you 32562306a36Sopenharmony_cican use any of the 44.128.0.0 network. Note that you do not need 32662306a36Sopenharmony_ciaxattach. The purpose of axattach (like slattach) is to create a KISS 32762306a36Sopenharmony_cinetwork device linked to a TTY. Please read the documentation of the 32862306a36Sopenharmony_ciax25-utils and the AX.25-HOWTO to learn how to set the parameters of 32962306a36Sopenharmony_cithe kernel AX.25. 33062306a36Sopenharmony_ci 33162306a36Sopenharmony_ci2.2 NOS, NET and TFKISS 33262306a36Sopenharmony_ci======================= 33362306a36Sopenharmony_ci 33462306a36Sopenharmony_ciSince the TTY driver (aka KISS TNC emulation) is gone you need 33562306a36Sopenharmony_cito emulate the old behaviour. The cost of using these programs is 33662306a36Sopenharmony_cithat you probably need to compile the kernel AX.25, regardless of whether 33762306a36Sopenharmony_ciyou actually use it or not. First setup your /etc/ax25/axports, 33862306a36Sopenharmony_cifor example:: 33962306a36Sopenharmony_ci 34062306a36Sopenharmony_ci 9k6 dl0tha-9 9600 255 4 9600 baud port (scc3) 34162306a36Sopenharmony_ci axlink dl0tha-15 38400 255 4 Link to NOS 34262306a36Sopenharmony_ci 34362306a36Sopenharmony_ciNow "ifconfig" the scc device:: 34462306a36Sopenharmony_ci 34562306a36Sopenharmony_ci ifconfig scc3 44.128.1.1 hw ax25 dl0tha-9 34662306a36Sopenharmony_ci 34762306a36Sopenharmony_ciYou can now axattach a pseudo-TTY:: 34862306a36Sopenharmony_ci 34962306a36Sopenharmony_ci axattach /dev/ptys0 axlink 35062306a36Sopenharmony_ci 35162306a36Sopenharmony_ciand start your NOS and attach /dev/ptys0 there. The problem is that 35262306a36Sopenharmony_ciNOS is reachable only via digipeating through the kernel AX.25 35362306a36Sopenharmony_ci(disastrous on a DAMA controlled channel). To solve this problem, 35462306a36Sopenharmony_ciconfigure "rxecho" to echo the incoming frames from "9k6" to "axlink" 35562306a36Sopenharmony_ciand outgoing frames from "axlink" to "9k6" and start:: 35662306a36Sopenharmony_ci 35762306a36Sopenharmony_ci rxecho 35862306a36Sopenharmony_ci 35962306a36Sopenharmony_ciOr simply use "kissbridge" coming with z8530drv-utils:: 36062306a36Sopenharmony_ci 36162306a36Sopenharmony_ci ifconfig scc3 hw ax25 dl0tha-9 36262306a36Sopenharmony_ci kissbridge scc3 /dev/ptys0 36362306a36Sopenharmony_ci 36462306a36Sopenharmony_ci 36562306a36Sopenharmony_ci3. Adjustment and Display of parameters 36662306a36Sopenharmony_ci======================================= 36762306a36Sopenharmony_ci 36862306a36Sopenharmony_ci3.1 Displaying SCC Parameters: 36962306a36Sopenharmony_ci============================== 37062306a36Sopenharmony_ci 37162306a36Sopenharmony_ciOnce a SCC channel has been attached, the parameter settings and 37262306a36Sopenharmony_cisome statistic information can be shown using the param program:: 37362306a36Sopenharmony_ci 37462306a36Sopenharmony_ci dl1bke-u:~$ sccstat scc0 37562306a36Sopenharmony_ci 37662306a36Sopenharmony_ci Parameters: 37762306a36Sopenharmony_ci 37862306a36Sopenharmony_ci speed : 1200 baud 37962306a36Sopenharmony_ci txdelay : 36 38062306a36Sopenharmony_ci persist : 255 38162306a36Sopenharmony_ci slottime : 0 38262306a36Sopenharmony_ci txtail : 8 38362306a36Sopenharmony_ci fulldup : 1 38462306a36Sopenharmony_ci waittime : 12 38562306a36Sopenharmony_ci mintime : 3 sec 38662306a36Sopenharmony_ci maxkeyup : 7 sec 38762306a36Sopenharmony_ci idletime : 3 sec 38862306a36Sopenharmony_ci maxdefer : 120 sec 38962306a36Sopenharmony_ci group : 0x00 39062306a36Sopenharmony_ci txoff : off 39162306a36Sopenharmony_ci softdcd : on 39262306a36Sopenharmony_ci SLIP : off 39362306a36Sopenharmony_ci 39462306a36Sopenharmony_ci Status: 39562306a36Sopenharmony_ci 39662306a36Sopenharmony_ci HDLC Z8530 Interrupts Buffers 39762306a36Sopenharmony_ci ----------------------------------------------------------------------- 39862306a36Sopenharmony_ci Sent : 273 RxOver : 0 RxInts : 125074 Size : 384 39962306a36Sopenharmony_ci Received : 1095 TxUnder: 0 TxInts : 4684 NoSpace : 0 40062306a36Sopenharmony_ci RxErrors : 1591 ExInts : 11776 40162306a36Sopenharmony_ci TxErrors : 0 SpInts : 1503 40262306a36Sopenharmony_ci Tx State : idle 40362306a36Sopenharmony_ci 40462306a36Sopenharmony_ci 40562306a36Sopenharmony_ciThe status info shown is: 40662306a36Sopenharmony_ci 40762306a36Sopenharmony_ci============== ============================================================== 40862306a36Sopenharmony_ciSent number of frames transmitted 40962306a36Sopenharmony_ciReceived number of frames received 41062306a36Sopenharmony_ciRxErrors number of receive errors (CRC, ABORT) 41162306a36Sopenharmony_ciTxErrors number of discarded Tx frames (due to various reasons) 41262306a36Sopenharmony_ciTx State status of the Tx interrupt handler: idle/busy/active/tail (2) 41362306a36Sopenharmony_ciRxOver number of receiver overruns 41462306a36Sopenharmony_ciTxUnder number of transmitter underruns 41562306a36Sopenharmony_ciRxInts number of receiver interrupts 41662306a36Sopenharmony_ciTxInts number of transmitter interrupts 41762306a36Sopenharmony_ciEpInts number of receiver special condition interrupts 41862306a36Sopenharmony_ciSpInts number of external/status interrupts 41962306a36Sopenharmony_ciSize maximum size of an AX.25 frame (*with* AX.25 headers!) 42062306a36Sopenharmony_ciNoSpace number of times a buffer could not get allocated 42162306a36Sopenharmony_ci============== ============================================================== 42262306a36Sopenharmony_ci 42362306a36Sopenharmony_ciAn overrun is abnormal. If lots of these occur, the product of 42462306a36Sopenharmony_cibaudrate and number of interfaces is too high for the processing 42562306a36Sopenharmony_cipower of your computer. NoSpace errors are unlikely to be caused by the 42662306a36Sopenharmony_cidriver or the kernel AX.25. 42762306a36Sopenharmony_ci 42862306a36Sopenharmony_ci 42962306a36Sopenharmony_ci3.2 Setting Parameters 43062306a36Sopenharmony_ci====================== 43162306a36Sopenharmony_ci 43262306a36Sopenharmony_ci 43362306a36Sopenharmony_ciThe setting of parameters of the emulated KISS TNC is done in the 43462306a36Sopenharmony_cisame way in the SCC driver. You can change parameters by using 43562306a36Sopenharmony_cithe kissparms program from the ax25-utils package or use the program 43662306a36Sopenharmony_ci"sccparam":: 43762306a36Sopenharmony_ci 43862306a36Sopenharmony_ci sccparam <device> <paramname> <decimal-|hexadecimal value> 43962306a36Sopenharmony_ci 44062306a36Sopenharmony_ciYou can change the following parameters: 44162306a36Sopenharmony_ci 44262306a36Sopenharmony_ci=========== ===== 44362306a36Sopenharmony_ciparam value 44462306a36Sopenharmony_ci=========== ===== 44562306a36Sopenharmony_cispeed 1200 44662306a36Sopenharmony_citxdelay 36 44762306a36Sopenharmony_cipersist 255 44862306a36Sopenharmony_cislottime 0 44962306a36Sopenharmony_citxtail 8 45062306a36Sopenharmony_cifulldup 1 45162306a36Sopenharmony_ciwaittime 12 45262306a36Sopenharmony_cimintime 3 45362306a36Sopenharmony_cimaxkeyup 7 45462306a36Sopenharmony_ciidletime 3 45562306a36Sopenharmony_cimaxdefer 120 45662306a36Sopenharmony_cigroup 0x00 45762306a36Sopenharmony_citxoff off 45862306a36Sopenharmony_cisoftdcd on 45962306a36Sopenharmony_ciSLIP off 46062306a36Sopenharmony_ci=========== ===== 46162306a36Sopenharmony_ci 46262306a36Sopenharmony_ci 46362306a36Sopenharmony_ciThe parameters have the following meaning: 46462306a36Sopenharmony_ci 46562306a36Sopenharmony_cispeed: 46662306a36Sopenharmony_ci The baudrate on this channel in bits/sec 46762306a36Sopenharmony_ci 46862306a36Sopenharmony_ci Example: sccparam /dev/scc3 speed 9600 46962306a36Sopenharmony_ci 47062306a36Sopenharmony_citxdelay: 47162306a36Sopenharmony_ci The delay (in units of 10 ms) after keying of the 47262306a36Sopenharmony_ci transmitter, until the first byte is sent. This is usually 47362306a36Sopenharmony_ci called "TXDELAY" in a TNC. When 0 is specified, the driver 47462306a36Sopenharmony_ci will just wait until the CTS signal is asserted. This 47562306a36Sopenharmony_ci assumes the presence of a timer or other circuitry in the 47662306a36Sopenharmony_ci MODEM and/or transmitter, that asserts CTS when the 47762306a36Sopenharmony_ci transmitter is ready for data. 47862306a36Sopenharmony_ci A normal value of this parameter is 30-36. 47962306a36Sopenharmony_ci 48062306a36Sopenharmony_ci Example: sccparam /dev/scc0 txd 20 48162306a36Sopenharmony_ci 48262306a36Sopenharmony_cipersist: 48362306a36Sopenharmony_ci This is the probability that the transmitter will be keyed 48462306a36Sopenharmony_ci when the channel is found to be free. It is a value from 0 48562306a36Sopenharmony_ci to 255, and the probability is (value+1)/256. The value 48662306a36Sopenharmony_ci should be somewhere near 50-60, and should be lowered when 48762306a36Sopenharmony_ci the channel is used more heavily. 48862306a36Sopenharmony_ci 48962306a36Sopenharmony_ci Example: sccparam /dev/scc2 persist 20 49062306a36Sopenharmony_ci 49162306a36Sopenharmony_cislottime: 49262306a36Sopenharmony_ci This is the time between samples of the channel. It is 49362306a36Sopenharmony_ci expressed in units of 10 ms. About 200-300 ms (value 20-30) 49462306a36Sopenharmony_ci seems to be a good value. 49562306a36Sopenharmony_ci 49662306a36Sopenharmony_ci Example: sccparam /dev/scc0 slot 20 49762306a36Sopenharmony_ci 49862306a36Sopenharmony_citail: 49962306a36Sopenharmony_ci The time the transmitter will remain keyed after the last 50062306a36Sopenharmony_ci byte of a packet has been transferred to the SCC. This is 50162306a36Sopenharmony_ci necessary because the CRC and a flag still have to leave the 50262306a36Sopenharmony_ci SCC before the transmitter is keyed down. The value depends 50362306a36Sopenharmony_ci on the baudrate selected. A few character times should be 50462306a36Sopenharmony_ci sufficient, e.g. 40ms at 1200 baud. (value 4) 50562306a36Sopenharmony_ci The value of this parameter is in 10 ms units. 50662306a36Sopenharmony_ci 50762306a36Sopenharmony_ci Example: sccparam /dev/scc2 4 50862306a36Sopenharmony_ci 50962306a36Sopenharmony_cifull: 51062306a36Sopenharmony_ci The full-duplex mode switch. This can be one of the following 51162306a36Sopenharmony_ci values: 51262306a36Sopenharmony_ci 51362306a36Sopenharmony_ci 0: The interface will operate in CSMA mode (the normal 51462306a36Sopenharmony_ci half-duplex packet radio operation) 51562306a36Sopenharmony_ci 1: Fullduplex mode, i.e. the transmitter will be keyed at 51662306a36Sopenharmony_ci any time, without checking the received carrier. It 51762306a36Sopenharmony_ci will be unkeyed when there are no packets to be sent. 51862306a36Sopenharmony_ci 2: Like 1, but the transmitter will remain keyed, also 51962306a36Sopenharmony_ci when there are no packets to be sent. Flags will be 52062306a36Sopenharmony_ci sent in that case, until a timeout (parameter 10) 52162306a36Sopenharmony_ci occurs. 52262306a36Sopenharmony_ci 52362306a36Sopenharmony_ci Example: sccparam /dev/scc0 fulldup off 52462306a36Sopenharmony_ci 52562306a36Sopenharmony_ciwait: 52662306a36Sopenharmony_ci The initial waittime before any transmit attempt, after the 52762306a36Sopenharmony_ci frame has been queue for transmit. This is the length of 52862306a36Sopenharmony_ci the first slot in CSMA mode. In full duplex modes it is 52962306a36Sopenharmony_ci set to 0 for maximum performance. 53062306a36Sopenharmony_ci The value of this parameter is in 10 ms units. 53162306a36Sopenharmony_ci 53262306a36Sopenharmony_ci Example: sccparam /dev/scc1 wait 4 53362306a36Sopenharmony_ci 53462306a36Sopenharmony_cimaxkey: 53562306a36Sopenharmony_ci The maximal time the transmitter will be keyed to send 53662306a36Sopenharmony_ci packets, in seconds. This can be useful on busy CSMA 53762306a36Sopenharmony_ci channels, to avoid "getting a bad reputation" when you are 53862306a36Sopenharmony_ci generating a lot of traffic. After the specified time has 53962306a36Sopenharmony_ci elapsed, no new frame will be started. Instead, the trans- 54062306a36Sopenharmony_ci mitter will be switched off for a specified time (parameter 54162306a36Sopenharmony_ci min), and then the selected algorithm for keyup will be 54262306a36Sopenharmony_ci started again. 54362306a36Sopenharmony_ci The value 0 as well as "off" will disable this feature, 54462306a36Sopenharmony_ci and allow infinite transmission time. 54562306a36Sopenharmony_ci 54662306a36Sopenharmony_ci Example: sccparam /dev/scc0 maxk 20 54762306a36Sopenharmony_ci 54862306a36Sopenharmony_cimin: 54962306a36Sopenharmony_ci This is the time the transmitter will be switched off when 55062306a36Sopenharmony_ci the maximum transmission time is exceeded. 55162306a36Sopenharmony_ci 55262306a36Sopenharmony_ci Example: sccparam /dev/scc3 min 10 55362306a36Sopenharmony_ci 55462306a36Sopenharmony_ciidle: 55562306a36Sopenharmony_ci This parameter specifies the maximum idle time in full duplex 55662306a36Sopenharmony_ci 2 mode, in seconds. When no frames have been sent for this 55762306a36Sopenharmony_ci time, the transmitter will be keyed down. A value of 0 is 55862306a36Sopenharmony_ci has same result as the fullduplex mode 1. This parameter 55962306a36Sopenharmony_ci can be disabled. 56062306a36Sopenharmony_ci 56162306a36Sopenharmony_ci Example: sccparam /dev/scc2 idle off # transmit forever 56262306a36Sopenharmony_ci 56362306a36Sopenharmony_cimaxdefer 56462306a36Sopenharmony_ci This is the maximum time (in seconds) to wait for a free channel 56562306a36Sopenharmony_ci to send. When this timer expires the transmitter will be keyed 56662306a36Sopenharmony_ci IMMEDIATELY. If you love to get trouble with other users you 56762306a36Sopenharmony_ci should set this to a very low value ;-) 56862306a36Sopenharmony_ci 56962306a36Sopenharmony_ci Example: sccparam /dev/scc0 maxdefer 240 # 2 minutes 57062306a36Sopenharmony_ci 57162306a36Sopenharmony_ci 57262306a36Sopenharmony_citxoff: 57362306a36Sopenharmony_ci When this parameter has the value 0, the transmission of packets 57462306a36Sopenharmony_ci is enable. Otherwise it is disabled. 57562306a36Sopenharmony_ci 57662306a36Sopenharmony_ci Example: sccparam /dev/scc2 txoff on 57762306a36Sopenharmony_ci 57862306a36Sopenharmony_cigroup: 57962306a36Sopenharmony_ci It is possible to build special radio equipment to use more than 58062306a36Sopenharmony_ci one frequency on the same band, e.g. using several receivers and 58162306a36Sopenharmony_ci only one transmitter that can be switched between frequencies. 58262306a36Sopenharmony_ci Also, you can connect several radios that are active on the same 58362306a36Sopenharmony_ci band. In these cases, it is not possible, or not a good idea, to 58462306a36Sopenharmony_ci transmit on more than one frequency. The SCC driver provides a 58562306a36Sopenharmony_ci method to lock transmitters on different interfaces, using the 58662306a36Sopenharmony_ci "param <interface> group <x>" command. This will only work when 58762306a36Sopenharmony_ci you are using CSMA mode (parameter full = 0). 58862306a36Sopenharmony_ci 58962306a36Sopenharmony_ci The number <x> must be 0 if you want no group restrictions, and 59062306a36Sopenharmony_ci can be computed as follows to create restricted groups: 59162306a36Sopenharmony_ci <x> is the sum of some OCTAL numbers: 59262306a36Sopenharmony_ci 59362306a36Sopenharmony_ci 59462306a36Sopenharmony_ci === ======================================================= 59562306a36Sopenharmony_ci 200 This transmitter will only be keyed when all other 59662306a36Sopenharmony_ci transmitters in the group are off. 59762306a36Sopenharmony_ci 100 This transmitter will only be keyed when the carrier 59862306a36Sopenharmony_ci detect of all other interfaces in the group is off. 59962306a36Sopenharmony_ci 0xx A byte that can be used to define different groups. 60062306a36Sopenharmony_ci Interfaces are in the same group, when the logical AND 60162306a36Sopenharmony_ci between their xx values is nonzero. 60262306a36Sopenharmony_ci === ======================================================= 60362306a36Sopenharmony_ci 60462306a36Sopenharmony_ci Examples: 60562306a36Sopenharmony_ci 60662306a36Sopenharmony_ci When 2 interfaces use group 201, their transmitters will never be 60762306a36Sopenharmony_ci keyed at the same time. 60862306a36Sopenharmony_ci 60962306a36Sopenharmony_ci When 2 interfaces use group 101, the transmitters will only key 61062306a36Sopenharmony_ci when both channels are clear at the same time. When group 301, 61162306a36Sopenharmony_ci the transmitters will not be keyed at the same time. 61262306a36Sopenharmony_ci 61362306a36Sopenharmony_ci Don't forget to convert the octal numbers into decimal before 61462306a36Sopenharmony_ci you set the parameter. 61562306a36Sopenharmony_ci 61662306a36Sopenharmony_ci Example: (to be written) 61762306a36Sopenharmony_ci 61862306a36Sopenharmony_cisoftdcd: 61962306a36Sopenharmony_ci use a software dcd instead of the real one... Useful for a very 62062306a36Sopenharmony_ci slow squelch. 62162306a36Sopenharmony_ci 62262306a36Sopenharmony_ci Example: sccparam /dev/scc0 soft on 62362306a36Sopenharmony_ci 62462306a36Sopenharmony_ci 62562306a36Sopenharmony_ci4. Problems 62662306a36Sopenharmony_ci=========== 62762306a36Sopenharmony_ci 62862306a36Sopenharmony_ciIf you have tx-problems with your BayCom USCC card please check 62962306a36Sopenharmony_cithe manufacturer of the 8530. SGS chips have a slightly 63062306a36Sopenharmony_cidifferent timing. Try Zilog... A solution is to write to register 8 63162306a36Sopenharmony_ciinstead to the data port, but this won't work with the ESCC chips. 63262306a36Sopenharmony_ci*SIGH!* 63362306a36Sopenharmony_ci 63462306a36Sopenharmony_ciA very common problem is that the PTT locks until the maxkeyup timer 63562306a36Sopenharmony_ciexpires, although interrupts and clock source are correct. In most 63662306a36Sopenharmony_cicases compiling the driver with CONFIG_SCC_DELAY (set with 63762306a36Sopenharmony_cimake config) solves the problems. For more hints read the (pseudo) FAQ 63862306a36Sopenharmony_ciand the documentation coming with z8530drv-utils. 63962306a36Sopenharmony_ci 64062306a36Sopenharmony_ciI got reports that the driver has problems on some 386-based systems. 64162306a36Sopenharmony_ci(i.e. Amstrad) Those systems have a bogus AT bus timing which will 64262306a36Sopenharmony_cilead to delayed answers on interrupts. You can recognize these 64362306a36Sopenharmony_ciproblems by looking at the output of Sccstat for the suspected 64462306a36Sopenharmony_ciport. If it shows under- and overruns you own such a system. 64562306a36Sopenharmony_ci 64662306a36Sopenharmony_ciDelayed processing of received data: This depends on 64762306a36Sopenharmony_ci 64862306a36Sopenharmony_ci- the kernel version 64962306a36Sopenharmony_ci 65062306a36Sopenharmony_ci- kernel profiling compiled or not 65162306a36Sopenharmony_ci 65262306a36Sopenharmony_ci- a high interrupt load 65362306a36Sopenharmony_ci 65462306a36Sopenharmony_ci- a high load of the machine --- running X, Xmorph, XV and Povray, 65562306a36Sopenharmony_ci while compiling the kernel... hmm ... even with 32 MB RAM ... ;-) 65662306a36Sopenharmony_ci Or running a named for the whole .ampr.org domain on an 8 MB 65762306a36Sopenharmony_ci box... 65862306a36Sopenharmony_ci 65962306a36Sopenharmony_ci- using information from rxecho or kissbridge. 66062306a36Sopenharmony_ci 66162306a36Sopenharmony_ciKernel panics: please read /linux/README and find out if it 66262306a36Sopenharmony_cireally occurred within the scc driver. 66362306a36Sopenharmony_ci 66462306a36Sopenharmony_ciIf you cannot solve a problem, send me 66562306a36Sopenharmony_ci 66662306a36Sopenharmony_ci- a description of the problem, 66762306a36Sopenharmony_ci- information on your hardware (computer system, scc board, modem) 66862306a36Sopenharmony_ci- your kernel version 66962306a36Sopenharmony_ci- the output of cat /proc/net/z8530 67062306a36Sopenharmony_ci 67162306a36Sopenharmony_ci4. Thor RLC100 67262306a36Sopenharmony_ci============== 67362306a36Sopenharmony_ci 67462306a36Sopenharmony_ciMysteriously this board seems not to work with the driver. Anyone 67562306a36Sopenharmony_cigot it up-and-running? 67662306a36Sopenharmony_ci 67762306a36Sopenharmony_ci 67862306a36Sopenharmony_ciMany thanks to Linus Torvalds and Alan Cox for including the driver 67962306a36Sopenharmony_ciin the Linux standard distribution and their support. 68062306a36Sopenharmony_ci 68162306a36Sopenharmony_ci:: 68262306a36Sopenharmony_ci 68362306a36Sopenharmony_ci Joerg Reuter ampr-net: dl1bke@db0pra.ampr.org 68462306a36Sopenharmony_ci AX-25 : DL1BKE @ DB0ABH.#BAY.DEU.EU 68562306a36Sopenharmony_ci Internet: jreuter@yaina.de 68662306a36Sopenharmony_ci WWW : http://yaina.de/jreuter 687