DINC(1)

NAME

dinc - ultra simple serial connection tool a la tip(1).

SYNOPSIS
dinc [[-125678ENOhsi]] [[baudrate]] [devname]

DESCRIPTION

dinc does basically what tip(1) or cu(1C) do but with way less confusion. It provides immediate support for changing line settings, setting and monitoring modem signals while you are connected, and it also supports extended baud rates up to 115200 on certain hardware.

There are no files to configure. In its simplest form, just invoke dinc with the name of the port you wish to open. It opens the port in non-blocking mode so carrier need not be present.

dinc does use the locking protocols adhered to by ttymon(1M), cu(1C), uucp(1C), and tip(1) so it will be careful not to access ports which might be in use by any of those processes. While dinc is intended primarily to be a troubleshooting or admin tool, it might find application as a general user tool as well.

dinc is provided along with source code so you can modify it to suit your needs.

USAGE

To invoke dinc with its default initial line settings, simply type dinc followed by the device name you wish to open.

dinc opens the specified serial device, establishes default line settings, prints some information about the line, and says its name (it beeps :)

---- DINC --- port=/dev/ttyC41 ----
  9600 BAUD 8 NONE 1 SWFC=ON HWFC=OFF
CAR=OFF DTR=ON RTS=ON CTS=OFF DSR=OFF
Type ~? for help.

This shows the line settings as 9600 baud, 8 bits, no parity, 1 stop bit. Software flow control is enabled, hardware flow control is disabled, and DTR and RTS are both driven active. The initial incoming modem signal states for carrier, CTS, and DSR are also reported.

If the port cannot be opened, dinc prints an error message and aborts.

Once dinc successfully opens the port, communication may begin immediately. It is also ready to accept various tilde commands to configure its operation. These are discussed in a later section.

OPTIONS

If no command line arguments (other than the device name) are specified, dinc defaults to 9600 baud, 8 bit characters, no parity, and 1 stop bit, with software flow control enabled and hardware flow control disabled unless the -i command line flag is specified - in which case it will default to the same paramaters as the internal ports.

If a baud rate is specified on the command line, it may either preceed or follow the device name. Supported baud rates are 75, 150, 300, 600, 1200, 2400, 4800, 9600, 19200, and 38400. On Digi International (formerly Central Data) EtherLite(R) and SCSI Terminal Server(TM) hardware, the additional baud rates of 57600, 76800, 115200, 153600 and 230400 may be supported. Extremely seldomly used baud rates such as 50, 110, 134, 200, and 1800 are omitted.

Note: dinc expects the specified device name to start with a non-numeric character so as to distinguish it from a baud rate.

The other command line options are as follows:

-1  1 stop bit

-2  2 stop bits

-5  5-bit characters

-6  6-bit characters

-7  7-bit characters

-8  8-bit characters

-E  Even parity

-N  No parity

-O  Odd parity

-h  Enable RTS/CTS hardware flow control

-s  Disable software flow control

-i  Do not initialize the port on open or restore it on close

TILDE COMMANDS

At any time while running dinc, you may issue various "tilde commands" to affect its operation similar to the tilde commands used by tip(1) and cu(1C). A tilde command must be immediately preceded by either a newline or a carriage return or another tilde command. Each tilde command consists of the "~" character followed by a single command character. The command character may be either upper or lower case. A tilde character at the start of a line may be sent by typing tilde twice in succession.

The following tilde commands are supported:

~?  Print the list of tilde commands.

~.  Quit out of dinc. Like the quit sequence for tip(1) and cu(1C), although the "~q" or "~x" commands are recommended instead to avoid possible interaction with rlogin(1) which also uses the same quit sequence.

~b ~+ ~- ~= ~_
    Cycle through the baud rate table. ~b, ~+, and ~= all increment the baud rate to the next available value. If the baud rate is currently at the highest supported value, it wraps around to the lowest. ~- and ~_ both decrement the baud rate, wrapping around at the bottom of the baud list.

~c  Toggles between 7 and 8 bit characters.

~d  Toggles the DTR modem signal.

~f  Toggles between character framing with 1 stop bit and 2 stop bits.

~h  Toggles hardware flow control.

~i  Displays information about the current connect in the same manner as the sign on message.

~k  Issues a break indication to the serial line.

~m  Displays the current state of the modem signals.

~o  Issues an output flush to the line. Useful if output is blocked for some reason.

~p  Cycles through the parity options of none, odd, and even.

~q  Quits out of dinc. Preferred over ~. since it won't interact with rlogin(1).

~r  Toggles the RTS modem signal.

~s  Toggles software flow control mode.

~x  Exits out of dinc. Same as ~q and ~.

ABOUT THE SOURCE CODE

Source code is supplied consisting of three files:
       dinc.c - main program
       dinc.h - header definitions
       dinc_hw.c - hardware dependencies

It also requires the presence of the 'cd_ext.h' header file, but only for the portions that support extended baudrates.

dinc has been built using both the Gnu C compiler (gcc) and the SunPro ANSI C compiler. To build, refer to the supplied Makefile and edit the appropriate defines.

SEE ALSO
ct(7), cu(1C), rlogin(1), stty(1), termio(7), termios(7), tip(1), ttymon(1M), uucp(1C)

PROVIDED BY

dinc was written by Dennis Cronin, formerly of Central Data Corporation (now part of Digi International). It is currently maintained by Jeff Randall of Digi International. Other vendors are invited to add high baud rate support for their products and forward changes to Jeff (Jeff_Randall@digi.com) for inclusion.