DITTY(1)

NAME
ditty - set/display Digi tty communication options.

SYNOPSIS
ditty [ -ap ] [ -n tty ] [ -w seconds ] [ option ... ] [ ttyname ... ]

DESCRIPTION
Ditty sets and displays all stty-type and Digi-special options associated with tty devices on Digi Intelligent boards, and on Realport devices. It can also be used to set and display standard stty options on non-Digi tty devices.

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, transparent print options, force modem control lines, and display all tty settings. Any unrecognized options are passed to stty(1) for interpretation.

OPTIONS

-a  Display all of the unique Digi option settings, as well as all of the standard tty settings reported by stty -a.

-n tty
    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.

-p  Display the port settings for a Digi parallel port. In this context many of the standard stty settings take on an entirely different meaning. (also -parallel).

-w seconds
    Wait for the device to become ready for up to the specified number of seconds (default 5). This option is usually specified in system boot scripts to wait for driver initialization. In this context a value of 60 seconds is recommended.

ttyname
    Set and display options for the given tty device, instead of standard input. This form can be used with a tty pathname prefixed by /dev/ or with a simple tty name beginning with: tty, pr, or cu. The tty is opened in non-blocking mode, so its possible to access a modem port when no carrier is present.

The following options specify special actions to be performed immediately.

break
    Send a 250 MS break signal out on the tty line.

flush
    Immediately flush (discard) tty input and output.

flushin
    Flush tty input only.

flushout
    Flush tty output only.

stopout
    Stop output exactly as if an xoff character was received.

startout
    Restart stopped output exactly as if an xon character was 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. Their effect continues until the system is rebooted.

[-]printer
    Alters the device behavior for operation with a serial printer. On close the device waits indefinitely for all buffered data to be sent out the port. Also all stty settings become sticky. These settings are now saved when the port is closed and restored when the port is reopened.

[-]fastcook
    Causes cooked output processing to be done on an external processor, offloading this activity from the host computer. Also causes nearly all output and most high-speed input to bypass the UNIX CLIST structures, improving performance. Turn this option on for best host performance and off to improve UNIX compatibility.

[-]fastbaud
    Alter the baud rate tables, so that the following baud rate changes take place. Note that if the "cspeed" option is enabled, that speed will override any "fastbaud" setting.

    With PC/Xx boards: 50=57600, 75=76800, 110=115200, 134=14400 and 150=28800.

    With XEM, Xr and EPC boards: 50=57600, 75=76800, 110=115200, 134=14400, 150=57600, 200=230000, 300=76800, 600=115200, 1200=230000, 1800=28800, 2400=460800, and 4800=921600.

    With C/X boards: 50=57600, 110=115200, 134=14400, 150=57600, 600=115200, and 1800=28800.

    With Realport: 50=57600, 75=76800, 110=115200, 134=131657, 150=153600, 200=230400, 300=460800, and 600=921600.

cspeed n
    This parameter allows one to override all other terminal speed parameters with the supplied integer rate. The current custom rate will be displayed in parentheses with an asterisk after it whenever "cspeed" is in effect. The "cspeed" feature will be disabled if a rate of "0" is supplied (the rate would then revert to whatever the prevailing rate was). Note that not all rates are supported by all hardware. Check your hardware documentation for speed limitations. Note that the displayed "cspeed" value may not match the requested rate, since only a finite set of rates are actually possible given hardware and software limitations.

-cspeed
    An alternate means to disable the "cspeed" feature.

[-]rtspace
    Enable RTS hardware input flow control, so RTS drops to pause remote transmission.

[-]ctspace
    Enable CTS hardware output flow control, so local transmission pauses when CTS drops.

[-]dsrpace
    Enable DSR hardware output flow control, so local transmission pauses when DSR drops.

[-]dcdpace
    Enable DCD hardware output flow control, so local transmission pauses when DCD drops.

[-]dtrpace
    Enable DTR hardware input flow control, so DTR drops to pause remote transmission.

[-]forcedcd
    Disable carrier sense, so the tty may be opened and used even when carrier is not present.

