Chapter7 Serial Devices. Computer Center, CS, NCTU 2 Serial devices  Terminal  Modem  Mice  …

Slides:



Advertisements
Similar presentations
Linux Serial Programming for POSIX Operating Systems
Advertisements

I/O Interfaces.
Terminal I/O POSIX termios Two terminal I/O modes Canonical and non-canonical Getting and setting terminal attributes Terminal window size: struct winsize.
Serial I/O - Programmable Communication Interface
PH4705 ET4305 Interface Standards A number of standard digital data interfaces are used in measurement systems to connect instruments and computers for.
Lesson 10-Controlling User Processes. Overview Managing and processing processes. Managing jobs. Exiting/quitting when jobs have been stopped.
WXES2106 Network Technology Semester /2005 Chapter 5 Routers CCNA2: Module 1 and 2.
Chapter 10 Supporting I/O Devices. You Will Learn…  How to install peripheral I/O devices  How to use ports and expansion slots for add- on devices.
Serial Devices1-1 Serial Devices  Serial Standards m RS-232 RS-232 cables consist of up to 25 wires, each with a specific function and each intended to.
1 © 2004, Cisco Systems, Inc. All rights reserved. CCNA 2 v3.1 Module 1 WANs and Routers.
CCNA 2 v3.1 Module 2.
UNIX chapter 03 Getting Started Mr. Mohammad Smirat.
15-pin monitor male cable connects to pin female monitor port.
Serial Communications Standards (Partly Excerpted from Simpl Primer) Cabling Configuration Protocol.
University of Tehran 1 Interface Design Keyboard and Printer Omid Fatemi.
1 Semester 2 Module 2 Introduction to Routers Yuda college of business James Chen
University of Tehran 1 Interface Design Serial Communications Omid Fatemi.
1 © 2004, Cisco Systems, Inc. All rights reserved. Chapter 5 WANs and Routers/ Introduction to Routers.
Identification And Function
Terminal and Console Access Unix/IP Preparation Course May 29, 2011 Dar es Salaam, Tanzania.
The Vision of a Leader Rapid Eye Plus Technical Training.
1 Chapter 2 ROUTER FUNDAMENTALS By: Tassos Tassou.
Computers in Surveying SVY2301 / E4006 Automated Surveying.
Chapter 8 Input/Output. Busses l Group of electrical conductors suitable for carrying computer signals from one location to another l Each conductor in.
CISCO NETWORKING ACADEMY Chabot College ELEC Hyperterminal Access to Routers.
Serial Port I/O Serial port sends and receives data one bit at a time. Serial communication devices are divided into: Data Communications Equipment (DCE),
Module 2 Chapter 1:WAN’s and Routers. Topics 1.1 WANs 1.2 Routers.
Objectives Define IP Address To be able to assign an IP address with its Subnet Mask and Default Gateway to a PC that operates using Windows 7 or Fedora.
1 Chapter Overview Using the New Connection Wizard to configure network and Internet connections Using the New Connection Wizard to configure outbound.
1 © 2003, Cisco Systems, Inc. All rights reserved. CCNA 2 v3.0 Module 1 WANs and Routers.
CCNA 3 Week 6 Switch Configuration. Copyright © 2005 University of Bolton Physical Details Available in variety of sizes –12 port, 16 port, up to 48 port.
CS 497C – Introduction to UNIX Lecture 6: General-Purpose Utilities Chin-Chih Chang
Ch.2 – Introduction to Routers
Agenda Link of the week Use of Virtual Machine Review week one lab assignment This week’s expected outcomes Review next lab assignments Break Out Problems.
De Anza College Instructor: Clare Nguyen
Second edition Your UNIX: The Ultimate Guide Das © 2006 The McGraw-Hill Companies, Inc. All rights reserved. UNIX Commands Major part of the of learning.
1 © 2003, Cisco Systems, Inc. All rights reserved. CCNA 2 Module 2 Introduction to Routers.
IS 340 Review Router 101 Brigham Young University-Idaho.
PacNOG 6: Nadi, Fiji Terminal and Console Access Hervey Allen Network Startup Resource Center.
Router Fundamentals PJC CCNA Semester 2 Ver. 3.0 by William Kelly.
Chapter 5 Input/Output 5.1 Principles of I/O hardware
Serial Devices. Computer Center, CS, NCTU 2 Serial devices  Terminal  Modem  Mice  …
Ch.2 – Introduction to Routers CCNA 2 version 3.0 Rick Graziani Cabrillo College.
Introduction to Routers
CCNA2 Chapter 2 Cisco IOS Software. Cisco’s operating system is called Cisco Internetwork Operating System (IOS) IOS provides the following network services:
Terminal and Console Access Unix/IP Preparation Course July 19, 2009 Eugene, Oregon, USA
Quick guide to ASIMON configuration For version 3.0 or greater SAFETY AT WORK Date: 3/18/2009.
 Terminal  Modem  Mice  …  RS-232 standard on DB25 connector › Electrical characteristics › Meaning of each signal wire › Ping assignment › DB25P.
