📄 z8530drv.txt
字号:
This is a subset of the documentation. To use this driver you MUST have thefull package from:Internet:=========1. ftp://ftp.ccac.rwth-aachen.de/pub/jr/z8530drv-utils_3.0-3.tar.gz2. ftp://ftp.pspt.fi/pub/ham/linux/ax25/z8530drv-utils_3.0-3.tar.gzPlease note that the information in this document may be hopelessly outdated.A new version of the documentation, along with links to other importantLinux Kernel AX.25 documentation and programs, is available onhttp://yaina.de/jreuter----------------------------------------------------------------------------- SCC.C - Linux driver for Z8530 based HDLC cards for AX.25 ******************************************************************** (c) 1993,2000 by Joerg Reuter DL1BKE <jreuter@yaina.de> portions (c) 1993 Guido ten Dolle PE1NNZ for the complete copyright notice see >> Copying.Z8530DRV << ******************************************************************** 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 devicedriver. If you want to run xNOS instead of our fine kernel AX.25use a 2.x version (available from above sites) or read theAX.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.oplease 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. Itwill read your /etc/z8530drv.conf.1.2. /etc/z8530drv.conf=======================To setup all parameters you must run /sbin/sccinit from oneof your rc.*-files. This has to be done BEFORE you can"ifconfig" an interface. Sccinit reads the file /etc/z8530drv.confand sets the hardware, MODEM and KISS parameters. A sample file isdelivered 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 eachZ8530:chip 1data_a 0x300 # data port Actrl_a 0x304 # control port Adata_b 0x301 # data port Bctrl_b 0x305 # control port Birq 5 # IRQ No. 5pclock 4915200 # clockboard BAYCOM # hardware typeescc no # enhanced SCC chip? (8580/85180/85280)vector 0 # latch for interrupt vectorspecial no # address of special function registeroption 0 # option to set via sfrchip - 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 Hertzboard - 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 BAYCOMescc - 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 4to a higher value.Example for the BAYCOM USCC:----------------------------chip 1data_a 0x300 # data port Actrl_a 0x304 # control port Adata_b 0x301 # data port Bctrl_b 0x305 # control port Birq 5 # IRQ No. 5 (#)board BAYCOM # hardware type (*)## SCC chip 2#chip 2data_a 0x302ctrl_a 0x306data_b 0x303ctrl_b 0x307board BAYCOMAn example for a PA0HZP card:-----------------------------chip 1data_a 0x153data_b 0x151ctrl_a 0x152ctrl_b 0x150irq 9pclock 4915200board PA0HZPvector 0x168escc no###chip 2data_a 0x157data_b 0x155ctrl_a 0x156ctrl_b 0x154irq 9pclock 4915200board PA0HZPvector 0x168escc noA DRSI would should probably work with this:--------------------------------------------(actually: two DRSI cards...)chip 1data_a 0x303data_b 0x301ctrl_a 0x302ctrl_b 0x300irq 7pclock 4915200board DRSIescc no###chip 2data_a 0x313data_b 0x311ctrl_a 0x312ctrl_b 0x310irq 7pclock 4915200board DRSIescc noNote that you cannot use the on-board baudrate generator off DRSIcards. Use "mode dpll" for clock source (see below).This is based on information provided by Mike Bilow (and verifiedby 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 withthe "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 0x10does the same for the BAYCOM USCC card. In my opinion it is much easierto edit scc_config.h... 1.2.2 channel configuration===========================The channel definition is divided into three sub sections for eachchannel:An example for scc0:# DEVICEdevice scc0 # the device for the following params# MODEM / BUFFERSspeed 1200 # the default baudrateclock dpll # clock source: # dpll = normal half duplex operation # external = MODEM provides own Rx/Tx clock # divider = use full duplex 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 64slot 8tail 8fulldup 0wait 12min 3maxkey 7idle 3maxdef 120group 0txoff offsoftdcd on slip offThe order WITHIN these sections is unimportant. The order OF thesesections IS important. The MODEM parameters are set with the firstrecognized 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-7This 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 ofthe kernel AX.25.2.2 NOS, NET and TFKISS=======================Since the TTY driver (aka KISS TNC emulation) is gone you needto emulate the old behaviour. The cost of using these programs isthat you probably need to compile the kernel AX.25, regardless of whetheryou 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 NOSNow "ifconfig" the scc device: ifconfig scc3 44.128.1.1 hw ax25 dl0tha-9
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -