From owner-p4-projects@FreeBSD.ORG Sat Mar 22 19:29:07 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2209F1065681; Sat, 22 Mar 2008 19:29:07 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4AFE106567D for ; Sat, 22 Mar 2008 19:29:06 +0000 (UTC) (envelope-from pgj@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id CBE5F8FC1B for ; Sat, 22 Mar 2008 19:29:06 +0000 (UTC) (envelope-from pgj@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m2MJT6bI017939 for ; Sat, 22 Mar 2008 19:29:06 GMT (envelope-from pgj@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m2MJT6cB017937 for perforce@freebsd.org; Sat, 22 Mar 2008 19:29:06 GMT (envelope-from pgj@FreeBSD.org) Date: Sat, 22 Mar 2008 19:29:06 GMT Message-Id: <200803221929.m2MJT6cB017937@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to pgj@FreeBSD.org using -f From: Gabor Pali To: Perforce Change Reviews Cc: Subject: PERFORCE change 138303 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Mar 2008 19:29:07 -0000 http://perforce.freebsd.org/chv.cgi?CH=138303 Change 138303 by pgj@disznohal on 2008/03/22 19:28:10 Add initial Hungarian translation of Chapter 24: Serial Communications. Raw translation of Part IV is now completed, so the whole handbook is translated. Some MFen and corrections still needed, but I think it is a milestone in our efforts to have a Hungarian FreeBSD Handbook. Thank you for having my submits, and good night! Affected files ... .. //depot/projects/docproj_hu/books/handbook/serialcomms/chapter.sgml#3 edit Differences ... ==== //depot/projects/docproj_hu/books/handbook/serialcomms/chapter.sgml#3 (text+ko) ==== @@ -4,58 +4,83 @@ $FreeBSD: doc/en_US.ISO8859-1/books/handbook/serialcomms/chapter.sgml,v 1.120 2007/12/28 11:11:43 remko Exp $ --> + + - Serial Communications + Soros vonali kommunikáció - Synopsis + Áttekintés + + soros + kommunikáció + + A &unix; mindig is támogatta a soros vonali + kommunikációt. Tulajdonképpen az elsõ + &unix;-os gépek is soros vonalon kapták a + felhasználóktól a bemenetet és + ugyanígy küldték vissza a kimenetet. Sokat + változtak már az idõk azóta, hogy egy + átlagos terminál mindössze egy + 10 karakter per másodperc sebességû soros + nyomtatóból és egy billentyûzetbõl + állt. Ebben a fejezetben ismertetünk + néhány olyan megoldást, amivel a &os; + képes soros vonalon keresztül + kommunikálni. - serial communications - &unix; has always had support for serial communications. In fact, - the very first &unix; machines relied on serial lines for user input - and output. Things have changed a lot from the days when the average - terminal consisted of a 10-character-per-second serial - printer and a keyboard. This chapter will cover some of the ways in - which FreeBSD uses serial communications. + A fejezet elolvasása során + megismerjük: - After reading this chapter, you will know: - How to connect terminals to your FreeBSD - system. - How to use a modem to dial out to remote - hosts. - How to allow remote users to login to your - system with a modem. - How to boot your system from a serial - console. + hogyan kapcsoljunk terminálokat a &os; + rendszerünkre + hogyan tárcsázzunk modem + segítségével távoli + számítógépeket + hogyan tegyük lehetõvé + gépünkre a bejelentkezést távoli + felhasználók + számára + hogyan indítsuk a rendszerünket soros + konzolról - Before reading this chapter, you should: + A fejezet elolvasásához ajánlott: + - Know how to configure and install a new kernel (egy új rendszermag + beállításának és + telepítésének ismerete (). - Understand &unix; permissions and processes (). - Have access to the technical manual for the - serial hardware (modem or multi-port card) that you would like - to use with FreeBSD. + a &unix;-os engedélyek és a benne + futtatott programok mûködtetésének + megértése (). + annak a soros vonali hardver (modem vagy + többportos kártya) kézikönyve, amit a + &os;-vel használni szeretnénk + - Introduction - - + Bevezetés - Terminology + Alapfogalmak - bits-per-second + bit per + másodperc + bps - Bits per Second — the rate at which data is - transmitted + Bit per másodperc — az adatátvitel + sebessége @@ -63,8 +88,9 @@ DTE DTE - Data Terminal Equipment — for example, your - computer + Adatterminál eszköz (Data Terminal + Equipment) — ez például a + számítógépünk @@ -72,76 +98,109 @@ DCE DCE - Data Communications Equipment — your modem + Adatkommunikációs eszköz (Data + Communications Equipment) — ez a modem RS-232 - RS-232C cables + RS-232C kábel - EIA standard for hardware serial communications + a hardveres soros vonali kommunikációhoz + szükséges EIA szabványú + kábel - When talking about communications data rates, this section - does not use the term baud. Baud refers to the - number of electrical state transitions that may be made in a - period of time, while bps (bits per second) is - the correct term to use (at least it does not - seem to bother the curmudgeons quite as much). + Amikor ebben a fejezetben az adatátvitel + sebességérõl beszélünk, akkor + szándékosan nem használjuk a + baud fogalmát. A baud ugyanis a + kommunikációs eszközben adott idõ alatt + lezajló jelváltások + mennyiségét jelöli, miközben itt a + bps (bit per másodperc) kifejezés + használata a helyes (vagy + legalább is a szõrszálhasogatók + egyelõre megnyugodhatnak). + - Cables and Ports + Kábelek és portok - To connect a modem or terminal to your FreeBSD system, you - will need a serial port on your computer and the proper cable to connect - to your serial device. If you are already familiar with your - hardware and the cable it requires, you can safely skip this - section. + Ha a &os; rendszerünkhöz egy modemet vagy egy + terminált akarunk csatlakoztatni, akkor ahhoz a + számítógépünkben + szükség lesz egy szabad soros portra és egy + megfelelõ típusú kábelre. Ha + már tisztában vagyunk a rendelkezésre + álló hardverrel és a + hozzátartozó kábellel, akkor nyugodtan + átléphetjük ezt a részt. - Cables + A kábelek fajtái - There are several different kinds of serial cables. The - two most common types for our purposes are null-modem cables - and standard (straight) RS-232 cables. The documentation - for your hardware should describe the type of cable - required. + A soros kábeleknek több + különbözõ típusa van. + Közülük a céljainkhoz leginkább + illesztedõ két legismertebb változatuk az + ún. null-modem és a szabványos + (egyenes) RS-232-es soros kábelek. A + hardverhez tartozó dokumentációban + megtaláljuk, hogy pontosan melyik típus tartozik + hozzá. - Null-modem Cables + A null-modem kábelek + + null-modem + kábel - - null-modem cable - - A null-modem cable passes some signals, such as Signal - Ground, straight through, but switches other signals. For - example, the Transmitted Data pin on one end goes to the - Received Data pin on the other end. + Egy null-modem kábel bizonyos jeleket, + többek közt a földet (Signal + Ground, SG), egyenesen küldi, másokat viszont + felcserélten. Például az + átküldött adat (Transmitted + Data, TD) jelzésû tû a kábel + másik végen a fogadott adat + (Received Data, RD) tûhöz fut be. - You can also construct your own null-modem cable for use with - terminals (e.g., for quality purposes). This table shows the RS-232C - signals and the pin - numbers on a DB-25 connector. Note that the standard also calls for a - straight-through pin 1 to pin 1 Protective Ground - line, but it is often omitted. Some terminals work OK using only - pins 2, 3 and 7, while others require different configurations than - the examples shown below. + A terminálokhoz akár saját magunk + is le tudunk gyártani egy null-modem kábelt (pl. + ha a boltiakkal nem vagyunk megelégedve). A + következõ táblázatban az RS-232C + jeleit + és érintkezõinek + számozását láthatjuk egy + DB-25-ös csatlakozó esetében. + Vegyük észre, hogy a szabvány a + kábel két 1-es tûjét + összekapcsoló vonalat + védõföldnek + (Protective Ground, PD) nevezi, de ezt gyakran el is + hagyják. Némely terminál remekül + mûködik mindössze a 2-es, 3-as és 7-es + tûk használatával, miközben + mások az iménti példától + eltérõ kiosztást + igényelnek. - DB-25 to DB-25 Null-Modem Cable + DB-25 DB-25 közti null-modem + kábel - Signal - Pin # + Jel + - Pin # - Signal + + Jel @@ -149,7 +208,7 @@ SG 7 - connects to + párja: 7 SG @@ -157,7 +216,7 @@ TD 2 - connects to + párja: 3 RD @@ -165,7 +224,7 @@ RD 3 - connects to + párja: 2 TD @@ -173,7 +232,7 @@ RTS 4 - connects to + párja: 5 CTS @@ -181,7 +240,7 @@ CTS 5 - connects to + párja: 4 RTS @@ -189,7 +248,7 @@ DTR 20 - connects to + párja: 6 DSR @@ -197,7 +256,7 @@ DTR 20 - connects to + párja: 8 DCD @@ -205,7 +264,7 @@ DSR 6 - connects to + párja: 20 DTR @@ -213,7 +272,7 @@ DCD 8 - connects to + párja: 20 DTR @@ -221,19 +280,20 @@
- Here are two other schemes more common nowadays. + Íme a mostanság elterjedt másik + két séma. - DB-9 to DB-9 Null-Modem Cable + DB-9 DB-9 null-modem kábel - Signal - Pin # + Jel + - Pin # - Signal + + Jel @@ -241,7 +301,7 @@ RD 2 - connects to + párja: 3 TD @@ -249,7 +309,7 @@ TD 3 - connects to + párja: 2 RD @@ -257,7 +317,7 @@ DTR 4 - connects to + párja: 6 DSR @@ -265,7 +325,7 @@ DTR 4 - connects to + párja: 1 DCD @@ -273,7 +333,7 @@ SG 5 - connects to + párja: 5 SG @@ -281,7 +341,7 @@ DSR 6 - connects to + párja: 4 DTR @@ -289,7 +349,7 @@ DCD 1 - connects to + párja: 4 DTR @@ -297,7 +357,7 @@ RTS 7 - connects to + párja: 8 CTS @@ -305,7 +365,7 @@ CTS 8 - connects to + párja: 7 RTS @@ -314,16 +374,16 @@
- DB-9 to DB-25 Null-Modem Cable + DB-9 DB-25 null-modem kábel - Signal - Pin # + Jel + - Pin # - Signal + + Jel @@ -331,7 +391,7 @@ RD 2 - connects to + párja: 2 TD @@ -339,7 +399,7 @@ TD 3 - connects to + párja: 3 RD @@ -347,7 +407,7 @@ DTR 4 - connects to + párja: 6 DSR @@ -355,7 +415,7 @@ DTR 4 - connects to + párja: 8 DCD @@ -363,7 +423,7 @@ SG 5 - connects to + párja: 7 SG @@ -371,7 +431,7 @@ DSR 6 - connects to + párja: 20 DTR @@ -379,7 +439,7 @@ DCD 1 - connects to + párja: 20 DTR @@ -387,7 +447,7 @@ RTS 7 - connects to + párja: 5 CTS @@ -395,7 +455,7 @@ CTS 8 - connects to + párja: 4 RTS @@ -404,127 +464,185 @@
- When one pin at one end connects to a pair of pins - at the other end, it is usually implemented with one short - wire between the pair of pins in their connector and a - long wire to the other single pin. + Amikor egy tû az átellenes oldalon + két másik tûhöz csatlakozik, akkor + azt általában úgy + valósítják meg, hogy a két + tût a saját oldalukon összekötik, + majd ezt hozzákapcsolják a harmadik + tûhöz. - The above designs seems to be the most popular. In another - variation (explained in the book RS-232 Made - Easy) SG connects to SG, TD connects to RD, RTS and - CTS connect to DCD, DTR connects to DSR, and vice-versa. + Ezek a megoldások a legnépszerûbbek. + Természetesen a tûk + összekötésének több más + variációja is létezik (amirõl az + RS-232 Made Easy c. könyvben + olvashatunk bõvebben), ahol az SG párja az SG, a + TD párja az RD, a RTS és a CTS párja az + DCD, a DTR párja a DSR és ugyanezek + fordítva. +
- Standard RS-232C Cables - RS-232C cables + Szabványos RS-232C kábelek + + RS-232C kábel + + A szabványos soros kábel az összes + RS-232C jelet közvetlenül átküldi. + Vagyis a kábel egyik végén levõ + átküldött adat tû a + másik végén is az + átküldött adat + tûhöz csatlakozik. Az ilyen típusú + kábeleket többnyire a + számítógépek és a modemek + között alkalmazzák, de egyes + terminál esetében is kellhet. - A standard serial cable passes all of the RS-232C signals - straight through. That is, the Transmitted Data pin on one - end of the cable goes to the Transmitted Data pin on the - other end. This is the type of cable to use to connect a modem to your - FreeBSD system, and is also appropriate for some - terminals.
- Ports + A portok - Serial ports are the devices through which data is transferred - between the FreeBSD host computer and the terminal. This section - describes the kinds of ports that exist and how they are addressed - in FreeBSD. + A soros port olyan eszköz, amiken keresztül a + &os;-s gép és a terminál között + adatokat tudunk közvetíteni. Ebben a szakaszban + az ilyen portok különféle típusait + és ezek használatát ismertetjük &os; + alatt. - Kinds of Ports + A portok típusai + + A soros portoknak több típusa + létezik. Mielõtt vásárolnánk + egy készítenénk egy soros + kábelt, mindenképpen gyõzödjünk + meg róla, hogy csatlakoztatni tudjuk-e a &os;-s + rendszerünkhöz és a + terminálhoz. - Several kinds of serial ports exist. Before you purchase or - construct a cable, you need to make sure it will fit the ports on - your terminal and on the FreeBSD system. + A legtöbb terminálon DB-25-ös portot + találunk. A személyi + számítógépek, köztük + azok, amelyeken &os; fut, DB-25-ös és DB-9es + portokkal rendelkeznek. Ha a gépünkben egy + többportos soros kártya van, akkor rajtuk + kívül még RJ-12-es és + RJ-45-ös portjaink is lehetnek. - Most terminals will have DB-25 ports. Personal computers, - including PCs running FreeBSD, will have DB-25 or DB-9 ports. If you - have a multiport serial card for your PC, you may have RJ-12 or - RJ-45 ports. + A hardverhez tartozó + dokumentációból tudjuk kideríteni + az adott port konkrét fajtáját, de + gyakran a port vizuális vizsgálata is + segíthet eldönteni a + kérdést. - See the documentation that accompanied the hardware for - specifications on the kind of port in use. A visual inspection of - the port often works too. - Port Names + A portok nevei - In FreeBSD, you access each serial port through an entry in - the /dev directory. There are two different - kinds of entries: + &os; alatt az egyes soros portokat a + /dev könyvtárban + található eszközleírókon + keresztül tudjuk elérni. Ezeknek két + típusa van: - Call-in ports are named + A behíváshoz használt portok + nevei /dev/ttydN - where N is the port number, - starting from zero. Generally, you use the call-in port for - terminals. Call-in ports require that the serial line assert - the data carrier detect (DCD) signal to work correctly. + alakúak, ahol az N a + port sorszáma, ami nullától indul. + A behívó portok alapvetõen a + terminál esetében használatosak. A + behívó portok használatához + a soros vonalon az vonal + észlelése (Data Carrier Detect, + DCD) jelnek kell megbízhatóan + mûködnie. - Call-out ports are named - /dev/cuadN. - You usually do not use the call-out port for terminals, just - for modems. You may use the call-out port if the serial cable - or the terminal does not support the carrier detect - signal. + A híváshoz használt portok + nevei + /dev/cuadN + alakúak. A hívó portokat + terminálok esetében ritkán + alkalmazzák, helyettük inkább csak + modemekhez. A hívó portokat akkor + érdemes használni, ha a soros kábel + vagy a terminál nem ismeri a DCD jelet. - Call-out ports are named - /dev/cuaaN in - &os; 5.X and older. + + A &os; 5.X és korábbi + változataiban a hívó portok neve + /dev/cuaaN + formátumú. + - If you have connected a terminal to the first serial port - (COM1 in &ms-dos;), then you will - use /dev/ttyd0 to refer to the terminal. If - the terminal is on the second serial port (also known as - COM2), use - /dev/ttyd1, and so forth. + Ha a terminált az elsõ soros portra (ami + &ms-dos;-ban a COM1) csatlakoztattuk, + akkor a /dev/ttyd0 + segítségével fogunk rá + hivatkozni. Ha viszont a második soros porton + (más néven a + COM2-ön) + található, akkor a + /dev/ttyd1 eszközt + használjuk, és így + tovább.
- Kernel Configuration + A rendszermag beállítása - FreeBSD supports four serial ports by default. In the - &ms-dos; world, these are known as - COM1, - COM2, - COM3, and - COM4. FreeBSD currently supports - dumb multiport serial interface cards, such as - the BocaBoard 1008 and 2016, as well as more - intelligent multi-port cards such as those made by Digiboard - and Stallion Technologies. However, the default kernel only looks - for the standard COM ports. + A &os; alapból négy soros portot + támogat. Az &ms-dos; világban ezeket rendre + COM1, COM2, + COM3 és + COM4 portoknak nevezik. A &os; jelen + pillanatban ismeri még a butább + többportos soros csatolókártyákat is, + például a BocaBoard 1008 és 2016 + típusokat, valamint több intelligensebb + többportos kártyát, mondjuk a Digiboard + és a Stallion Technologies gyártmányait. + Azonban az alap rendszermag csak a szabványos COM + portokat keresi. - To see if your kernel recognizes any of your serial ports, watch - for messages while the kernel is booting, or use the - /sbin/dmesg command to replay the kernel's boot - messages. In particular, look for messages that start with the - characters sio. + Ha ellenõrizni akarjuk, hogy a rendszermag rendben + megtalálta a soros portokat, akkor figyelmesen olvassuk + el a rendszerindítás során megjelenõ + üzeneteket, vagy az /sbin/dmesg parancs + kiadásával játsszuk vissza a rendszermag + üzeneteit. Különösen a + sio kezdetû sorokra kell + figyelnünk. - To view just the messages that have the word - sio, use the command: + + Az alábbi paranccsal tudjuk leszûrni a + sio szövegrészt + tartalmazó sorokat: - &prompt.root; /sbin/dmesg | grep 'sio' + &prompt.root; /sbin/dmesg | grep 'sio' - For example, on a system with four serial ports, these are the - serial-port specific kernel boot messages: + Például ha négy soros port + található a rendszerünkben, akkor a + rájuk vonatkozó rendszerüzenetek a + következõk lesznek: sio0 at 0x3f8-0x3ff irq 4 on isa sio0: type 16550A @@ -535,116 +653,174 @@ sio3 at 0x2e8-0x2ef irq 9 on isa sio3: type 16550A - If your kernel does not recognize all of your serial - ports, you will probably need to configure your kernel - in the /boot/device.hints file. You can - also comment-out or completely remove lines for devices you do not - have. + Ha a rendszermagunk nem ismerte volna fel az összes + soros portot, akkor valószínûleg a + /boot/device.hints állományt + kell módosítanunk. Tegyük + megjegyzésbe vagy akár teljesen + távolítsuk is el azokat az eszközöket, + amikkel nem rendelkezünk. - Please refer to the &man.sio.4; manual page for - more information on serial ports and multiport boards configuration. - Be careful if you are using a configuration - file that was previously used for a different version of - FreeBSD because the device flags and the syntax have changed between - versions. + A soros portok és a többportos + kártyák beállításával + kapcsolatban a &man.sio.4; man oldalát olvassuk el. + Óvatosan bánjunk a &os; megelõzõ + változataiból származó + konfigurációs állományokkal, mert az + eszközök vonatkozó + beállításokat és azok + formátuma megváltozhatott azóta. - port IO_COM1 is a substitution for - port 0x3f8, IO_COM2 is - 0x2f8, IO_COM3 is - 0x3e8, and IO_COM4 is - 0x2e8, which are fairly common port addresses for - their respective serial ports; interrupts 4, 3, 5, and 9 are fairly - common interrupt request lines. Also note that regular serial ports - cannot share interrupts on ISA-bus PCs - (multiport boards have on-board electronics that allow all the - 16550A's on the board to share one or two interrupt request - lines). + Az port IO_COM1 a port + 0x3f8, az IO_COM2 a + 0x2f8, az IO_COM3 a + 0x3e8 és az + IO_COM4 a 0x2e8 + beállítást helyettesíti. Ezek az + adott porthoz tartozó gyakori címeket + képviselik. A 4-es, 3-as, 5-ös és 9 + megszakítások is igen általánosak + ezeknél. Azonban szeretnénk hozzátenni, + hogy a hagyományos soros portok az ISA buszos PC-ken + nem képesek a + megszakításokon osztozni. (A többportos + kártyák azonban lehetõvé teszik az + összes 16550A számára, hogy mindössze + egy vagy két megszakítást + használjon.) - Device Special Files + Speciális + eszközállományok + + A rendszermagban található legtöbb + eszköz az ún. speciális + eszközállományokon keresztül + érhetõ el, melyek a /dev + könyvtárban találhatóak. A + sio eszközök a + /dev/ttydN + (behívó portok) és + /dev/cuadN + (hívó portok) állományok + használatával érhetõek el. A &os; + ezenkívül még külön + eszközállományokat biztosít az + inicializációhoz + (/dev/ttydN.init + és + /dev/cuadN.init + a &os; 6.X változata alatt, + /dev/ttyidN + és + /dev/cuaiaN a + &os; 5.X változata esetén) és a + zároláshoz + (/dev/ttydN.lock + és + /dev/cuadN.lock + &os; 6.X alatt, + /dev/ttyldN + és + /dev/cualaN + &os; 5.X alatt) Az inicializációs + állományokat a port megnyitásakor + használhatóak a hozzátartozó + paraméterek beállítására, + például így tudjuk elküldeni a + crtscts utasítást az olyan + modemeknek, amelyek a forgalom + irányítását + RTS/CTS jelezéssel + valósítják meg. A zároló + állományokkal a portokra vonatkozó + zárolásokat állíthatjuk be, + így a felhasználók vagy a programok nem + lesznek képesek bizonyos paraméterek + megváltoztatni. A &man.termios.4;, &man.sio.4; és + &man.stty.1; man oldalakon olvashatunk részletesebben a + terminálok beállításairól, + valamint az eszközök + zárolásáról és + inicializálásáról. - Most devices in the kernel are accessed through device - special files, which are located in the - /dev directory. The sio - devices are accessed through the - /dev/ttydN (dial-in) - and /dev/cuadN - (call-out) devices. FreeBSD also provides initialization devices - (/dev/ttydN.init and - /dev/cuadN.init on - &os; 6.X, - /dev/ttyidN and - /dev/cuaiaN on - &os; 5.X) and - locking devices - (/dev/ttydN.lock and - /dev/cuadN.lock on - &os; 6.X, - /dev/ttyldN and - /dev/cualaN on - &os; 5.X). The - initialization devices are used to initialize communications port - parameters each time a port is opened, such as - crtscts for modems which use - RTS/CTS signaling for flow control. The locking - devices are used to lock flags on ports to prevent users or programs - changing certain parameters; see the manual pages &man.termios.4;, >>> TRUNCATED FOR MAIL (1000 lines) <<<