1 / 18

Serial Devices

Serial Devices. Serial Standards RS-232 RS-232 cables consist of up to 25 wires, each with a specific function and each intended to carry a different signal. Two for data transmission The rest are for various kinds of control signals All 25 pins are rarely used Only 9 pins commonly

erek
Download Presentation

Serial Devices

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Serial Devices • Serial Standards • RS-232 • RS-232 cables consist of up to 25 wires, each with a specific function and each intended to carry a different signal. • Two for data transmission • The rest are for various kinds of control signals • All 25 pins are rarely used • Only 9 pins commonly • DB25-to-9 pin adapters are readily available Serial Devices

  2. Serial Devices • RS-232 standard defines two types of equipment • Data Terminal Equipment (DTE) • Computers are DTE • Data Communication Equipment (DCT) • Modems, printers are DCE • DTE uses pin2 to transmit data and pin 3 to receive data; DCE does the reverse • To connect a computer to a modem, you want to make the connection straight through. • To connect a computer to a computer (DTE<->DTE), you need a able with receive/transmit lines crossed. • Called a null-modem or modem-eliminator cable Serial Devices

  3. Serial Devices • connectors • DB-25 • Mini DIN-8 • Found on Macs, laptops and workstations. • DB-9 variant • Commonly found on PCs • RJ-45 variant • An eight-wire modular telephone connector • Used as intermediate connectors when routing serial lines through patch panels. • Terminal servers Serial Devices

  4. Configuration of hardwired terminals • Terminal configuration involves main tasks • Making sure a process is attached to a terminal to accept logins • Making sure that information about the terminal is available once a user has logged in. • The login process • Usually, Init daemon spawn a process (getty) on each terminal port that is turned on in /etc/inittab • Getty set the port’s initial characteristics and print a login prompt Serial Devices

  5. Configuration of hardwired terminals • The sequence of events in a complete login • A user enters a login name at getty’s prompt • Getty executes the login program with the specified name • Login request a password and validate it again /etc/passwd • Login print the message of the day from /etc/motd • Login sets up the TERM env and runs a shell • The shell executes the appropriate startup files • The shell prints a prompt and waits for input. • When user logout, control returns to init, which wakes up and spawn a new getty on the terminal port. Serial Devices

  6. Configuration of hardwired terminals • Possible related files • BSD: The /etc/ttys and /etc/ttytab files • Format • Device program termtype {on|off} [secure] • /etc/ttytype • /etc/getttytab • Solaris/HP-UX: /etc/inittab • /etc/gettydefs • Starting the terminal line • Force the program init to reread the terminal line initialization information • Init becomes aware the device that has been added • Init takes the appropriate action (getty) • Example • #telinit q Serial Devices

  7. Terminal-Related Special Files • Special files for serial lines • Vary between systems • often the form /dev/ttyn where n is a number corresponding the line number • Pseudo terminal devices - Indirect login session via a network or windowing system • The master or control pseudo terminal, /dev/pty[p-s]n • The slave pseudo terminal ( virtual terminal) /dev/ttp[p-s]n • The special file /dev/console always refers to the system console device. Serial Devices

  8. Terminals • Commands tty • Display what special file is being used for any login session. • Example: [ruihong@dafinn ~]$ tty /dev/pts/3 • Specifying Terminal Characteristics • Unix programs are generally written to be terminal independent • They call standard screen manipulation library which is responsible for interfacing to actual terminals. • The library serve to map terminal characteristics and functions to the specific character sequences required to perform them on any specific terminal. Serial Devices

  9. Terminals • Terminal definitions are stored in database • User set what kind of terminal they are using by setting the TERM environment • Terminal definition database • Under BSD scheme, /etc/termcap • A text file consisting series entries that describes how different terminals function • Such as How many columns, how many lines, auto wrapping, characters sequence when a special key is pressed • Under System V, /usr/share/lib/terminfo • A series of binary files describing terminal capabilities • Each entry is a separate file in the subdirectory of /usr/share/lib/terminfo/{firstletter}/file Serial Devices

  10. Terminals • Terminfo files are compiled from source code • Command to manipulating terminfo entries • Compile terminfo source: tic • List source for a compiled terminfo entry: infocmp • Translate from terminfo to termcap: infocmp –C • Translate from termcap to terminfo source: captoinfo • For example: To use a old terminal for AIX system where system does no have terminfo entry for it. • found a BSD termcap • copy it to the system • run captoinfo • compile it using tic Serial Devices

  11. STTY: set terminal options • Specify generic terminal and terminal line characteristics • Syntax: stty option [value] … • See next page for commonly used options • Display the current terminal settings • $stty –a • Stty controls device driver and allow user to explicitly change the default setting Serial Devices

  12. Commonly used stty options Serial Devices

  13. Modems • Modem • converts digital signal from computer to analog signal for transmission on a standard phone line. • Internal and external modem • External:RS-232 interface on the digital side and RJ-11 jack on the analog side • Internal:pluginto an ISA, PCI or PCMCIA slot and have a RJ-11 jack • Upto 56Kb/s throughput Serial Devices

  14. Modems • Dial-out configuration • Command tip and cu • Use /etc/phones and /etc/remote • Bi-directional modems • Need special treatment • Since getty normally take full control of serial ports and other processes that want to use the modem are shut out • Under HP-UX/Redhat, use a special getty called uugetty on biferectinal ports. • Uugetty shares lock file with cu, tip and uucico to avoid conflicts. Serial Devices

  15. Other common I/O ports • Parallel ports • Transfer 8bits of data at once • Parallel interfaces are most commonly found on • Printer • Zip, tape drives and viedo cameras in Windows world • Two modes • EPP (Enhanced Parallel port) • ECP (Extended Capability Port) • Support DMA • Connectors and Cables • Computer usually provide a female DB-25 connector • Peripherals tend to have a female 36-pin Centronics connector • Most parallel cables are male DB-25 to male Centronics • Limited to 10 meters Serial Devices

  16. Other common I/O ports • USB: The Universal Serial Bus • Features: • Makes adding peripheral devices so easy. • Standardized connectors • Hot swapping – devices can be connected and disconnected without powering down • Up to 127 devices can be connected • Legacy serial and parallel devices can be connected with adaptors. Serial Devices

  17. Maximum Transfer Rates for various Connections • serial port: 115kbits/s (.115Mbits/s) • standard parallel port: 115kBYTES/s (.115MBYTES/s) • Original USB: 12Mbits/s (1.5MBYTES/s) • ECP/EPP parallel port: 3MBYTES/s • IDE: 3.3-16.7MBYTES/s • SCSI-1: 5MBYTES/s • SCSI-2 (Fast SCSI, Fast Narrow SCSI): 10MBYTES/s • Fast Wide SCSI (Wide SCSI): 20MBYTES/s • Ultra SCSI (SCSI-3, Fast-20, Ultra Narrow): 20MBYTES/s • UltraIDE: 33MBYTES/s • Wide Ultra SCSI (Fast Wide 20): 40MBYTES/s • Ultra2 SCSI: 40MBYTES/s • IEEE-1394: 100-800Mbits/s (12.5--100MBYTES/s) • Hi-Speed USB: 480Mbits/s • Wide Ultra2 SCSI: 80MBYTES/s • Ultra3 SCSI: 80MBYTES/s • Wide Ultra3 SCSI: 160MBYTES/s • FC-AL Fiber Channel: 100-400MBYTES/s Serial Devices

  18. Exercise • Connect to the switch console using a straight through cable • Connect to the other Sun Blade 100’s serial console using a non modem cable Serial Devices

More Related