serial(HW) 19 June 1992 serial(HW) Name serial: tty1[a-h] , tty1[A-H] , tty2[a-h] , tty2[A-H] - interface to serial ports Description The tty1[a-h], tty1[A-H], tty2[a-h] and tty2[A-H] files provide access to the standard and optional serial ports of the computer. Each file corre- sponds to one of the serial ports (with or without modem control). Files are named according to the following conventions: - The first number in the filename corresponds to the COM expansion slot. - Lowercase letters indicate no modem control. - Uppercase letters indicate the line has modem control. tty1a and tty1A both refer to COM1, whereas tty2a and tty2A both refer to COM2. For example, with a four-port expansion board installed at COM1 and a single port board installed at COM2, you can access: tty1a tty1A tty1b tty1B tty1c tty1C tty1d tty1D tty2a tty2A Each serial port has modem and non-modem invocations. The device names in the following table refer to the serial ports, with and without modem control. The first section of the table describes boards at COM1 and the second section describes boards installed at COM2. ``Minor'' is the minor device number for the port (see mknod(C)). ________________________________________________________________________ Serial Lines ________________________________________________________________________ Board Non-Modem Type Control Modem Control | Minor Name Minor Name | |_______________________________________________________________________| | | | | | | 1 Port 0 tty1a 128 tty1A| | | _____________ | | | | 1 | tty1b | 129 | tty1B| | | | 2 | tty1c | 130 | tty1C| | | 4 Port | | | | | | | | 3 | tty1d | 131 | tty1D| | ____________________| | | | | | | 4 | tty1e | 132 | tty1E| | | 5 | tty1f | 133 | tty1F| | 8 Port | 6 | tty1g | 134 | tty1G| | | 7 | tty1h | 135 | tty1H| |___________________________|__________|_________|_____________|________| | | | | | | | | | | 1 Port | 8 | tty2a | 136 | tty2A| | | ____________| | | | | | | | 9 | tty2b | 137 | tty2B| | | | 10 | tty2c | 138 | tty2C| | | 4 Port | | | | | | | | 11 | tty2d | 139 | tty2D| | ____________________| | | | | | | 12 | tty2e | 140 | tty2E| | | 13 | tty2f | 141 | tty2F| | 8 Port | 14 | tty2g | 142 | tty2G| | | 15 | tty2h | 143 | tty2H| |___________________________|__________|_________|_____________|________| | | 16 | tty2i | 144 | tty2I| | | 17 | tty2j | 145 | tty2J| | | 18 | tty2k | 146 | tty2K| | | 19 | tty2l | 147 | tty2L| | 16 Port | 20 | tty2m | 148 | tty2M| | | 21 | tty2n | 149 | tty2N| | | 22 | tty2o | 150 | tty2O| | | 23 | tty2p | 151 | tty2P| |___________________________|__________|_________|_____________|________| Interrupt Vectors: All board(s) installed at COM1 - 4 All board(s) installed at COM2 - 3 For a list of I/O addresses, see the Release Notes. Access The files may only be accessed if the corresponding serial interface card is installed and its jumper I/O address correctly set. Also, for multi- port expansion cards, you must use the mkdev(ADM) program to create more than the default number of files. Unless other COM slots are specifically referred to in your hardware documentation, only COM1 and COM2 may be used. The serial ports must also be defined in the system configuration. Check your hardware manual to determine how your system is configured, via a CMOS database or by switch settings on the main system board. If your system is configured using a CMOS database, the ports are defined in the database (see cmos(HW)). Otherwise, define the ports by setting the proper switches on the main system board. Refer to your computer hard- ware manual for switch settings. It is an error to attempt to access a serial port that has not been installed and defined. The serial ports can be used for a variety of serial communication pur- poses such as connecting login terminals to the computer, attaching printers, or forming a serial network with other computers. Note that a serial port may operate at most of the standard baud rates, and that the ports (on most computers) have a DTE (Data Terminal Equipment) configura- tion. The following table defines how each pin is used for 25-pin and 9-pin connections: _________________________________________________________________________ 25-Pin 9-Pin Description _________________________________________________________________________ 2 2 Transmit Data 3 3 Receive Data 4 7 Request to Send 5 8 Clear to Send 7 5 Signal Ground 8 1 Carrier Detect (Data Set Ready) 20 4 Data Terminal Ready Only pins 2, 3, and 7 (2, 3, and 5 for 9-pin) are necessary for a termi- nal (or direct) connection. A modem control device (port) uses pins 2, 3, and 7 in the same way as a non-modem control device: send on pin 2 and receive on pin 3. Pin 7 is data ground. On a non-modem control device, pins 4 and 20 (RTS and DTR) are asserted, but pin 8 is not. On a modem control device, pins 4 and 20 (RTS & DTR) are asserted and the port will not open until pin 8 (CXD) is asserted. That is, no signal travels from pin 2 until pin 8 is asserted from another source. The modem control device monitors the status of pin 8. Files /dev/tty1[a-h] /dev/tty1[A-H] /dev/tty2[a-h] /dev/tty2[A-H] See also cmos(HW), csh(C), cu(C), getty(M), mkdev(ADM), mknod(C), nohup(C), open(S), termio(M), tty(M), uucp(C) ``Administering terminals'' in the System Administrator's Guide. Notes If you log in via a modem control serial line, hanging up logs that line out and kills your background processes. See nohup(C) and csh(C). You cannot use the same serial port with both modem and non-modem control at the same time. For example, you cannot use tty1a and tty1A simultane- ously. Use a modem cable to connect your modem to a computer.