Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ tctl — Apollo

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

emt

10.4;tctl (terminal_control), revision 2.0, 02/06/91
tctl (terminal_control) - set or display SIO/TTY line characteristics
usage: tctl [-line #] [-tty ##] [-nld [msec]]
                [-speed rate [-force]]
                [-erase chr] [-kill chr]
                [-eof chr] [-quitchr chr]
                [-faultchr chr] [-suspchr chr]
                [-parity {none|even|odd}]
                [-bpc {5|6|7|8}] [-stop {1|1.5|2}]
                [-[no]raw] [-[no]echo]
                [-[no]sync] [-[no]insync] [-[no]cvt_nl]
                [-[no]cvtraw_nl] [-[no]quit]
                [-[no]fault] [-[no]susp]
                [-[no]rts] [-[no]dtr]
                [-[no]dcd_enable]
                [-[no]cts_enable]
                [-[no]rts_enable]
                [-[no]polite]
                [-error {[no]parity|[no]framing|
                        [no]dcd_change|[no]cts_change|[no]overrun}]
                [-default]



DESCRIPTION
     tctl sets or displays TTY or SIO line characteristics, which control how
     hardware and software connected to those lines should behave.  For
     example, if you wish to allow a dumb terminal to dial into a node and
     communicate meaningfully with a shell, you must properly configure the
     TTY or SIO line so that the node will understand the terminal's signals.
     Thus, tctl controls the transmission speed (baud rate) that connected
     terminals must use, and which characters typed on those terminals delete
     characters or lines.

     Because the functionality of the SIO and TTY interfaces are different, it
     is important to use either -line (for SIO support) or -tty (for TTY
     support) to to assure the desired behavior on the line.  If neither
     option is specified, tctl will attempt to choose the correct interface.

COMMAND LINE SUMMARY
     -line #               Set/Inquire the SIO line # (/dev/sio#).
     -tty ##               Set/Inquire the TTY line ## (/dev/tty##).
     -nld [msec]           Set newline delay, in milliseconds.
     -speed rate           set baud rate.
     -force                Set baud rate even if it affects partner
                           line.
     -erase chr            Set erase character.
     -kill chr             Set kill character.
     -eof chr              Set end-of-file character.
     -quitchr chr          Set interrupt character.
     -faultchr chr         Set quit character.
     -suspchr chr          Set suspend character.
     -parity none          Don't send or check parity bit.
        even               Send and check even parity.
        odd                Send and check odd parity.
     -bpc  {5|6|7|8}       Set number of bits per character.
     -stop   {1|1.5|2}     Set number of stop bits.
     -[no]raw              Enable/disable "raw" mode.
     -[no]echo             Enable/disable echo.
     -[no]sync             Enable/disable host synchronization via node
                           sending CTRL-S/CTRL-Q (enable implies
                           -norts_enable).
     -[no]insync           Enable/disable input synchronization,
                           honoring CTRL-S/CTRL-Q sequences received.
     -[no]cvt_nl           Enable/disable transmitting new_lines (NL=10)
                           as CR-LF (when using the emt command, this
                           option must be considered in conjunction with
                           the setting of the outterm state in emt).
     -[no]cvtraw_nl        Enable or disable transmitting new_lines
                           (NL=10) as CR-LF in "raw" mode.
     -[no]quit             Enable/disable passing interrupts to this
                           process.
     -[no]fault            Enable/disable passing quits received to this
                           process.
     -[no]susp             Enable/disable passing suspension faults to
                           this process.
     -[no]rts              Set/reset the request-to-send line.
     -[no]dtr              Set/reset the data-terminal-ready line.
     -[no]dcd_enable       Enable/disable standard handling of carrier
                           detect.
     -[no]cts_enable       Enable/disable standard handling of clear-
                           to-send.
     -[no]rts_enable       Enable/disable synchronization via the
                           request-to-send line (enable implies
                           -nosync).
     -[no]bp_enable        Enable/disable processing of bitpad input on
                           this line.
     -[no]polite           Enable/disable polite mode.
     -error [no]framing    Enable/disable report of framing errors.
          [no]parity       Enable/disable report of parity errors.
          [no]dcd_change   Enable/disable report of change in DCD line.
          [no]cts_change   Enable/disable report of change in CTS line.
          [no]overrun      Enable/disable report of overrun errors.
     -default              Set all settable options to default values.

     Valid speeds are 50, 75, 110, 134, 150, 300, 600, 1200, 2000, 2400, 3600,
     4800, 7200, 9600, and 19200.  chr may be a single ASCII character or a
     one-byte hexadecimal value (for example, 1a or 0f1).

OPTIONS
     If no options are specified, the current settings of the TTY or SIO lines
     are displayed.

     -line #
          Specify the SIO line to be affected by subsequent options on this
          command line. # is an integer in the range 0-3. The default SIO line
          is line 1 or standard input (if standard input is directed to an SIO
          line).

     -tty ##
          Specify the TTY line to be affected by subsequent options on this
          command line.  ## is an integer in the range 00-03.

     -default
          Set all settable options to their default values.  This allows you
          to quickly reset values to known states.

     -speed baud
          Set the speed of the line, for both input and output.  The possible
          baud rates are: 50, 75, 110, 134, 150, 300, 600, 1200, 2000, 2400,
          3600, 4800, 7200, 9600, 19200.  The initial setting is 9600 baud.
          Note that 3600 baud is not supported on DN3xx systems.  Speeds for
          partner line(s) may occasionally need to be forced:  see -force
          below.

     -force
          Valid only if -speed is also specified.  This option forces the
          speed of the line specified by -line to be set to the correct speed
          (specified by -speed).  If the line has a partner line that is
          currently set to some other (incompatible) speed, -force will reset
          the partner line's speed to 9600 baud.  See examples 7 and 8 below.
          For more information about partner lines, see the sio_$control
          description in Domain/OS Call Reference.

     -nld [n]
          Set newline delay.  This is the number of milliseconds required
          following the output of a line feed (newline).

     -erase char
          Set the erase character.  This option is valid only when data is
          being passed to the TTY or SIO line in "cooked" mode. char may be
          any character or a  one-byte hexadecimal value.  Some characters may
          require quoting in the shell.  The erase character is initially set
          to BACKSPACE (08 hex).

     -kill char
          Set the kill character.  This option is valid only when data is
          being passed to the TTY or SIO line in "cooked" mode.  The kill
          character is initially set to CTRL/X (SIO) or CTRL/U (TTY).

     -eof char
          Set the end-of file character.  The EOF character is initially set
          to CTRL/Z (SIO) or CTRL/D (TTY).

     -quitchr char
          Set the interrupt character.  The SIO/TTY interrupt character is
          initially CTRL/C.

     -faultchr char
          Set the quit character.  The quit character is initially set to
          CTRL/] (SIO) or CTRL/| (TTY).

     -suspchr char
          Set the suspend character.  This is used primarily by Domain/OS.
          The suspend character is initially CTRL/P (SIO) or CTRL/Z (TTY).

     -[no]raw
          Turn "raw" mode on or off.  In "raw" mode, full 8-bit bytes are
          transmitted in both directions, without any interpretation.  The
          initial setting is -noraw.

     -[no]echo
          Turn the echoing of input characters over the TTY or SIO line on or
          off.  The initial setting is echo.

     -[no]sync
          A standard terminal protocol for synchronization is the sending of
          CTRL/S  (XON)  when the terminal input buffer  begins  to  fill, and
          CTRL/Q (XOFF) when the buffer begins to empty.  This protocol is
          used to control the flow of transmissions from a high-speed data
          source (when the node is receiving information too fast from a
          host). This option enables or disables this synchronization behavior
          (it is initially enabled).  -sync implies -norts_enable .

     -[no]cvt_nl
          Enable or disable conversion of LF to CR-LF on output.  cvt_nl
          causes newline (LF) to be transmitted as CR-LF sequences.  This
          option is valid only when data is being passed to the TTY or SIO
          line in "cooked" mode.  The initial setting is -nocvt_nl.

     -[no]cvtraw_nl
          Similar to -cvt_nl, but applies only to "raw" mode.

     -[no]insync
          When a node is transmitting data on a serial line, the terminal (or
          host on the receiving end) may not be able to keep up with the node
          transmissions and sends CTRL/S to stop the node from transmitting,
          then CTRL/Q to resume.  This option is used enable  or  disable
          reacting  to  CTRL/S  and CTRL/Q when they are received by the node.
          -insync  causes  transmissions to  halt when CTRL/S is received and
          to resume when CTRL/Q is received.  The initial setting is
          -noinsync.

     -parity state
          Select parity checking state.  Valid states are as follows:

          none Don't send or check parity bit.

          even Send and check even parity.

          odd  Send and check odd parity.  The initial state is none.

     -bpc n
          Set number of bits per character.  n is an integer in the range 5-8.
          The initial number of bits per character is 8.

     -stop n
          Set number of stop bits.  n may be 1, 1.5, or 2.  The initial number
          of stop bits is 1.

     -[no]quit
          Enable/disable interrupts for the current process.  The initial
          setting is -noquit for SIO, -quit for TTY.

     -[no]fault
          Enable/disable quits for the current process. The initial setting is
          -nofault for SIO, -fault for TTY.

     -[no]susp
          Enable/disable suspend faults for the current process.  The initial
          setting is -nosusp for SIO, -susp for TTY.

     -[no]rts
          Enable/disable the request-to-send line.  The initial setting is
          -rts.  Note that you may not use this option if -rts_enable is
          specified.

     -[no]dtr
          Enable/disable the data-terminal-ready line.  The initial setting is
          -dtr.

     -[no]dcd_enable
          Enable/disable standard handling of carrier detect.  The initial
          setting is -nodcd_enable (SIO) or -dcd_enable (TTY).

     -[no]cts_enable
          Enable/disable standard handling of clear-to-send.  The initial
          setting is -nocts_enable.

     -[no]rts_enable
          Enable/disable RTS flow control.  The initial setting is
          -norts_enable.  Enable implies -nosync.

     -[no]bp_enable
          Enable/disable processing of bit-pad input (from a graphics tablet)
          on the TTY/SIO line.  When enabled, data received on this line is
          not delivered through ios_$get, but is accumulated by the interrupt
          routine, and passed to the display driver a point at a time, much as
          with the touchpad.  This processing has the additional property that
          subsequent points within +/-1 in both the x and y dimensions are
          ignored.  The initial setting is -nobp_enable.

     -[no]polite
          Enable/disable polite mode.  When enabled, prevents requests from
          being mixed together when more than one process has the TTY/SIO
          device open for read.

     -error state
          Select error reporting state.  Valid states are as follows:
          [no]framing      Enable/disable reported framing errors.
          [no]parity       Enable/disable reported parity errors.
          [no]dcd_change   Enable/disable report on DCD line.
          [no]cts_change   Enable/disable report on CTS line.
          [no]overrun      Enable/disable reported overrun errors.

          Only framing is initially enabled.

