|
| asy - asynchronous serial port driver |
SYNOPSIS
|
open("/dev/ttynn", mode);
|
|
open("/dev/ttydn", mode);
|
|
The asy
module is a loadable STREAMS driver that provides basic support for the standard UARTS that use Intel-8250, National Semiconductor-16450
and 16550 hardware, in addition to basic asynchronous communication support.
The asy module supports those termio(7I)
device control functions specified by flags in the c_cflag
word of the termios structure, and by the IGNBRK, IGNPAR, PARMRK, or INPCK 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, providing
the standard termio(7I) interface.
The character-special devices /dev/tty00 and /dev/tty01 are used to access the two standard serial ports ( COM1 and COM2 ) on
an x86-based system. The asy module supports up to
four serial ports, including the standard ports. The ttynn devices have minor device numbers in the range 00-03, and
may be assigned names of the form /dev/ttydn, where n denotes the line to be
accessed. These device names are typically used to provide a logical access
point for a dial-in line that is used with a modem.
To allow a single tty line to be connected to a modem and used for incoming
and outgoing calls, a special feature is available that is controlled by the
minor device number. 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.
Note This module is affected by the setting of certain eeprom variables.
For information on parameters that are persistent across reboots, see the eeprom(1M) man
page. |
|
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. A non-blocking open will return an error. If
the /dev/ttydn line has been
opened successfully (usually only when carrier is recognized on the modem),
the corresponding /dev/cuan
line cannot be opened. This allows a modem to be attached to a device, (for
example, /dev/ttyd0, which is renamed from /dev/tty00) and used for dial-in (by enabling the line for login in /etc/inittab) or dial-out (by tip(1)
or uucp(1C)) as /dev/cua0 when no one is logged in on the line.
|
|
The standard set of termio ioctl()
calls are supported by asy.
Breaks can be generated by the TCSBRK, TIOCSBRK, and TIOCCBRK ioctl() calls.
The input and output line speeds may be set to any speed that is supported
by termio. The speeds cannot be set independently; for
example, when the output speed is set, the input speed is automatically set
to the same speed.
When the asy module is used to service the serial
console port, it supports a BREAK condition that allows the system to enter
the debugger or the monitor. The BREAK condition is generated by hardware
and it is usually enabled by default.
A BREAK condition originating from erroneous electrical signals cannot
be distinguished from one deliberately sent by remote DCE. The Alternate Break
sequence can be used as a remedy against this. Due to a risk of incorrect
sequence interpretation, binary protocols such as PPP, SLIP, and others should
not be run over the serial console port when Alternate Break sequence is in
effect. By default, the Alternate Break sequence is a three character sequence:
carriage return, tilde and control-B (CR ~ CTRL-B), but may be changed by
the driver. For more information on breaking (entering the debugger or monitor)
, see kbd(1) and kb(7M)
|
|
An open() will fail under the following conditions:
-
ENXIO
- The unit being opened does not exist.
-
EBUSY
- The
dial-out device is being opened while the dial-in device is already open,
or the dial-in device is being opened with a no-delay open and the dial-out
device is already open.
-
EBUSY
- The
unit has been marked as exclusive-use by another process with a TIOCEXCL ioctl() call.
-
EINTR
- The
open was interrupted by the delivery of a signal.
|
|
-
/dev/tty[00-03]
- hardwired tty lines
-
/dev/ttyd[0-3]
- dial-in tty lines
-
/dev/cua[0-3]
- dial-out tty lines
-
/platform/i86pc/kernel/drv/asy.conf
-
asy configuration file
|
|
See attributes(5)
for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
Architecture | IA |
|
|
tip(1), kbd(1), uucp(1C), eeprom(1M), ioctl(2), open(2), termios(3C), attributes(5), ldterm(7M), ttcompat(7M), kb(7M) termio(7I)
|
|
-
asyn: silo overflow.
- The hardware overrun
occurred before the input character could be serviced.
-
asyn: ring buffer overflow.
- The driver's
character input ring buffer overflowed before it could be serviced.
|
| |