[-]altpin
    Switches the function of the DSR and the DCD inputs on the modular connector, so that DCD is available when using an 8-pin RJ-11 connector instead of the 10-pin RJ-45 connector. This option is ineffective with Realport; set altpin in the remote device (i.e. a Digi Portserver) configuration instead.

startc c
    Sets the XON flow control character. The character may be given as a decimal, octal, or hexadecimal number.

stopc c
    Sets the XOFF flow control character. The character may be given as a decimal, octal, or hexadecimal number.

astartc c
    Sets auxiliary XON flow control character. The character may be given as a decimal, octal, or hexadecimal number.

astopc c
    Sets auxiliary XOFF flow control character. The character may be given as a decimal, octal, or hexadecimal number.

[-]aixon
    Enables operation of the auxiliary flow control characters astartc, and astopc. Operation of the regular and auxiliary flow control characters are independent; if transmission is stopped by one of the stop characters, only the corresponding start character can resume it. If both stop characters are received, transmission will not resume until both start characters are received.

[-]2200flow
    Use 2200 style flow control on the port. The 2200 terminals support an attached printer and use four flow-control characters: terminal XON (0xF8), printer XON (0xF9), terminal XOFF (0xFA) and printer XOFF (0xFB). This option is not supported by Realport.

[-]2200print
    The 2200print flag determines how these flow characters are interpreted. If 2200print is set, run independent flow control for terminal and transparent print devices. Otherwise, terminal and printer flow control are logically tied together, so if either XOFF character is received, all output is paused until the matching XON character is received. This option is not supported by Realport.

maxcps n
    Sets the maximum Character 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 activate flow control, temporarily stopping all output to both the CRT and the printer; keyboard response is severely impaired. Default is 100 CPS.

maxchar n
    Sets the maximum number of transparent print characters the driver will place in the output queue ahead of CRT data. 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.

Note:
    If the printer activates flow control at the start of a printout, bufsize is too large. Otherwise if it activates flow control during a printout, maxcps is too large. If the printer is not activating flow control, but terminal delays are experienced, maxchar is too large.

edelay ms
    Sets the edelay parameter to the number of milliseconds specified.

    Data is sent from the intelligent processor to the host computer when there is data in the input buffer and either (1) input buffer becomes about 1/2 full, (2) the port becomes momentarily idle or (3) no data has been sent to the host for at least edelay milliseconds.

    Setting edelay to lower values improves latency, but increases the number of system calls and so reduces system efficiency. Setting edelay to higher values reduces the number of system calls, improving efficiency, but degrades latency. The default value is appropriate for most applications.

onstr s
    Sets the transparent print ON escape sequence. This string tells the terminal that the data which follows should be sent to the attached printer. An octal character xxx may be given as \xxx.

offstr s
    Sets the transparent print off escape sequence. This sequence tells the terminal that subsequent data should be displayed on the screen. An arbitrary octal character xxx may be given as \xxx.

term t
    Sets transparent print on/off strings to values found in the internal default table. Internal default are provided for the following terminals: adm31, ansi, dg200, dg210, hz1500, mc5, microterm, pcterm, tvi, vp-a2, vp-60, vt52, vt100, 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 sets transparent print on/off strings to values given by the mc5/mc4 attributes found there.

The following are ditty options for parallel ports.

reset
    The SELECTIN line will go low and then high, resetting the parallel port.

[-]noack
    The parallel port will [wait] not wait for an ACK pulse for each character transmitted.

[+/-]OP
    +OP raises the SELECTIN line and -OP lowers the SELECTIN line. This has the same effect as resetting the parallel port.

The length of the strobe determines the speed of the parallel port. Valid settings are: 0.8, 1.0, 1.2, 1.6, 2.0, 3.0, 4.0, 10.0, 20.0, 30.0, 40.0, and 50.0. The higher numbers will result in lower effective throughput. A setting of "50.0" corresponds to 50 baud and "0.8" corresponds to baud rates of 9600 and above.

EXIT STATUS

Normal completion has exit status 0.

Fatal errors generate a message to stderr, and exit with status 1.

Parameter errors generate a message to stderr, and exit with status 2.

SEE ALSO
stty(1), ioctl(2), termio(4), terminfo(5), drp(7), drpd(8).