Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ serial(7) — A/UX 0.7

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

stty(1)

ioctl(2)

open(2)

termio(7)



     serial(7)                                               serial(7)



     NAME
          serial - the on-board serial ports

     SYNOPSIS
          /dev/tty0
          /dev/tty1
          /dev/modem
          /dev/printer

     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 UNIX® 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.


          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 ONDELAY (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



     Page 1                                        (last mod. 1/15/87)





     serial(7)                                               serial(7)



                         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

          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 a UNIX
                         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 they are shown
          with the connections required to use them for RS232:

                Mini-DIN



     Page 2                                        (last mod. 1/15/87)





     serial(7)                                               serial(7)



                 Pin #      Function    RS232    Pin #

                  1           HSKo       DTR      20
                  2           HSKi       DCD       8
                  3           TXD-       TXD       3
                  4           GND        GND       7
                  5           RXD-       RXD       2
                  6           TXD+       GND       7
                  7           GPi         NC
                  8           RXD+       GND       7

     FILES
          /dev/tty0
          /dev/tty1
          /dev/modem
          /dev/printer

     SEE ALSO
          stty(1), ioctl(2), open(2), termio(7).




































     Page 3                                        (last mod. 1/15/87)



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026