You are viewing an article about an obsolete product. Information on this page is provided as-is and not supported.

HOW TO: Configure TTY Options in Unix

 

Solution:

AccelePort and RealPort UNIX device driver packages include a command, ditty, which is a superset of stty, and may be used to set and display the device options for Digi AccelePort devices.

The general command format is:

   ditty [-a] [-n ttyname] [option(s)] [ttyname]

In AIX, substitute the command, stty-digi, for ditty:

   /usr/lbin/tty/stty-digi [-a] [-n ttyname] [option(s)] [ttyname]

When using RealPort for AIX or DG/UX, substitute the command, stty-ncxa, for ditty:

   stty-ncxa [-a] [-n ttyname] [option(s)] [ttyname]

When using RealPort for Linux, substitute the command, ditty-rp, for ditty:

   ditty-rp [-a] [-n ttyname] [option(s)] [ttyname]

With no options, ditty displays all Digi special driver settings, modem signals, and all standard parameters displayed by stty(1) for the TTY device referenced by standard input.

Command options are provided to change flow control settings, set transparent print options, force modem control lines, and display all TTY settings. Any unrecognized options are passed to stty(1) for interpretation.

ditty commands may be executed from the command line, or placed in a startup script to be run whenever the system is booted.

The options are:

-a Display all of the unique Digi option settings, as well as all of the standard TTY settings reported by stty -a.
-n ttyname Set and display options for the given TTY device, instead of standard input. This option may be specified multiple times to perform the same operation on multiple TTYs.
ttyname Set and display options for the specified TTY device. Replace ttyname with the TTY pathname (such as /dev/ttya01s, /dev/term/a01 or /dev/dty/a001s, depending on your operating system). This option may be used on a modem control line when no carrier is present.

The following options specify transient actions to be performed immediately:

break Send a 250 MS break signal out on the TTY line.
clear

Clear the tbusy flag in the channel structure to free the port.

NOTE: This option is supported only in UnixWare, OpenServer and Solaris operating systems.

cspeed n

Set the port speed to n bps, where n is an integer value. Available only on Xr, Xem and Xp adapters.

NOTE: This option is supported only in UnixWare, OpenServer, Solaris and HP-UX operating systems. Because the cspeed option is sticky and not transient on HP-UX systems, and only the AccelePort Xp adapter supports cspeed in HP-UX, HP-UX users should refer to the cspeed entry under the sticky options below.

flush Immediately flush (discard) TTY input and output.
flushin Flush TTY input only.
flushout Flush TTY output only.

The following options specify actions which are not sticky, meaning that the changes are cancelled when the device is closed, and that the device will use the default values the next time it is opened.

stopout Stop output exactly as if an XOFF character were received.
startout Restart stopped output exactly as if an XON character were received.
stopin Activate flow control to stop input.
startin Release flow control to resume stopped input.
[-]dtr Raise [drop] the DTR modem control line, unless DTR hardware flow control is selected.
[-]rts Raise [drop] the RTS modem control line, unless RTS hardware flow control is selected.

The following options are sticky—the effects continue until the system is rebooted or until the options are changed.

[-]printer

Forces the port to stay open so that non-sticky parameters such as baud rate and flow control are not reset to default values.

NOTES:

  • This option is supported only in UnixWare, OpenServer and Solaris operating systems.
  • This option is not supported by RealPort.
[-]fastcook

Perform cooked output processing on the adapter itself to minimize use of host resources.

NOTES:

  • This option is supported only in OpenServer and AIX operating systems.
  • This option is not supported by RealPort.
[-]fastbaud Alter the baud rate tables to permit the use of data rates that are beyond the range supported by the operating system. See fastbaud Data Rate Mapping, at the end of this page.
[-]rtspace Enable [disable] RTS hardware input flow control, so RTS drops to pause remote transmission.
[-]ctspace Enable [disable] CTS hardware output flow control, so local transmission pauses when CTS drops.
[-]dsrpace Enable [disable] DSR hardware output flow control, so local transmission pauses when DSR drops.
[-]dcdpace Enable [disable] DCD hardware output flow control, so local transmission pauses when DCD drops.
[-]dtrpace Enable [disable] DTR hardware input flow control, so DTR drops to pause remote transmission.
[-]forcedcd Disable [re-enable] carrier sense, so the TTY may be opened and used even when carrier is not present.
edelay n edelay is a tunable parameter used to set the number of milliseconds of delay between the time the first character arrives after a period of no characters and notification of its arrival to the host. This is also referred to as the wakeup rate between the host adapter software (FEP/OS) and the host device driver. This has the advantage of reducing host overhead by allowing the host to process larger blocks of incoming data.

Larger edelay values result in more characters being sent in a given time period. This will reduce host processor overhead and increase overall system throughput.

Smaller edelay values result in fewer characters being sent in a given time period. This will increase character response time and increase host processor overhead.

The default value for edelay is 100. This is a good value for normal TTY activity like typing. For some applications like uucp, decreasing the edelay value may increase character throughput, but will result in increased host (system) overhead. For applications receiving continuous input at high speeds, increasing edelay will result in lowering host overhead and increasing overall system throughput. A value of 250 is reasonable.

 NOTES:

  • This option is supported only in UnixWare, OpenServer and AIX operating systems.
  • This option is not supported by RealPort.
