[Previous Section] [Back to Table of Contents] [Next Section]

IRIX Advanced Site and Server Administration Guide


Chapter 10
Terminals and Modems

This chapter describes some of the software and hardware considerations for terminals and modems. This information also applies to most generic serial devices and specialized devices such as the Dial & Button Box and the Spaceball. For more information on these devices, please contact Silicon Graphics.

The TTY system supports serial communication between users and serial devices, such as modems and terminals. ''Dumb'' serial printers are also connected using the TTY system, but they are covered in Chapter 9, "Administering Printers." This chapter tells you how to administer the TTY system with respect to terminals and modems. It includes information about:

To connect peripherals that are not covered in this chapter, see the documentation that accompanies the peripheral.


Terms

The following terms are used when describing serial devices and the TTY system:

TTY

Derived from the near-classic abbreviation for teletypewriter, the term covers the whole area of access between the IRIX system and peripheral devices, including the system console. It shows up in commands such as getty(1M) and stty(1), in the names of device special files such as /dev/ttyd1, and in the names of files such as /etc/gettydefs, which is used by getty.

TTY line

The physical equipment through which access to the computer is made.

port

A synonym for TTY line.

line settings

A set of line characteristics.

baud rate

The speed at which data is transmitted over the line. A part of line settings.

mode

The characteristics of the terminal interface, and a part of line settings. The TTY line and the terminal must be working in the same mode before communication can take place. Described in termio(7).

hunt sequence

A circular series of line settings such as different baud rates. During the login sequence, a user looking for a compatible connection to the computer can go from one setting to the next by sending a BREAK signal.

terminal options


Selectable settings that define the way a given terminal operates. Described in termio(7).


Adding a Terminal or Modem

Most workstations have some form of external tty devices attached. The following information describes the tasks necessary to add a terminal or a modem to your workstation.

Attaching an ASCII Terminal

This section describes the procedures for connecting and configuring an ASCII terminal. The diagnostics terminal is the ASCII terminal connected to the port labeled 1 on the I/O panel of a server. The messages produced by the power-on diagnostics appear on the screen of this terminal.

Connecting the Terminal Hardware

Connect the ASCII terminal to the port labeled 1 on the I/O panel. See "Cabling the Serial Ports" for information about port cabling and pin signals.

Configuring the Terminal Software

This section tells you how to configure IRIX software to use an ASCII terminal with your workstation.

The utilities described in this section are distributed as part of the eoe2.sw.terminfo package. You must have installed this package on your system in order to use these utilities. See the Software Installation Guide for information and specific instructions on installing this package.

The /usr/lib/terminfo directory contains files that describe different terminal models, their capabilities, and how they operate. For most ASCII terminal models, you do not need to edit this database. Follow the procedure below to see whether the information on your terminal model appears in the directory /usr/lib/terminfo. If your terminal is not in the database, or if it does not work properly after you have configured the software, you must write a terminal description. See the optional IRIX Programmer's Guide and the tset(1), stty(1), and terminfo(4) reference pages.

The directory /usr/lib/terminfo is divided into numerical and alphabetical subdirectories. Each subdirectory contains entries for terminals whose names begin with that character. For example, /usr/lib/terminfo/v contains the entry for the Visual 50. The entry name listed in the subdirectory is v50am.

