← Documents Documentation/networking/device_drivers/hamradio/z8530drv.rst GitHub 원문 ↗

Linux 6.18.37 · Networking

Z8530 HDLC Driver for AX.25

Z8530 기반 HDLC card를 AX.25 network interface로 초기화하고 hardware·MODEM·KISS parameter를 설정하는 방법, NOS 연결, 통계 해석과 문제 해결을 설명합니다.

Source pathDocumentation/networking/device_drivers/hamradio/z8530drv.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약·해설

z8530drv.rst:1-686

Z8530 드라이버는 SCC hardware를 커널 AX.25 network interface로 노출합니다. 정확한 port·IRQ·clock 설정, boot당 한 번뿐인 board 초기화, KISS channel access parameter 조정이 핵심이며, 오래된 hardware에서는 bus timing과 interrupt 처리 능력도 확인해야 합니다.

Z8530 운영 단계
단계도구/파일역할
Hardware 초기화`/etc/z8530drv.conf`, `sccinit`port, IRQ, clock, board 설정
Interface 연결`ifconfig`SCC channel을 AX.25에 연결
상태 확인`sccstat`parameter와 interrupt/buffer 통계 표시
동작 조정`sccparam`, `kissparms`KISS channel access parameter 변경
NOS 연동`rxecho`, `kissbridge`network interface와 pseudo-TTY 연결

설정 파일부터 장애 진단까지 필요한 도구입니다.

Z8530 설정과 진단 흐름
hardware 주소와 IRQ 확인`sccinit`으로 board 초기화AX.25 interface 연결`sccstat` 통계 확인`sccparam`으로 조정

