Technical data
asy(7D) Devices SunOS 5.5
NAME asy − asynchronous serial port driver
SYNOPSIS #include <fcntl.h>
#include <sys/termios.h>
open("/dev/ttynn", mode);
open("/dev/ttydn", mode);
open("/dev/cuan", mode);
AVAILABILITY x86
DESCRIPTION The asy module is a loadable STREAMS driver that provides basic support for the stan-
dard UARTS that use Intel-8250, National Semiconductor-16450/16550 hardware,
together with basic asynchronous communication support. The driver supports those
termio(7I) device control functions specified by flags in the c_cflag word of the termios
structure and by theIGNBRK, IGNPAR, PARMRK,orINPCK flags in the c_iflag word of
the termios structure. All other termio(7I) functions must be performed by STREAMS
modules pushed atop the driver. When a device is opened, the ldterm(7M) and
ttcompat(7M) STREAMS modules are automatically pushed on top of the stream, provid-
ing the standard termio(7I) interface.
The character-special devices /dev/tty00 and /dev/tty01 are used to access the two stan-
dard serial ports (COM1 andCOM2) on an x86 system. The asy driver supports up to four
serial ports, including the standard ports. These ttynn devices have minor device
numbers in the range 00-03.
By convention these same devices may be given names of the form /dev/ttydn, where n
denotes which line is to be accessed. Such device names are typicallyused to provide a
logical access point for a dial-in line being used with a modem.
To allow a single tty line to be connected to a modem and used for both incoming and
outgoing calls, a special feature, controlled by the minor device number, is available. By
accessing character-special devices with names of the form /dev/cuan it is possible to
open a port without the Carrier Detect signal being asserted, either through hardware or
an equivalent software mechanism. These devices are commonly known as dial-out lines.
APPLICATION
PROGRAMMING
INTERFACE
Once a /dev/cuan line is opened, the corresponding tty, or ttyd line cannot be opened
until the /dev/cuan line is closed; a blocking open will wait until the /dev/cuan line is
closed (which will drop Data Terminal Ready, after which Carrier Detect will usually
drop as well) and carrier is detected again, and a non-blocking open will return an error.
Also, if the /dev/ttydn line has been opened successfully (usually only when carrier is
recognized on the modem) the corresponding /dev/cuan line can not be opened. This
allows a modem to be attached to, for example, /dev/ttyd0 (renamed from /dev/tty00)
and used for dial-in (by enablingthe line for login in /etc/inittab) and also used for dial-
out (by tip(1) or uucp(1C)) as /dev/cua0 when no one is loggedin on the line.
7D-20 modified 24 May 1995










