you should see "OK".
Congratulations! You're talking with the modem!
If you don't see "OK", you are not communicating with the modem.
See if the modem is plugged in, verify the baud rate of the modem
and the hardwire entry in /etc/remote, verify the modem cable.
3. The cuaa entry (below) allows you to type "tip cuaa" and talk
directly to a modem on port a at 2400 bps.
4. "tip some_phone_number" will look for the tip0 entry and use that
definition. (In the example below, it will use tip0, which points to
UNIX-2400, which sets up a dialup 2400 bps hayes compatible modem.
UNIX-2400 points to dialers, which references /dev/cua/a.
5. "tip mysystem" (below) looks up the "mysystem" entry, and dials the
number 14155551212 via a 9600 bps connection on /dev/cua/b.
Feb 2 Celeste's Guide to Terminals & Modems in Solaris 2.x Page 9
/etc/remote example:
--------------------
The following sample file is set up for
port a, 2400 bps hayes-compatible modem, 8 bits no parity ("p8" entry)
port b, 9600 bps hayes-compatible modem, 7 bits even parity (no "p8" entry)
cuaa:dv=/dev/cua/a:p8:br#2400:
mysystem:pn=14155551212:tc=UNIX-9600:
hardwire:\
:dv=/dev/cua/b:br#9600:el=^C^S^Q^U^D:ie=%$:oe=^D:
tip1200:tc=UNIX-1200:
tip0|tip2400:tc=UNIX-2400:
tip9600:tc=UNIX-9600:
tip19200:tc=UNIX-19200:
cu1200:tc=UNIX-1200:
cu0|cu2400:tc=UNIX-2400:
UNIX-1200:\
:el=^D^U^C^S^Q^O@:du:at=hayes:ie=#$%:oe=^D:br#1200:tc=dialers:
UNIX-2400:\
:el=^D^U^C^S^Q^O@:du:at=hayes:ie=#$%:oe=^D:br#2400:tc=dialers:
UNIX-9600:\
:el=^D^U^C^S^Q^O@:du:at=hayes:ie=#$%:oe=^D:br#9600:tc=dialfast:
UNIX-19200:\
:el=^D^U^C^S^Q^O@:du:at=hayes:ie=#$%:oe=^D:br#19200:tc=dialers:
dialers:\
:dv=/dev/cua/a:
dialfast:\
:dv=/dev/cua/b:
--------------------------------------------------------------------
The attributes are:
dv device to use for the tty
du make a call flag (dial up)
pn phone numbers (@ =>'s search phones file; possibly taken from
PHONES environment variable)
at ACU type
ie input EOF marks (default is NULL)
oe output EOF string (default is NULL)
cu call unit (default is dv)
br baud rate (defaults to 300)
tc to continue a capability
Feb 2 Celeste's Guide to Terminals & Modems in Solaris 2.x Page 10
E. Setting other serial port modes
==================================
Serial port modes (the terminal I/O options found in stty(1) ) are set in the
file /etc/ttydefs. The name of the serial port mode (like contty5H) is used
as the argument to the "-l" option in the "ttyadm" portion of the "pmadm
-a" command. (This is the "speed" setting you use when you add a new port
monitor.) See the stty man page for all the available terminal I/O options.
The format of the entries in ttydefs is defined as:
ttylabel:initial-flags:final-flags:autobaud:nextlabel
ttylabel The string ttymon tries to match against the TTY port's
ttylabel field in the port monitor administrative file.
It often describes the speed at which the terminal is
supposed to run, for example, 1200.
initial-flags Contains the initial termio(7) settings to which the
terminal is to be set. For example, the system administrator
will be able to specify what the default erase and kill
characters will be. initial-flags must be specified in the
syntax recognized by the stty command.
final-flags final-flags must be specified in the same format as
initial-flags. ttymon sets these final settings after a
connection request has been made and immediately prior to
invoking a port's service.
autobaud If the autobaud field contains the character `A', autobaud
will be enabled. Otherwise, autobaud will be disabled.
ttymon determines what line speed to set the TTY port to by
analyzing the carriage returns entered. If autobaud has been
disabled, the hunt sequence is used for baud rate determination.
nextlabel If the user indicates that the current terminal setting is
not appropriate by sending a BREAK, ttymon searchs for a
ttydefs entry whose ttylabel field matches the nextlabel field.
If a match is found, ttymon uses that field as its ttylabel
field. A series of speeds is often linked together in this
way into a closed set called a hunt sequence. For example,
4800 may be linked to 1200, which in turn is linked to 2400,
which is finally linked to 4800.
WARNING: These stty modes are processed from left to right within each set
of "initial-flags" or "final-flags". So, the order of the modes in each
entry is significant.
***************************************************************************
** IMPORTANT NOTE: When setting the mode to 8bits, do NOT enter it as **
** ".... -parity ... sane", but as "... sane... -parity" because "sane" **
** resets the port to 7 bits. **
***************************************************************************
Feb 2 Celeste's Guide to Terminals & Modems in Solaris 2.x Page 11
/etc/ttydefs examples:
----------------------
1. contty5H, as supplied by Sun, is 19200 bps, 7 bits even parity
contty5H:19200 opost onlcr:19200 hupcl sane::conttyH
This is equivalent to:
contty5H:19200 evenp opost onlcr:19200 sane evenp hupcl::conttyH
or
contty5H:19200 parenb -parodd opost onlcr:19200 sane parenb
-parodd hupcl::conttyH
2. To change contty5H to "7 bits, no parity" (-parenb):
contty5H:19200 -parenb opost onlcr:19200 sane -parenb hupcl::conttyH
3. To change contty5H to "7bits, odd parity" (parenb parodd, or oddp):
contty5H:19200 parenb parodd opost onlcr:19200 sane parenb parodd
hupcl::conttyH
or
contty5H:19200 oddp opost onlcr:19200 sane oddp hupcl::conttyH
4. To change contty5H to "8 bits, no parity" (-parenb cs8, or -parity):
contty5H:19200 -parenb cs8 opost onlcr:19200 sane -parenb cs8 hupcl::conttyH
or
contty5H:19200 -parity opost onlcr:19200 sane -parity hupcl::conttyH
WARNING: These stty modes are processed from left to right within each set
of "initial-flags" or "final-flags". So, the order of the modes in each
entry is significant.
***************************************************************************
** IMPORTANT NOTE: When setting the mode to 8bits, do NOT enter it as **
** ".... -parity ... sane", but as "... sane... -parity" because "sane" **
** resets the port to 7 bits. **
***************************************************************************
Feb 2 Celeste's Guide to Terminals & Modems in Solaris 2.x Page 12
E. Random notes of various uses of serial ports
===============================================
1. Parity in UUCP:
People often get confused about running UUCP in 7 bits vs. 8 bits vs.
even vs. odd parity. Here's what's really going on and how to deal with it.
Both the caller and receiver must agree on parity (even, odd, none) during
the login sequence. 7 or 8 bit word length often doesn't matter, if you
"do the right thing" with parity.
Once the uucico's are running, UUCP's own protocol handles all these
issues for you, but you need to be concerned with it during login.
There are 4 parity-related options you can set up during the login chat:
P_ZERO - No parity
P_EVEN - Even parity
P_ODD - Odd parity
P_ONE - "1" or Mark parity
It is usually safest to set up parity on a per-system-to-call basis, in
the /etc/uucp/Systems file, but it can also be set for all uses of the
port, in /etc/uucp/Dialers file.
Example 1. Setting up a port within UUCP to run with no parity, on a
per-system-connect basis.
In the file /etc/uucp/Systems, include P_ZERO in the chat script,
as in:
outhost Any ACU 9600 5551212 "" P_ZERO ogin: mylogin ssword: mypass
This means that when you first start trying to contact the machine
"outhost" uucp expects nothing ("") and sets P_ZERO (no parity).
Example 2. Setting up a port within UUCP to run with no parity, for all
uses of this port.
(This example assumes you are using the "tbfast" entry in your
/etc/uucp/Devices file)
In /etc/uucp/Dialers:
tbfast =W-, "" P_ZERO "" \dA\pA\pA\pTE1V1X1......
Feb 2 Celeste's Guide to Terminals & Modems in Solaris 2.x Page 13
2. Flow control with UUCP:
With UUCP, either use hardware flow control or no flow control. Please
remember that there is no incoming hardware flow control on Sun CPU
serial ports, only outgoing hardware flow control. (There is no such
limitation on non-cpu ports which claim to have hardware flow control.)
Sun has released a patch to enable hardware flow control on some
systems' cpu serial ports. It may work on your system.
The lack of incoming hardware flow control is not a problem with UUCP,
usually, because the UUCP protocol is robust enough to request
retransmission of packets when the data isn't correct.
Using a good modem that has built-in UUCP protocol support (also known as
spoofing) will also help. If all else fails, slow down the connection
between the Sun and the modem to what you can support in your environment.
The string "STTY=crtscts" tells UUCP to use hardware flow control. It's
usually better to set this up on a per-port basis, rather than on a
per-system basis, but UUCP will let you configure it however you want.
Example 1. Setting up a port with UUCP to use hardware flow control for
all uses of this port. (Preferred way)
(This example assumes you are using the "tbfast" entry in your
/etc/uucp/Devices file)
In /etc/uucp/Dialers, add "STTY=crtscts" after the CONNECT\sFAST:
tbfast =W-, "" \dA\pTE1.... \EATDT\T\r\c CONNECT\sFAST STTY=crtscts
Example 2. Setting up a port with UUCP to use hardware flow control, on
a per-system-connect basis. (Do this if you feel you must, but there
are very few good reasons for it.)
In the file /etc/uucp/Systems, include "STTY=crtscts" in the chat
script, as in:
outhost Any ACU 9600 5551212 ogin: mylog ssword: mypass "" STTY=crtscts
Last-modified: Tue, 18 Sep 2001 17:41:37 GMT