Your SlideShare is downloading. ×
0
Ch09
Ch09
Ch09
Ch09
Ch09
Ch09
Ch09
Ch09
Ch09
Ch09
Ch09
Ch09
Ch09
Ch09
Ch09
Ch09
Ch09
Ch09
Ch09
Ch09
Ch09
Ch09
Ch09
Ch09
Ch09
Ch09
Ch09
Ch09
Ch09
Ch09
Ch09
Ch09
Ch09
Ch09
Ch09
Ch09
Ch09
Ch09
Ch09
Ch09
Ch09
Ch09
Ch09
Ch09
Ch09
Ch09
Ch09
Ch09
Ch09
Ch09
Ch09
Ch09
Ch09
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Ch09

376

Published on

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
376
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
22
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Serial Ports Chapter 9
  • 2. Chapter Goals <ul><li>Understand serial port terminology. </li></ul><ul><li>Understand serial port capabilities. </li></ul><ul><li>Understand serial port signals. </li></ul><ul><li>Understand serial port configuration </li></ul><ul><li>Understand serial port management. </li></ul><ul><li>Understand modem connections and setup. </li></ul><ul><li>Disabling serial port services. </li></ul><ul><li>Understand new-technology serial ports. </li></ul>
  • 3. Serial Ports <ul><li>Serial Ports </li></ul><ul><ul><li>Serial ports are universal I/O ports. They are available on almost every computer. </li></ul></ul><ul><ul><li>Serial ports are slow, but they are flexible. </li></ul></ul><ul><ul><li>Serial ports can be used for terminal connections, printer connections, network connections, modem connections, keyboards, mice, and other input/output devices. </li></ul></ul>
  • 4. Serial Ports <ul><li>Serial Ports </li></ul><ul><ul><li>Serial ports use standard pin-outs for the connectors. The most common of these standard is known as RS-232. </li></ul></ul><ul><ul><ul><li>Proposed by the Electronic Industries Association (EIA). </li></ul></ul></ul><ul><ul><ul><li>RS stands for Recommended Standard. </li></ul></ul></ul><ul><ul><ul><li>RS-232 defines the pin-outs of the connectors and the voltage levels allowed on each pin of a serial port connection. RS-232 is functionally identical to the CCITT V.24/V.28 standards. </li></ul></ul></ul><ul><ul><ul><li>RS-232 defines two types of signals; Data signals, and flow-control signals. </li></ul></ul></ul>
  • 5. Serial Ports <ul><li>Serial Ports </li></ul><ul><ul><ul><li>The RS-232 standard defines how the flow control signals interact to manage the flow of data across a connection. </li></ul></ul></ul><ul><ul><ul><li>The full functionality of the RS-232 standard is rarely supported, as several of the signals are not required for simple communications connections. </li></ul></ul></ul><ul><ul><ul><li>Traditional RS-232 uses 22 gauge stranded, twisted-pair cable. </li></ul></ul></ul><ul><ul><ul><li>RS-232 signal voltages are defined to be +/- 12 volts DC. </li></ul></ul></ul><ul><ul><ul><li>RS-232 connections terminate in a 25 pin D-connector (also known as a DB-25). The computer has the receptacle, while the cable has a plug. </li></ul></ul></ul><ul><ul><ul><li>According to the standard, RS-232 will drive a 50 foot cable at 9600 baud. </li></ul></ul></ul>
  • 6. Serial Ports <ul><ul><ul><li>Newer standards have emerged since RS-232 became the standard. </li></ul></ul></ul><ul><ul><ul><ul><li>RS-422/RS-423 use lower signaling voltages (+/- 5 volts DC) , and can drive longer lines. </li></ul></ul></ul></ul><ul><ul><ul><ul><li>RS-422 is electrically compatible with CCITT recommendation V.11. </li></ul></ul></ul></ul><ul><ul><ul><ul><li>RS-423 is electrically compatible with CCITT recommendation V.10. </li></ul></ul></ul></ul><ul><ul><ul><ul><li>RS-449 is the standard which defines the pin-outs and connector characteristics for the RS-422/RS-423 standards. </li></ul></ul></ul></ul><ul><ul><ul><ul><li>MOST RS-422/RS-423 implementations will connect directly to RS-232 devices and function properly. </li></ul></ul></ul></ul>
  • 7. Serial Ports <ul><ul><ul><li>RS-422 uses differential line drivers, and can drive several kilometers of cable. </li></ul></ul></ul><ul><ul><ul><li>RS-423 uses single-ended line drivers and can drive up to a kilometer of cable. </li></ul></ul></ul><ul><ul><ul><li>All of these standards use the same signals, so we will focus most of our discussion on the RS-232 standards. </li></ul></ul></ul>
  • 8. Serial Ports <ul><ul><ul><li>RS-232 defines two cabling configurations: DTE (Data Terminal Equipment) and DCE (Data Communications Equipment). </li></ul></ul></ul><ul><ul><ul><ul><li>These cabling configurations determine which signals a device expects on what pins. </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Most computers, printers, and terminals are DTE equipment. </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Modems are DCE equipment. </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Cables for terminals connections are different from the cables used for modem connections! </li></ul></ul></ul></ul>
  • 9. Serial Ports
  • 10. Serial Ports <ul><ul><ul><li>Although 25 pins are defined, many devices only use a small subset (4 to 9 pins). These devices require a software generated carrier signal. </li></ul></ul></ul>
  • 11. Serial Ports <ul><ul><ul><li>Devices which provide for limited modem control use 9 pin connections. </li></ul></ul></ul>
  • 12. Serial Ports <ul><ul><ul><li>Hardwired connections generally use a straight-through connection. </li></ul></ul></ul>
  • 13. Serial Ports <ul><ul><ul><li>Some devices require a null-modem cable. This cable fools the device at each end on the link into thinking it is receiving the proper modem control signals, while in fact each device is generating it’s own modem control signals. </li></ul></ul></ul>
  • 14. Serial Ports <ul><ul><ul><li>Some manufacturers have come out with alternate connectors for use with RS-232 connections: Apple uses a Mini-Din 8 connector, PC’s use DB-9 connectors, and some patch panels and other serial equipment use telephone style RJ-45 connectors. </li></ul></ul></ul>
  • 15. Serial Ports <ul><li>Working With Serial Devices </li></ul><ul><ul><li>When dealing with serial devices there are several complicating factors: </li></ul></ul><ul><ul><ul><li>You must set the communication speed (baud rate) of the device and the serial port. </li></ul></ul></ul><ul><ul><ul><li>You must set the correct form of parity checking on the device and the serial port. </li></ul></ul></ul><ul><ul><ul><li>You must set the number of stop bits to be used on the device and the serial port. </li></ul></ul></ul><ul><ul><ul><li>You must set the word length on the device and the serial port. </li></ul></ul></ul>
  • 16. Serial Ports <ul><li>Terminal Setup (Software) </li></ul><ul><ul><li>The built-in terminal devices on a UNIX workstation are usually /dev/ttya (/dev/term/a) and /dev/ttyb (/dev/term/b). </li></ul></ul><ul><ul><ul><li>The modem control equivalents of ttya and ttyb are /dev/cua0 /dev/cua1. </li></ul></ul></ul><ul><ul><li>For any serial connection you must set up certain system parameters: </li></ul></ul><ul><ul><ul><li>You must tell the system to listen for logins on a terminal port. </li></ul></ul></ul><ul><ul><ul><li>Dial-up modems listen for logins, but they must also monitor modem control signals to control the status of the link. </li></ul></ul></ul><ul><ul><ul><li>Dial-out modems require setup information in /etc/remote so the tip and cu commands know how to talk to the modem. </li></ul></ul></ul>
  • 17. Serial Ports <ul><li>Serial Ports </li></ul><ul><ul><li>Most terminals are used as login devices by the users. The sequence of events to start up a login session are : </li></ul></ul><ul><ul><ul><li>User enters login name at the getty prompt. </li></ul></ul></ul><ul><ul><ul><li>Getty executes login </li></ul></ul></ul><ul><ul><ul><li>login requests a password, and confirms it against /etc/passwd. </li></ul></ul></ul><ul><ul><ul><li>login prints the message of the day from /etc/motd . </li></ul></ul></ul><ul><ul><ul><li>login runs a shell and sets the TERM variable. </li></ul></ul></ul><ul><ul><ul><li>The shell executes the appropriate startup files for the user. </li></ul></ul></ul><ul><ul><ul><li>The shell prints the UNIX prompt and waits for input. </li></ul></ul></ul>
  • 18. Serial Ports <ul><li>Managing Terminals </li></ul><ul><ul><ul><li>When the user logs out, init takes over and starts a new getty process. </li></ul></ul></ul><ul><ul><ul><li>Getty reads configuration information from /etc/ttytab (BSD) or /etc/inittab (ATT) </li></ul></ul></ul><ul><ul><ul><li>/etc/ttytab contains entries which specify the terminal port , the program to run on that port, the terminal type connected to the port, { on|off } and possibly [ secure ]. </li></ul></ul></ul><ul><ul><ul><ul><li>ttya “/usr/etc/getty std.9600” wyse50 on </li></ul></ul></ul></ul><ul><ul><ul><li>The getty program checks /etc/gettytab to determine what the “std.9600” entry means, and sets the line disciplines appropriately. </li></ul></ul></ul><ul><ul><ul><ul><li>2|std.9600|9600-baud::sp#9600: </li></ul></ul></ul></ul>
  • 19. Serial Ports <ul><li>Managing Terminals </li></ul><ul><ul><li>In the ATT model, getty uses the /etc/inittab file to determine how to set the serial port. </li></ul></ul><ul><ul><li>The /etc/inittab file consists of entries with the format id:run-levels:action:process . </li></ul></ul><ul><ul><li>A typical entry might be: </li></ul></ul><ul><ul><ul><li>11:234:respawn:/etc/getty tty11 9600 </li></ul></ul></ul><ul><ul><li>The getty program consults the /etc/gettydefs file to determine how to set the port disciplines: </li></ul></ul><ul><ul><ul><li>9600# B9600 HUPCL # B9600 SANE IXANY HUPCL #login: #4800 </li></ul></ul></ul><ul><ul><li>The format of the entries is: label#initflags#finalflags#prompt#next </li></ul></ul>
  • 20. Serial Ports <ul><li>Managing Terminals </li></ul><ul><ul><li>The Service Access Facility ( SAF ) - is one method for managing serial devices under Solaris. It is a suite of commands which interacts with the serial device driver to allow the system administrator to configure the port hardware, and the port monitor software. </li></ul></ul><ul><ul><ul><li>The SAF allows you to </li></ul></ul></ul><ul><ul><ul><ul><li>Manage and troubleshoot TTY devices </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Manage and troubleshoot network print service requests. </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Manage and troubleshoot the Service Access Controller. </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Add and manage “listen” port monitor services. </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Add and manage ttymon port monitor services. </li></ul></ul></ul></ul>
  • 21. Serial Ports <ul><li>Managing Terminals </li></ul><ul><ul><ul><li>The SAF is not a single program; it is a suite of programs and background processes which control other programs which do all of the work. </li></ul></ul></ul><ul><ul><ul><ul><li>The top-level SAF program is the Service Access Controller (SAC). </li></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>The SAC is initialized at system boot. It is started by the scripts in the directory /etc/init.d . </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>The SAC initializes the system environment by interpreting the /etc/saf/_safconfig script. This script allows the system administrator to customize the serial port parameters for the machine. </li></ul></ul></ul></ul></ul>
  • 22. Serial Ports <ul><li>Managing Terminals </li></ul><ul><ul><ul><ul><ul><li>After the environment is set up, the SAC interprets the /etc/saf/_sactab file to start and customize the port monitors. </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>Each port monitor is spawned as a new process. The SAC maintains control of these processes, and is therefore the parent process. </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>Each child process started by the SAC invokes the appropriate /etc/saf/port_monitor/_config script to customize it’s own environment and start any processes required to enable the login process. </li></ul></ul></ul></ul></ul>
  • 23. Serial Ports <ul><li>Managing Terminals </li></ul><ul><ul><ul><ul><ul><li>Solaris implements two port monitors; ttymon , and listen . </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>ttymon is the program which monitors the serial ports, and directs data to/from the ports to the correct destination. </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>The ttymon command uses the definitions in the / etc/ttydefs file to set line disciplines and baud rate for each port. </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>Once the line disciplines are set, the ttymon hands control of the port over to the login process. </li></ul></ul></ul></ul></ul>
  • 24. Serial Ports
  • 25. Serial Ports <ul><li>Managing Terminals </li></ul><ul><ul><ul><ul><li>The sacadm command is used to administer the SAC. </li></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>sacadm allows the system administrator to add/remove port monitors, start/stop port monitors, enable/disable port monitors, install/replace configuration scripts, install/replace port monitor configuration scripts, and print port monitor information. </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>sacadm accepts input from stdin, and uses this input to control the SAC. </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>Non-privileged users may use sacadm to request the status of print jobs, port monitors, and system configuration scripts. </li></ul></ul></ul></ul></ul>
  • 26. Serial Ports
  • 27. Serial Ports <ul><li>Managing Terminals </li></ul><ul><ul><ul><ul><li>The ttyadm command is used to format ttymon administrative information for interpretation by the sacadm and pmadm commands. </li></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>The ttyadm command does not work with listen monitors. </li></ul></ul></ul></ul></ul>
  • 28. Serial Ports <ul><li>Managing Terminals </li></ul><ul><ul><ul><ul><li>Listen is the port monitor program which monitors the network for service requests from other hosts. </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Listen monitors may also manage some network services which are not controlled by the inet facility. </li></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>For example the network printer services are controlled by the listen port monitor. </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>The sacadm, pmadm, and nlsadmin commands are used to configure/administer the listen port monitor. </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>We will discuss the listen port monitor in more detail in the section on printers, and again in the networking section. </li></ul></ul></ul></ul></ul>
  • 29. The Service Access Controller
  • 30. Serial Ports <ul><li>Managing Terminals </li></ul><ul><ul><li>Admintool is another method for managing serial devices. It is a point and click GUI which interfaces to the SAF commands for you. </li></ul></ul><ul><ul><li>Because admintool relies on the command line form of the commands, and sometimes you want to do non-standard things, it is best to discuss how to use the command line commands. Once we understand them, we may never use them again...but understanding them is important! </li></ul></ul>
  • 31. Serial Ports <ul><li>Managing Terminals </li></ul><ul><ul><li>In order to connect a hardwired terminal to the system we must first: </li></ul></ul><ul><ul><ul><li>Set up the port monitor software. </li></ul></ul></ul><ul><ul><ul><ul><li>As root, use the sacadm command to enable login services on the port. </li></ul></ul></ul></ul><ul><ul><ul><ul><li>NOTE : You must use the bourne shell to execute the sacadm commands, or they may fail or provide unexpected results. </li></ul></ul></ul></ul><ul><ul><ul><li>Configure the terminal. </li></ul></ul></ul><ul><ul><ul><li>Test the setup to determine if the setup is correct. </li></ul></ul></ul>
  • 32. Serial Ports <ul><li>Managing Terminals </li></ul><ul><ul><li>To configure the software, first we check to see if a ttymon is already running on the port: </li></ul></ul><ul><ul><ul><li>sacadm -l -t ttymon </li></ul></ul></ul><ul><ul><li>If no ttymon is running, set one up: </li></ul></ul><ul><ul><li>sacadm -a -p zsmon -t ttymon -c /usr/lib/saf/ttymon -v ‘ttyadm -V’ </li></ul></ul><ul><ul><ul><li>NOTE: The string zsmon is known as the Port Monitor Tag (PMTAG) </li></ul></ul></ul>
  • 33. Serial Ports <ul><li>Managing Terminals </li></ul><ul><ul><li>Check to see if a service running on the zsmon port monitor: </li></ul></ul><ul><ul><li>pmadm -l </li></ul></ul><ul><ul><li>If a service is running, remove it (Note, the SVCTAG is generally the port name such as ttya. The preceding command will tell which SVCTAG to use here). </li></ul></ul><ul><ul><ul><li>pmadm -r -p (PMTAG) -s (SVCTAG) </li></ul></ul></ul><ul><ul><li>Set the port line disciplines and start login for the terminal: </li></ul></ul><ul><ul><li>pmadm -a -p zsmon -s (SVCTAG) -i root -fu -v ‘/usr/sbin/ttyadmin -V’ -m “‘/usr/sbin/ttyadm -l BAUDRATE -p “MESSAGE” -d /dev/term/(PORT) -T vt100 -i ‘terminal disabled’ -s /usr/bin/login -S -y’” </li></ul></ul>
  • 34. Serial Ports <ul><li>The stty command is a utility that allows the user, or administrator, to set specific terminal port characteristics. </li></ul><ul><li>Typical uses of the stty command include setting the baud rate, size of the display, parity, and special characters (erase character, interrupt character, redraw character, and so on). </li></ul><ul><li>stty also allows the user to view the current settings of these (and other) parameters. </li></ul><ul><li>Viewing Port Settings Using stty </li></ul><ul><ul><li>The invocation of stty that allows the user to view port settings ison of: </li></ul></ul><ul><ul><ul><li>stty a or stty all or stty everything </li></ul></ul></ul><ul><li>The second command lists several variants, because each version of UNIX seems to have its own flag to cause stty to display this information. </li></ul>
  • 35. Serial Ports <ul><li>Terminal Problems and Solutions </li></ul><ul><ul><li>Most terminal problems are caused by one of: </li></ul></ul><ul><ul><ul><li>You forgot to make init re-read the configuration files. Typing kill -1 1 (as root) will cause this to happen. </li></ul></ul></ul><ul><ul><ul><li>Forgot to set soft carrier mode on 3 wire connections. </li></ul></ul></ul><ul><ul><ul><li>Forgot to use the cu device for modem control connections. </li></ul></ul></ul><ul><ul><ul><li>Wrong type of cable (wrong pinout, null-modem instead of straight through, bad cable) </li></ul></ul></ul><ul><ul><ul><li>Port Monitor incorrectly configured. </li></ul></ul></ul><ul><ul><ul><li>Wrong line discipline information at one end of the link (parity, baud rate, stop bits). </li></ul></ul></ul><ul><ul><ul><li>Bad port/terminal </li></ul></ul></ul>
  • 36. Serial Ports <ul><li>Terminal Problems and Solutions </li></ul><ul><ul><ul><li>Sometimes a program will wedge a terminal. Vi, and any other screen oriented software can exit non-gracefully and cause the terminal to be left in a strange state. Many times you can recover from this. </li></ul></ul></ul><ul><ul><ul><ul><li>On BSD systems, type reset </li></ul></ul></ul></ul><ul><ul><ul><ul><li>On ATT systems, type stty sane </li></ul></ul></ul></ul><ul><ul><li>Sometimes the terminal will not accept a <CR>, so you have to use <LF> or CTRL-J after the commands to get any action from the system. </li></ul></ul>
  • 37. Modems <ul><li>Modem Control Signals </li></ul><ul><ul><li>Hard and Soft carrier </li></ul></ul><ul><ul><ul><li>UNIX systems expect to see the Data Carrier Detect signal (pin 8) active (+5VDC) when a device is connected and ready to communicate. </li></ul></ul></ul><ul><ul><ul><li>If the hardware actually expects pin 8 to be active, then the device is said to be using “hard carrier”. </li></ul></ul></ul><ul><ul><ul><li>Many systems employ software which pretends that the DCD signal is active. These systems are using “soft carrier”. </li></ul></ul></ul><ul><ul><ul><li>Soft carrier simplifies the wiring, and is often adequate for terminal connections. </li></ul></ul></ul><ul><ul><ul><li>Soft carrier is not adequate for modem connections, or for many printer connections. </li></ul></ul></ul>
  • 38. Modems <ul><li>Modem Control Signals </li></ul><ul><ul><li>The CTS/RTS signals are used to control data-flow between the devices. </li></ul></ul><ul><ul><li>Flow control is essential for modems, and is also very useful for many printers. </li></ul></ul><ul><ul><ul><li>Many printers have limited data buffers. These printers have to tell the computer to stop sending data while they drain their buffers. </li></ul></ul></ul><ul><ul><ul><li>Some printers use X-ON/X-OFF (Control-S, Control-Q) to signal the computer when to stop/start sending data. This method is not always reliable. </li></ul></ul></ul><ul><ul><ul><li>Most printers prefer to use use the modem-control signals to control data-flow. </li></ul></ul></ul>
  • 39. Modems <ul><li>Modem Control </li></ul><ul><ul><li>When a device is wired for modem control operation, the CTS/RTS signals define when each device may send data to the other. If DCD is true, and: </li></ul></ul><ul><ul><ul><li>a device sets it’s Clear-To-Send signal to true, then it is signaling the other end of the connection that it is ready to receive data. </li></ul></ul></ul><ul><ul><ul><li>a device sets it’s Request-To-Send signal to true, it is telling the device at the other end of the connection that it is ready to send data. </li></ul></ul></ul><ul><ul><ul><li>If the Data Carrier Detect signal transitions to false, the carrier has been lost, so the system should log the user out, and the connection should be terminated. </li></ul></ul></ul>
  • 40. Modems <ul><li>Managing Modems </li></ul><ul><ul><li>Modems take a little more setup information in the way of configuration files. </li></ul></ul><ul><ul><li>The /etc/remote file contains information used for dial-out connections by the tip and cu programs. A typical entry might be: </li></ul></ul><ul><ul><ul><li>dial9600|9600 Baud Hayes:dv=/dev/cul0:br#9600:cu=/dev/cul0:at=hayes:du: </li></ul></ul></ul><ul><ul><ul><li>systema:pn=5551212:tc=dial9600 </li></ul></ul></ul><ul><ul><ul><li>monet:pn=@:tc=dial9600 </li></ul></ul></ul><ul><ul><li>The /etc/phones file contains entries of the form: </li></ul></ul><ul><ul><ul><li>monet 8,,510,555-4567,,,,xxxx-xxx </li></ul></ul></ul><ul><ul><ul><li>cc 5552530 </li></ul></ul></ul>
  • 41. Modems <ul><li>Managing Modems </li></ul><ul><ul><li>In order to connect a bi-directional modem to the system we must first: </li></ul></ul><ul><ul><li>Set the PROM monitor to enable modem control signals. </li></ul></ul><ul><ul><ul><li>eeprom ttya-ignore-cd=true </li></ul></ul></ul><ul><ul><ul><li>eeprom ttya-rts-dtr-off=true </li></ul></ul></ul><ul><ul><li>Connect the modem to the port with a straight through cable. DO NOT use a null-modem cable, nor should you cross any of the pins in the modem cable. </li></ul></ul>
  • 42. Modems <ul><li>Managing Modems </li></ul><ul><ul><ul><li>Set up the port monitor software. </li></ul></ul></ul><ul><ul><ul><ul><li>As root, use the sacadm command to enable login services on the port. </li></ul></ul></ul></ul><ul><ul><ul><ul><li>NOTE : You must use the bourne shell to execute the sacadm commands, or they may fail or provide unexpected results. </li></ul></ul></ul></ul><ul><ul><li>To configure the software, first we check to see if a ttymon is already running on the port: </li></ul></ul><ul><ul><ul><li>sacadm -l -t ttymon </li></ul></ul></ul><ul><ul><li>If no ttymon is running, set one up: </li></ul></ul>
  • 43. Modems <ul><li>Managing Modems </li></ul><ul><ul><li>sacadm -a -p zsmon -t ttymon -c /usr/lib/saf/ttymon -v ‘ttyadm -V’ </li></ul></ul><ul><ul><ul><li>NOTE: The string zsmon is known as the Port Monitor Tag (PMTAG) </li></ul></ul></ul><ul><ul><li>Check to see if a service running on the zsmon port monitor: </li></ul></ul><ul><ul><li>pmadm -l </li></ul></ul><ul><ul><li>If a service is running, remove it (Note, the SVCTAG is generally the port name such as ttya. The preceding command will tell which SVCTAG to use here). </li></ul></ul><ul><ul><ul><li>pmadm -r -p (PMTAG) -s (SVCTAG) </li></ul></ul></ul><ul><ul><li>Set the port line disciplines and start login for the modem: </li></ul></ul>
  • 44. Modems <ul><li>Managing Modems </li></ul><ul><ul><li>pmadm -a -p zsmon -s (SVCTAG) -i root -v ‘/usr/sbin/ttyadmin -V’ -fu -m “‘/usr/sbin/ttyadm -p “MESSAGE” -d /dev/term/(PORT) -s /usr/bin/login -l BAUDRATE -b -S n -m ldterm,ttcompat’” -y “dial-in/out on serial port” </li></ul></ul><ul><ul><li>Configure the modem. </li></ul></ul><ul><ul><li>Test the setup to determine if the setup is correct. </li></ul></ul>
  • 45. Modems <ul><li>Using Dial-in Passwords </li></ul><ul><ul><li>Some versions of UNIX provide a dial-in password, an additional aid for defending dial-in terminal access. The dial-in password is controlled by two files, /etc/dialups and /etc/d_passwd . </li></ul></ul><ul><ul><ul><li>1. Create /etc/dialups . This file contains a single entry per line with the path of each dial-in modem line (e.g., /dev/term/a ). </li></ul></ul></ul><ul><ul><ul><li>2 . Create /etc/d_passwd . This file contains a single entry for each possible shell a dial-in modem user might use. </li></ul></ul></ul><ul><ul><ul><li> The following is a sample d_passwd file. </li></ul></ul></ul><ul><ul><ul><ul><li>/usr/lib/uucp/uucico: passwd-goes-here: </li></ul></ul></ul></ul><ul><ul><ul><ul><li>/usr/bin/csh: passwd-goes-here: </li></ul></ul></ul></ul><ul><ul><ul><ul><li>/usr/bin/ksh: passwd-goes-here: </li></ul></ul></ul></ul><ul><ul><ul><ul><li>/usr/bin/sh: passwd-goes-here: </li></ul></ul></ul></ul><ul><ul><ul><li>3. Insert an encrypted password for each shell in place of the passwd-goes-here strings shown previously. </li></ul></ul></ul>
  • 46. PPP <ul><li>A host can be a PPP client or a PPP server. </li></ul><ul><ul><li>If your host is dialing out to another server, your host is a PPP client. </li></ul></ul><ul><ul><li>If other hosts are dialing in to your system, your host is a PPP server. </li></ul></ul><ul><ul><li>Most operating systems provide tools for implementing both client and server sides of PPP. </li></ul></ul><ul><li>The process a user goes through to establish a PPP link to a typical PPP server includes the following steps. </li></ul><ul><ul><li>Dial into the server’s modem. </li></ul></ul><ul><ul><li>Log in using a valid user name and password pair. </li></ul></ul><ul><ul><li>At the shell prompt, issue the command ppp to start PPP on the server. </li></ul></ul><ul><ul><li>Start PPP on the user’s system. </li></ul></ul>
  • 47. PPP <ul><li>Windows Point-to-Point Protocol (PPP) </li></ul><ul><ul><li>The Microsoft PPP protocol is the Windows PPP client. </li></ul></ul><ul><ul><li>The PPP protocol setup is part of the Network and Dialup connections control panel. </li></ul></ul><ul><ul><ul><li>The selections under this wizard are somewhat limited; the dial-up line can be a terminal-style dial-up, a PPP dial-up, or a SLIP dial-up line. </li></ul></ul></ul><ul><ul><ul><li>The NETWORK tab of the dial-up control panel allows you to select between the PPP and SLIP connections. </li></ul></ul></ul>
  • 48. PPP <ul><li>Linux includes the following utilities, used to configure the client end of the PPP link. </li></ul><ul><ul><li>Kppp : The kppp utility is a PPP setup and dialer tool used under the KDE desktop manager. </li></ul></ul><ul><ul><li>WvDial : A PPP driver for Linux. This driver was designed with an emphasis on simplicity. </li></ul></ul><ul><ul><li>RP3 : Short for RedHat PPP. RP3 includes a “wizard” interface to guide the user through the setup/configuration of the PPP link. </li></ul></ul><ul><ul><li>Linuxconf : A generalized tool for configuring and managing your Linux machine. Linuxconf includes a utility to help configure PPP. </li></ul></ul>
  • 49. New Serial Ports <ul><li>Two new serial bus technologies have recently joined the mainstream offerings on computer systems: </li></ul><ul><ul><li>the Universal Serial Bus (USB) and </li></ul></ul><ul><ul><li>FireWire interfaces. </li></ul></ul><ul><ul><li>These two interfaces are high-speed system interconnects that support devices beyond modems and terminals. </li></ul></ul><ul><ul><li>Both interfaces allow you to add disks, tapes, and network adapters to the system via the USB/FireWire ports. </li></ul></ul>
  • 50. New Serial Ports <ul><li>USB Interface </li></ul><ul><li>The intent of the USB architecture is to provide a replacement for the aging serial and parallel ports on existing computers. </li></ul><ul><ul><li>The traditional serial bus requires an IRQ, I/O space, and memory space for each port, and only one device can plug into each port. USB uses one IRQ no matter how many devices are in use. </li></ul></ul><ul><ul><li>USB cables consist of four wires. </li></ul></ul><ul><ul><ul><li>Two of the wires supply voltage and two are data signal wires. </li></ul></ul></ul><ul><ul><ul><li>The bus operates at either 12 megabits per second or 1.5 megabits per second, depending on the attached device. </li></ul></ul></ul><ul><ul><ul><ul><li>The devices tell the bus what their speed is through the voltage cables. High-speed devices shift the positive voltage lead while slow-speed devices shift the negative voltage. </li></ul></ul></ul></ul>
  • 51. New Serial Ports <ul><li>FireWire Interface (IEEE 1394) </li></ul><ul><ul><li>The IEEE-1394 Serial Interface (FireWire) is a versatile, high-speed, low-cost method of interconnecting a variety of personal computer peripherals and consumer electronics devices. </li></ul></ul><ul><ul><li>The IEEE-1394 bus was developed in 1986 as Apple Computer’s alternative to the traditional COM ports, which had been used to connect printers, modems, external fixed-disk drives, scanners, and other peripherals to PCs. </li></ul></ul><ul><ul><li>The FireWire interface delivers up to 200 Mbps of data/control information. </li></ul></ul><ul><ul><li>Versions that support 400 Mbps and a 1.2-Gbps (gigabits per second) are under development. </li></ul></ul>
  • 52. Reference <ul><li>Good Reference for serial ports and Unix: </li></ul><ul><ul><li>http://www.stokely.com/unix.port.resources/tutorials.html </li></ul></ul>
  • 53. Summary <ul><li>Serial ports are low-speed communication channels provided by most computer systems. The hardware and signaling used on these ports are defined by standards, but the software employed by different operating systems is not. This often leads to confusion on the part of an administrator that has to deal with serial ports on many operating environments. </li></ul><ul><li>This chapter examined generic serial port standards and terminology, as well as the configuration and management utilities supplied by Windows and several flavors of UNIX operating systems. Also covered were configuration and management procedures for using serial ports under the point-to-point network protocol. The chapter also examined how to disable serial port services on traditional serial ports. </li></ul><ul><li>Whereas traditional serial ports are still used on most computer systems, two new serial port offerings allow users to connect an entirely new set of devices to the system using serial connections. The Universal Serial Bus (USB) and FireWire (IEEE1394) busses are both standards-driven serial interconnect bus specifications. </li></ul>

×