serial(7) serial(7)NAME serial - provides the on-board serial ports DESCRIPTION /dev/tty0 is the serial port connected to the DIN connector on the rear of the chassis with the modem icon above it; it is linked to (is the same as) the name /dev/modem. /dev/tty1 is the serial port connected to the DIN connector on the rear of the chassis with the printer icon above it; it is linked to (is the same as) the name /dev/printer. These ports support all the standard A/UX ioctls from termio(7). They also support the following hardware specific extensions. The modes set by these ioctls (or the corresponding stty(1) options) persist after a device is closed and reopened. The mnemonic definitions are in /usr/include/sys/ioctl.h. UIOCNOMODEM No modem control, the input line HSKi is ignored. The output line HSKo is asserted whenever the line is opened. The following stty(1) command can be used to put a port (/dev/tty0 in this example) into such a mode: stty -modem < /dev/tty0 UIOCMODEM Modem control, the output line HSKo is asserted whenever a process is attempting to open the device or while the device is open, as an output this performs the RS232 function Data Terminal Ready (DTR). When a port is closed this line is negated (if the HUPCL flag from termio(7) is set) which causes a modem to hang up a call. Upon opening, if HSKi is not asserted, then an open will not complete (a process will be suspended until the open does complete) until it is asserted. Processes that use the O_NDELAY (see open(2)) flag when opening such a port are not suspended, but instead complete their opening immediately. If HSKi is negated while a port is open, the signal SIGHUP will be generated to processes with the port as their controlling terminal (usually resulting in the death of the processes and the subsequent closing of the port). In this mode, the HSKi input functions as the RS232 function Data Carrier Detect (DCD). The following stty(1) command can be used to put a port into such a mode: stty modem < /dev/tty0 January 1992 1
serial(7) serial(7)To turn this option off, stty(1) needs to first open the port; and because it can't open the port until the HSKi (DCD) line is asserted, the following form of the stty(1) should be used to turn off this option: stty -n /dev/tty0 -modem UIOCDTRFLOW DTR flow control. This mode is used to communicate with printers such as the Apple ImageWriter II. The HSKo output performs in the same manner as above. The HSKi input is used to enable or disable output by a a device (such as a printer) that wishes to flow control it. When HSKi is asserted characters may be output, when it is negated output will stop. Note that when an A/UX device is closed, the process that is closing it will be suspended until all waiting characters have been transmitted; such a process will wait until flow control is asserted. Either of the following stty(1) commands can be used to turn on DTR flow control: stty dtrflow < /dev/tty0 stty hxctl < /dev/tty0 UIOCTTSTAT This call returns the current state of the three above options; refer to termio(7) for more documentation. Note: Since this interface does not support the RS232 ``Clear To Send'' and ``Request To Send'' (CTS/RTS), the ioctls UIOCFLOW and UIOCNOFLOW are not supported. In UIOCDTRFLOW mode, the HSKi input acts very similarly to CTS and could be used with some devices that require this signal. The port pins have the following functions, shown with the connections required to use them for RS232: Mini-DIN Pin # Function RS232 Pin #___________________________________1 HSKo DTR 202 HSKi DCD 83 TXD- TXD 34 GND GND 75 RXD- RXD 26 TXD+ GND 77 GPi NC8 RXD+ GND 72 January 1992
serial(7) serial(7)FILES /dev/tty0 Device file /dev/tty1 Device file /dev/modem Device file /dev/printer Device file /usr/include/sys/ioctl.h Header file SEE ALSO termio(7) stty(1) in A/UX Command Reference ioctl(2), open(2) in A/UX Programmer's Reference January 1992 3