startc c Sets the XON flow control character. The character may be given as a decimal, octal or hexadecimal number. Octal numbers are recognized by the presence of a leading zero, and hexadecimal numbers are denoted by a leading "0x". For example, the standard XON character, , can be entered as "17" (decimal), "021" (octal) or "0x11" (hexadecimal).
stopc c Sets the XOFF flow control character. The character may be given as a decimal, octal, or hexadecimal number (see startc, above, for format of octal and hexadecimal numbers).
astartc c Sets auxiliary XON flow control character. The character may be given as a decimal, octal, or hexadecimal number (see startc, above, for format of octal and hexadecimal numbers).

Note: This option is not supported in Solaris.

astopc c Sets auxiliary XOFF flow control character. The character may be given as a decimal, octal, or hexadecimal number (see startc, above, for format of octal and hexadecimal numbers).

Note: This option is not supported in Solaris.

[-]aixon Enables auxiliary flow control, so that two unique characters are used for XON and XOFF. If both XOFF characters are received, transmission will not resume until both XON characters are received.
maxcps n Sets the maximum Characters Per Second (CPS) rate at which characters are output to the transparent print device. The rate chosen should be just below the average print speed. If the number is too low, printer speed will be reduced. If the number is too high, the printer will resort to flow control, and user entry on the terminal will be correspondingly impaired. Default is 100 CPS.
maxchar n Sets the maximum number of transparent print characters the driver will place in the output queue. Reducing this number increases system overhead; increasing this number delays operator keystroke echo times when the transparent printer is in use. Default is 50 characters.
bufsize n Sets the driver’s estimate of the size of the transparent printer’s input buffer. After a period of inactivity, the driver bursts this many characters to the transparent printer before reducing to the maxcps rate selected above. Default is 100 characters.
onstr "s" Defines the terminal escape sequence to direct subsequent data to the transparent printer.

s is a string of ASCII characters, enclosed in quotes, that command the terminal to enter transparent printing mode. An arbitrary octal character xxx may be given as \xxx.

For example, the sequence [5i would be entered as: "\033[5i".

offstr "s" Defines the terminal escape sequence to stop directing data to the printer.

s is a string of ASCII characters, enclosed in quotes, that command the terminal to enter transparent printing mode. An arbitrary octal character xxx may be given as \xxx.

For example, the sequence [5i would be entered as: "\033[5i".

term t Sets the transparent printer on/off strings to values found in the internal default table. Internal defaults are used for the following terminals: adm31, ansi, dg200, dg210, hz1500, mc5, microterm, multiterm, pcterm, tvi, vp-a2, vp-60, vt52, vt100, vt220, wyse30, wyse50, wyse60, or wyse75. If the terminal type is not found in the internal default table, then ditty reads the terminfo entry for the terminal type and sets transparent print on/off strings to values given by the mc5/mc4 attributes found there.
cspeed n Set the port speed to n bps, where n is an integer value.

For HP-UX, this option is valid only for AccelePort Xp adapters. This option is also supported in the UnixWare, OpenServer and Solaris operating systems. Because the cspeed option is transient and not sticky in these operating systems, UnixWare, OpenServer and Solaris users should refer to the cspeed entry under the transient options above.

Fastbaud:

Use the table below to see how setting fastbaud affects data rates for standard AccelePort and RealPort products. Select one of the links below to view a table of fastbaud data rates for: 

Note: Fastbaud for AccelePort Xp products is not supported under Linux. Linux users should use stty to set baudrates as high as 921600 or use the setserial command for setting arbitrary baudrates.

AccelePort fastbaud Data Rates

  Xp Xe Xr, Xem, EPC/X Xr 920 C/X
Specified Data Rate: Data Rate Mapped to: Data Rate Mapped to: Data Rate Mapped to: Data Rate Mapped to: Data Rate Mapped to:
50 57600 57600 57600 57600 57600
75 76800 76800 76800 76800 75
110 115200 115200 115200 115200 115200
134 131657 14400 14400 14400 14400
150 153600 28800 57600 57600 57600
200 230400 200 230400 230400 200
300 460800 300 76800 76800 300
600 921600 600 115200 115200 115200
1200

N/A

1200 230400 230400 1200
1800

N/A

1800 28800 28800 28800
2400 2400 2400 2400 460800 2400
4800 4800 4800 4800 921600 4800
9600 9600 9600 9600 9600 9600
19200 19200 19200 19200 19200 19200
38400 38400 38400 38400 38400 38400

RealPort fastbaud Data Rates

The table below contains the fastbaud data rates available for RealPort. All other fastbaud data rates for RealPort are unmapped.

Specified Data Rate: Data Rate Mapped to:
50 57600
75 76800
110 115200
134 131657
150 153600
200 230400
300 460800

 

 
Last updated: Jan 11, 2024

Recently Viewed

No recently viewed articles

Did you find this article helpful?