Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ttysoftcar(8) — SunOS 4.0.2

Media Vault

Software Library

Restoration Projects

Artifacts Sought

TTYSOFTCAR(8)  —  MAINTENANCE COMMANDS

NAME

ttysoftcar − enable, disable, or display soft-carrier mode for tty ports

SYNOPSIS

/usr/etc/ttysoftcar [ −y | −n ] tty ... 

/usr/etc/ttysoftcar −a

DESCRIPTION

ttysoftcar enables, disables, or displays soft-carrier mode for tty ports.  It changes the kernel’s settings for the “local” and “remote” tty port flags withour reconfiguring the kernel. 

Enabling soft-carrier mode permits the use of null modem cables that do not support the DCD signal.  Disabling soft-carrier mode requires that the modem provide DCD. 

With no options, ttysoftcar displays the soft-carrier mode status of each tty. 

OPTIONS

−a Enable soft-carrier mode for all local tty ports and disable it for all other tty ports. 

−n tty ... 
Disable soft-carrier mode for tty.

−y tty ... 
Enable soft-carrier mode for tty.

EXAMPLES

The following command turns on soft carrier mode for /dev/ttym0 so a modem or printer can be connected with a null modem cable. 

example% /usr/etc/ttysoftcar −y /dev/ttym0

To turn on soft-carrier mode for serial port A (/dev/ttya) each time the system boots, add the following line to /etc/rc.local:

/usr/etc/ttysoftcar −y /dev/ttya

SEE ALSO

Sun386i System Setup and Maintenance

NOTES

You cannot dial in to modems using null modem cables; you must use cables which implement pin 8 DCD. 

After running ttysoftcar, you must restart init(8):

example% kill -HUP 1

Soft-carrier mode can also be enabled, disabled, or determined under program control by passing request codes TIOCSSOFTCAR or TIOCGSOFTCAR to ioctl(2) as shown in the following programming examples:

      #include <sys/ioctl.h>  /∗  indirectly refers to /usr/include/sys/ttycom.h
which #defines the request codes.  ∗/
 

int ttysetting;   /∗ To store the soft-carrier mode setting  ∗/
 ioctl("/dev/ttya", TIOCSSOFTCAR, 1);    /∗ enables soft-carrier mode ∗/
ioctl("/dev/ttya", TIOCSSOFTCAR, 0);    /∗ disables soft-carrier mode ∗/
ioctl("/dev/ttya", TIOCGSOFTCAR, &ttysetting);
/∗ stores the soft-carrier mode setting for /dev/ttya in ttysetting,
      which is 1 if the mode is enabled, and 0 if it’s disabled  ∗/

Sun Release 4.0  —  Last change: 17 July 1989

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