To find the entry name for your terminal and to configure software for an ASCII terminal, follow these steps:

    Log in as root or become the superuser by entering the su command.

    To change directories to /usr/lib/terminfo, type:

    cd /usr/lib/terminfo 

    To find the name of your terminal, issue a grep command with a string that you suspect could make up part of your terminal name. If this fails, examine the subdirectories of /usr/lib/terminfo, which contain all the terminal entries.

    ls -R | fgrep string 

    Once you know the terminal name as it appears in /usr/lib/terminfo, issue the infocmp command to find out the model name of your terminal. For example, for a Visual 50, issue this command:

    infocmp -I v50am 

    You see a display that begins with this line:

    v50am|visual50 (v50 emulation) with automatic margins,

    The data in the first field (v50am) is the model name of your terminal. In the next step, you'll enter this model name in the /etc/ttytype file.

    Edit /etc/ttytype.

    This file tells which type of terminal is connected to which port. In the line that contains the port you are using, replace du with the model name of your terminal. The question mark (?) at the beginning of the line in /etc/ttytype causes tset to prompt for the kind of terminal you are using when you log on through that port. An /etc/ttytype might look like this example:

    iris-ansi systty
    ?v50am    ttyd1
    ?v50am    ttyd2
    ?v50am    ttyd3
    ?v50am    ttyd4
    ?v50am    ttyd5
    ?v50am    ttyd6
    ?v50am    ttyd7
    ?v50am    ttyd8
    ?v50am    ttyd9
    ?v50am    ttyd10
    ?v50am    ttyd11
    ?v50am    ttyd12

    You normally call tset in your login startup script (.login or .profile). tset commands use information from /etc/ttytype and /usr/lib/terminfo to initialize the terminal. These files also provide information on setting up environment variables so that editors and other programs know how to communicate with the terminal. See tset(1).

    Edit /etc/inittab so that you can log in to the computer ports. This is a sample from an /etc/inittab file:

    t1:23:respawn:/etc/getty -s console ttyd1 co_9600 # port 1
    t2:23:off:/etc/getty -N ttyd2 co_9600 # port 2 
    t3:23:off:/etc/getty -N ttyd3 co_9600 # port 3 
    t4:23:off:/etc/getty -N ttyd4 co_9600 # port 4 

    Here are two example entries, with an explanation of each field in the entries:

    t1:23:respawn:/etc/getty -s console ttyd1 co_9600
    t2:23:off:/etc/getty -N ttyd2 co_9600



    t1 t2

    uniquely identifies the entry.

    23

    defines the run level in which this entry is to be processed. A 23 means this entry is to be processed in run levels two and three.

    off

    means never perform the action on the process field of init.

    respawn

    means perform the action on the process field of init. See inittab(4) for a description of all possible actions.

    /etc/getty -s console ttyd1 co_9600


    runs the getty process on the port labeled 1 at the baud rate and with the options specified in the co_9600 entry in the /etc/gettydefs file. The -s console option instructs getty that the login shell generated is a system console, and therefore receives system error messages.

    /etc/getty -N ttyd2 co_9600


    runs the getty process on the port labeled 2 at the baud rate and with the options specified in the co_9600 entry in the /etc/gettydefs file. The -N option instructs getty to honor the presence of the /etc/nologin file, which disallows remote logins over the network.

    To enable you to log in to the terminal connected to the port labeled 2, find this line:

    t2:23:off:/etc/getty -N ttyd2 co_9600 

    Change it to:

    t2:23:respawn:/etc/getty -N ttyd2 co_9600 

    /etc/inittab refers to /etc/gettydefs for information about the terminal baud rate. In the example from /etc/inittab above, co_9600 refers to the name of an entry in /etc/gettydefs; it defines a 9600 baud setting. If you don't plan to run the terminal at 9600 baud, replace co_9600 in /etc/inittab with the correct entry name from /etc/gettydefs. To see which entries are defined in /etc/gettydefs, examine the file, or see "Checking Line Settings Using IRIX Shell Commands". To make a new entry, see "Creating and Testing Line Settings". The entries in /etc/gettydefs look like this:

    dx_9600# B9600 # B9600 SANE TAB3 HUPCL #\r\n\n$HOSTNAME login: #dx_9600 
    dx_4800# B4800 # B4800 SANE TAB3 HUPCL #\r\n\n$HOSTNAME login: #dx_4800 
    dx_2400# B2400 # B2400 SANE TAB3 HUPCL #\r\n\n$HOSTNAME login: #dx_2400 
    dx_1200# B1200 # B1200 SANE TAB3 HUPCL #\r\n\n$HOSTNAME login: #dx_1200 
    du_1200# B1200 # B1200 SANE TAB3 HUPCL #\r\n\n$HOSTNAME login: #du_300 
    du_300#  B300  # B300  SANE TAB3 HUPCL #\r\n\n$HOSTNAME login: #du_2400 
    du_2400# B2400 # B2400 SANE TAB3 HUPCL #\r\n\n$HOSTNAME login: #du_1200 

    The entries beginning with dx are typically used for terminals; those beginning with du are typically for modems. See gettydefs(4) for more information on the fields of each entry.

    When the terminal is powered on, the workstation sends a login prompt to the terminal screen. Press <Enter> if the login prompt doesn't appear. If the default line speed set in /etc/inittab is incorrect, the prompt may be garbled or may not appear.

    Inform init of the change to /etc/inittab, and start a getty process for the port:

    telinit q 

Setting Terminal Options

The TTY system described thus far establishes a basic style of communication between the user's terminal and the IRIX operating system. Once a user has successfully logged in, he or she may prefer terminal options other than the default set.

The stty(1) command controls terminal options. Many users add an stty command to their .profile or .login files so the options they want are automatically set as part of the login process. Here is an example of a simple stty command:

