In article <Csqy96....@usenet.ucs.indiana.edu> j...@phil.indiana.edu (Jon Dunn) writes:
>I'm trying to setup a dialout modem on a SPARCstation LX running
>Solaris 2.3 and can't get it to work. I've tested the modem (USR
>.....
Well, below I've included "Celeste's Guide to Terminals & Modems in Solaris 2.x"
which should be quite helpful.
Regards,
Luca Polo
----------- 8< ---------- 8< ------------ 8< ------------- 8< ---------------
Feb 23 1994 Celeste's Guide to Terminals & Modems in Solaris 2.x Page 1
Celeste's Guide to Terminals & Modems under Solaris 2.x
=======================================================
Revision 2/23/94 (and probably the last there will ever be)
INDEX
Section Description Page
----------------------------------------------------------------------
A.........Setting up a terminal on Solaris 2.x......................2
BEFORE YOU BEGIN: SET UP THE TERMINAL.................2
ENABLING SOLARIS FOR A TERMINAL.......................2
add_terminal script...................................3
B.........Setting Up a Bidirectional Modem on Solaris 2.x...........4
BEFORE YOU BEGIN: SETTING UP THE MODEM................4
ENABLING SOLARIS FOR A BIDIRECTIONAL MODEM............4
add_modem script......................................6
C.........Setting up a Modem for dial-out only......................7
BEFORE YOU BEGIN: SETTING UP THE MODEM................7
ENABLING SOLARIS FOR A DIAL-OUT-ONLY MODEM............7
D.........Tip and /etc/remote ......................................8
/etc/remote example...................................9
E.........Setting other serial port modes..........................10
/etc/ttydefs examples................................11
F.........Random notes of various uses of serial ports.............12
Parity in UUCP.......................................12
Flow control with UUCP...............................13
This document uses a "cook book" approach to setting up modems and
terminals under Sun's Solaris 2.x. It is not a tutorial and does not
cover all variations of serial port usage. But, between the explanations
and the scripts, you should be able to get common asynchronous modems
and terminals working fairly quickly.
You must execute the commands as root and you will probably have to
reboot the machine. So, plan the system's downtime accordingly.
You may distribute this information to anyone who wants it, as long as
you never attempt to copyright it in any way. If you find errors in it,
or have suggestions for changes in future revisions, please let me know
via email. Go for it--you can do it!
..Celeste Stokely
Unix System Administration Consultant, Stokely Consulting
EMAIL: cele...@xs.com
Voice Line: 415-967-6898 / FAX: 415-967-0160
USMAIL Address: Stokely Consulting
211 Thompson Square / Mountain View CA 94043
Feb 23 1994 Celeste's Guide to Terminals & Modems in Solaris 2.x Page 2
A. Setting up a terminal on Solaris 2.x
=======================================
*********************************************************************
*** IMPORTANT NOTES: ***
*** 1. All single quotes in these directions are BACK QUOTES, ***
*** not FORWARD QUOTES, except where specifically noted. ***
*** ***
*** 2. Be sure and execute these commands as root, from a ***
*** BOURNE shell (sh), not ksh, tcsh, or csh. (If you put the ***
*** commands into a Bourne shell script, that's fine, too.) ***
*** ***
*** 3. If, after following these instructions, you get ***
*** terminal failures, and you're not using a script, then ***
*** make sure that root's default shell is /sbin/sh and not ***
*** csh. ***
*********************************************************************
BEFORE YOU BEGIN: SETTING UP THE TERMINAL
- Set the terminal for the speed you wish (example below
assumes you are using 9600 baud)
- The only lines you really need in the terminal-to-Sun cable
are 2, 3, and 7. Be sure to cross lines 2 and 3 in your cable.
- Set the terminal for Xon/Xoff flow control
- Set the terminal for 7 bits, Even Parity. (1 stop bit, if
you have that setting.) If you want a different parity or
word length, see Section D of this document.
ENABLING SOLARIS FOR A TERMINAL:
- Save the following script as add_terminal
- make it executable with "chmod u+x add_terminal"
- Edit add_terminal to meet your particular needs
- Execute add_terminal
- If the terminal doesn't give you a login when you hit <return>
try rebooting the machine once.
Feb 23 1994 Celeste's Guide to Terminals & Modems in Solaris 2.x Page 3
#!/bin/sh
##########################################################################
# add_terminal shell script. Must be run as root.
# This script invokes pmadm with the following parameters.
# Change these parameters as needed for your particular needs.
#
# PARAMETER MEANING
# --------- -------
# PORT Port you want to set up. "a" or "b"
# TTYSPEED Speed setting, from /etc/ttydefs
# -s tty$PORT Terminal is on tty$PORT
# -d /dev/term/$PORT Actual port device. you may want
# -l $TTYSPEED Speed/stty setting from /etc/ttydefs. choose a
# $TTYSPEED entry that meets your needs
# -T tvi925 Your default terminal type for this port. This
# is a terminfo terminal type
# -i 'terminal disabled' Message sent to the tty port if the port is
# ever disabled
#
# QUOTE-ALERT: The single quotes in the "terminal-disabled" message are
# FORWARD QUOTES
##########################################################################
# set PORT = either a or b
#----------------------------------------
#PORT="a"
PORT="b"
#----------------------------------------
# choose your speed setting. See /etc/ttydefs for more settings,
# or build your own from the examples in the rest of this document
# contty5H = 19200 bps, 7 bits even parity
# contty3H = 2400 bps, 7 bits even parity
# conttyH = 9600 bps, 7 bits even parity
#----------------------------------------
TTYSPEED="conttyH"
#----------------------------------------
# change ownership of outgoing side of port to user uucp, group tty
# change ownership of incoming side of port to user root, group tty
#----------------------------------------
chown uucp /dev/cua/$PORT; chgrp tty /dev/cua/$PORT
chown root /dev/term/$PORT; chgrp tty /dev/term/$PORT
#----------------------------------------
# Remove any existing port monitor on the port
#----------------------------------------
pmadm -r -p zsmon -s tty$PORT
#----------------------------------------
# Create the new port monitor
#
# QUOTE-ALERT: The single quotes in the port-disabled message
# [terminal disabled] are FORWARD QUOTES
#----------------------------------------
pmadm -a -p zsmon -s tty$PORT -i root -fu -v `ttyadm -V` \
-m "`ttyadm -l $TTYSPEED -d /dev/term/$PORT -T tvi925 \
-i 'terminal disabled' -s /usr/bin/login -S y`"
Feb 23 1994 Celeste's Guide to Terminals & Modems in Solaris 2.x Page 4
B. Setting Up a Bidirectional Modem on Solaris 2.x
==================================================
BEFORE YOU BEGIN: SETTING UP THE MODEM
Be sure that the modem is configured in the following way:
- Hardware DTR. When the Sun drops DTR the modem should hang up and
reset the modem.
- Hardware Carrier Detect. The modem only raises the CD line when
there is an active carrier signal on the phone connection. When carrier
drops, either when the other end of the connection terminated or if
the phone connection is broken, the Sun will be notified and
act appropriately. The CD signal is also used for coordinating dial-in
and dial-out use on a single serial port and modem.
- Respond with numeric result codes. (Usually this is ATV0)
- Sends BASIC result codes ONLY. (Sometimes this is ATX0 or ATQ0)
- Does not echo commands. (Usually this is ATE0)
- Modem is locked at a single speed setting between Sun and modem.
Speed may vary as needed between local and remote modem, but
should remain constant between Sun and modem.
ENABLING SOLARIS FOR A BIDIRECTIONAL MODEM
*********************************************************************
*** IMPORTANT NOTES: ***
*** 1. All single quotes in these directions are BACK QUOTES, ***
*** not FORWARD QUOTES, except where specifically noted. ***
*** ***
*** 2. Be sure and execute these commands as root, from a ***
*** BOURNE shell (sh), not ksh, tcsh, or csh. (If you use ***
*** the a Bourne shell script, that's ok.) ***
*** ***
*** 3. If, after following these instructions, you get ***
*** modem failures, or if step #7 gives an error message ***
*** about "ttyadm: -V: invalid parameter", then make sure ***
*** that root's default shell is /sbin/sh and not csh. ***
...
read more »