초기화 이후 통계를 바탕으로 parameter와 hardware를 조정합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2 .. include:: <isonum.txt>
3
4 =========================================================
5 SCC.C - Linux driver for Z8530 based HDLC cards for AX.25
6 =========================================================
7
8
9 This is a subset of the documentation. To use this driver you MUST have the
10 full package from:
11
12 Internet:
13
14 1. ftp://ftp.ccac.rwth-aachen.de/pub/jr/z8530drv-utils_3.0-3.tar.gz
15
16 2. ftp://ftp.pspt.fi/pub/ham/linux/ax25/z8530drv-utils_3.0-3.tar.gz
17
18 Please note that the information in this document may be hopelessly outdated.
19 A new version of the documentation, along with links to other important
20 Linux Kernel AX.25 documentation and programs, is available on
21 http://yaina.de/jreuter
22
23 Copyright |copy| 1993,2000 by Joerg Reuter DL1BKE <jreuter@yaina.de>
24
25 portions Copyright |copy| 1993 Guido ten Dolle PE1NNZ
26
27 for the complete copyright notice see >> Copying.Z8530DRV <<
28
29 1. Initialization of the driver
30 ===============================
31
32 To use the driver, 3 steps must be performed:
33
34 1. if compiled as module: loading the module
35 2. Setup of hardware, MODEM and KISS parameters with sccinit
36 3. Attach each channel to the Linux kernel AX.25 with "ifconfig"
37
38 Unlike the versions below 2.4 this driver is a real network device
39 driver. If you want to run xNOS instead of our fine kernel AX.25
40 use a 2.x version (available from above sites) or read the
41 AX.25-HOWTO on how to emulate a KISS TNC on network device drivers.
42
43
44 1.1 Loading the module
45 ======================
46
47 (If you're going to compile the driver as a part of the kernel image,
48 skip this chapter and continue with 1.2)
49
50 Before you can use a module, you'll have to load it with::
51
52 insmod scc.o
53
54 please read 'man insmod' that comes with module-init-tools.
55
56 You should include the insmod in one of the /etc/rc.d/rc.* files,
57 and don't forget to insert a call of sccinit after that. It
58 will read your /etc/z8530drv.conf.
59
60 1.2. /etc/z8530drv.conf
61 =======================
62
63 To setup all parameters you must run /sbin/sccinit from one
64 of your rc.*-files. This has to be done BEFORE you can
65 "ifconfig" an interface. Sccinit reads the file /etc/z8530drv.conf
66 and sets the hardware, MODEM and KISS parameters. A sample file is
67 delivered with this package. Change it to your needs.
68
69 The file itself consists of two main sections.
70
71 1.2.1 configuration of hardware parameters
72 ==========================================
73
74 The hardware setup section defines the following parameters for each
75 Z8530::
76
77 chip 1
78 data_a 0x300 # data port A
79 ctrl_a 0x304 # control port A
80 data_b 0x301 # data port B
81 ctrl_b 0x305 # control port B
82 irq 5 # IRQ No. 5
83 pclock 4915200 # clock
84 board BAYCOM # hardware type
85 escc no # enhanced SCC chip? (8580/85180/85280)
86 vector 0 # latch for interrupt vector
87 special no # address of special function register
88 option 0 # option to set via sfr
89
90
91 chip
92 - this is just a delimiter to make sccinit a bit simpler to
93 program. A parameter has no effect.
94
95 data_a
96 - the address of the data port A of this Z8530 (needed)
97 ctrl_a
98 - the address of the control port A (needed)
99 data_b
100 - the address of the data port B (needed)
101 ctrl_b
102 - the address of the control port B (needed)
103
104 irq
105 - the used IRQ for this chip. Different chips can use different
106 IRQs or the same. If they share an interrupt, it needs to be
107 specified within one chip-definition only.
108
109 pclock - the clock at the PCLK pin of the Z8530 (option, 4915200 is
110 default), measured in Hertz
111
112 board
113 - the "type" of the board:
114
115 ======================= ========
116 SCC type value
117 ======================= ========
118 PA0HZP SCC card PA0HZP
119 EAGLE card EAGLE
120 PC100 card PC100
121 PRIMUS-PC (DG9BL) card PRIMUS
122 BayCom (U)SCC card BAYCOM
123 ======================= ========
124
125 escc
126 - if you want support for ESCC chips (8580, 85180, 85280), set
127 this to "yes" (option, defaults to "no")
128
129 vector
130 - address of the vector latch (aka "intack port") for PA0HZP
131 cards. There can be only one vector latch for all chips!
132 (option, defaults to 0)
133
134 special
135 - address of the special function register on several cards.
136 (option, defaults to 0)
137
138 option - The value you write into that register (option, default is 0)
139
140 You can specify up to four chips (8 channels). If this is not enough,
141 just change::
142
143 #define MAXSCC 4
144
145 to a higher value.
146
147 Example for the BAYCOM USCC:
148 ----------------------------
149
150 ::
151
152 chip 1
153 data_a 0x300 # data port A
154 ctrl_a 0x304 # control port A
155 data_b 0x301 # data port B
156 ctrl_b 0x305 # control port B
157 irq 5 # IRQ No. 5 (#)
158 board BAYCOM # hardware type (*)
159 #
160 # SCC chip 2
161 #
162 chip 2
163 data_a 0x302
164 ctrl_a 0x306
165 data_b 0x303
166 ctrl_b 0x307
167 board BAYCOM
168
169 An example for a PA0HZP card:
170 -----------------------------
171
172 ::
173
174 chip 1
175 data_a 0x153
176 data_b 0x151
177 ctrl_a 0x152
178 ctrl_b 0x150
179 irq 9
180 pclock 4915200
181 board PA0HZP
182 vector 0x168
183 escc no
184 #
185 #
186 #
187 chip 2
188 data_a 0x157
189 data_b 0x155
190 ctrl_a 0x156
191 ctrl_b 0x154
192 irq 9
193 pclock 4915200
194 board PA0HZP
195 vector 0x168
196 escc no
197
198 A DRSI would should probably work with this:
199 --------------------------------------------
200 (actually: two DRSI cards...)
201
202 ::
203
204 chip 1
205 data_a 0x303
206 data_b 0x301
207 ctrl_a 0x302
208 ctrl_b 0x300
209 irq 7
210 pclock 4915200
211 board DRSI
212 escc no
213 #
214 #
215 #
216 chip 2
217 data_a 0x313
218 data_b 0x311
219 ctrl_a 0x312
220 ctrl_b 0x310
221 irq 7
222 pclock 4915200
223 board DRSI
224 escc no
225
226 Note that you cannot use the on-board baudrate generator off DRSI
227 cards. Use "mode dpll" for clock source (see below).
228
229 This is based on information provided by Mike Bilow (and verified
230 by Paul Helay)
231
232 The utility "gencfg"
233 --------------------
234
235 If you only know the parameters for the PE1CHL driver for DOS,
236 run gencfg. It will generate the correct port addresses (I hope).
237 Its parameters are exactly the same as the ones you use with
238 the "attach scc" command in net, except that the string "init" must
239 not appear. Example::
240
241 gencfg 2 0x150 4 2 0 1 0x168 9 4915200
242
243 will print a skeleton z8530drv.conf for the OptoSCC to stdout.
244
245 ::
246
247 gencfg 2 0x300 2 4 5 -4 0 7 4915200 0x10
248
249 does the same for the BAYCOM USCC card. In my opinion it is much easier
250 to edit scc_config.h...
251
252
253 1.2.2 channel configuration
254 ===========================
255
256 The channel definition is divided into three sub sections for each
257 channel:
258
259 An example for scc0::
260
261 # DEVICE
262
263 device scc0 # the device for the following params
264
265 # MODEM / BUFFERS
266
267 speed 1200 # the default baudrate
268 clock dpll # clock source:
269 # dpll = normal half duplex operation
270 # external = MODEM provides own Rx/Tx clock
271 # divider = use full duplex divider if
272 # installed (1)
273 mode nrzi # HDLC encoding mode
274 # nrzi = 1k2 MODEM, G3RUH 9k6 MODEM
275 # nrz = DF9IC 9k6 MODEM
276 #
277 bufsize 384 # size of buffers. Note that this must include
278 # the AX.25 header, not only the data field!
279 # (optional, defaults to 384)
280
281 # KISS (Layer 1)
282
283 txdelay 36 # (see chapter 1.4)
284 persist 64
285 slot 8
286 tail 8
287 fulldup 0
288 wait 12
289 min 3
290 maxkey 7
291 idle 3
292 maxdef 120
293 group 0
294 txoff off
295 softdcd on
296 slip off
297
298 The order WITHIN these sections is unimportant. The order OF these
299 sections IS important. The MODEM parameters are set with the first
300 recognized KISS parameter...
301
302 Please note that you can initialize the board only once after boot
303 (or insmod). You can change all parameters but "mode" and "clock"
304 later with the Sccparam program or through KISS. Just to avoid
305 security holes...
306
307 (1) this divider is usually mounted on the SCC-PBC (PA0HZP) or not
308 present at all (BayCom). It feeds back the output of the DPLL
309 (digital pll) as transmit clock. Using this mode without a divider
310 installed will normally result in keying the transceiver until
311 maxkey expires --- of course without sending anything (useful).
312
313 2. Attachment of a channel by your AX.25 software
314 =================================================
315
316 2.1 Kernel AX.25
317 ================
318
319 To set up an AX.25 device you can simply type::
320
321 ifconfig scc0 44.128.1.1 hw ax25 dl0tha-7
322
323 This will create a network interface with the IP number 44.128.20.107
324 and the callsign "dl0tha". If you do not have any IP number (yet) you
325 can use any of the 44.128.0.0 network. Note that you do not need
326 axattach. The purpose of axattach (like slattach) is to create a KISS
327 network device linked to a TTY. Please read the documentation of the
328 ax25-utils and the AX.25-HOWTO to learn how to set the parameters of
329 the kernel AX.25.
330
331 2.2 NOS, NET and TFKISS
332 =======================
333
334 Since the TTY driver (aka KISS TNC emulation) is gone you need
335 to emulate the old behaviour. The cost of using these programs is
336 that you probably need to compile the kernel AX.25, regardless of whether
337 you actually use it or not. First setup your /etc/ax25/axports,
338 for example::
339
340 9k6 dl0tha-9 9600 255 4 9600 baud port (scc3)
341 axlink dl0tha-15 38400 255 4 Link to NOS
342
343 Now "ifconfig" the scc device::
344
345 ifconfig scc3 44.128.1.1 hw ax25 dl0tha-9
346
347 You can now axattach a pseudo-TTY::
348
349 axattach /dev/ptys0 axlink
350
351 and start your NOS and attach /dev/ptys0 there. The problem is that
352 NOS is reachable only via digipeating through the kernel AX.25
353 (disastrous on a DAMA controlled channel). To solve this problem,
354 configure "rxecho" to echo the incoming frames from "9k6" to "axlink"
355 and outgoing frames from "axlink" to "9k6" and start::
356
357 rxecho
358
359 Or simply use "kissbridge" coming with z8530drv-utils::
360
361 ifconfig scc3 hw ax25 dl0tha-9
362 kissbridge scc3 /dev/ptys0
363
364
365 3. Adjustment and Display of parameters
366 =======================================
367
368 3.1 Displaying SCC Parameters:
369 ==============================
370
371 Once a SCC channel has been attached, the parameter settings and
372 some statistic information can be shown using the param program::
373
374 dl1bke-u:~$ sccstat scc0
375
376 Parameters:
377
378 speed : 1200 baud
379 txdelay : 36
380 persist : 255
381 slottime : 0
382 txtail : 8
383 fulldup : 1
384 waittime : 12
385 mintime : 3 sec
386 maxkeyup : 7 sec
387 idletime : 3 sec
388 maxdefer : 120 sec
389 group : 0x00
390 txoff : off
391 softdcd : on
392 SLIP : off
393
394 Status:
395
396 HDLC Z8530 Interrupts Buffers
397 -----------------------------------------------------------------------
398 Sent : 273 RxOver : 0 RxInts : 125074 Size : 384
399 Received : 1095 TxUnder: 0 TxInts : 4684 NoSpace : 0
400 RxErrors : 1591 ExInts : 11776
401 TxErrors : 0 SpInts : 1503
402 Tx State : idle
403
404
405 The status info shown is:
406
407 ============== ==============================================================
408 Sent number of frames transmitted
409 Received number of frames received
410 RxErrors number of receive errors (CRC, ABORT)
411 TxErrors number of discarded Tx frames (due to various reasons)
412 Tx State status of the Tx interrupt handler: idle/busy/active/tail (2)
413 RxOver number of receiver overruns
414 TxUnder number of transmitter underruns
415 RxInts number of receiver interrupts
416 TxInts number of transmitter interrupts
417 EpInts number of receiver special condition interrupts
418 SpInts number of external/status interrupts
419 Size maximum size of an AX.25 frame (*with* AX.25 headers!)
420 NoSpace number of times a buffer could not get allocated
421 ============== ==============================================================
422
423 An overrun is abnormal. If lots of these occur, the product of
424 baudrate and number of interfaces is too high for the processing
425 power of your computer. NoSpace errors are unlikely to be caused by the
426 driver or the kernel AX.25.
427
428
429 3.2 Setting Parameters
430 ======================
431
432
433 The setting of parameters of the emulated KISS TNC is done in the
434 same way in the SCC driver. You can change parameters by using
435 the kissparms program from the ax25-utils package or use the program
436 "sccparam"::
437
438 sccparam <device> <paramname> <decimal-|hexadecimal value>
439
440 You can change the following parameters:
441
442 =========== =====
443 param value
444 =========== =====
445 speed 1200
446 txdelay 36
447 persist 255
448 slottime 0
449 txtail 8
450 fulldup 1
451 waittime 12
452 mintime 3
453 maxkeyup 7
454 idletime 3
455 maxdefer 120
456 group 0x00
457 txoff off
458 softdcd on
459 SLIP off
460 =========== =====
461
462
463 The parameters have the following meaning:
464
465 speed:
466 The baudrate on this channel in bits/sec
467
468 Example: sccparam /dev/scc3 speed 9600
469
470 txdelay:
471 The delay (in units of 10 ms) after keying of the
472 transmitter, until the first byte is sent. This is usually
473 called "TXDELAY" in a TNC. When 0 is specified, the driver
474 will just wait until the CTS signal is asserted. This
475 assumes the presence of a timer or other circuitry in the
476 MODEM and/or transmitter, that asserts CTS when the
477 transmitter is ready for data.
478 A normal value of this parameter is 30-36.
479
480 Example: sccparam /dev/scc0 txd 20
481
482 persist:
483 This is the probability that the transmitter will be keyed
484 when the channel is found to be free. It is a value from 0
485 to 255, and the probability is (value+1)/256. The value
486 should be somewhere near 50-60, and should be lowered when
487 the channel is used more heavily.
488
489 Example: sccparam /dev/scc2 persist 20
490
491 slottime:
492 This is the time between samples of the channel. It is
493 expressed in units of 10 ms. About 200-300 ms (value 20-30)
494 seems to be a good value.
495
496 Example: sccparam /dev/scc0 slot 20
497
498 tail:
499 The time the transmitter will remain keyed after the last
500 byte of a packet has been transferred to the SCC. This is
501 necessary because the CRC and a flag still have to leave the
502 SCC before the transmitter is keyed down. The value depends
503 on the baudrate selected. A few character times should be
504 sufficient, e.g. 40ms at 1200 baud. (value 4)
505 The value of this parameter is in 10 ms units.
506
507 Example: sccparam /dev/scc2 4
508
509 full:
510 The full-duplex mode switch. This can be one of the following
511 values:
512
513 0: The interface will operate in CSMA mode (the normal
514 half-duplex packet radio operation)
515 1: Fullduplex mode, i.e. the transmitter will be keyed at
516 any time, without checking the received carrier. It
517 will be unkeyed when there are no packets to be sent.
518 2: Like 1, but the transmitter will remain keyed, also
519 when there are no packets to be sent. Flags will be
520 sent in that case, until a timeout (parameter 10)
521 occurs.
522
523 Example: sccparam /dev/scc0 fulldup off
524
525 wait:
526 The initial waittime before any transmit attempt, after the
527 frame has been queue for transmit. This is the length of
528 the first slot in CSMA mode. In full duplex modes it is
529 set to 0 for maximum performance.
530 The value of this parameter is in 10 ms units.
531
532 Example: sccparam /dev/scc1 wait 4
533
534 maxkey:
535 The maximal time the transmitter will be keyed to send
536 packets, in seconds. This can be useful on busy CSMA
537 channels, to avoid "getting a bad reputation" when you are
538 generating a lot of traffic. After the specified time has
539 elapsed, no new frame will be started. Instead, the trans-
540 mitter will be switched off for a specified time (parameter
541 min), and then the selected algorithm for keyup will be
542 started again.
543 The value 0 as well as "off" will disable this feature,
544 and allow infinite transmission time.
545
546 Example: sccparam /dev/scc0 maxk 20
547
548 min:
549 This is the time the transmitter will be switched off when
550 the maximum transmission time is exceeded.
551
552 Example: sccparam /dev/scc3 min 10
553
554 idle:
555 This parameter specifies the maximum idle time in full duplex
556 2 mode, in seconds. When no frames have been sent for this
557 time, the transmitter will be keyed down. A value of 0 is
558 has same result as the fullduplex mode 1. This parameter
559 can be disabled.
560
561 Example: sccparam /dev/scc2 idle off # transmit forever
562
563 maxdefer
564 This is the maximum time (in seconds) to wait for a free channel
565 to send. When this timer expires the transmitter will be keyed
566 IMMEDIATELY. If you love to get trouble with other users you
567 should set this to a very low value ;-)
568
569 Example: sccparam /dev/scc0 maxdefer 240 # 2 minutes
570
571
572 txoff:
573 When this parameter has the value 0, the transmission of packets
574 is enable. Otherwise it is disabled.
575
576 Example: sccparam /dev/scc2 txoff on
577
578 group:
579 It is possible to build special radio equipment to use more than
580 one frequency on the same band, e.g. using several receivers and
581 only one transmitter that can be switched between frequencies.
582 Also, you can connect several radios that are active on the same
583 band. In these cases, it is not possible, or not a good idea, to
584 transmit on more than one frequency. The SCC driver provides a
585 method to lock transmitters on different interfaces, using the
586 "param <interface> group <x>" command. This will only work when
587 you are using CSMA mode (parameter full = 0).
588
589 The number <x> must be 0 if you want no group restrictions, and
590 can be computed as follows to create restricted groups:
591 <x> is the sum of some OCTAL numbers:
592
593
594 === =======================================================
595 200 This transmitter will only be keyed when all other
596 transmitters in the group are off.
597 100 This transmitter will only be keyed when the carrier
598 detect of all other interfaces in the group is off.
599 0xx A byte that can be used to define different groups.
600 Interfaces are in the same group, when the logical AND
601 between their xx values is nonzero.
602 === =======================================================
603
604 Examples:
605
606 When 2 interfaces use group 201, their transmitters will never be
607 keyed at the same time.
608
609 When 2 interfaces use group 101, the transmitters will only key
610 when both channels are clear at the same time. When group 301,
611 the transmitters will not be keyed at the same time.
612
613 Don't forget to convert the octal numbers into decimal before
614 you set the parameter.
615
616 Example: (to be written)
617
618 softdcd:
619 use a software dcd instead of the real one... Useful for a very
620 slow squelch.
621
622 Example: sccparam /dev/scc0 soft on
623
624
625 4. Problems
626 ===========
627
628 If you have tx-problems with your BayCom USCC card please check
629 the manufacturer of the 8530. SGS chips have a slightly
630 different timing. Try Zilog... A solution is to write to register 8
631 instead to the data port, but this won't work with the ESCC chips.
632 *SIGH!*
633
634 A very common problem is that the PTT locks until the maxkeyup timer
635 expires, although interrupts and clock source are correct. In most
636 cases compiling the driver with CONFIG_SCC_DELAY (set with
637 make config) solves the problems. For more hints read the (pseudo) FAQ
638 and the documentation coming with z8530drv-utils.
639
640 I got reports that the driver has problems on some 386-based systems.
641 (i.e. Amstrad) Those systems have a bogus AT bus timing which will
642 lead to delayed answers on interrupts. You can recognize these
643 problems by looking at the output of Sccstat for the suspected
644 port. If it shows under- and overruns you own such a system.
645
646 Delayed processing of received data: This depends on
647
648 - the kernel version
649
650 - kernel profiling compiled or not
651
652 - a high interrupt load
653
654 - a high load of the machine --- running X, Xmorph, XV and Povray,
655 while compiling the kernel... hmm ... even with 32 MB RAM ... ;-)
656 Or running a named for the whole .ampr.org domain on an 8 MB
657 box...
658
659 - using information from rxecho or kissbridge.
660
661 Kernel panics: please read /linux/README and find out if it
662 really occurred within the scc driver.
663
664 If you cannot solve a problem, send me
665
666 - a description of the problem,
667 - information on your hardware (computer system, scc board, modem)
668 - your kernel version
669 - the output of cat /proc/net/z8530
670
671 4. Thor RLC100
672 ==============
673
674 Mysteriously this board seems not to work with the driver. Anyone
675 got it up-and-running?
676
677
678 Many thanks to Linus Torvalds and Alan Cox for including the driver
679 in the Linux standard distribution and their support.
680
681 ::
682
683 Joerg Reuter ampr-net: dl1bke@db0pra.ampr.org
684 AX-25 : DL1BKE @ DB0ABH.#BAY.DEU.EU
685 Internet: jreuter@yaina.de
686 WWW : http://yaina.de/jreuter
687

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