NOTE
     emt always puts the SIO line in "raw" mode, so -cvt_nl has no effect in
     that instance.  Use the outterm command within emt.

     tctl -tty ## [-options] may or may not be sufficient to set/inquire tty
     UNIX characteristics.  Use /bin/stty instead.

EXAMPLES
     1. $ tctl -line 1 -default


     2. $ tctl -line 1        Display current settings on SIO line 1.
        Status of Line 1:
        Erase (character delete) character: 08 (hex)
        Kill (line delete) character: 18 (hex)
        End of file character: 1A (hex)
        Quit character: 1D (hex)
        Interrupt character: 03 (hex)
        Suspend character: 10 (hex)
        New line delay: 0
        Speed: 9600
        Raw: FALSE,         Echo: TRUE,         Cvt_NL: FALSE
        CvtRaw_NL: FALSE,   Host_Sync: TRUE,    Input_Sync: FALSE
        RTS: TRUE,          DTR: TRUE,          DCD: TRUE
        CTS: FALSE,         Quit_Enable: FALSE, Int_Enable: FALSE
        Susp_Enable: FALSE, DCD_Enable: FALSE,  CTS_enable: FALSE
        BP_enable: FALSE    RTS_enable: FALSE
        Eight bits per character, Parity: None, One stop bit
        Errors enabled: FRAMING
        Polite: FALSE


     3. $ tctl -tty 01 -default


     4. $ tctl -tty 01        Display current settings on TTY line 01.
        Status of TTY Line 01:
        Erase (character delete) character: 08 (hex)
        Kill (line delete) character: 15 (hex)
        End of file character: 04 (hex)
        Quit character: 03 (hex)
        Fault character: 1C (hex)
        Suspend character: 1A (hex)
        New line delay: 0
        Speed: 9600
        Raw: FALSE,         Echo: TRUE,         Cvt_NL: TRUE
        CvtRaw_NL: TRUE,    Host_Sync: TRUE,   Input_Sync: TRUE
        RTS: TRUE,          DTR: TRUE,          DCD: TRUE
        CTS: FALSE,         Quit_Enable: TRUE,  Fault_Enable: TRUE
        Susp_Enable: TRUE,  DCD_Enable: TRUE,  CTS_enable: FALSE
        BP_Enable: FALSE,   RTS_Enable: FALSE
        Eight bits per character, Parity: None, One stop bit
        Errors enabled: FRAMING
        Polite: FALSE

     5. Set quit character to hex FE, enable input synchronization, set
        speed to 300 baud on SIO line 2.

        $ tctl -line 2 -quitchar 0FE -insync -speed 300

     6. Set parity to odd, quit character to # (quoted because #
        normally begins a comment in the shell), and kill character
        to ! on line 1.

        $ tctl -line 1 -parity odd -quitchar '#' -kill !


     7. $ tctl -line 2 -speed 50
        ?(tctl)  Speed requested is incompatible with current
                 speed of partner line 1.  Resubmit  command
                 with -force if permissible to reset partner
                 line to 9600 baud.


     8. $ tctl -line 2 -speed 50 -force
        ?(tctl) Warning: Speed of partner line has been reset
                to 9600 baud.



SEE ALSO
     More information is available.  Type

     help  emt      For  details  about  configuring  your node as a dumb
                    terminal to communicate with a remote host via an SIO line

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