Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

system(4)

asoser(7)

cdsio(7)

keyboard(7)

streamio(7)

termio(7)

termios(3)

cserialio(7)

usio(3)



serial(7)                                                            serial(7)



NAME
     serial - serial communication ports

SYNOPSIS
     /dev/tty<type><portno>

DESCRIPTION
     All Silicon Graphics systems have two or more general purpose serial
     ports.  These ports can be used to connect terminals, printers, modems,
     other systems, or graphical input devices such as a tablet or dial and
     button box.  Each line can be independently set to run at any of several
     speeds.  Various character echoing and interpreting parameters can also
     be set.  See stty(1) and termio(7) for details on the various modes.

     Details of the serial ports found on optional add-on boards are given
     elsewhere.  The Audio/Serial Option for CHALLENGE/Onyx provides six
     high-speed serial ports, see asoser(7) for more information.  The CDSIO
     VME board provides six serial ports; see cdsio(7) for more information.

     Special files for the serial ports exist in the /dev directory. These
     files are named tty<type><portno>, where type is one or more characters
     indicating the type of interface to the hardware that this file provides,
     and portno is a number identifying the physical port. The descriptions
     below indicate among other things which hardware signals are used by each
     port type. For more details on this see SOFTWARE USAGE below. Currently
     supported types include:

     d    e.g. ttyd1. This is the most basic serial port type. It supports
          TD/RD only.

     m    e.g. ttym1. This port type provides modem control. It supports TD/RD
          and DCD/DTR.

     f    e.g. ttyf1. This port type provides modem and flow control. It
          supports TD/RD, DCD/DTR and RTS/CTS.

     The following types are supported on O2, OCTANE, Origin2000/200, Onyx2
     and Challenge/Onyx systems:

     c    e.g. ttyc1. This port type provides a raw character device interface
          to the hardware. It is intended for applications which wish to do
          bulk data transfer with minimal overhead and no data interpretation.
          Since this is not a streams device and no line discipline exists,
          streams or line discipline related ioctl commands may fail or
          silently have no effect. See cserialio(7) for details.  This port
          type supports only TD/RD by default but RTS/CTS flow control may be
          enabled via ioctl if the hardware supports it.

     4d   e.g. tty4d1. This port type enables RS422 (Appletalk) mode. It uses
          TxD+/-, RxD+/-. On Challenge/Onyx, every 4th port (tty4d4, tty4d8,
          etc.) is hardwired to RS422 and other ports are hardwired to RS232,
          so this port type only exists for every 4th port.



                                                                        Page 1





serial(7)                                                            serial(7)



     4f   e.g. tty4f1. This port type enables RS422 (Appletalk) mode including
          the handshake signals. It uses TxD+/-, RxD+/-, HSKo and HSKi. On
          Challenge/Onyx, every 4th port (tty4d4, tty4d8, etc.) is hardwired
          to RS422 and other ports are hardwired to RS232, so this port type
          only exists for every 4th port.

     midi e.g. ttymidi1. This port type provides a midi interface to the
          serial device. See midi(3).

     The following type is supported on O2, OCTANE, Onyx2 and Origin2000/200
     systems:

     us   e.g. ttyus1. This port type provides a user mapped interface to the
          hardware, allowing reading and writing of bytes without any system
          call overhead. Use of this port requires installation of the
          react.sw.usio subsystem of REACT/Pro. See usio(3) for details.

     The portno component of the tty filename identifies the actual hardware
     accessed by the device file. All tty files with the same port number
     access the same hardware, i.e. ttyd1, ttyc1 and ttymidi1 all access the
     same physical port. A given tty device may be opened any number of times,
     but only one interface type may be opened to the same physical port at a
     time, e.g. if ttyd1 is open, access will be denied to ttyf1 or ttyc1.

     On Onyx2 systems with console set to d, and on Origin2000 and Origin200
     systems, the console port and its twin are guaranteed to be ports 1 and
     2, all other ports are dynamically assigned port numbers as per the whims
     of ioconfig(1). It may be necessary to obtain the absolute path of the
     port in the filesystem by resolving links until a true device is found in
     order to determine where on the machine the port is actually located.

CONNECTORS AND PIN ASSIGNMENTS
     There are five different types of connectors found on various 4D models.
     Note that in terms of connectors and pin assignments, the Challenge S is
     identical to the Indy and both Challenge M and Power Challenge M are
     equivalent to the Indigo2.  The DB-9 male serial port connectors on O2,
     OCTANE, Onyx2, Origin2000 and Origin200 systems have the following IBM(R)
     PC/AT(tm)-like pin assignments:

                                -------------------
                                \  1  2  3  4  5  /
                                 \   6  7  8  9  /
                                  ---------------

                         Pin | Name | Description
________________________________
| |
1 DCD Data Carrier Detect
| |
2 RD Receive Data
| |
3 TD Transmit Data
| |
4 DTR Data Terminal Ready
| |
5 | GND | Signal Ground
Page 2