드라이버 초기화와 module 적재

1-68

이 문서는 `GPL-2.0` 라이선스를 따릅니다.

SCC.C - AX.25용 Z8530 기반 HDLC card의 Linux 드라이버

이 문서는 전체 설명서의 일부입니다. 이 드라이버를 사용하려면 다음 위치에서 전체 package를 받아야 한다고 원문은 안내합니다.

  • `ftp://ftp.ccac.rwth-aachen.de/pub/jr/z8530drv-utils_3.0-3.tar.gz`
  • `ftp://ftp.pspt.fi/pub/ham/linux/ax25/z8530drv-utils_3.0-3.tar.gz`

문서 정보는 심각하게 오래되었을 수 있습니다. 원문은 새 설명서와 Linux 커널 AX.25 관련 문서·프로그램 링크를 `http://yaina.de/jreuter`에서 제공한다고 안내합니다. 이 FTP와 웹 주소는 역사적 기록이므로 현재 유효성은 별도로 확인해야 합니다.

Copyright 1993, 2000 Joerg Reuter DL1BKE `<jreuter@yaina.de>`. 일부는 Copyright 1993 Guido ten Dolle PE1NNZ입니다. 전체 저작권 고지는 `Copying.Z8530DRV`를 참조하십시오.

1. 드라이버 초기화

