18c2ecf20Sopenharmony_ci.. SPDX-License-Identifier: GPL-2.0 28c2ecf20Sopenharmony_ci.. include:: <isonum.txt> 38c2ecf20Sopenharmony_ci 48c2ecf20Sopenharmony_ci========================================================= 58c2ecf20Sopenharmony_ciSCC.C - Linux driver for Z8530 based HDLC cards for AX.25 68c2ecf20Sopenharmony_ci========================================================= 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ciThis is a subset of the documentation. To use this driver you MUST have the 108c2ecf20Sopenharmony_cifull package from: 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ciInternet: 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ci 1. ftp://ftp.ccac.rwth-aachen.de/pub/jr/z8530drv-utils_3.0-3.tar.gz 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ci 2. ftp://ftp.pspt.fi/pub/ham/linux/ax25/z8530drv-utils_3.0-3.tar.gz 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ciPlease note that the information in this document may be hopelessly outdated. 198c2ecf20Sopenharmony_ciA new version of the documentation, along with links to other important 208c2ecf20Sopenharmony_ciLinux Kernel AX.25 documentation and programs, is available on 218c2ecf20Sopenharmony_cihttp://yaina.de/jreuter 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ciCopyright |copy| 1993,2000 by Joerg Reuter DL1BKE <jreuter@yaina.de> 248c2ecf20Sopenharmony_ci 258c2ecf20Sopenharmony_ciportions Copyright |copy| 1993 Guido ten Dolle PE1NNZ 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_cifor the complete copyright notice see >> Copying.Z8530DRV << 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_ci1. Initialization of the driver 308c2ecf20Sopenharmony_ci=============================== 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_ciTo use the driver, 3 steps must be performed: 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ci 1. if compiled as module: loading the module 358c2ecf20Sopenharmony_ci 2. Setup of hardware, MODEM and KISS parameters with sccinit 368c2ecf20Sopenharmony_ci 3. Attach each channel to the Linux kernel AX.25 with "ifconfig" 378c2ecf20Sopenharmony_ci 388c2ecf20Sopenharmony_ciUnlike the versions below 2.4 this driver is a real network device 398c2ecf20Sopenharmony_cidriver. If you want to run xNOS instead of our fine kernel AX.25 408c2ecf20Sopenharmony_ciuse a 2.x version (available from above sites) or read the 418c2ecf20Sopenharmony_ciAX.25-HOWTO on how to emulate a KISS TNC on network device drivers. 428c2ecf20Sopenharmony_ci 438c2ecf20Sopenharmony_ci 448c2ecf20Sopenharmony_ci1.1 Loading the module 458c2ecf20Sopenharmony_ci====================== 468c2ecf20Sopenharmony_ci 478c2ecf20Sopenharmony_ci(If you're going to compile the driver as a part of the kernel image, 488c2ecf20Sopenharmony_ci skip this chapter and continue with 1.2) 498c2ecf20Sopenharmony_ci 508c2ecf20Sopenharmony_ciBefore you can use a module, you'll have to load it with:: 518c2ecf20Sopenharmony_ci 528c2ecf20Sopenharmony_ci insmod scc.o 538c2ecf20Sopenharmony_ci 548c2ecf20Sopenharmony_ciplease read 'man insmod' that comes with module-init-tools. 558c2ecf20Sopenharmony_ci 568c2ecf20Sopenharmony_ciYou should include the insmod in one of the /etc/rc.d/rc.* files, 578c2ecf20Sopenharmony_ciand don't forget to insert a call of sccinit after that. It 588c2ecf20Sopenharmony_ciwill read your /etc/z8530drv.conf. 598c2ecf20Sopenharmony_ci 608c2ecf20Sopenharmony_ci1.2. /etc/z8530drv.conf 618c2ecf20Sopenharmony_ci======================= 628c2ecf20Sopenharmony_ci 638c2ecf20Sopenharmony_ciTo setup all parameters you must run /sbin/sccinit from one 648c2ecf20Sopenharmony_ciof your rc.*-files. This has to be done BEFORE you can 658c2ecf20Sopenharmony_ci"ifconfig" an interface. Sccinit reads the file /etc/z8530drv.conf 668c2ecf20Sopenharmony_ciand sets the hardware, MODEM and KISS parameters. A sample file is 678c2ecf20Sopenharmony_cidelivered with this package. Change it to your needs. 688c2ecf20Sopenharmony_ci 698c2ecf20Sopenharmony_ciThe file itself consists of two main sections. 708c2ecf20Sopenharmony_ci 718c2ecf20Sopenharmony_ci1.2.1 configuration of hardware parameters 728c2ecf20Sopenharmony_ci========================================== 738c2ecf20Sopenharmony_ci 748c2ecf20Sopenharmony_ciThe hardware setup section defines the following parameters for each 758c2ecf20Sopenharmony_ciZ8530:: 768c2ecf20Sopenharmony_ci 778c2ecf20Sopenharmony_ci chip 1 788c2ecf20Sopenharmony_ci data_a 0x300 # data port A 798c2ecf20Sopenharmony_ci ctrl_a 0x304 # control port A 808c2ecf20Sopenharmony_ci data_b 0x301 # data port B 818c2ecf20Sopenharmony_ci ctrl_b 0x305 # control port B 828c2ecf20Sopenharmony_ci irq 5 # IRQ No. 5 838c2ecf20Sopenharmony_ci pclock 4915200 # clock 848c2ecf20Sopenharmony_ci board BAYCOM # hardware type 858c2ecf20Sopenharmony_ci escc no # enhanced SCC chip? (8580/85180/85280) 868c2ecf20Sopenharmony_ci vector 0 # latch for interrupt vector 878c2ecf20Sopenharmony_ci special no # address of special function register 888c2ecf20Sopenharmony_ci option 0 # option to set via sfr 898c2ecf20Sopenharmony_ci 908c2ecf20Sopenharmony_ci 918c2ecf20Sopenharmony_cichip 928c2ecf20Sopenharmony_ci - this is just a delimiter to make sccinit a bit simpler to 938c2ecf20Sopenharmony_ci program. A parameter has no effect. 948c2ecf20Sopenharmony_ci 958c2ecf20Sopenharmony_cidata_a 968c2ecf20Sopenharmony_ci - the address of the data port A of this Z8530 (needed) 978c2ecf20Sopenharmony_cictrl_a 988c2ecf20Sopenharmony_ci - the address of the control port A (needed) 998c2ecf20Sopenharmony_cidata_b 1008c2ecf20Sopenharmony_ci - the address of the data port B (needed) 1018c2ecf20Sopenharmony_cictrl_b 1028c2ecf20Sopenharmony_ci - the address of the control port B (needed) 1038c2ecf20Sopenharmony_ci 1048c2ecf20Sopenharmony_ciirq 1058c2ecf20Sopenharmony_ci - the used IRQ for this chip. Different chips can use different 1068c2ecf20Sopenharmony_ci IRQs or the same. If they share an interrupt, it needs to be 1078c2ecf20Sopenharmony_ci specified within one chip-definition only. 1088c2ecf20Sopenharmony_ci 1098c2ecf20Sopenharmony_cipclock - the clock at the PCLK pin of the Z8530 (option, 4915200 is 1108c2ecf20Sopenharmony_ci default), measured in Hertz 1118c2ecf20Sopenharmony_ci 1128c2ecf20Sopenharmony_ciboard 1138c2ecf20Sopenharmony_ci - the "type" of the board: 1148c2ecf20Sopenharmony_ci 1158c2ecf20Sopenharmony_ci ======================= ======== 1168c2ecf20Sopenharmony_ci SCC type value 1178c2ecf20Sopenharmony_ci ======================= ======== 1188c2ecf20Sopenharmony_ci PA0HZP SCC card PA0HZP 1198c2ecf20Sopenharmony_ci EAGLE card EAGLE 1208c2ecf20Sopenharmony_ci PC100 card PC100 1218c2ecf20Sopenharmony_ci PRIMUS-PC (DG9BL) card PRIMUS 1228c2ecf20Sopenharmony_ci BayCom (U)SCC card BAYCOM 1238c2ecf20Sopenharmony_ci ======================= ======== 1248c2ecf20Sopenharmony_ci 1258c2ecf20Sopenharmony_ciescc 1268c2ecf20Sopenharmony_ci - if you want support for ESCC chips (8580, 85180, 85280), set 1278c2ecf20Sopenharmony_ci this to "yes" (option, defaults to "no") 1288c2ecf20Sopenharmony_ci 1298c2ecf20Sopenharmony_civector 1308c2ecf20Sopenharmony_ci - address of the vector latch (aka "intack port") for PA0HZP 1318c2ecf20Sopenharmony_ci cards. There can be only one vector latch for all chips! 1328c2ecf20Sopenharmony_ci (option, defaults to 0) 1338c2ecf20Sopenharmony_ci 1348c2ecf20Sopenharmony_cispecial 1358c2ecf20Sopenharmony_ci - address of the special function register on several cards. 1368c2ecf20Sopenharmony_ci (option, defaults to 0) 1378c2ecf20Sopenharmony_ci 1388c2ecf20Sopenharmony_cioption - The value you write into that register (option, default is 0) 1398c2ecf20Sopenharmony_ci 1408c2ecf20Sopenharmony_ciYou can specify up to four chips (8 channels). If this is not enough, 1418c2ecf20Sopenharmony_cijust change:: 1428c2ecf20Sopenharmony_ci 1438c2ecf20Sopenharmony_ci #define MAXSCC 4 1448c2ecf20Sopenharmony_ci 1458c2ecf20Sopenharmony_cito a higher value. 1468c2ecf20Sopenharmony_ci 1478c2ecf20Sopenharmony_ciExample for the BAYCOM USCC: 1488c2ecf20Sopenharmony_ci---------------------------- 1498c2ecf20Sopenharmony_ci 1508c2ecf20Sopenharmony_ci:: 1518c2ecf20Sopenharmony_ci 1528c2ecf20Sopenharmony_ci chip 1 1538c2ecf20Sopenharmony_ci data_a 0x300 # data port A 1548c2ecf20Sopenharmony_ci ctrl_a 0x304 # control port A 1558c2ecf20Sopenharmony_ci data_b 0x301 # data port B 1568c2ecf20Sopenharmony_ci ctrl_b 0x305 # control port B 1578c2ecf20Sopenharmony_ci irq 5 # IRQ No. 5 (#) 1588c2ecf20Sopenharmony_ci board BAYCOM # hardware type (*) 1598c2ecf20Sopenharmony_ci # 1608c2ecf20Sopenharmony_ci # SCC chip 2 1618c2ecf20Sopenharmony_ci # 1628c2ecf20Sopenharmony_ci chip 2 1638c2ecf20Sopenharmony_ci data_a 0x302 1648c2ecf20Sopenharmony_ci ctrl_a 0x306 1658c2ecf20Sopenharmony_ci data_b 0x303 1668c2ecf20Sopenharmony_ci ctrl_b 0x307 1678c2ecf20Sopenharmony_ci board BAYCOM 1688c2ecf20Sopenharmony_ci 1698c2ecf20Sopenharmony_ciAn example for a PA0HZP card: 1708c2ecf20Sopenharmony_ci----------------------------- 1718c2ecf20Sopenharmony_ci 1728c2ecf20Sopenharmony_ci:: 1738c2ecf20Sopenharmony_ci 1748c2ecf20Sopenharmony_ci chip 1 1758c2ecf20Sopenharmony_ci data_a 0x153 1768c2ecf20Sopenharmony_ci data_b 0x151 1778c2ecf20Sopenharmony_ci ctrl_a 0x152 1788c2ecf20Sopenharmony_ci ctrl_b 0x150 1798c2ecf20Sopenharmony_ci irq 9 1808c2ecf20Sopenharmony_ci pclock 4915200 1818c2ecf20Sopenharmony_ci board PA0HZP 1828c2ecf20Sopenharmony_ci vector 0x168 1838c2ecf20Sopenharmony_ci escc no 1848c2ecf20Sopenharmony_ci # 1858c2ecf20Sopenharmony_ci # 1868c2ecf20Sopenharmony_ci # 1878c2ecf20Sopenharmony_ci chip 2 1888c2ecf20Sopenharmony_ci data_a 0x157 1898c2ecf20Sopenharmony_ci data_b 0x155 1908c2ecf20Sopenharmony_ci ctrl_a 0x156 1918c2ecf20Sopenharmony_ci ctrl_b 0x154 1928c2ecf20Sopenharmony_ci irq 9 1938c2ecf20Sopenharmony_ci pclock 4915200 1948c2ecf20Sopenharmony_ci board PA0HZP 1958c2ecf20Sopenharmony_ci vector 0x168 1968c2ecf20Sopenharmony_ci escc no 1978c2ecf20Sopenharmony_ci 1988c2ecf20Sopenharmony_ciA DRSI would should probably work with this: 1998c2ecf20Sopenharmony_ci-------------------------------------------- 2008c2ecf20Sopenharmony_ci(actually: two DRSI cards...) 2018c2ecf20Sopenharmony_ci 2028c2ecf20Sopenharmony_ci:: 2038c2ecf20Sopenharmony_ci 2048c2ecf20Sopenharmony_ci chip 1 2058c2ecf20Sopenharmony_ci data_a 0x303 2068c2ecf20Sopenharmony_ci data_b 0x301 2078c2ecf20Sopenharmony_ci ctrl_a 0x302 2088c2ecf20Sopenharmony_ci ctrl_b 0x300 2098c2ecf20Sopenharmony_ci irq 7 2108c2ecf20Sopenharmony_ci pclock 4915200 2118c2ecf20Sopenharmony_ci board DRSI 2128c2ecf20Sopenharmony_ci escc no 2138c2ecf20Sopenharmony_ci # 2148c2ecf20Sopenharmony_ci # 2158c2ecf20Sopenharmony_ci # 2168c2ecf20Sopenharmony_ci chip 2 2178c2ecf20Sopenharmony_ci data_a 0x313 2188c2ecf20Sopenharmony_ci data_b 0x311 2198c2ecf20Sopenharmony_ci ctrl_a 0x312 2208c2ecf20Sopenharmony_ci ctrl_b 0x310 2218c2ecf20Sopenharmony_ci irq 7 2228c2ecf20Sopenharmony_ci pclock 4915200 2238c2ecf20Sopenharmony_ci board DRSI 2248c2ecf20Sopenharmony_ci escc no 2258c2ecf20Sopenharmony_ci 2268c2ecf20Sopenharmony_ciNote that you cannot use the on-board baudrate generator off DRSI 2278c2ecf20Sopenharmony_cicards. Use "mode dpll" for clock source (see below). 2288c2ecf20Sopenharmony_ci 2298c2ecf20Sopenharmony_ciThis is based on information provided by Mike Bilow (and verified 2308c2ecf20Sopenharmony_ciby Paul Helay) 2318c2ecf20Sopenharmony_ci 2328c2ecf20Sopenharmony_ciThe utility "gencfg" 2338c2ecf20Sopenharmony_ci-------------------- 2348c2ecf20Sopenharmony_ci 2358c2ecf20Sopenharmony_ciIf you only know the parameters for the PE1CHL driver for DOS, 2368c2ecf20Sopenharmony_cirun gencfg. It will generate the correct port addresses (I hope). 2378c2ecf20Sopenharmony_ciIts parameters are exactly the same as the ones you use with 2388c2ecf20Sopenharmony_cithe "attach scc" command in net, except that the string "init" must 2398c2ecf20Sopenharmony_cinot appear. Example:: 2408c2ecf20Sopenharmony_ci 2418c2ecf20Sopenharmony_ci gencfg 2 0x150 4 2 0 1 0x168 9 4915200 2428c2ecf20Sopenharmony_ci 2438c2ecf20Sopenharmony_ciwill print a skeleton z8530drv.conf for the OptoSCC to stdout. 2448c2ecf20Sopenharmony_ci 2458c2ecf20Sopenharmony_ci:: 2468c2ecf20Sopenharmony_ci 2478c2ecf20Sopenharmony_ci gencfg 2 0x300 2 4 5 -4 0 7 4915200 0x10 2488c2ecf20Sopenharmony_ci 2498c2ecf20Sopenharmony_cidoes the same for the BAYCOM USCC card. In my opinion it is much easier 2508c2ecf20Sopenharmony_cito edit scc_config.h... 2518c2ecf20Sopenharmony_ci 2528c2ecf20Sopenharmony_ci 2538c2ecf20Sopenharmony_ci1.2.2 channel configuration 2548c2ecf20Sopenharmony_ci=========================== 2558c2ecf20Sopenharmony_ci 2568c2ecf20Sopenharmony_ciThe channel definition is divided into three sub sections for each 2578c2ecf20Sopenharmony_cichannel: 2588c2ecf20Sopenharmony_ci 2598c2ecf20Sopenharmony_ciAn example for scc0:: 2608c2ecf20Sopenharmony_ci 2618c2ecf20Sopenharmony_ci # DEVICE 2628c2ecf20Sopenharmony_ci 2638c2ecf20Sopenharmony_ci device scc0 # the device for the following params 2648c2ecf20Sopenharmony_ci 2658c2ecf20Sopenharmony_ci # MODEM / BUFFERS 2668c2ecf20Sopenharmony_ci 2678c2ecf20Sopenharmony_ci speed 1200 # the default baudrate 2688c2ecf20Sopenharmony_ci clock dpll # clock source: 2698c2ecf20Sopenharmony_ci # dpll = normal half duplex operation 2708c2ecf20Sopenharmony_ci # external = MODEM provides own Rx/Tx clock 2718c2ecf20Sopenharmony_ci # divider = use full duplex divider if 2728c2ecf20Sopenharmony_ci # installed (1) 2738c2ecf20Sopenharmony_ci mode nrzi # HDLC encoding mode 2748c2ecf20Sopenharmony_ci # nrzi = 1k2 MODEM, G3RUH 9k6 MODEM 2758c2ecf20Sopenharmony_ci # nrz = DF9IC 9k6 MODEM 2768c2ecf20Sopenharmony_ci # 2778c2ecf20Sopenharmony_ci bufsize 384 # size of buffers. Note that this must include 2788c2ecf20Sopenharmony_ci # the AX.25 header, not only the data field! 2798c2ecf20Sopenharmony_ci # (optional, defaults to 384) 2808c2ecf20Sopenharmony_ci 2818c2ecf20Sopenharmony_ci # KISS (Layer 1) 2828c2ecf20Sopenharmony_ci 2838c2ecf20Sopenharmony_ci txdelay 36 # (see chapter 1.4) 2848c2ecf20Sopenharmony_ci persist 64 2858c2ecf20Sopenharmony_ci slot 8 2868c2ecf20Sopenharmony_ci tail 8 2878c2ecf20Sopenharmony_ci fulldup 0 2888c2ecf20Sopenharmony_ci wait 12 2898c2ecf20Sopenharmony_ci min 3 2908c2ecf20Sopenharmony_ci maxkey 7 2918c2ecf20Sopenharmony_ci idle 3 2928c2ecf20Sopenharmony_ci maxdef 120 2938c2ecf20Sopenharmony_ci group 0 2948c2ecf20Sopenharmony_ci txoff off 2958c2ecf20Sopenharmony_ci softdcd on 2968c2ecf20Sopenharmony_ci slip off 2978c2ecf20Sopenharmony_ci 2988c2ecf20Sopenharmony_ciThe order WITHIN these sections is unimportant. The order OF these 2998c2ecf20Sopenharmony_cisections IS important. The MODEM parameters are set with the first 3008c2ecf20Sopenharmony_cirecognized KISS parameter... 3018c2ecf20Sopenharmony_ci 3028c2ecf20Sopenharmony_ciPlease note that you can initialize the board only once after boot 3038c2ecf20Sopenharmony_ci(or insmod). You can change all parameters but "mode" and "clock" 3048c2ecf20Sopenharmony_cilater with the Sccparam program or through KISS. Just to avoid 3058c2ecf20Sopenharmony_cisecurity holes... 3068c2ecf20Sopenharmony_ci 3078c2ecf20Sopenharmony_ci(1) this divider is usually mounted on the SCC-PBC (PA0HZP) or not 3088c2ecf20Sopenharmony_ci present at all (BayCom). It feeds back the output of the DPLL 3098c2ecf20Sopenharmony_ci (digital pll) as transmit clock. Using this mode without a divider 3108c2ecf20Sopenharmony_ci installed will normally result in keying the transceiver until 3118c2ecf20Sopenharmony_ci maxkey expires --- of course without sending anything (useful). 3128c2ecf20Sopenharmony_ci 3138c2ecf20Sopenharmony_ci2. Attachment of a channel by your AX.25 software 3148c2ecf20Sopenharmony_ci================================================= 3158c2ecf20Sopenharmony_ci 3168c2ecf20Sopenharmony_ci2.1 Kernel AX.25 3178c2ecf20Sopenharmony_ci================ 3188c2ecf20Sopenharmony_ci 3198c2ecf20Sopenharmony_ciTo set up an AX.25 device you can simply type:: 3208c2ecf20Sopenharmony_ci 3218c2ecf20Sopenharmony_ci ifconfig scc0 44.128.1.1 hw ax25 dl0tha-7 3228c2ecf20Sopenharmony_ci 3238c2ecf20Sopenharmony_ciThis will create a network interface with the IP number 44.128.20.107 3248c2ecf20Sopenharmony_ciand the callsign "dl0tha". If you do not have any IP number (yet) you 3258c2ecf20Sopenharmony_cican use any of the 44.128.0.0 network. Note that you do not need 3268c2ecf20Sopenharmony_ciaxattach. The purpose of axattach (like slattach) is to create a KISS 3278c2ecf20Sopenharmony_cinetwork device linked to a TTY. Please read the documentation of the 3288c2ecf20Sopenharmony_ciax25-utils and the AX.25-HOWTO to learn how to set the parameters of 3298c2ecf20Sopenharmony_cithe kernel AX.25. 3308c2ecf20Sopenharmony_ci 3318c2ecf20Sopenharmony_ci2.2 NOS, NET and TFKISS 3328c2ecf20Sopenharmony_ci======================= 3338c2ecf20Sopenharmony_ci 3348c2ecf20Sopenharmony_ciSince the TTY driver (aka KISS TNC emulation) is gone you need 3358c2ecf20Sopenharmony_cito emulate the old behaviour. The cost of using these programs is 3368c2ecf20Sopenharmony_cithat you probably need to compile the kernel AX.25, regardless of whether 3378c2ecf20Sopenharmony_ciyou actually use it or not. First setup your /etc/ax25/axports, 3388c2ecf20Sopenharmony_cifor example:: 3398c2ecf20Sopenharmony_ci 3408c2ecf20Sopenharmony_ci 9k6 dl0tha-9 9600 255 4 9600 baud port (scc3) 3418c2ecf20Sopenharmony_ci axlink dl0tha-15 38400 255 4 Link to NOS 3428c2ecf20Sopenharmony_ci 3438c2ecf20Sopenharmony_ciNow "ifconfig" the scc device:: 3448c2ecf20Sopenharmony_ci 3458c2ecf20Sopenharmony_ci ifconfig scc3 44.128.1.1 hw ax25 dl0tha-9 3468c2ecf20Sopenharmony_ci 3478c2ecf20Sopenharmony_ciYou can now axattach a pseudo-TTY:: 3488c2ecf20Sopenharmony_ci 3498c2ecf20Sopenharmony_ci axattach /dev/ptys0 axlink 3508c2ecf20Sopenharmony_ci 3518c2ecf20Sopenharmony_ciand start your NOS and attach /dev/ptys0 there. The problem is that 3528c2ecf20Sopenharmony_ciNOS is reachable only via digipeating through the kernel AX.25 3538c2ecf20Sopenharmony_ci(disastrous on a DAMA controlled channel). To solve this problem, 3548c2ecf20Sopenharmony_ciconfigure "rxecho" to echo the incoming frames from "9k6" to "axlink" 3558c2ecf20Sopenharmony_ciand outgoing frames from "axlink" to "9k6" and start:: 3568c2ecf20Sopenharmony_ci 3578c2ecf20Sopenharmony_ci rxecho 3588c2ecf20Sopenharmony_ci 3598c2ecf20Sopenharmony_ciOr simply use "kissbridge" coming with z8530drv-utils:: 3608c2ecf20Sopenharmony_ci 3618c2ecf20Sopenharmony_ci ifconfig scc3 hw ax25 dl0tha-9 3628c2ecf20Sopenharmony_ci kissbridge scc3 /dev/ptys0 3638c2ecf20Sopenharmony_ci 3648c2ecf20Sopenharmony_ci 3658c2ecf20Sopenharmony_ci3. Adjustment and Display of parameters 3668c2ecf20Sopenharmony_ci======================================= 3678c2ecf20Sopenharmony_ci 3688c2ecf20Sopenharmony_ci3.1 Displaying SCC Parameters: 3698c2ecf20Sopenharmony_ci============================== 3708c2ecf20Sopenharmony_ci 3718c2ecf20Sopenharmony_ciOnce a SCC channel has been attached, the parameter settings and 3728c2ecf20Sopenharmony_cisome statistic information can be shown using the param program:: 3738c2ecf20Sopenharmony_ci 3748c2ecf20Sopenharmony_ci dl1bke-u:~$ sccstat scc0 3758c2ecf20Sopenharmony_ci 3768c2ecf20Sopenharmony_ci Parameters: 3778c2ecf20Sopenharmony_ci 3788c2ecf20Sopenharmony_ci speed : 1200 baud 3798c2ecf20Sopenharmony_ci txdelay : 36 3808c2ecf20Sopenharmony_ci persist : 255 3818c2ecf20Sopenharmony_ci slottime : 0 3828c2ecf20Sopenharmony_ci txtail : 8 3838c2ecf20Sopenharmony_ci fulldup : 1 3848c2ecf20Sopenharmony_ci waittime : 12 3858c2ecf20Sopenharmony_ci mintime : 3 sec 3868c2ecf20Sopenharmony_ci maxkeyup : 7 sec 3878c2ecf20Sopenharmony_ci idletime : 3 sec 3888c2ecf20Sopenharmony_ci maxdefer : 120 sec 3898c2ecf20Sopenharmony_ci group : 0x00 3908c2ecf20Sopenharmony_ci txoff : off 3918c2ecf20Sopenharmony_ci softdcd : on 3928c2ecf20Sopenharmony_ci SLIP : off 3938c2ecf20Sopenharmony_ci 3948c2ecf20Sopenharmony_ci Status: 3958c2ecf20Sopenharmony_ci 3968c2ecf20Sopenharmony_ci HDLC Z8530 Interrupts Buffers 3978c2ecf20Sopenharmony_ci ----------------------------------------------------------------------- 3988c2ecf20Sopenharmony_ci Sent : 273 RxOver : 0 RxInts : 125074 Size : 384 3998c2ecf20Sopenharmony_ci Received : 1095 TxUnder: 0 TxInts : 4684 NoSpace : 0 4008c2ecf20Sopenharmony_ci RxErrors : 1591 ExInts : 11776 4018c2ecf20Sopenharmony_ci TxErrors : 0 SpInts : 1503 4028c2ecf20Sopenharmony_ci Tx State : idle 4038c2ecf20Sopenharmony_ci 4048c2ecf20Sopenharmony_ci 4058c2ecf20Sopenharmony_ciThe status info shown is: 4068c2ecf20Sopenharmony_ci 4078c2ecf20Sopenharmony_ci============== ============================================================== 4088c2ecf20Sopenharmony_ciSent number of frames transmitted 4098c2ecf20Sopenharmony_ciReceived number of frames received 4108c2ecf20Sopenharmony_ciRxErrors number of receive errors (CRC, ABORT) 4118c2ecf20Sopenharmony_ciTxErrors number of discarded Tx frames (due to various reasons) 4128c2ecf20Sopenharmony_ciTx State status of the Tx interrupt handler: idle/busy/active/tail (2) 4138c2ecf20Sopenharmony_ciRxOver number of receiver overruns 4148c2ecf20Sopenharmony_ciTxUnder number of transmitter underruns 4158c2ecf20Sopenharmony_ciRxInts number of receiver interrupts 4168c2ecf20Sopenharmony_ciTxInts number of transmitter interrupts 4178c2ecf20Sopenharmony_ciEpInts number of receiver special condition interrupts 4188c2ecf20Sopenharmony_ciSpInts number of external/status interrupts 4198c2ecf20Sopenharmony_ciSize maximum size of an AX.25 frame (*with* AX.25 headers!) 4208c2ecf20Sopenharmony_ciNoSpace number of times a buffer could not get allocated 4218c2ecf20Sopenharmony_ci============== ============================================================== 4228c2ecf20Sopenharmony_ci 4238c2ecf20Sopenharmony_ciAn overrun is abnormal. If lots of these occur, the product of 4248c2ecf20Sopenharmony_cibaudrate and number of interfaces is too high for the processing 4258c2ecf20Sopenharmony_cipower of your computer. NoSpace errors are unlikely to be caused by the 4268c2ecf20Sopenharmony_cidriver or the kernel AX.25. 4278c2ecf20Sopenharmony_ci 4288c2ecf20Sopenharmony_ci 4298c2ecf20Sopenharmony_ci3.2 Setting Parameters 4308c2ecf20Sopenharmony_ci====================== 4318c2ecf20Sopenharmony_ci 4328c2ecf20Sopenharmony_ci 4338c2ecf20Sopenharmony_ciThe setting of parameters of the emulated KISS TNC is done in the 4348c2ecf20Sopenharmony_cisame way in the SCC driver. You can change parameters by using 4358c2ecf20Sopenharmony_cithe kissparms program from the ax25-utils package or use the program 4368c2ecf20Sopenharmony_ci"sccparam":: 4378c2ecf20Sopenharmony_ci 4388c2ecf20Sopenharmony_ci sccparam <device> <paramname> <decimal-|hexadecimal value> 4398c2ecf20Sopenharmony_ci 4408c2ecf20Sopenharmony_ciYou can change the following parameters: 4418c2ecf20Sopenharmony_ci 4428c2ecf20Sopenharmony_ci=========== ===== 4438c2ecf20Sopenharmony_ciparam value 4448c2ecf20Sopenharmony_ci=========== ===== 4458c2ecf20Sopenharmony_cispeed 1200 4468c2ecf20Sopenharmony_citxdelay 36 4478c2ecf20Sopenharmony_cipersist 255 4488c2ecf20Sopenharmony_cislottime 0 4498c2ecf20Sopenharmony_citxtail 8 4508c2ecf20Sopenharmony_cifulldup 1 4518c2ecf20Sopenharmony_ciwaittime 12 4528c2ecf20Sopenharmony_cimintime 3 4538c2ecf20Sopenharmony_cimaxkeyup 7 4548c2ecf20Sopenharmony_ciidletime 3 4558c2ecf20Sopenharmony_cimaxdefer 120 4568c2ecf20Sopenharmony_cigroup 0x00 4578c2ecf20Sopenharmony_citxoff off 4588c2ecf20Sopenharmony_cisoftdcd on 4598c2ecf20Sopenharmony_ciSLIP off 4608c2ecf20Sopenharmony_ci=========== ===== 4618c2ecf20Sopenharmony_ci 4628c2ecf20Sopenharmony_ci 4638c2ecf20Sopenharmony_ciThe parameters have the following meaning: 4648c2ecf20Sopenharmony_ci 4658c2ecf20Sopenharmony_cispeed: 4668c2ecf20Sopenharmony_ci The baudrate on this channel in bits/sec 4678c2ecf20Sopenharmony_ci 4688c2ecf20Sopenharmony_ci Example: sccparam /dev/scc3 speed 9600 4698c2ecf20Sopenharmony_ci 4708c2ecf20Sopenharmony_citxdelay: 4718c2ecf20Sopenharmony_ci The delay (in units of 10 ms) after keying of the 4728c2ecf20Sopenharmony_ci transmitter, until the first byte is sent. This is usually 4738c2ecf20Sopenharmony_ci called "TXDELAY" in a TNC. When 0 is specified, the driver 4748c2ecf20Sopenharmony_ci will just wait until the CTS signal is asserted. This 4758c2ecf20Sopenharmony_ci assumes the presence of a timer or other circuitry in the 4768c2ecf20Sopenharmony_ci MODEM and/or transmitter, that asserts CTS when the 4778c2ecf20Sopenharmony_ci transmitter is ready for data. 4788c2ecf20Sopenharmony_ci A normal value of this parameter is 30-36. 4798c2ecf20Sopenharmony_ci 4808c2ecf20Sopenharmony_ci Example: sccparam /dev/scc0 txd 20 4818c2ecf20Sopenharmony_ci 4828c2ecf20Sopenharmony_cipersist: 4838c2ecf20Sopenharmony_ci This is the probability that the transmitter will be keyed 4848c2ecf20Sopenharmony_ci when the channel is found to be free. It is a value from 0 4858c2ecf20Sopenharmony_ci to 255, and the probability is (value+1)/256. The value 4868c2ecf20Sopenharmony_ci should be somewhere near 50-60, and should be lowered when 4878c2ecf20Sopenharmony_ci the channel is used more heavily. 4888c2ecf20Sopenharmony_ci 4898c2ecf20Sopenharmony_ci Example: sccparam /dev/scc2 persist 20 4908c2ecf20Sopenharmony_ci 4918c2ecf20Sopenharmony_cislottime: 4928c2ecf20Sopenharmony_ci This is the time between samples of the channel. It is 4938c2ecf20Sopenharmony_ci expressed in units of 10 ms. About 200-300 ms (value 20-30) 4948c2ecf20Sopenharmony_ci seems to be a good value. 4958c2ecf20Sopenharmony_ci 4968c2ecf20Sopenharmony_ci Example: sccparam /dev/scc0 slot 20 4978c2ecf20Sopenharmony_ci 4988c2ecf20Sopenharmony_citail: 4998c2ecf20Sopenharmony_ci The time the transmitter will remain keyed after the last 5008c2ecf20Sopenharmony_ci byte of a packet has been transferred to the SCC. This is 5018c2ecf20Sopenharmony_ci necessary because the CRC and a flag still have to leave the 5028c2ecf20Sopenharmony_ci SCC before the transmitter is keyed down. The value depends 5038c2ecf20Sopenharmony_ci on the baudrate selected. A few character times should be 5048c2ecf20Sopenharmony_ci sufficient, e.g. 40ms at 1200 baud. (value 4) 5058c2ecf20Sopenharmony_ci The value of this parameter is in 10 ms units. 5068c2ecf20Sopenharmony_ci 5078c2ecf20Sopenharmony_ci Example: sccparam /dev/scc2 4 5088c2ecf20Sopenharmony_ci 5098c2ecf20Sopenharmony_cifull: 5108c2ecf20Sopenharmony_ci The full-duplex mode switch. This can be one of the following 5118c2ecf20Sopenharmony_ci values: 5128c2ecf20Sopenharmony_ci 5138c2ecf20Sopenharmony_ci 0: The interface will operate in CSMA mode (the normal 5148c2ecf20Sopenharmony_ci half-duplex packet radio operation) 5158c2ecf20Sopenharmony_ci 1: Fullduplex mode, i.e. the transmitter will be keyed at 5168c2ecf20Sopenharmony_ci any time, without checking the received carrier. It 5178c2ecf20Sopenharmony_ci will be unkeyed when there are no packets to be sent. 5188c2ecf20Sopenharmony_ci 2: Like 1, but the transmitter will remain keyed, also 5198c2ecf20Sopenharmony_ci when there are no packets to be sent. Flags will be 5208c2ecf20Sopenharmony_ci sent in that case, until a timeout (parameter 10) 5218c2ecf20Sopenharmony_ci occurs. 5228c2ecf20Sopenharmony_ci 5238c2ecf20Sopenharmony_ci Example: sccparam /dev/scc0 fulldup off 5248c2ecf20Sopenharmony_ci 5258c2ecf20Sopenharmony_ciwait: 5268c2ecf20Sopenharmony_ci The initial waittime before any transmit attempt, after the 5278c2ecf20Sopenharmony_ci frame has been queue for transmit. This is the length of 5288c2ecf20Sopenharmony_ci the first slot in CSMA mode. In full duplex modes it is 5298c2ecf20Sopenharmony_ci set to 0 for maximum performance. 5308c2ecf20Sopenharmony_ci The value of this parameter is in 10 ms units. 5318c2ecf20Sopenharmony_ci 5328c2ecf20Sopenharmony_ci Example: sccparam /dev/scc1 wait 4 5338c2ecf20Sopenharmony_ci 5348c2ecf20Sopenharmony_cimaxkey: 5358c2ecf20Sopenharmony_ci The maximal time the transmitter will be keyed to send 5368c2ecf20Sopenharmony_ci packets, in seconds. This can be useful on busy CSMA 5378c2ecf20Sopenharmony_ci channels, to avoid "getting a bad reputation" when you are 5388c2ecf20Sopenharmony_ci generating a lot of traffic. After the specified time has 5398c2ecf20Sopenharmony_ci elapsed, no new frame will be started. Instead, the trans- 5408c2ecf20Sopenharmony_ci mitter will be switched off for a specified time (parameter 5418c2ecf20Sopenharmony_ci min), and then the selected algorithm for keyup will be 5428c2ecf20Sopenharmony_ci started again. 5438c2ecf20Sopenharmony_ci The value 0 as well as "off" will disable this feature, 5448c2ecf20Sopenharmony_ci and allow infinite transmission time. 5458c2ecf20Sopenharmony_ci 5468c2ecf20Sopenharmony_ci Example: sccparam /dev/scc0 maxk 20 5478c2ecf20Sopenharmony_ci 5488c2ecf20Sopenharmony_cimin: 5498c2ecf20Sopenharmony_ci This is the time the transmitter will be switched off when 5508c2ecf20Sopenharmony_ci the maximum transmission time is exceeded. 5518c2ecf20Sopenharmony_ci 5528c2ecf20Sopenharmony_ci Example: sccparam /dev/scc3 min 10 5538c2ecf20Sopenharmony_ci 5548c2ecf20Sopenharmony_ciidle: 5558c2ecf20Sopenharmony_ci This parameter specifies the maximum idle time in full duplex 5568c2ecf20Sopenharmony_ci 2 mode, in seconds. When no frames have been sent for this 5578c2ecf20Sopenharmony_ci time, the transmitter will be keyed down. A value of 0 is 5588c2ecf20Sopenharmony_ci has same result as the fullduplex mode 1. This parameter 5598c2ecf20Sopenharmony_ci can be disabled. 5608c2ecf20Sopenharmony_ci 5618c2ecf20Sopenharmony_ci Example: sccparam /dev/scc2 idle off # transmit forever 5628c2ecf20Sopenharmony_ci 5638c2ecf20Sopenharmony_cimaxdefer 5648c2ecf20Sopenharmony_ci This is the maximum time (in seconds) to wait for a free channel 5658c2ecf20Sopenharmony_ci to send. When this timer expires the transmitter will be keyed 5668c2ecf20Sopenharmony_ci IMMEDIATELY. If you love to get trouble with other users you 5678c2ecf20Sopenharmony_ci should set this to a very low value ;-) 5688c2ecf20Sopenharmony_ci 5698c2ecf20Sopenharmony_ci Example: sccparam /dev/scc0 maxdefer 240 # 2 minutes 5708c2ecf20Sopenharmony_ci 5718c2ecf20Sopenharmony_ci 5728c2ecf20Sopenharmony_citxoff: 5738c2ecf20Sopenharmony_ci When this parameter has the value 0, the transmission of packets 5748c2ecf20Sopenharmony_ci is enable. Otherwise it is disabled. 5758c2ecf20Sopenharmony_ci 5768c2ecf20Sopenharmony_ci Example: sccparam /dev/scc2 txoff on 5778c2ecf20Sopenharmony_ci 5788c2ecf20Sopenharmony_cigroup: 5798c2ecf20Sopenharmony_ci It is possible to build special radio equipment to use more than 5808c2ecf20Sopenharmony_ci one frequency on the same band, e.g. using several receivers and 5818c2ecf20Sopenharmony_ci only one transmitter that can be switched between frequencies. 5828c2ecf20Sopenharmony_ci Also, you can connect several radios that are active on the same 5838c2ecf20Sopenharmony_ci band. In these cases, it is not possible, or not a good idea, to 5848c2ecf20Sopenharmony_ci transmit on more than one frequency. The SCC driver provides a 5858c2ecf20Sopenharmony_ci method to lock transmitters on different interfaces, using the 5868c2ecf20Sopenharmony_ci "param <interface> group <x>" command. This will only work when 5878c2ecf20Sopenharmony_ci you are using CSMA mode (parameter full = 0). 5888c2ecf20Sopenharmony_ci 5898c2ecf20Sopenharmony_ci The number <x> must be 0 if you want no group restrictions, and 5908c2ecf20Sopenharmony_ci can be computed as follows to create restricted groups: 5918c2ecf20Sopenharmony_ci <x> is the sum of some OCTAL numbers: 5928c2ecf20Sopenharmony_ci 5938c2ecf20Sopenharmony_ci 5948c2ecf20Sopenharmony_ci === ======================================================= 5958c2ecf20Sopenharmony_ci 200 This transmitter will only be keyed when all other 5968c2ecf20Sopenharmony_ci transmitters in the group are off. 5978c2ecf20Sopenharmony_ci 100 This transmitter will only be keyed when the carrier 5988c2ecf20Sopenharmony_ci detect of all other interfaces in the group is off. 5998c2ecf20Sopenharmony_ci 0xx A byte that can be used to define different groups. 6008c2ecf20Sopenharmony_ci Interfaces are in the same group, when the logical AND 6018c2ecf20Sopenharmony_ci between their xx values is nonzero. 6028c2ecf20Sopenharmony_ci === ======================================================= 6038c2ecf20Sopenharmony_ci 6048c2ecf20Sopenharmony_ci Examples: 6058c2ecf20Sopenharmony_ci 6068c2ecf20Sopenharmony_ci When 2 interfaces use group 201, their transmitters will never be 6078c2ecf20Sopenharmony_ci keyed at the same time. 6088c2ecf20Sopenharmony_ci 6098c2ecf20Sopenharmony_ci When 2 interfaces use group 101, the transmitters will only key 6108c2ecf20Sopenharmony_ci when both channels are clear at the same time. When group 301, 6118c2ecf20Sopenharmony_ci the transmitters will not be keyed at the same time. 6128c2ecf20Sopenharmony_ci 6138c2ecf20Sopenharmony_ci Don't forget to convert the octal numbers into decimal before 6148c2ecf20Sopenharmony_ci you set the parameter. 6158c2ecf20Sopenharmony_ci 6168c2ecf20Sopenharmony_ci Example: (to be written) 6178c2ecf20Sopenharmony_ci 6188c2ecf20Sopenharmony_cisoftdcd: 6198c2ecf20Sopenharmony_ci use a software dcd instead of the real one... Useful for a very 6208c2ecf20Sopenharmony_ci slow squelch. 6218c2ecf20Sopenharmony_ci 6228c2ecf20Sopenharmony_ci Example: sccparam /dev/scc0 soft on 6238c2ecf20Sopenharmony_ci 6248c2ecf20Sopenharmony_ci 6258c2ecf20Sopenharmony_ci4. Problems 6268c2ecf20Sopenharmony_ci=========== 6278c2ecf20Sopenharmony_ci 6288c2ecf20Sopenharmony_ciIf you have tx-problems with your BayCom USCC card please check 6298c2ecf20Sopenharmony_cithe manufacturer of the 8530. SGS chips have a slightly 6308c2ecf20Sopenharmony_cidifferent timing. Try Zilog... A solution is to write to register 8 6318c2ecf20Sopenharmony_ciinstead to the data port, but this won't work with the ESCC chips. 6328c2ecf20Sopenharmony_ci*SIGH!* 6338c2ecf20Sopenharmony_ci 6348c2ecf20Sopenharmony_ciA very common problem is that the PTT locks until the maxkeyup timer 6358c2ecf20Sopenharmony_ciexpires, although interrupts and clock source are correct. In most 6368c2ecf20Sopenharmony_cicases compiling the driver with CONFIG_SCC_DELAY (set with 6378c2ecf20Sopenharmony_cimake config) solves the problems. For more hints read the (pseudo) FAQ 6388c2ecf20Sopenharmony_ciand the documentation coming with z8530drv-utils. 6398c2ecf20Sopenharmony_ci 6408c2ecf20Sopenharmony_ciI got reports that the driver has problems on some 386-based systems. 6418c2ecf20Sopenharmony_ci(i.e. Amstrad) Those systems have a bogus AT bus timing which will 6428c2ecf20Sopenharmony_cilead to delayed answers on interrupts. You can recognize these 6438c2ecf20Sopenharmony_ciproblems by looking at the output of Sccstat for the suspected 6448c2ecf20Sopenharmony_ciport. If it shows under- and overruns you own such a system. 6458c2ecf20Sopenharmony_ci 6468c2ecf20Sopenharmony_ciDelayed processing of received data: This depends on 6478c2ecf20Sopenharmony_ci 6488c2ecf20Sopenharmony_ci- the kernel version 6498c2ecf20Sopenharmony_ci 6508c2ecf20Sopenharmony_ci- kernel profiling compiled or not 6518c2ecf20Sopenharmony_ci 6528c2ecf20Sopenharmony_ci- a high interrupt load 6538c2ecf20Sopenharmony_ci 6548c2ecf20Sopenharmony_ci- a high load of the machine --- running X, Xmorph, XV and Povray, 6558c2ecf20Sopenharmony_ci while compiling the kernel... hmm ... even with 32 MB RAM ... ;-) 6568c2ecf20Sopenharmony_ci Or running a named for the whole .ampr.org domain on an 8 MB 6578c2ecf20Sopenharmony_ci box... 6588c2ecf20Sopenharmony_ci 6598c2ecf20Sopenharmony_ci- using information from rxecho or kissbridge. 6608c2ecf20Sopenharmony_ci 6618c2ecf20Sopenharmony_ciKernel panics: please read /linux/README and find out if it 6628c2ecf20Sopenharmony_cireally occurred within the scc driver. 6638c2ecf20Sopenharmony_ci 6648c2ecf20Sopenharmony_ciIf you cannot solve a problem, send me 6658c2ecf20Sopenharmony_ci 6668c2ecf20Sopenharmony_ci- a description of the problem, 6678c2ecf20Sopenharmony_ci- information on your hardware (computer system, scc board, modem) 6688c2ecf20Sopenharmony_ci- your kernel version 6698c2ecf20Sopenharmony_ci- the output of cat /proc/net/z8530 6708c2ecf20Sopenharmony_ci 6718c2ecf20Sopenharmony_ci4. Thor RLC100 6728c2ecf20Sopenharmony_ci============== 6738c2ecf20Sopenharmony_ci 6748c2ecf20Sopenharmony_ciMysteriously this board seems not to work with the driver. Anyone 6758c2ecf20Sopenharmony_cigot it up-and-running? 6768c2ecf20Sopenharmony_ci 6778c2ecf20Sopenharmony_ci 6788c2ecf20Sopenharmony_ciMany thanks to Linus Torvalds and Alan Cox for including the driver 6798c2ecf20Sopenharmony_ciin the Linux standard distribution and their support. 6808c2ecf20Sopenharmony_ci 6818c2ecf20Sopenharmony_ci:: 6828c2ecf20Sopenharmony_ci 6838c2ecf20Sopenharmony_ci Joerg Reuter ampr-net: dl1bke@db0pra.ampr.org 6848c2ecf20Sopenharmony_ci AX-25 : DL1BKE @ DB0ABH.#BAY.DEU.EU 6858c2ecf20Sopenharmony_ci Internet: jreuter@yaina.de 6868c2ecf20Sopenharmony_ci WWW : http://yaina.de/jreuter 687