serial(7)                                                            serial(7)



                          6  | -    | reserved
                          7  | RTS  | Request To Send
                          8  | CTS  | Clear To Send
                          9  | -    | reserved

     The ports on OCTANE, Onyx2, Origin2000 and Origin200 systems can be set
     by software to an Appletalk-compatible RS-422-like mode, in which they
     have the following pin assignments:

                           Pin | Name | Description
_____________________________
| |
1 - reserved
| |
2 RxD- Receive Data -
| |
3 TxD- Transmit Data -
| |
4 TxD+ Transmit Data +
| |
5 GND Signal Ground
| |
6 RxD+ Receive Data +
| |
7 HSKo Output Handshake
| |
8 HSKi Input Handshake
| |
9 | - | reserved
The DB-9 female serial port connectors, which are found on the CHALLENGE
and Onyx systems, have the following pin assignments.
-------------------
\ 5 4 3 2 1 /
\ 9 8 7 6 /
---------------
Pin | Name | Description
________________________________
| |
2 TD Transmit Data
| |
3 RD Receive Data
| |
4 RTS Request To Send
| |
5 CTS Clear To Send
| |
7 SG Signal Ground
| |
8 DCD Data Carrier Detect
| |
9 | DTR | Data Terminal Ready
The CHALLENGE and Onyx systems provide an RS-422 port. This RS-422 port uses a DB-9 female serial connector and has the following pin assignments. Pin | Name | Description
________________________________
| |
1 DTR Data Terminal Ready
| |
2 TxD- Transmit Data -
| |
3 RxD- Receive Data -
| |
4 DCD Data Carrier Detect
| |
5 CTS Clear To Send
| |
6 SG Signal Ground
| |
7 | TxD+ | Transmit Data +
Page 3


serial(7)                                                            serial(7)



                          8  | RxD+ | Receive Data +
                          9  | RTS  | Request to send

     In order to support peripherals that draw power from the host system, the
     CHALLENGE and Onyx systems provide two powered-peripheral serial ports.
     These ports have a DIN-8 connector.  The powered ports share the tty2 and
     tty3 signal lines with the standard DB-9 connectors; if the DB-9
     connector for tty2 is already in use, you cannot use the powered
     peripheral connector for tty2.  Similarly, if tty3's DB-9 connector is
     connected to a peripheral, the powered peripheral port connected to the
     tty3 signal lines cannot also be used.  The powered peripheral ports have
     the following pin assignments.

                                      __---__
                                     /   2   \
                                    /4       5\
                                   /           \
                                  ( 1    8    3 )
                                   \           /
                                    \ 6     7 /
                                     ---___---

                        Pin | Name   | Description
__________________________________
| |
1 DTR Data Terminal Ready
| |
2 CTS Clear To Send
| |
3 STEREO Stereo field sync
| |
4 RD Receive Data
| |
5 TD Transmit Data
| |
6 SG Signal Ground
| |
7 GND Ground point
| |
8 | V10P | 10V supply
The DIN-8 serial port connectors on the Indigo, Indy, Indigo2, Challenge
S, Challenge M, Power Challenge M, and the MENET 4-Enet, 6-serial board
(XT-FE-4TX-6A) have the following pin assignments.
---------
/ 8 7 6 \
( 5 4 3 )
\ 2 1 /
---------
4D Compatible Pin Assignments (RS-232)
_________________________________________
Pin | Name | Description
_________________________________________
| |
1 DTR Data Terminal Ready
| |
2 CTS Clear To Send
| |
3 TD Transmit Data
| |
4 SG Signal Ground
| |
5 | RD | Receive Data
Page 4


serial(7)                                                            serial(7)



                       6      RTS       Request To Send