드라이버를 사용하려면 다음 세 단계를 수행해야 합니다.

  • module로 빌드했다면 module을 적재합니다.
  • `sccinit`으로 hardware, MODEM, KISS parameter를 설정합니다.
  • `ifconfig`로 각 channel을 Linux 커널 AX.25에 연결합니다.

2.4 미만 버전과 달리 이 드라이버는 실제 network device 드라이버입니다. 커널 AX.25 대신 xNOS를 실행하려면 위 사이트에서 2.x 버전을 사용하거나, network device 드라이버에서 KISS TNC를 흉내 내는 방법을 `AX.25-HOWTO`에서 확인하십시오.

Z8530 channel 활성화 순서
`insmod scc.o``sccinit`이 `/etc/z8530drv.conf` 적용`ifconfig`로 channel 연결AX.25 network interface 사용

module 적재부터 AX.25 interface 연결까지의 필수 순서입니다.

1.1 module 적재

드라이버를 커널 image 일부로 빌드할 예정이라면 이 절을 건너뛰고 1.2로 이동하십시오. module로 사용할 때는 다음과 같이 적재합니다.

insmod scc.o

자세한 내용은 module-init-tools와 함께 제공되는 `man insmod`를 읽으십시오.

`insmod`를 `/etc/rc.d/rc.*` 파일 중 하나에 넣고, 그 뒤에 `sccinit` 호출도 추가해야 합니다. `sccinit`은 `/etc/z8530drv.conf`를 읽습니다.

1.2 `/etc/z8530drv.conf`

모든 parameter를 설정하려면 `rc.*` 파일 중 하나에서 `/sbin/sccinit`을 실행해야 합니다. 이 작업은 interface에 `ifconfig`를 실행하기 전에 완료해야 합니다.

`sccinit`은 `/etc/z8530drv.conf`를 읽어 hardware, MODEM, KISS parameter를 설정합니다. package에 들어 있는 예제 파일을 환경에 맞게 바꾸십시오. 파일은 크게 두 section으로 구성됩니다.

.. SPDX-License-Identifier: GPL-2.0
.. include:: <isonum.txt>

=========================================================
SCC.C - Linux driver for Z8530 based HDLC cards for AX.25
=========================================================


This is a subset of the documentation. To use this driver you MUST have the
full package from:

Internet:

    1. ftp://ftp.ccac.rwth-aachen.de/pub/jr/z8530drv-utils_3.0-3.tar.gz

    2. ftp://ftp.pspt.fi/pub/ham/linux/ax25/z8530drv-utils_3.0-3.tar.gz

Please note that the information in this document may be hopelessly outdated.
A new version of the documentation, along with links to other important
Linux Kernel AX.25 documentation and programs, is available on
http://yaina.de/jreuter

Copyright |copy| 1993,2000 by Joerg Reuter DL1BKE <jreuter@yaina.de>

portions Copyright |copy| 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 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.o

please read 'man insmod' that comes with module-init-tools.

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.

Z8530 hardware parameter 설정

69-252

1.2.1 hardware parameter 설정

hardware setup section은 각 Z8530에 대해 다음 parameter를 정의합니다.

chip    1
data_a  0x300
ctrl_a  0x304
data_b  0x301
ctrl_b  0x305
irq     5
pclock  4915200
board   BAYCOM
escc    no
vector  0
special no
option  0
Z8530 hardware parameter
parameter의미필수/기본값
`chip``sccinit` parser를 단순화하는 구분자값 자체는 효과 없음
`data_a`Z8530 data port A 주소필수
`ctrl_a`control port A 주소필수
`data_b`data port B 주소필수
`ctrl_b`control port B 주소필수
`irq`chip이 사용하는 IRQ; 여러 chip이 공유 가능공유 IRQ는 한 chip 정의에만 지정
`pclock`Z8530 PCLK pin의 clock(Hz)선택, 기본 `4915200`
`board`board typehardware에 맞는 값
`escc`8580/85180/85280 ESCC 지원선택, 기본 `no`
`vector`PA0HZP vector latch 또는 intack port 주소선택, 기본 0; 모든 chip에 하나
`special`일부 card의 special function register 주소선택, 기본 0
`option`special function register에 쓸 값선택, 기본 0

필수 port 주소와 선택 hardware 정보를 구분했습니다.

`board`에 사용할 수 있는 값은 PA0HZP SCC card의 `PA0HZP`, EAGLE card의 `EAGLE`, PC100 card의 `PC100`, PRIMUS-PC(DG9BL) card의 `PRIMUS`, BayCom (U)SCC card의 `BAYCOM`입니다.

최대 네 chip, 즉 여덟 channel을 지정할 수 있습니다. 더 필요하다면 소스의 `#define MAXSCC 4`를 더 큰 값으로 바꾸십시오.

BAYCOM USCC 예제

chip    1
data_a  0x300
ctrl_a  0x304
data_b  0x301
ctrl_b  0x305
irq     5
board   BAYCOM

chip    2
data_a  0x302
ctrl_a  0x306
data_b  0x303
ctrl_b  0x307
board   BAYCOM

첫 chip 정의에 IRQ를 지정하고 두 번째 chip은 같은 interrupt를 공유하는 구성입니다.

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

DRSI card 두 장에 사용할 것으로 예상한 예제

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

DRSI card의 내장 baudrate generator는 사용할 수 없습니다. clock source에는 아래에서 설명하는 `mode dpll`을 사용하십시오. 이 정보는 Mike Bilow가 제공했고 Paul Helay가 검증했습니다.

`gencfg` utility

DOS용 PE1CHL 드라이버 parameter만 알고 있다면 `gencfg`를 실행하십시오. 작성자의 표현대로라면 올바른 port 주소를 생성할 것입니다. parameter는 `net`의 `attach scc` 명령과 같지만 `init` 문자열은 넣지 않습니다.

gencfg 2 0x150 4 2 0 1 0x168 9 4915200
gencfg 2 0x300 2 4 5 -4 0 7 4915200 0x10

첫 명령은 OptoSCC용 `z8530drv.conf` 골격을 표준 출력으로 내보내고, 두 번째 명령은 BAYCOM USCC card용 골격을 만듭니다. 작성자는 `scc_config.h`를 직접 편집하는 편이 훨씬 쉽다는 의견도 남겼습니다.

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. In my opinion it is much easier
to edit scc_config.h...

Channel의 MODEM·buffer·KISS 설정

253-312

1.2.2 channel 설정

각 channel 정의는 DEVICE, MODEM/BUFFERS, KISS(Layer 1)의 세 subsection으로 나뉩니다. 다음은 `scc0` 예제입니다.

device scc0

speed 1200
clock dpll
mode nrzi
bufsize 384

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
slip    off
Z8530 MODEM과 buffer 설정
parameter값/선택지의미
`speed``1200`기본 baudrate
`clock``dpll`일반 half-duplex 동작; digital PLL 사용
`clock``external`MODEM이 자체 RX/TX clock 제공
`clock``divider`설치된 full-duplex divider 사용
`mode``nrzi`1k2 MODEM과 G3RUH 9k6 MODEM의 HDLC encoding
`mode``nrz`DF9IC 9k6 MODEM의 HDLC encoding
`bufsize``384`AX.25 header까지 포함한 buffer 크기; 선택 기본값 384

channel 예제의 MODEM/BUFFERS parameter 의미입니다.

각 subsection 내부의 parameter 순서는 중요하지 않지만 subsection 자체의 순서는 중요합니다. MODEM parameter는 처음 인식된 KISS parameter와 함께 설정됩니다.

board는 boot 또는 `insmod` 뒤 한 번만 초기화할 수 있습니다. 그 뒤에는 보안 문제를 피하기 위해 `mode`와 `clock`을 제외한 parameter만 `Sccparam` 또는 KISS를 통해 변경할 수 있습니다.

`divider`는 보통 SCC-PBC(PA0HZP)에 장착되고 BayCom에는 전혀 없습니다. 이 회로는 DPLL(digital PLL) 출력을 송신 clock으로 되돌립니다.

divider가 설치되지 않은 상태에서 이 mode를 사용하면 보통 transceiver가 `maxkey` 만료 때까지 keying된 채 아무것도 보내지 못합니다.

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 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 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).

AX.25 software에 channel 연결

313-364

2. AX.25 software에 channel 연결

2.1 커널 AX.25

AX.25 device는 다음 명령으로 설정할 수 있습니다.

ifconfig scc0 44.128.1.1 hw ax25 dl0tha-7

원문 설명은 이 명령이 IP `44.128.20.107`과 callsign `dl0tha`를 가진 network interface를 만든다고 적지만, 실제 예제 인수는 IP `44.128.1.1`과 callsign `dl0tha-7`입니다. 여기서는 원문의 명령과 설명을 모두 그대로 보존합니다.

아직 IP 번호가 없다면 `44.128.0.0` network의 주소를 사용할 수 있다고 문서는 안내합니다. `axattach`는 필요하지 않습니다.

`axattach`는 `slattach`처럼 TTY에 연결된 KISS network device를 만드는 도구입니다. 커널 AX.25 parameter 설정은 ax25-utils 문서와 `AX.25-HOWTO`를 읽으십시오.

2.2 NOS, NET, TFKISS

TTY 드라이버, 즉 KISS TNC emulation이 사라졌으므로 예전 동작을 별도로 흉내 내야 합니다. 이런 프로그램을 쓰려면 실제 사용 여부와 무관하게 커널 AX.25를 빌드해야 할 가능성이 큽니다.

먼저 `/etc/ax25/axports`를 설정합니다.

9k6     dl0tha-9  9600  255 4 9600 baud port (scc3)
axlink  dl0tha-15 38400 255 4 Link to NOS

그런 다음 SCC device에 `ifconfig`를 적용합니다.

ifconfig scc3 44.128.1.1 hw ax25 dl0tha-9

이제 pseudo-TTY에 `axattach`를 실행할 수 있습니다.

axattach /dev/ptys0 axlink

NOS를 시작하고 그 안에서 `/dev/ptys0`를 연결합니다. 이 방식에서는 NOS에 커널 AX.25를 통한 digipeating으로만 도달할 수 있는데, DAMA가 제어하는 channel에는 심각한 문제가 됩니다.

해결하려면 `rxecho`가 `9k6`에서 들어오는 frame을 `axlink`로, `axlink`에서 나가는 frame을 `9k6`으로 echo하도록 설정한 뒤 `rxecho`를 시작합니다.

또는 z8530drv-utils의 `kissbridge`를 사용합니다.

ifconfig scc3 hw ax25 dl0tha-9
kissbridge scc3 /dev/ptys0
NOS와 SCC channel 연결
`scc3` AX.25 interface`rxecho`로 `9k6`와 `axlink` 양방향 echopseudo-TTYNOS
`scc3` AX.25 interface`kissbridge scc3 /dev/ptys0`pseudo-TTYNOS

