import less(1)
[unleashed/tickless.git] / share / man / man7d / asy.7d
blobe0c9900239087914b76b54a254ccf0d019d2650a
1 '\" te
2 .\" Copyright (c) 2004, Sun Microsystems, Inc.  All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH ASY 7D "Oct 9, 2004"
7 .SH NAME
8 asy \- asynchronous serial port driver
9 .SH SYNOPSIS
10 .LP
11 .nf
12 #include <fcntl.h>
13 .fi
15 .LP
16 .nf
17 #include <sys/termios.h>
18 .fi
20 .LP
21 .nf
22 open("/dev/term/\fIn\fR", \fImode\fR);
23 .fi
25 .LP
26 .nf
27 open("/dev/tty/\fIn\fR", \fImode\fR);
28 .fi
30 .LP
31 .nf
32 open("/dev/cua/\fIn\fR", \fImode\fR);
33 .fi
35 .SH DESCRIPTION
36 .sp
37 .LP
38 The \fBasy\fR module is a loadable STREAMS driver that provides basic support
39 for Intel-8250, National Semiconductor-16450, 16550, and some 16650 and 16750
40 and equivalent UARTs connected via the ISA-bus, in addition to basic
41 asynchronous communication support. The \fBasy\fR module supports those
42 \fBtermio\fR(7I) device control functions specified by flags in the
43 \fBc_cflag\fR word of the \fBtermios\fR structure, and by the \fBIGNBRK,\fR
44 \fBIGNPAR,\fR \fBPARMRK\fR, \fBINPCK\fR, \fBIXON\fR, \fBIXANY\fR, or
45 \fBIXOFF\fR flags in the c_iflag word of the termios structure. All other
46 \fBtermio\fR(7I) functions must be performed by \fBSTREAMS\fR modules pushed
47 atop the driver. When a device is opened, the \fBldterm\fR(7M) and
48 \fBttcompat\fR(7M) \fBSTREAMS\fR modules are automatically pushed on top of the
49 stream, providing the standard \fBtermio\fR(7I) interface.
50 .sp
51 .LP
52 The character-special devices \fB/dev/term/a\fR, \fB/dev/term/b\fR,
53 \fB/dev/term/c\fR and \fB/dev/term/d\fR are used to access the four standard
54 serial ports (COM1, COM2, COM3 and COM4 at I/O addresses 3f8, 2f8, 3e8 and 2e8
55 respectively). Serial ports on non-standard ISA-bus I/O addresses are accessed
56 via the character-special devices \fB/dev/term/0\fR, \fB/dev/term/1\fR, etc.
57 Device names are typically used to provide a logical access point for a dial-in
58 line that is used with a modem.
59 .sp
60 .LP
61 To allow a single tty line to be connected to a modem and used for incoming and
62 outgoing calls, a special feature is available that is controlled by the minor
63 device number. By accessing character-special devices with names of the form
64 \fB/dev/cua/\fR\fIn, \fR it is possible to open a port without the \fBCarrier
65 Detect\fR signal being asserted, either through hardware or an equivalent
66 software mechanism. These devices are commonly known as dial-out lines.
67 .LP
68 Note -
69 .sp
70 .RS 2
71 This module is affected by the setting of certain eeprom variables,
72 ttya-ignore-cd and ttya-rts-dtr-off (and similarly for ttyb-, ttyc-, and ttyd-
73 parameters). For information on these parameters, see the \fBeeprom\fR(1M) man
74 page.
75 .RE
76 .LP
77 Note -
78 .sp
79 .RS 2
80 For serial ports on the standard COM1 to COM4 I/O addresses above, the default
81 setting for ttya-ignore-cd and ttya-rts-dtr-off is true. If any of these ports
82 are connected to a modem, these settings should be changed to false. For serial
83 ports on non-standard I/O addresses, the default setting for ttya-ignore-cd and
84 ttya-rts-dtr-off is false.
85 .RE
86 .SH APPLICATION PROGRAMMING INTERFACE
87 .sp
88 .LP
89 Once a \fB/dev/cua/\fR\fIn\fR line is opened, the corresponding tty line cannot
90 be opened until the \fB/dev/cua/\fR\fIn\fR line is closed. A blocking open will
91 wait until the \fB/dev/cua/\fR\fIn\fR line is closed (which will drop \fBData
92 Terminal Ready\fR, after which \fBCarrier Detect\fR will usually drop as well)
93 and carrier is detected again. A non-blocking open will return an error. If the
94 \fB/dev/ttyd\fR\fIn\fR line has been opened successfully (usually only when
95 carrier is recognized on the modem), the corresponding \fB/dev/cua/\fR\fIn\fR
96 line cannot be opened. This allows a modem to be attached to
97 \fB/dev/term/\fR[\fIn\fR] (renamed from \fB/dev/tty\fR[\fIn\fR]) and used for
98 dial-in (by enabling the line for login in \fB/etc/inittab\fR) or dial-out (by
99 \fBtip\fR(1)) as \fB/dev/cua/\fR\fIn\fR when no one is logged
100 in on the line.
101 .SH IOCTLS
104 The standard set of \fBtermio\fR \fBioctl()\fR calls are supported by
105 \fBasy\fR.
108 Breaks can be generated by the \fBTCSBRK,\fR \fBTIOCSBRK,\fR and \fBTIOCCBRK\fR
109 \fBioctl()\fR calls.
112 The input and output line speeds may be set to any speed that is supported by
113 \fBtermio\fR. The speeds cannot be set independently; for example, when the
114 output speed is set, the input speed is automatically set to the same speed.
117 When the \fBasy\fR module is used to service the serial console port, it
118 supports a BREAK condition that allows the system to enter the debugger or the
119 monitor. The BREAK condition is generated by hardware and it is usually enabled
120 by default.
123 A BREAK condition originating from erroneous electrical signals cannot be
124 distinguished from one deliberately sent by remote DCE. The Alternate Break
125 sequence can be used as a remedy against this. Due to a risk of incorrect
126 sequence interpretation, SLIP and certain other binary protocols should not be
127 run over the serial console port when Alternate Break sequence is in effect.
128 Although PPP is a binary protocol, it is able to avoid these sequences using
129 the ACCM feature in \fIRFC 1662\fR. For Solaris PPP 4.0, you do this by adding
130 the following line to the \fB/etc/ppp/options\fR file (or other configuration
131 files used for the connection; see \fBpppd\fR(1M) for details):
133 .in +2
135 asyncmap 0x00002000
137 .in -2
141 By default, the Alternate Break sequence is a three character sequence:
142 carriage return, tilde and control-B (CR ~ CTRL-B), but may be changed by the
143 driver. For more information on breaking (entering the debugger or monitor),
144 see \fBkbd\fR(1) and \fBkb\fR(7M).
145 .SH ERRORS
148 An \fBopen()\fR will fail under the following conditions:
150 .ne 2
152 \fB\fBENXIO\fR\fR
154 .RS 9n
155 The unit being opened does not exist.
159 .ne 2
161 \fB\fBEBUSY\fR\fR
163 .RS 9n
164 The dial-out device is being opened while the dial-in device is already open,
165 or the dial-in device is being opened with a no-delay open and the dial-out
166 device is already open.
170 .ne 2
172 \fB\fBEBUSY\fR\fR
174 .RS 9n
175 The unit has been marked as exclusive-use by another process with a
176 \fBTIOCEXCL\fR \fBioctl()\fR call.
180 .ne 2
182 \fB\fBEINTR\fR\fR
184 .RS 9n
185 The open was interrupted by the delivery of a signal.
188 .SH FILES
190 .ne 2
192 \fB\fB/dev/term/\fR[\fIa-d\fR]\fR
196 \fB\fB/dev/term/\fR[\fI012...\fR]\fR
198 .RS 25n
199 dial-in tty lines
203 .ne 2
205 \fB\fB/dev/cua/\fR[\fIa-d\fR]\fR
209 \fB\fB/dev/cua/\fR[\fI012...\fR]\fR
211 .RS 25n
212  dial-out tty lines
216 .ne 2
218 \fB\fB/kernel/drv/amd64/asy\fR\fR
220 .RS 25n
221 64-bit kernel module for 64-bit x86 platform
225 .ne 2
227 \fB\fB/kernel/drv/asy.conf\fR\fR
229 .RS 25n
230 \fBasy\fR configuration file
233 .SH ATTRIBUTES
236 See \fBattributes\fR(5) for descriptions of the following attributes:
241 box;
242 c | c
243 l | l .
244 ATTRIBUTE TYPE  ATTRIBUTE VALUE
246 Architecture    x86
249 .SH SEE ALSO
252 \fBtip\fR(1), \fBkbd\fR(1), \fBeeprom\fR(1M), \fBpppd\fR(1M),
253 \fBioctl\fR(2), \fBopen\fR(2), \fBtermios\fR(3C), \fBattributes\fR(5),
254 \fBldterm\fR(7M), \fBttcompat\fR(7M), \fBkb\fR(7M), \fBtermio\fR(7I)
255 .SH DIAGNOSTICS
257 .ne 2
259 \fB\fBasy\fR\fIn\fR\fB\|: silo overflow.\fR\fR
261 .sp .6
262 .RS 4n
263 The hardware overrun occurred before the input character could be serviced.
267 .ne 2
269 \fB\fBasy\fR\fIn\fR\fB\|: ring buffer overflow.\fR\fR
271 .sp .6
272 .RS 4n
273 The driver's character input ring buffer overflowed before it could be
274 serviced.