1asy(7D)                             Devices                            asy(7D)
2
3
4

NAME

6       asy - asynchronous serial port driver
7

SYNOPSIS

9       #include <fcntl.h>
10
11
12       #include <sys/termios.h>
13
14
15       open("/dev/term/n", mode);
16
17
18       open("/dev/tty/n", mode);
19
20
21       open("/dev/cua/n", mode);
22
23

DESCRIPTION

25       The asy module is a loadable STREAMS driver that provides basic support
26       for Intel-8250, National Semiconductor-16450, 16550, and some 16650 and
27       16750  and  equivalent  UARTs connected via the ISA-bus, in addition to
28       basic asynchronous communication support. The asy module supports those
29       termio(7I)  device  control functions specified by flags in the c_cflag
30       word of the termios structure,  and  by  the  IGNBRK,  IGNPAR,  PARMRK,
31       INPCK,  IXON,  IXANY, or IXOFF flags in the c_iflag word of the termios
32       structure. All other termio(7I) functions must be performed by  STREAMS
33       modules pushed atop the driver. When a device is opened, the ldterm(7M)
34       and ttcompat(7M) STREAMS modules are automatically pushed on top of the
35       stream, providing the standard termio(7I) interface.
36
37
38       The character-special devices /dev/term/a, /dev/term/b, /dev/term/c and
39       /dev/term/d are used to access the four standard  serial  ports  (COM1,
40       COM2,  COM3  and  COM4  at  I/O addresses 3f8, 2f8, 3e8 and 2e8 respec‐
41       tively).  Serial  ports  on  non-standard  ISA-bus  I/O  addresses  are
42       accessed  via  the  character-special devices /dev/term/0, /dev/term/1,
43       etc. Device names are typically used to provide a logical access  point
44       for a dial-in line that is used with a modem.
45
46
47       To  allow  a  single  tty  line to be connected to a modem and used for
48       incoming and outgoing calls, a special feature  is  available  that  is
49       controlled  by  the minor device number. By accessing character-special
50       devices with names of the form /dev/cua/n,  it is possible  to  open  a
51       port  without  the Carrier Detect signal being asserted, either through
52       hardware or an equivalent software mechanism. These  devices  are  com‐
53       monly known as dial-out lines.
54
55       Note -
56
57         This  module  is affected by the setting of certain eeprom variables,
58         ttya-ignore-cd and ttya-rts-dtr-off (and similarly for ttyb-,  ttyc-,
59         and  ttyd-  parameters). For information on these parameters, see the
60         eeprom(1M) man page.
61
62       Note -
63
64         For serial ports on the standard COM1 to COM4  I/O  addresses  above,
65         the  default setting for ttya-ignore-cd and ttya-rts-dtr-off is true.
66         If any of these ports are connected to a modem, these settings should
67         be  changed to false. For serial ports on non-standard I/O addresses,
68         the default setting for ttya-ignore-cd and ttya-rts-dtr-off is false.
69

APPLICATION PROGRAMMING INTERFACE

71       Once a /dev/cua/n line is opened, the corresponding tty line cannot  be
72       opened  until  the /dev/cua/n line is closed. A blocking open will wait
73       until the /dev/cua/n line is closed  (which  will  drop  Data  Terminal
74       Ready,  after  which Carrier Detect will usually drop as well) and car‐
75       rier is detected again. A non-blocking open will return  an  error.  If
76       the  /dev/ttydn  line  has  been opened successfully (usually only when
77       carrier is recognized on the modem), the corresponding /dev/cua/n  line
78       cannot  be  opened. This allows a modem to be attached to /dev/term/[n]
79       (renamed from /dev/tty[n]) and used for dial-in (by enabling  the  line
80       for  login  in  /etc/inittab)  or  dial-out  (by tip(1) or uucp(1C)) as
81       /dev/cua/n when no one is logged in on the line.
82

IOCTLS

84       The standard set of termio ioctl() calls are supported by asy.
85
86
87       Breaks can be generated by the TCSBRK, TIOCSBRK, and  TIOCCBRK  ioctl()
88       calls.
89
90
91       The  input  and output line speeds may be set to any speed that is sup‐
92       ported by termio. The speeds cannot be set independently; for  example,
93       when  the  output speed is set, the input speed is automatically set to
94       the same speed.
95
96
97       When the asy module is used to service the serial console port, it sup‐
98       ports a BREAK condition that allows the system to enter the debugger or
99       the monitor. The BREAK condition is generated by  hardware  and  it  is
100       usually enabled by default.
101
102
103       A  BREAK condition originating from erroneous electrical signals cannot
104       be distinguished from one deliberately sent by remote DCE.  The  Alter‐
105       nate Break sequence can be used as a remedy against this. Due to a risk
106       of incorrect sequence interpretation, SLIP  and  certain  other  binary
107       protocols should not be run over the serial console port when Alternate
108       Break sequence is in effect. Although PPP is a binary protocol,  it  is
109       able  to  avoid these sequences using the ACCM feature in RFC 1662. For
110       Solaris PPP 4.0, you do this  by  adding  the  following  line  to  the
111       /etc/ppp/options  file  (or other configuration files used for the con‐
112       nection; see pppd(1M) for details):
113
114         asyncmap 0x00002000
115
116
117
118       By default, the Alternate Break sequence is a three character sequence:
119       carriage  return, tilde and control-B (CR ~ CTRL-B), but may be changed
120       by the driver. For more information on breaking (entering the  debugger
121       or monitor), see kbd(1) and kb(7M).
122

ERRORS

124       An open() will fail under the following conditions:
125
126       ENXIO    The unit being opened does not exist.
127
128
129       EBUSY    The  dial-out  device is being opened while the dial-in device
130                is already open, or the dial-in device is being opened with  a
131                no-delay open and the dial-out device is already open.
132
133
134       EBUSY    The  unit  has been marked as exclusive-use by another process
135                with a TIOCEXCL ioctl() call.
136
137
138       EINTR    The open was interrupted by the delivery of a signal.
139
140

FILES

142       /dev/term/[a-d]          dial-in tty lines
143       /dev/term/[012...]
144
145       /dev/cua/[a-d]            dial-out tty lines
146       /dev/cua/[012...]
147
148       /kernel/drv/amd64/asy    64-bit kernel module for 64-bit x86 platform
149
150
151       /kernel/drv/asy.conf     asy configuration file
152
153

ATTRIBUTES

155       See attributes(5) for descriptions of the following attributes:
156
157
158
159
160       ┌─────────────────────────────┬─────────────────────────────┐
161       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
162       ├─────────────────────────────┼─────────────────────────────┤
163       │Architecture                 │x86                          │
164       └─────────────────────────────┴─────────────────────────────┘
165

SEE ALSO

167       tip(1), kbd(1),  uucp(1C),  eeprom(1M),  pppd(1M),  ioctl(2),  open(2),
168       termios(3C),    attributes(5),    ldterm(7M),   ttcompat(7M),   kb(7M),
169       termio(7I)
170

DIAGNOSTICS

172       asyn: silo overflow.
173
174           The hardware overrun occurred before the input character  could  be
175           serviced.
176
177
178       asyn: ring buffer overflow.
179
180           The driver's character input ring buffer overflowed before it could
181           be serviced.
182
183
184
185
186SunOS 5.11                        9 Oct 2004                           asy(7D)
Impressum