KISS TNC emulation을 대신하는 두 연결 경로입니다.

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 of using these programs is
that you probably need to compile the kernel AX.25, regardless of whether
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
(disastrous 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 z8530drv-utils::

        ifconfig scc3 hw ax25 dl0tha-9
        kissbridge scc3 /dev/ptys0

SCC parameter와 통계 표시

365-428

3. parameter 조정과 표시

3.1 SCC parameter 표시

SCC channel을 연결한 뒤에는 `sccstat` 프로그램으로 parameter 설정과 일부 통계를 볼 수 있습니다.

sccstat scc0

예제 출력의 parameter는 `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`입니다.

sccstat 상태 field
field의미
`Sent`송신한 frame 수
`Received`수신한 frame 수
`RxErrors`CRC 또는 ABORT 수신 오류 수
`TxErrors`여러 이유로 버린 TX frame 수
`Tx State`TX interrupt handler 상태: idle, busy, active, tail
`RxOver`receiver overrun 수
`TxUnder`transmitter underrun 수
`RxInts`receiver interrupt 수
`TxInts`transmitter interrupt 수
`EpInts`receiver special-condition interrupt 수
`SpInts`external/status interrupt 수
`Size`AX.25 header를 포함한 AX.25 frame 최대 크기
`NoSpace`buffer를 할당하지 못한 횟수

HDLC, interrupt, buffer 통계가 뜻하는 값입니다.

overrun은 비정상입니다. 많이 발생한다면 baudrate와 interface 수의 곱이 컴퓨터 처리 능력에 비해 너무 큽니다.

`NoSpace` 오류는 드라이버나 커널 AX.25 때문에 생겼을 가능성이 낮습니다.

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 your computer. NoSpace errors are unlikely to be caused by the
driver or the kernel AX.25.

KISS TNC parameter 설정

429-624

3.2 parameter 설정

SCC 드라이버에서 emulated KISS TNC parameter도 같은 방식으로 설정합니다. ax25-utils의 `kissparms` 또는 `sccparam`을 사용할 수 있습니다.

sccparam <device> <paramname> <decimal-|hexadecimal value>

변경 가능한 parameter와 원문의 예시 값은 `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`입니다.

`speed`는 이 channel의 초당 bit 단위 baudrate입니다. 예: `sccparam /dev/scc3 speed 9600`.

`txdelay`는 transmitter를 keying한 뒤 첫 byte를 보낼 때까지의 지연이며 단위는 10 ms입니다. TNC에서는 보통 `TXDELAY`라고 부릅니다.

`txdelay`에 0을 지정하면 CTS signal이 assert될 때까지 기다립니다. MODEM이나 transmitter에 timer 또는 다른 회로가 있어 송신 준비가 되면 CTS를 assert한다고 가정합니다. 일반 값은 30~36입니다. 예: `sccparam /dev/scc0 txd 20`.

`persist`는 channel이 비어 있을 때 transmitter를 keying할 확률입니다. 값은 0~255이고 확률은 `(value+1)/256`입니다. 보통 50~60 부근이 적절하며 channel 사용량이 많을수록 낮춰야 합니다. 예: `sccparam /dev/scc2 persist 20`.

`slottime`은 channel을 sampling하는 간격이며 단위는 10 ms입니다. 200~300 ms, 즉 값 20~30 정도가 적당합니다. 예: `sccparam /dev/scc0 slot 20`.

`tail`은 packet의 마지막 byte를 SCC로 넘긴 뒤에도 transmitter keying을 유지하는 시간입니다. transmitter를 내리기 전에 CRC와 flag가 SCC를 빠져나가야 하기 때문에 필요합니다.

`tail` 값은 baudrate에 따라 달라지며 몇 character 시간이면 충분합니다. 예를 들어 1200 baud에서는 40 ms, 즉 값 4입니다. 단위는 10 ms입니다. 원문의 예제 `sccparam /dev/scc2 4`에는 parameter 이름이 빠져 있으나 그대로 보존합니다.

Z8530 full-duplex mode
동작
0CSMA mode, 일반적인 half-duplex packet radio
1수신 carrier를 확인하지 않고 언제든 keying; 보낼 packet이 없으면 keying 해제
2값 1과 같지만 packet이 없어도 keying 유지; timeout까지 flag 송신

`full` parameter 값에 따른 channel access와 keying 동작입니다.

`full`은 full-duplex mode switch입니다. 예: `sccparam /dev/scc0 fulldup off`.

`wait`는 frame이 송신 queue에 들어간 뒤 첫 송신 시도 전까지 기다리는 초기 시간이며 CSMA mode의 첫 slot 길이입니다. full-duplex mode에서는 최대 성능을 위해 0으로 설정합니다. 단위는 10 ms입니다. 예: `sccparam /dev/scc1 wait 4`.

`maxkey`는 packet 송신을 위해 transmitter를 keying할 수 있는 최대 시간이며 단위는 초입니다. busy CSMA channel에서 많은 traffic을 만들 때 독점 송신을 피하는 데 유용합니다.

`maxkey` 시간이 지나면 새 frame을 시작하지 않고 transmitter를 `min`에 지정된 시간 동안 끈 뒤 선택한 keyup algorithm을 다시 시작합니다. 0 또는 `off`는 이 기능을 꺼서 송신 시간을 무제한으로 허용합니다. 예: `sccparam /dev/scc0 maxk 20`.

`min`은 최대 송신 시간을 넘었을 때 transmitter를 꺼 두는 시간입니다. 예: `sccparam /dev/scc3 min 10`.

`idle`은 full-duplex mode 2에서 허용할 최대 idle 시간이며 단위는 초입니다. 이 시간 동안 frame을 보내지 않으면 transmitter keying을 해제합니다.

`idle` 값 0은 full-duplex mode 1과 같은 결과를 냅니다. parameter를 비활성화할 수도 있습니다. 예: `sccparam /dev/scc2 idle off`는 계속 송신합니다.

`maxdefer`는 송신할 free channel을 기다리는 최대 시간이며 단위는 초입니다. timer가 만료되면 transmitter를 즉시 keying합니다. 다른 사용자와 충돌하지 않으려면 지나치게 낮게 설정하지 마십시오.

원문의 예제 `sccparam /dev/scc0 maxdefer 240`에는 주석으로 2분이라고 적혀 있지만 240초는 4분입니다. 명령과 주석은 원문 그대로 아래 영어 원문에 보존됩니다.

`txoff`가 0이면 packet 송신을 허용하고, 그 밖의 값이면 송신을 비활성화합니다. 예: `sccparam /dev/scc2 txoff on`.

`group`은 같은 band의 여러 주파수에 여러 receiver와 전환 가능한 transmitter 하나를 쓰거나, 같은 band에서 여러 radio를 운용할 때 interface 사이의 transmitter를 잠그는 기능입니다.

`param <interface> group <x>` 명령으로 설정하며 `full = 0`인 CSMA mode에서만 동작합니다. group 제한이 필요 없으면 `<x>`는 0입니다. 제한 group 값은 다음 8진수 flag의 합으로 계산합니다.

Z8530 group의 8진수 flag
8진수 값제약
`200`group의 다른 모든 transmitter가 꺼져 있을 때만 keying
`100`group의 다른 모든 interface에서 carrier detect가 꺼져 있을 때만 keying
`0xx`서로 다른 group 정의용 byte; `xx` 값의 bit AND가 0이 아니면 같은 group

송신기 상호 배제와 carrier 조건을 조합합니다.

interface 두 개가 group `201`을 쓰면 두 transmitter는 동시에 keying되지 않습니다. group `101`이면 두 channel이 동시에 비어 있을 때만 transmitter가 keying됩니다. group `301`이면 transmitter가 동시에 keying되지 않습니다.

parameter를 설정하기 전에 8진수를 10진수로 변환해야 합니다. 원문의 group 예제는 아직 작성되지 않은 상태로 남아 있습니다.

`softdcd`는 실제 hardware DCD 대신 software DCD를 사용합니다. squelch가 매우 느릴 때 유용합니다. 예: `sccparam /dev/scc0 soft on`.

3.2 Setting Parameters
======================


The setting of parameters of the emulated KISS TNC is done in the
same way in the SCC driver. You can change parameters by using
the kissparms program from the ax25-utils package or use the program
"sccparam"::

     sccparam <device> <paramname> <decimal-|hexadecimal value>

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 /dev/scc3 speed 9600

txdelay:
     The delay (in units of 10 ms) 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 /dev/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 /dev/scc2 persist 20

slottime:
     This is the time between samples of the channel. It is
     expressed in units of 10 ms.  About 200-300 ms (value 20-30)
     seems to be a good value.

     Example: sccparam /dev/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 10 ms units.

     Example: sccparam /dev/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 /dev/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 full duplex modes it is
     set to 0 for maximum performance.
     The value of this parameter is in 10 ms units.

     Example: sccparam /dev/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 /dev/scc0 maxk 20

min:
     This is the time the transmitter will be switched off when
     the maximum transmission time is exceeded.

     Example: sccparam /dev/scc3 min 10

idle:
     This parameter specifies the maximum idle time in full duplex
     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 /dev/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 /dev/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 /dev/scc2 txoff on

group:
     It is possible to build special radio equipment to use more than
     one frequency on the same band, 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 <interface> group <x>" command.  This will only work when
     you are using CSMA mode (parameter full = 0).

     The number <x> must be 0 if you want no group restrictions, and
     can be computed as follows to create restricted groups:
     <x> 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 /dev/scc0 soft on

알려진 문제와 지원 정보

625-686

4. 문제

BayCom USCC card에서 TX 문제가 있다면 8530 제조사를 확인하십시오. SGS chip은 timing이 조금 다르므로 Zilog chip을 시도해 볼 수 있습니다.

data port 대신 register 8에 쓰는 해결책도 있지만 ESCC chip에서는 동작하지 않습니다.

interrupt와 clock source가 올바른데도 PTT가 `maxkeyup` timer 만료 때까지 잠기는 문제가 매우 흔합니다. 대부분은 `make config`에서 설정하는 `CONFIG_SCC_DELAY`로 드라이버를 빌드하면 해결됩니다.

추가 단서는 pseudo FAQ와 z8530drv-utils에 포함된 설명서를 참조하십시오.

일부 386 기반 시스템, 예를 들어 Amstrad에서 문제가 있다는 보고가 있었습니다. 잘못된 AT bus timing 때문에 interrupt 응답이 늦어집니다.

의심되는 port에서 `Sccstat` 출력을 확인해 underrun과 overrun이 함께 나타나면 이런 시스템일 가능성이 큽니다.

수신 데이터 처리가 늦어지는 정도는 다음 조건에 좌우됩니다.

  • 커널 버전
  • kernel profiling을 빌드했는지 여부
  • 높은 interrupt load
  • 시스템의 높은 부하
  • `rxecho` 또는 `kissbridge` 정보 사용

원문은 X, Xmorph, XV, Povray를 실행하면서 커널까지 빌드하는 32 MB RAM 시스템이나, 8 MB 시스템에서 `.ampr.org` 전체를 위한 `named`를 실행하는 사례를 높은 부하의 예로 듭니다.

kernel panic이 발생했다면 `/linux/README`를 읽고 실제로 SCC 드라이버 안에서 발생했는지 확인하십시오.

문제를 해결할 수 없다면 다음 정보를 작성자에게 보내십시오.

  • 문제 설명
  • computer system, SCC board, modem을 포함한 hardware 정보
  • 커널 버전
  • `cat /proc/net/z8530` 출력
Z8530 문제 진단
BayCom USCC TX 문제8530 제조사 확인SGS 대신 Zilog 검토
PTT가 maxkeyup까지 잠김interrupt와 clock 확인`CONFIG_SCC_DELAY` 빌드
RX/TX under/overrun`Sccstat` 확인AT bus timing과 시스템 부하 점검

증상별로 timing, build option, 처리 부하를 확인합니다.

4. Thor RLC100

이 board는 알 수 없는 이유로 드라이버와 동작하지 않는 것으로 보입니다. 원문은 성공적으로 동작시킨 사용자가 있는지 묻습니다.

드라이버를 Linux 표준 배포판에 포함하고 지원해 준 Linus Torvalds와 Alan Cox에게 감사를 전합니다.

Joerg Reuter 연락처: ampr-net `dl1bke@db0pra.ampr.org`, AX.25 `DL1BKE @ DB0ABH.#BAY.DEU.EU`, Internet `jreuter@yaina.de`, WWW `http://yaina.de/jreuter`.

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 compiling the driver with CONFIG_SCC_DELAY (set with
make config) 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. 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 /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?


Many 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 @ DB0ABH.#BAY.DEU.EU
                        Internet: jreuter@yaina.de
                        WWW     : http://yaina.de/jreuter