| |
7 DCD Data Carrier Detect
| |
8 | SG | Signal Ground
Macintosh SE Compatible Pin Assignments (RS-422)
_________________________________________________
Pin | Name | Description
_________________________________________________
| |
1 HSKo Output Handshake
| |
2 HSKi Input Handshake Or External Clock
| |
3 TxD- Transmit Data -
| |
4 GND Signal Ground
| |
5 RxD- Receive Data -
| |
6 TxD+ Transmit Data +
| |
7 GPi General Purpose Input
| |
8 | RxD+ | Receive Data +
SOFTWARE USAGE The set of signals that are actually used depends upon which form of the device was opened. If the ttyd name was used, only TD, RD, and SG signals are meaningful. These three signals are typically used with "dumb" devices that either do not need any sort of data flow control or use software flow control (see the description of the ixon, ixany, and ixoff options in stty(1) for more information on setting up software flow control). If the ttym device is used, the DCD, and DTR signals are also used. These signals provide a two way handshake for establishing and breaking a communication link with another device and are normally used when connecting via a modem. When the port is initially opened, the host asserts the DTR line and waits for the DCD line to become active. If the port is opened with the O_NDELAY flag, the open succeeds even if the DCD line is not active. A hangup condition occurs if the DCD line transitions from active to inactive. See open(2), and termio(7) for more information. If the ttyf device is used, all of the signals are used. The additional signals provide for full hardware flow control between the host and the remote device. The RTS line is asserted by the host whenever it is capable of receiving more data. The CTS line is sampled before data is transmitted and if it is not active, the host suspends output until it is. The DIN-8 serial port connectors on the Indy, Challenge S, Indigo2, Challenge M, Power Challenge M, and MENET 4-Enet, 6-serial board (XT-FE- 4TX-6A) can be used to communicate with serial devices using RS-422 protocol. User can use the stream ioctl commands, SIOC_EXTCLK and SIOC_RS422, defined in /usr/include/sys/z8530.h to switch between internal/external clock and RS-232/RS-422 protocols. Another command that can be useful is SIOC_ITIMER; it informs the driver how long it should buffer up input data, in clock ticks, before sending them upstream. Data can sometimes be sent upstream before, but never after, this time limit. This feature reduces the cpu cost of receiving large amounts of data by sending data upstream in large chunks. This duration can also be configured into the kernel by tuning the duart_rsrv_duration variable. On Origin, Onyx2, O2 and Octane systems, the serial hardware sets an input timer based on the value passed in through SIOC_ITIMER. For Page 5


serial(7)                                                            serial(7)



     soft flow control, this input timer may result in excessively slow
     response to an XOFF request since an XOFF char is not detected by the
     software until the hardware timer expires. If soft flow control skid is
     unacceptably large, it may be necessary to reduce the latency of the
     hardware input timer by reducing the value passed to SIOC_ITIMER.

SUPPORTED SPEEDS
     The serial ports of all SGI systems support several standard rates up
     through 38400 bps (see termio(7) for these standard rates). The serial
     ports on O2, OCTANE, Origin2000, Onyx2 and Origin200 systems also support
     bit rates up through 115200 bps, including the following rates:

                                  31250   57600
                                  76800   115200

     Many other rates, up to 460800, can be set.  The accuracy of actual baud
     rate set is guaranteed to be within 2.5% of the desired rate.  If this
     condition cannot be met, the command (ioctl or stty) will fail.  However,
     performance at baud rates above 115200 is not guaranteed, and their use
     is not officially supported.

     At baud rates above 38400, cable length and quality become quite
     important.  These rates are more likely to work in RS-422 mode, on
     systems that support it.

CHALLENGE L/XL AND ONYX PORT CONFIGURATION
     By default, Onyx and CHALLENGE L/XL systems enable only the serial ports
     of the master IO4.  To enable the serial ports on other IO4 boards, a
     vector line must be added for the epcserial device to
     /var/sysgen/system/irix.sm.  The following vector line configures the
     serial ports on the IO4 in slot 13 as tty45, tty46, and tty47:

          VECTOR: bustype=EPC module=epcserial unit=1 slot=13

     The first two options (bustype and module) are mandatory and tell
     lboot(1M) that you're configuring serial ports.  The unit option
     specifies which set of tty names should be used for this set of ports:
     unit 1 corresponds to the logical devices tty45, tty46, and tty47; unit 2
     represents devices tty49, tty50, and tty51; unit 3 specifies devices
     tty53, tty54, and tty55.  Finally, the slot option indicates which IO4
     board contains the ports that should be mapped.  Each board must have its
     own vector line.  Configuring one IO4 board's serial ports has no effect
     on any of the other boards.  After irix.sm has been updated, the
     autoconfig(1M) command should be issued to reconfigure the kernel.  It
     may also be necessary to execute MAKEDEV(1M) in order to build device
     files for the new ports.

     If the system is unable to honor the VECTOR line for some reason (if, for
     example, the specified slot is invalid), a warning message is written to
     /var/adm/SYSLOG.  These warning messages contain the string epcserial, in
     order to facilitate finding them with commands like grep(1).  Because the
     console port has not been initialized when these messages are issued, the



                                                                        Page 6





serial(7)                                                            serial(7)



     kernel is unable to display the warning on the console.

     Only the master IO4 provides an RS-422 port (tty4).  Additional IO4
     boards support three RS-232 serial ports only.  To allow for future
     expansion, however, space was left in the serial port namespace for the
     additional RS-422 ports.  For this reason, there is no actual device
     associated with tty48, tty52, and tty56.

FILES
     /dev/tty[dmf][1-4,45-56]
     /usr/include/sys/z8530.h
     /dev/MAKEDEV
     /var/sysgen/system

SEE ALSO
     system(4), asoser(7), cdsio(7), keyboard(7), streamio(7), termio(7),
     termios(3), cserialio(7), usio(3).






































                                                                        Page 7



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026