1 Chapter Overview Modems The Internet and Web Browsers.
Lecture 02 File and File system. Topics Describe the layout of a Linux file system Display and set paths Describe the most important files, including.
1 Pertemuan 2 Routers. Discussion Topics Introduction to WANs Router physical characteristics Router external connections Management port connections.
1 Pertemuan 12 Cabeling WANs. Discussion Topics WAN physical layer WAN serial connections Routers and serial connections Routers and ISDN BRI connections.
PCs ENVIRONMENT and PERIPHERALS Lecture 1. Software The series of instructions that tells the hardware how to perform tasks Software The series of instructions.
Chapter 4 Making Connections. Modem Modulates digital data onto analog signal and then demodulate analog signal back to digital data Features:  Standard.
BASICS OF SERIAL COMMUNICATIONS BIRLA VISHWKARMA MAHAVIDYALAYA ELECTRONICS & TELECOMMUNICATION DEPARTMENT PRESENTING BY: ABHISHEK SINGH AMANDEEP.
Cisco 2 - Routers Perrine. J Page 16/26/2016 Chapter 2 Cisco IOS Software Cisco’s operating system is called Cisco Internetwork Operating System (IOS)
1 © 2004, Cisco Systems, Inc. All rights reserved. CCNA 2 v3.1 Module 2 Introduction to Routers.
Chapter7 Serial Devices
Chapter7 Serial Devices
Operating Systems (CS 340 D)
Chapter7 Serial Devices
Serial Communications
Introduction to Networking
Serial Devices.
Identification And Function
CCNA 2 v3.1 Module 1 WANs and Routers
Serial Devices Chapter 7.
Serial Devices.
How to output NW camera picture to external monitor.
Presentation transcript:

Chapter7 Serial Devices

Computer Center, CS, NCTU 2 Serial devices  Terminal  Modem  Mice  …

Computer Center, CS, NCTU 3 Serial standard (1)  RS-232 standard on DB25 connector Electrical characteristics Meaning of each signal wire Ping assignment DB25P(male) DB25S (female)

Computer Center, CS, NCTU 4 Serial standard (2)  RS-232 signals and ping assignment

Computer Center, CS, NCTU 5 Serial standard (3)  Alternative connectors Since RS-232 is overkill for all real-world situation  Mini DIN-8  DB-9  RJ-45

Computer Center, CS, NCTU 6 Serial standard (4)  Cable Length RS-232 specifies a maximum length of 75 feet at 9600 bps  75 * 30.5 ≒ 22 m In reality, they hit the limit between 800 ~ 1000 feet

Computer Center, CS, NCTU 7 Serial Device File  Serial ports are represented by device files under /dev  The name of the device file is no big deal behavior is determined by the major and minor device number SystemDevice files for the first two serial ports FreeBSD/dev/ttyd[0,1] (com1, com2) Red Hat/dev/ttyS[0,1] Solaris/dev/term[a,b] SunOS/dev/tty[a,b] ls -al ttyd* crw root wheel 28, 0 Sep 19 20:14 ttyd0 crw root wheel 28, 1 Sep 19 20:14 ttyd1 crw root wheel 28, 2 Sep 19 20:14 ttyd2 crw root wheel 28, 3 Sep 19 20:14 ttyd3

Computer Center, CS, NCTU 8 Kernel Configuration  dmesg % /sbin/dmesg | grep sio  Kernel configuration file device sio  Kernel Module % kldload sio sio0 port 0x2f8-0x2ff irq 3 on acpi0 sio0: type 16550A sio1 port 0x2f8-0x2ff irq 3 on acpi0 sio1: type 16550A

