Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ asy(7) — Interactive 3.2r4.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

termio(7)

asy(7)  —  

NAME

asy − asynchronous serial port

DESCRIPTION

The asy driver is a character device driver written for a front-end module and a common interface module implementation.  The asy driver supports both the system board serial port and additional serial adapters.  Up to 32 serial ports are supported simultaneously.  If an adapter for a port is not installed, an attempt to open it will fail.  The port can be programmed for different speeds (50-38400 baud), for character length, and for parity.  Output speed is always the same as input speed.  The port behaves as described in termio(7).

The asynchronous port is a character-at-a-time ­device for both input and output.  This characteristic both limits the bandwidth which can be achieved over a line and increases the interrupt loading on the central processor.  In particular, file transfer programs such as uucp(1) may not function well at speeds over 9600 baud.

If the port is opened with the modem control bit present in the minor ­device number for the port (see below), modem control will be enabled.  If enabled, the driver will wait in open until Data Carrier Detect (DCD) is present.  Once opened, if DCD drops, the driver will return errors on any subsequent reads or writes of the asynchronous port by the user. If the port is opened as a controlling teletype, signal SIGHUP will be generated to the process which did the open.

The baud rates of the serial adapter’s programmable baud rate generator do not correspond exactly with system baud rates.  In particular, setting B0 will cause a disconnect, i.e., cause the Ready-to-Send (RTS) and Data-Term-Ready (DTR) lines to be dropped, whereas setting the baud rate back to any non-zero value will assert the RTS and DTR lines.  Setting EXTA will set 19200 baud, and setting EXTB will set 38400 baud.  It is not possible to directly set 2000, 3600, or 7200 baud. 

Minor Device Numbers

The asynchronous port is a character ­device.  The low-order 4 bits (bits 0-3) of the minor ­device number correspond to the asynchronous port.  Each port has three ­devices associated with it:

Device 1. 
Completely ignores modem control. The ­device is intended for direct (hardwired) connections, and it allows a simple three-wire connection.

Device 2. 
Used for dial-in connections, with opens blocked until DCD is present. 

Device 3. 
Used for dial-out connections, which allows open calls to complete immediately, although the ­device obeys modem control once a carrier has been established. 

Bit 4 indicates the dial-in line, and bit 5 indicates the dial-out line.  Thus, minor ­device 0 corresponds to the directly-connected serial port 0 (or async adapter COM1) with no modem control, while minor ­device 16 corresponds to the same port for dial-in use with modem control enabled, and minor ­device 32 is the dial-out ­device with modem control enabled.  Similarly, minor ­device number 1 corresponds to the directly connected serial port 1 (or async adapter COM2), while minor ­device 17 corresponds to the same port for dial-in use, and minor ­device 33 is the dial-out ­device.  All three ­devices interlock to allow use of a single port for bidirectional communication without requiring any special software.  If the incoming line has been successfully opened (due to a carrier being detected), then subsequent attempts to open either the direct or dial-out lines will fail and errno will be set to EBUSY.  If either of the direct or dial-out lines has been opened, then a process attempting to open the dial-in line will not complete the open regardless of the DCD state as long as the other ­device remains open.  This interlocking allows a standard /etc/getty to run on the dial-in line while allowing uucp to dial out on the dial-out line whenever the incoming line is not in use. 

FILES

/dev/tty0*
directly connected device

/dev/ttyd*
dial-in device

/dev/acu*
dial-out device

SEE ALSO

termio(7). 

ADDED VALUE

This entry, supplied by SunSoft, Inc., contains enhancements to UNIX System V. 

\*U  —  Version 1.0

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