stty cr0 nl0 echoe -tabs erase '^H'

The options in the example mean:

cr0 nl0

No delay for carriage return or new line. Delays are not used on a video display terminal, but are necessary on some printing terminals to allow time for the mechanical parts of the equipment to move.

echoe

Erases characters as you backspace.

-tabs

Expand tabs to spaces when printing.

erase '^H

Change the character-delete character to a Ctrl-H. The default character-delete character is the pound sign (#). Most terminals transmit a Ctrl-H when the <backspace> key is pressed. Specifying this option makes <backspace> useful.

Attaching a Modem

Complete information on installing and configuring a modem is available in the Personal System Administration Guide and it is recommended that you use that information as your primary guide. The information provided here is sufficient to install a modem using IRIX shell commands. See "Cabling the Serial Ports" for information about modem cabling.

Silicon Graphics supports Hayes 2400 and Telebit modems. This section gives you the information you need to set up only these two types of modems; it does not provide all the in-depth information necessary to set up a ``Hayes- compatible'' modem.

You can use the standard system software to set up a modem in three different ways:

To set up a modem, you must first physically connect the modem to a serial port on your system, and connect the modem to a telephone jack. See your Owner's Guide or "Cabling the Serial Ports" for cabling information.

Note: Do not connect your system to the modem with a cable for an IBM-PC/AT or for an Apple Macintosh as it will not function correctly.

The eoe2.sw.uucp subsystem must be installed on your system. It is shipped with your IRIX system software distribution on tape or CD, but it is not installed by default. You can determine whether eoe2.sw.uucp is installed by using the command:

versions 

and checking the versions output for the following line:

I eoe2.sw.uucp uucp utilities

If the line above is not present, eoe2.sw.uucp is not installed. See the IRIS Software Installation Guide for instructions on installing a subsystem and install eoe2.sw.uucp.

Use the documentation that came with your modem to determine the modem's baud rate. Next, determine what use you want to make of the

modem and go to the appropriate following section in this chapter. There are three options:

Turning On Dial-In Modem Software

You enable dial-in modem software by editing the /etc/inittab file, and running several commands. Perform the following steps in order:

    Log in as root.

    Edit /etc/inittab to turn off the port you will be using so you can configure it correctly.

    Find the line for your port. The line begins with tportnumber, where portnumber is the number of a serial port. For example, if you connected your modem to port 2, look for a line similar to the following:

    t2:23:respawn:/etc/getty -N ttyd2 co_9600 #port 2

    Change respawn to off. This tells the system not to restart the /etc/getty program when it exits. If it is already off, continue to the next step. The line should look like this when you are finished:

    t2:23:off:/etc/getty -N ttyd2 co_9600 #port 2

    Write and exit the /etc/inittab file.

    Inform init about the change to inittab with the following command:

    telinit q 

    If you have a Hayes 2400 modem, use the fix-hayes command and specify a dial-in modem ( -i) and the port number to which the modem is connected. For example, if the modem is connected to port 2, enter the command:

    /etc/uucp/fix-hayes -i d2 

    If you have a Telebit modem, use the fix-telebit command and specify a dial-in modem ( -i), the model number of the modem (tb+, t1000, t1600, t2500) and the port number to which the modem is connected. (Older models of Telebit modems should first be reset with a paperclip.)

    For example, if the modem is connected to port 2, enter the following command:

    /etc/uucp/fix-telebit -i -m t2500 d2 

    Edit the /etc/inittab file again so the system will recognize which port will be used for the modem (as opposed to a terminal). This editing also sets the correct baud rate on the port and enables user logins through the port.

    Find the line for the port to which the modem is connected. The line begins with tportnumber, where portnumber is the number of a serial port. For example, if you connected your modem to port 2, look for a line similar to the following:

    t2:23:off:/etc/getty -N ttyd2 co_9600 #port 2 

    If you are setting up a Hayes 2400 modem, make the following changes to this line:

    For example, if you connected a Hayes 2400 modem to serial port 2, and found a line similar to this line in /etc/inittab:

    t2:23:off:/etc/getty -N ttyd2 co_9600 #port 2

    You would change it to read:

    t2:23:respawn:/etc/getty -N ttym2 du_2400 #Modem

    If you are setting up a Telebit modem, make the following changes to the line in /etc/inittab:

    For example, suppose you connected a Telebit modem to serial port 2, and found a line similar to this one:

    t2:23:off:/etc/getty -N ttyd2 co_9600 #port 2

    You would change it to read:

    t2:23:respawn:/etc/getty -N ttyf2 dx_19200 #Modem

    Write and exit the /etc/inittab file.

    Inform init about the change to /etc/inittab with the following command:

    telinit q 

To test the dial-in setup, have someone try to dial in to the system through this modem. If the login prompt is garbled or does not appear, the caller should press the <Break> key and try again. If it still does not work, check all cable connections and make sure you edited the files correctly.

Turning On Dial-Out Modem Software

You can turn on dial-out modem software by editing the /etc/uucp/Devices file. You also have to run the following commands:

    Log in as root

    Edit /etc/inittab to turn off the port you will be using so you can configure it correctly. Find the line for your port. The line begins with tportnumber, where portnumber is the number of a serial port. For example, if you connected your modem to port 2, look for a line similar to the following:

    t2:23:respawn:/etc/getty -N ttyd2 co_9600 #port 2

    Change the respawn to off. If it is already off, continue to the next step. When you are finished, the line should look like this:

    t2:23:off:/etc/getty -N ttyd2 co_9600 #port 2

    Write and exit the /etc/inittab file.

    Inform init about the change to inittab with the command:

    telinit q 

    If you have a Hayes 2400 modem, use the fix-hayes command and specify a dial-out modem ( -o) and the port number to which the modem is connected. For example, if you connected the modem to serial port 2, enter the command:

    /etc/uucp/fix-hayes -o d2 

    If you have a Telebit modem, use the fix-telebit command and specify a dial-out modem ( -o), the model number of the modem (tb+, t1000, t1600, t2500) and the port number to which the modem is connected. (Older models of Telebit modems should first be reset with a paperclip.) For example, if the modem is connected to port 2, enter the command:

    /etc/uucp/fix-telebit -o -m t2500 2 

    Edit the /etc/uucp/Devices file to specify the port to which the modem is connected and to set the correct baud rate. Add one or more lines to specify the port number and baud rate for the modem. Also, add a ``Direct'' line for use in debugging problems. The lines have the following forms:

    ACU tty<hi/low> <portnumber> null baudrate 212 x dialer 
    Direct ttyd<portnumber> - baud direct

    If your modem runs at 2400 baud or lower, the <hi/low> field should be ttym. If it runs faster than 2400 baud, the <hi/low> field should be ttyf. The replacement for portnumber is the number of the serial port to which the modem is connected. The baud variable is the baud rate at which you will run the modem.

    For example, consider a Hayes 2400 modem connected to serial port 2 which can accept and send data at 2400, 1200, and 300 baud. You would add the following lines to the Devices file:

    ACU ttym2 null 2400 212 x hayes24
    ACU ttym2 null 1200 212 x hayes24
    ACU ttym2 null 300 212 x hayes24
    Direct ttyd2 - 1200 direct

    For a Telebit modem connected to serial port 2 and running only at 19200 baud, add the following lines:

    ACU ttyf2 null 19200 212 x telebit
    Direct ttyd2 - 19200 direct

    Save and exit the Devices file.

    Change the ownership of the device files. For example, if you are using serial port 2, give the following command (substituting the appropriate tty device as determined above):

    chown uucp /dev/tty[dfm]2

When you have finished the above process, try to dial out through this modem to verify the dial-out setup. For more information on dialer options, see the file /etc/uucp/Dialers.

Turning On Dial-In/Dial-Out Modem Software

You turn on dial-in/dial-out modem software by combining the processes for enabling a dial-in and a dial-out modem. You must edit two files: /etc/uucp/Devices and /etc/inittab. You also have to run several shell commands. Perform the following steps:

    Log in as root

    Edit /etc/inittab to turn off the port you will be using so you can configure it correctly. Find the line for your port. The line begins with tportnumber, where portnumber is the number of a serial port. For example, if you connected your modem to port 2, look for a line similar to the following:

    t2:23:respawn:/etc/getty -N ttyd2 co_9600 #port 2

    Change the respawn to off. If it is already off, continue to the next step. When you are finished, the line should look like this:

    t2:23:off:/etc/getty -N ttyd2 co_9600 #port 2

    Write and exit the /etc/inittab file.

    Inform init about the change to inittab with the command:

    telinit q 

    If you have a Hayes 2400 modem, use the fix-hayes command and specify a dial-in/dial-out modem ( -io) and the port number to which the modem is connected. For example, if you connected the modem to serial port 2, enter the command:

    /etc/uucp/fix-hayes -io d2 

    If you have a Telebit modem, use the fix-telebit command and specify a dial-in/dial-out modem ( -io), the model number of the modem (tb+, t1000, t1600, t2500) and the port number to which the modem is connected. (Older models of Telebit modems should first be reset with a paperclip.) For example, if the modem is connected to port 2, enter the command:

    /etc/uucp/fix-telebit -io -m t2500 2 

    Edit the /etc/uucp/Devices file to specify the port to which the modem is connected and to set the correct baud rate. Add one or more lines to specify the port number and baud rate for the modem. Also, add a ``Direct'' line for use in debugging problems. The lines have the following forms:

    ACU tty<hi/low> <portnumber> null baudrate 212 x dialer 
    Direct ttyd<portnumber> - baud direct

    If your modem runs at 2400 baud or lower, the <hi/low> field should be ttym. If it runs faster than 2400 baud, the <hi/low> field should be ttyf. The replacement for portnumber is the number of the serial port to which the modem is connected. The baud variable is the baud rate at which you will run the modem.

    For example, consider a Hayes 2400 modem connected to serial port 2 which can accept and send data at 2400, 1200, and 300 baud. You would add the following lines to the Devices file:

    ACU ttym2 null 2400 212 x hayes24
    ACU ttym2 null 1200 212 x hayes24
    ACU ttym2 null 300 212 x hayes24
    Direct ttyd2 - 1200 direct

    For a Telebit modem connected to serial port 2 and running only at 19200 baud, add the following lines:

    ACU ttyf2 null 19200 212 x telebit
    Direct ttyd2 - 19200 direct

    Finally, save and exit the Devices file.

    Change the ownership of the device files. For example, if you are using serial port 2, give the following command (substituting the appropriate tty device as determined above):

    chown uucp /dev/tty[dfm]2

    Edit the /etc/inittab file again so the system will recognize which port will be used for the modem (as opposed to a terminal). This editing also sets the correct baud rate on the port and enables user logins through the port.

    Find the line for the port to which the modem is connected. The line begins with tportnumber, where portnumber is the number of a serial port. For example, if you connected your modem to port 2, look for a line similar to the following:

    t2:23:off:/etc/getty -N ttyd2 co_9600 #port 2 

    If you are setting up a Hayes 2400 modem, make the following changes to this line:

    For example, suppose you connected a Hayes 2400 modem to serial port 2, and found a line similar to this line in /etc/inittab:

    t2:23:off:/etc/getty -N ttyd2 co_9600 #port 2

    You would change it to read (all on the same line):

    t2:23:respawn:/usr/lib/uucp/uugetty -Nt 60 -d8 -ihayes24in, conn ttym2 du_2400 #Modem

    If you are setting up a Telebit modem, make the following changes to the line in /etc/inittab:

    For example, if you connected a Telebit modem to serial port 2, find a line similar to this line:

    t2:23:off:/etc/getty -N ttyd2 co_9600 #port 2

    If you are using a T1000 or TB+, change the line to read (all on one line):

    t2:23:respawn:/usr/lib/uucp/uugetty -Nt 60 -itelebitin, conn ttyf2 dx_19200 #Modem

    If you are using a T1600, use t16in instead of telebitin in the above command line. If you are using a T2500, use t25in instead of telebitin in the above command line.

    Write and exit the /etc/inittab file.

    Inform init about the change to /etc/inittab with the following command:

    telinit q 

When you have finished the above process, try to dial out through the modem to verify the dial-out setup. Then, to test the dial-in setup, have someone try to dial in to the system through this modem. If the login prompt is garbled or does not appear, the caller should press the <BREAK> key and try again. If the connection still does not work, check all cable connections and make sure you edited and saved all files correctly.

Dialing Out to Another Modem

The cu(1) utility dials your modem. Before you attempt to dial out, make sure your local modem is connected to both your system and a working telephone line. Also, make sure the modem is turned on. The cu syntax to dial the number 1-800-555-1234 is simply:

cu 18005551234

Refer to the cu(1) reference page for complete information on cu. If everything is working, you should hear the modem dialing, and after a short time you should see the message on your console:

Connected

If no login prompt is displayed, press <Return> once. If a prompt is displayed, continue and log in to the remote system. To disconnect, press the <Return> key, the tilde key (~), a period (.), and the <Return> key again.

If there are any problems with the dial-up process, you may want to use the ( -d) option to cu to instruct the system to print diagnostic messages to your system console. The syntax to force diagnostic messages is.

cu -d 18005551234 


The TTY System

This section covers the following topics:

A series of four processes (init(1M), getty(1M), login(1), and one of sh(1) or csh(1)) connects a user to the IRIX system. init is a general process spawner that is invoked as the last step in the boot procedure. It spawns a getty process for each line that a user may log in on, guided by instructions in /etc/inittab. An argument required by the getty command is line. The TTY line argument is the name of a special file in the /dev directory. For a description of other arguments that may be used with getty, see the getty(1M) reference page.

A user attempting to make a connection generates a request-to-send signal that is routed by the hardware to the getty process for one of the TTY line files in /dev. getty responds by sending an entry from file /etc/gettydefs down the line. The gettydefs entry used depends on the speed argument used with the getty command. (In the SYNOPSIS of the getty(1M) reference page the argument name is speed, but it is really a pointer to the label field of a gettydefs entry.) If no speed argument is provided, getty uses the first entry in gettydefs. Among the fields in the gettydefs entry (described later in this chapter) is the login prompt.

On receiving the login prompt, the user enters a login name. getty starts login, using the login name as an argument. login issues the prompt for a password, evaluates the user's response, and if the password is acceptable, calls in the user's shell as listed in the /etc/passwd entry for the login name. If no shell is named, /bin/sh is furnished by default.

/bin/sh executes /etc/profile and then executes the user's .profile, if it exists. .profile or .login often contain stty commands that reset terminal options that differ from the defaults. /bin/csh executes /etc/cshrc, .cshrc, and .login. The connection between the user and the IRIX system has now been made.

Checking Line Settings Using IRIX Shell Commands

The /etc/gettydefs file contains information used by the getty(1M) command to establish the speed and terminal settings for a line. The general format of the gettydefs file is:

label# initial-flags # final-flags #login-prompt #next-label

The following example shows a few lines from a gettydefs file:

console# B9600 # B9600 SANE TAB3 #\r\n\n$HOSTNAME console login: #console 
co_9600# B9600 # B9600 SANE TAB3 #\r\n\n$HOSTNAME login: #co_4800 
co_4800# B4800 # B4800 SANE TAB3 #\r\n\n$HOSTNAME login: #co_2400 
co_2400# B2400 # B2400 SANE TAB3 #\r\n\n$HOSTNAME login: #co_1200 
co_1200# B1200 # B1200 SANE TAB3 #\r\n\n$HOSTNAME login: #co_300 
co_300# B300 # B300 SANE TAB3 #\r\n\n$HOSTNAME login: #co_9600 
dx_9600# B9600 # B9600 SANE TAB3 HUPCL #\r\n\n$HOSTNAME login: #dx_9600 

These entries form a single, circular hunt sequence; the last field on each line is the label of the next line. The next-label field for the last line shown points back to the first line in the sequence. The object of the hunt sequence is to link a range of line speeds. If you see garbage characters instead of a clear login prompt, press the <Break> key to force getty to step to the next entry in the sequence. The hunt continues until the baud rate of the line matches the speed of the user's terminal.

The flag fields shown have the following meanings:

B300-B19200

The baud rate of the line.

HUPCL

Hang up on close.

SANE

A composite flag that stands for a set of normal line characteristics.

IXANY

Allow any character to restart output. If this flag is not specified, only DC1 (CTL-Q) restarts output.

TAB3

Send tabs to the terminal as spaces.

For a description of all getty flags, see termio(7).

Creating and Testing Line Settings

Create new lines for the gettydefs file by following the example shown above. Each entry in the file is followed by a blank line. After editing the file, run the command:

/etc/getty -c /etc/gettydefs 

This causes getty to scan the file and print the results on your terminal. Any unrecognized modes or improperly constructed entries are reported.

Modifying Line Characteristics

You can modify TTY line characteristics using an IRIX editor, such as vi(1), to edit /etc/inittab.

The /etc/inittab file contains instructions for the /etc/init(1M) command. The general format of a line entry in the /etc/inittab file is as follows:

identification:level:action:process

The four colon-separated fields are as follows:

identification

A unique one or two identifier for the line entry.

level

The run-level in which the entry is to be performed.

action

How /etc/init treats the process field (refer to the inittab(4) reference page for complete information).

process

The shell command to be executed.

/etc/inittab contains several entries that spawn getty processes. The following example is a selection of such entries from a sample /etc/inittab:

t1:23:respawn:/etc/getty -s console ttyd1 co_9600 
t2:23:respawn:/etc/getty ttyd2 co_9600 

There are at least three things you might want to do to an inittab entry for a TTY line:


Serial Ports

This section outlines the serial support on IRIS workstations and servers and provides instructions for connecting peripheral devices to the serial ports. For information on the optional serial ports, see the document that accompanies that hardware option.

Defining the Serial Interface

The IRIS workstation or server provides an RS-232 (or RS-423) or a DB-9 (9 pin) compatible serial interface. Additionally, some systems are equipped with the Mini-DIN8 serial interface. These ports do not lay out the pins in a conventional pattern such as DB-9 or RS232; instead, the plug is cylindrical. Adapter cables are available commercially or through Silicon Graphics to connect Mini-DIN8 ports with DB-9 and RS232 ports. Consult your system's Owner's Guide for complete information on your system's serial ports. All serial data cables that you connect to the computer should be shielded. The computer can easily drive and receive signals on a 50-foot cable, and it typically drives and receives signals on a cable up to 200 feet long.

There are two types of serial interface equipment available: Data Terminal Equipment (DTE) and Data Communications Equipment (DCE). The primary difference between DTE and DCE is the designation of several pins on the connector. For example, DTEs output on pin 2 and input on pin 3. DCEs output on pin 3 and input on pin 2. You can connect a DTE interface directly to a DCE interface.

To connect either a DCE to a DCE, or a DTE to a DTE, use a null modem cable. A null modem cable has the wires to pins 2 and 3 swapped in one connector and may have other swapped wires as well. A signal on pin 2 at one end appears on pin 3 at the other end, and vice versa.

The serial ports for IRIS workstations and servers are all configured as DTE. Most terminals are also configured as DTE. Therefore, to connect a terminal to a workstation that has RS232 or DB-9 connectors, use a cable that has pins 2 and 3 swapped in one connector. To connect a modem to the workstation, use a cable that connects each pin of the serial port to the corresponding pin of the modem. No signals need to be swapped. Note that on a modem cable, if pins 5 and 7 become swapped, any process attempting to use the modem may become hung up. Some commercially available personal computer serial cables swap pins 5 and 7. Ensure that your cable is a straight connection before using it with your IRIS. Connect other peripheral devices according to the configuration data provided with the device.

Silicon Graphics provides three kinds of special files, which determine which driver is used on each port. The special files beginning with ttyd are used for devices such as terminals; the files ttymX are used for modems; and ttyfX files are used for flow control to devices that use hardware flow control on the RTS and CTS pins. Some workstations use ``Mini-DIN8'' style ports. These ports do not lay out the pins in a conventional pattern such as DB9 or RS232; instead, the plug is cylindrical. Adapter cables are available commercially or through Silicon Graphics to connect Mini-DIN8 ports with DB9 and RS232 ports.

Cabling the Serial Ports

This section describes the cables typically used to connect the computer to terminals and modems. The serial ports are designed to connect directly to Data Communications Equipment (DCE) devices such as modems through a serial cable. Each wire on this cable connects the same pin of the computer to the device, that is, it has a pin-to-pin correspondence. Connecting to Data Terminal Equipment (DTE) devices such as terminals requires a different cable arrangement: a null modem cable. A null modem cable has the wires for pin 2 and pin 3 swapped in one connector, and may have other wires swapped as well.

DB-9 Serial Connector Cabling

For most ``dumb'' terminals SGI recommends the following cable. This cable uses the normal 3-wire connection and is used as a /dev/ttyd* device. Table 10-1 shows typical cabling:

Table 10-1 : DB-9 Serial Terminal Cable

Function DB9-Male DB25-Male


1 nc*
TXD 2 3
RXD 3 2


4 nc


5 nc


6 nc
GND 7 7
DCD** 8 20


9 nc



*nc stands for "no connect," meaning the wire is not used.

**DCD is only used with /dev/ttym* devices if the system must notice when the terminal or printer powers off. Normally it is not used.

Note: Do not use a cable designed for an IBM PC/AT® compatible 9-pin connector. It does not work correctly with your workstation.

Table 10-2 lists the pin definitions for an example of a 9-pin (DB-9) null modem cable. Connect pins that are shown separated by commas in the DTE Device column together with a wire or jumper at that end of the cable. Then connect these joined pins to the pin shown in the 9-pin column at the 9-pin end of the cable.

Table 10-2 : Pin Definitions for a Null Modem Cable

9-Pin DTE Device Signal
2 3 Transmit and Receive Data
3 2 Receive and Transmit Data
4 5 Request To Send, Clear To Send
5 4 Clear To Send, Request To Send
7 7 Signal Ground
9 6,8 Data Terminal Ready, Data Set Ready and Data Carrier Detect
8 20 Data Carrier Detect, Data Terminal Ready



Most terminals do not require the various handshaking lines such as Clear To Send or Data Set Ready and work with a three-wire null modem cable. To make one of these, you simply need to swap the signals for pins 2 and 3, and you need to connect pin 7 of the computer to pin 7 of the terminal. Table 10-3 lists the pin definitions for a three-wire null modem cable.

Table 10-3 : Sample Three-wire Null Modem Terminal Cable

Computer Terminal Signals
2 3 Transmit Data
3 2 Receive Data
7 7 Signal Ground



Note that the pinout of these DB-9 connectors is different from that of the DIN connectors that may be next to them. These DIN connectors also have different pinouts from the Mini-DIN8 connectors used on some systems and documented in the next section. The DB-9 and DIN connectors are connected to the same internal port hardware.

For modem devices using RTS/CTS hardware flow control, the following pin-out will allow ``full flow control.'' This cable is required to implement /dev/ttyf* devices. This cable also supports /dev/ttym* devices. Table 10-4 illustrates the correct pin-out for these devices:

Table 10-4 : DB9 RTS/CTS Modem Control Cable

Function DB9-Male DB25-Male


1 nc
TXD 2 2
RXD 3 3
RTS* 4 4
CTS* 5 5


6 nc
GND 7 7
DCD 8 8
DTR 9 20



* RTS and CTS are ignored (optional) if using /dev/ttym* but required if using /dev/ttyf*

Note: This cable can be used with a null modem adapter for terminals and printers (see Table 10-2 above); however, it is recommended that you use this cable exclusively for modem connections. The IBM PC/AT to modem cable ("off the shelf cables") will not work properly with your workstation. For additional information see the serial(7) reference page.

Mini-DIN8 Serial Connector Cabling

There are three basic cable configurations for the Mini-DIN8 serial ports. See your Owner's Guide to determine if you have a Mini-DIN8 port on your workstation or server. Depending on the cables used, some functionality may be sacrificed. Note that the pinout of these Mini-DIN8 connectors is different from that of the DIN connectors on larger systems. These larger systems also have DB-9 connectors that are connected to the same internal port hardware.

For most dumb terminals you should use a commercially available cable, "Macintosh SE® to Imagewriter1®." This cable uses the normal 3-wire connection and is used as a /dev/ttyd* device. Table 10-5 shows the pin configuration:

Table 10-5 : Mini-DIN8 Serial Terminal Cable

Function Mini-DIN8-Male DB25-Male


1 nc


2 nc
TXD 3 3
GND 4 7
RXD 5 2


6 nc
DCD* 7 20
GND 8 7



* /dev/ttym* devices should be used with this cable only if the system must notice when the terminal or printer is powered off.

Note: A Macintosh SE cable also has some other pins connected but they can be ignored.

For modem devices using RTS/CTS hardware flow control, the following pin-out allows "full flow control." This cable is required to implement /dev/ttyf* devices. This cable also supports /dev/ttym* devices. Table 10-6 shows the pinout:

Table 10-6 : Mini-DIN8 RTS/CTS Modem Cable

Function Mini-DIN8-Male DB25-Male
DTR 1 20
CTS* 2 5
TXD 3 2
GND 4 7
RXD 5 3
RTS* 6 4
DCD 7 8
GND 8 7



* RTS and CTS are ignored (optional) if using /dev/ttym* but required if using /dev/ttyf*

Note: This cable is available from Silicon Graphics. Contact your sales representative or SGI Express. This cable can be used with a null modem adapter for terminals and printers (see Table 10-2); however, you should use this cable exclusively for modem connections. The commercially available cable that connects a Macintosh SE to a modem does not work properly with SGI software.

Dial & Button Box and Spaceball Serial Cabling

For SGI peripherals such as the Dial & Button Box and Spaceball, the following Mini-DIN8 to SGI 9 Pin connector cable is available. Table 10-7 shows the pinout for this application:

Table 10-7 : SGI Peripheral Cable

Function Mini-DIN8-Male DB25-Male
DTR 1 9
CTS 2 5
TXD 3 2
GND 4 7
RXD 5 3
RTS 6 4
DCD 7 8
GND 8 7



Note: All pins not shown are "no connects" (nc). For additional information, see the serial(7) reference page.


[Previous Section] [Back to Table of Contents] [Next Section]


Send feedback to Technical Publications.

Copyright © 1997, Silicon Graphics, Inc. All Rights Reserved. Trademark Information