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

NAME

6       su - asynchronous serial port driver
7

SYNOPSIS

9       #include <fcntl.h>
10       #include <sys/termios.h>
11       open("/dev/tty[a-z]", _mode);
12       open("/dev/term[a-z]", _mode);
13       open("/dev/cua[a-z]", _mode);
14
15

DESCRIPTION

17       The  su module is a loadable STREAMS driver that provides basic support
18       for  standard  UARTS  that   use   Intel-8250,   National   Semiconduc‐
19       tor-16450/16550 hardware and Southbridge 1535D (16550 compatable) Super
20       I/O hardware. The module also provides keyboard and mouse  I/O  support
21       for  Sun  machines  using  those same Intel, National Semiconductor and
22       Southbridge chipsets. The su driver provides basic asynchronous  commu‐
23       nication  support  for  serial  ports. Both the serial devices and key‐
24       board/mouse devices will have streams built  with  appropriate  modules
25       pushed  atop  the   su  driver  by  means of either the autopush(1M) or
26       dacf.conf(4) facilities, depending on the OS revision and  architecture
27       in use.
28
29
30       The su module supports those termio(7I) device control functions speci‐
31       fied by flags in the c_cflag word of the termios structure, and by  the
32       IGNBRK,  IGNPAR,  PARMRK,  or  INPCK  flags  in the c_iflag word of the
33       termios structure. All other termio(7I) functions must be performed  by
34       STREAMS  modules  pushed atop the driver.  When a device is opened, the
35       ldterm(7M) and ttcompat(7M) STREAMS modules are automatically pushed on
36       top of the stream, providing the standard termio(7I) interface.
37
38
39       The  character-special  devices  /dev/ttya  and  /dev/ttyb  are used to
40       access the two standard serial ports. The su module supports up to  ten
41       serial  ports,  including the standard ports. The tty[a-z] devices have
42       minor device numbers in the range 00-03, and may be assigned  names  of
43       the  form  /dev/ttyd_n_,  where  _n_  denotes  the line to be accessed.
44       These device names are typically used to provide a logical access point
45       for a _dial-in_ line that is used with a modem.
46
47
48       To  allow  a  single  tty  line to be connected to a modem and used for
49       incoming and outgoing calls, a special feature  is  available  that  is
50       controlled  by  the minor device number. By accessing character-special
51       devices with names of the form  /dev/cua_n,  it is possible to  open  a
52       port  without  the Carrier Detect signal being asserted, either through
53       hardware or an equivalent software mechanism. These  devices  are  com‐
54       monly known as _dial-out_ lines.
55

APPLICATION PROGRAMMING INTERFACE

57       Once  a /dev/cua_n_ line is opened, the corresponding tty, or ttyd line
58       cannot be opened until the /dev/cua_n_ line is closed. A blocking  open
59       will  wait  until  the /dev/cua_n_ line is closed (which will drop Data
60       Terminal Ready, after which Carrier Detect will usually drop  as  well)
61       and  carrier  is  detected  again.  A  non-blocking open will return an
62       error. If the /dev/ttyd_n_ line has been opened  successfully  (usually
63       only  when  carrier  is  recognized  on  the  modem), the corresponding
64       /dev/cua_n_ line cannot be opened. This allows a modem to  be  attached
65       to   a   device,  (for  example,  /dev/ttyd0,  which  is  renamed  from
66       /dev/tty00) and used for dial-in (by enabling the  line  for  login  in
67       /etc/inittab)  or dial-out (by tip(1) or uucp(1C)) as /dev/cua0 when no
68       one is logged in on the line.
69

IOCTLS

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

ERRORS

112       An open() will fail under the following conditions:
113
114       ENXIO    The unit being opened does not exist.
115
116
117       EBUSY    The dial-out device is being opened while the  dial-in  device
118                is  already open, or the dial-in device is being opened with a
119                no-delay open and the dial-out device is already open.
120
121
122       EBUSY    The unit has been marked as exclusive-use by  another  process
123                with a TIOCEXCL ioctl() call.
124
125

FILES

127       /dev/cua/[a-z]     dial-out tty lines
128
129
130       /dev/term/[a-z]    dial-in tty lines
131
132
133       /dev/tty[a-z]      binary compatibility package device names
134
135

ATTRIBUTES

137       See attributes(5) for descriptions of the following attributes:
138
139
140
141
142       ┌─────────────────────────────┬─────────────────────────────┐
143       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
144       ├─────────────────────────────┼─────────────────────────────┤
145       │Architecture                 │ SPARC                       │
146       └─────────────────────────────┴─────────────────────────────┘
147

SEE ALSO

149       strconf(1), kbd(1), tip(1),uucp(1C), autopush(1M), kstat(1M), pppd(1M),
150       ioctl(2), open(2), termios(3C),  dacf.conf(4),  attributes(5),  kb(7M),
151       ldterm(7M), ttcompat(7M), termio(7I)
152

DIAGNOSTICS

154       The su driver keeps track of various warning and error conditions using
155       kstat counters. The output of the kstat su command provides kstat coun‐
156       ters. The counters and their meaning follow:
157
158       silo overflow           The  internal chip FIFO received more data than
159                               it  could  handle.  This  indicates   that  the
160                               Solaris operating environment was not servicing
161                               data interrupts fast enough possibly due  to  a
162                               system  with too many interrupts or a data line
163                               with a data rate that is too high.
164
165
166       ring buffer overflow    The su module was unable  to   store   data  it
167                               removed  from  the  chips  internal FIFO into a
168                               software buffer. The user process is not  read‐
169                               ing  data fast enough, possibly due to an over‐
170                               loaded system. If   possible,  the  application
171                               should  enable  flow  control (either CTSRTS or
172                               XONXOFF) to allow the  driver  to  backpressure
173                               the  remote  system when the local buffers fill
174                               up.
175
176
177
178
179SunOS 5.11                       18 June 2004                           su(7D)
Impressum