Computer Center, CS, NCTU 9 Software Configuration  Depend on the type of serial device Hardwired terminal Modem

Computer Center, CS, NCTU 10 Configuration of Hardwired Terminals (1)  Two main tasks Make sure each process is attached to a terminal to accept logins Make sure that information about the terminal is available once a user login

Computer Center, CS, NCTU 11 Configuration of Hardwired Terminals (2)  The login process init spawn getty according to /etc/ttys getty sets the port ’ s initial characteristics and print the prompt User enter login name getty executes login program login request password login prints /etc/motd login sets up environment variables login runs a shell for user

Computer Center, CS, NCTU 12 Configuration of Hardwired Terminals (3)  Terminal Configuration Files On/Off  whether the terminal should be run a getty Term type  virtual console, network, dial-in Parameter  Terminal parameters, such as speed SystemOn/OffTerm TypeParametersMonitor FreeBSD/etc/ttys /etc/gettytabgetty Red Hat/etc/inittab/etc/ttytype/etc/gettydefsgetty SunOS/etc/ttytab /etc/gettytabgetty Solaris_sactab zsmon/_pmtabttymon

Computer Center, CS, NCTU 13 Configuration of Hardwired Terminals (4)  FreeBSD: /etc/ttys Format device program termtype {on|off} [secure] Restart init process  kill -1 1  kill – HUP 1 ttyv1 "/usr/libexec/getty Pc" cons25 on secure ttyv2 "/usr/libexec/getty Pc" cons25 on secure ttyd0 "/usr/libexec/getty std.9600" dialup off secure ttyd1 "/usr/libexec/getty std.9600" dialup off secure ttyp0 none network ttyp1 none network

Computer Center, CS, NCTU 14 Configuration of Hardwired Terminals (5)  FreeBSD: /etc/gettytab Associate symbolic names with port configuration information, such as speed, parity, prompt man gettytab default:\ :cb:ce:ck:lc:fd#1000:im=\r\n%s/%m (%h) (%t)\r\n\r\n:sp#1200:\ :if=/etc/issue: 2|std.9600|9600-baud:\ :np:sp#9600: P|Pc|Pc console:\ :ht:np:sp#115200:

Computer Center, CS, NCTU 15 Special Characters and The terminal driver  The terminal driver supports several special function when typing special keys NameDefaultFunction Erase^HErases one character of input WErase^WErases one word of input Kill^UErases the entire line of input EOF^D Sends an “ end of file ” indication INTR^CInterrupts the currently running process Quit^\Kills the current process with a core dump Stop^SStops output to the screen Start^QRestarts output to the screen Discard^OThrows away pending output Suspend^ZSuspends the current process LNext^VInterprets the next character literally

Computer Center, CS, NCTU 16 stty – Set Terminal Options  Change and query various settings of the terminal drivers There are about a zillion options man tty(4) and stty(1)  Example stty intr "^C" kill "^U" erase "^H" stty –a reset tty  reset  stty sane speed baud; 24 rows; 80 columns; lflags: icanon isig iexten echo echoe -echok echoke -echonl echoctl -echoprt -altwerase -noflsh -tostop -flusho pendin -nokerninfo -extproc iflags: -istrip icrnl -inlcr -igncr ixon -ixoff ixany imaxbel -ignbrk brkint -inpck -ignpar -parmrk oflags: opost onlcr -ocrnl -oxtabs -onocr -onlret cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow -dtrflow -mdmbuf cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = ; eol2 = ; erase = ^?; erase2 = ^H; intr = ^C; kill = ^U; lnext = ^V; min = 1; quit = ^\; reprint = ^R; start = ^Q; status = ^T; stop = ^S; susp = ^Z; time = 0; werase = ^W;

Computer Center, CS, NCTU 17 Other Common I/O ports (1)  Parallel ports Similar to serial ports in concept, but parallel ports transfer 8 bits of data at once IEEE-1284 standard Male DB25  male Centronics connector Male Centronics connector Female Centronics connector

Computer Center, CS, NCTU 18 Other Common I/O ports (2)  USB – Universal Serial Bus Up to 127 devices can be connected Standardized connectors Devices can be connected and disconnected without powering down Up to 12Mb/s  USB 2.0 Up to 480Mb/s