Note:to facilitate faster loading of EdCert documents, this page contains excerpts borrowed from another source.
Copyright (c) 1995 Stokely Consulting.
Permission to use, copy, and distribute this documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies, that both that copyright notice and this permission notice appear in supporting documentation, that this document is not modified, and that the name of Stokely Consulting not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Stokely Consulting makes no representations about the suitability of this documentation for any purpose. It is provided "as is" without express or implied warranty. All other product names are copyrighted by their various owners.
Tip
and /etc/remote You may hate tip and love kermit or pcomm. I understand. But, do this via tip to keep it simple, ok?
Decide which serial port you want to use. (One with no cable already plugged in is often a good bet.) The port will be labeled "A", "B", "A/B" or could even be "C" or higher.
If you use one labeled "A/B" and have no Y-type splitter cable plugged into it, you'll have access only to port A. With the splitter, you'll get ports A and B on separate sockets of the splitter cable.
The Sun serial port device driver splits each physical port into two logical
devices, /dev/term/a or /dev/term/b for incoming transmission, and
/dev/cua/a or /dev/cua/b for outgoing transmission.
The speed referred to in this section is the DTE or Sun-to-modem speed. It is NOT the modem-to-modem speed. A 14400bps modem may have a 19200bps DTE speed.
Make sure you have your serial port permissions right. uucp should own the
outgoing side, and root should own the incoming side.
Execute these commands as root, substituting your port name (a, b, c, or d) where needed:
prompt# chown uucp /dev/cua/a; chgrp tty /dev/cua/a prompt# chown root /dev/term/a; chgrp tty /dev/term/a
/etc/remote, and find the entry beginning
with "hardwire:". This is the entry you use to program the modem, and is
not usually used for dialing out directly, unless you enjoy AT commands.
(If this is the second modem you're adding, clone the entire hardwire
entry and label the new entry "hardwire2".)
Change it from an entry like:
hardwire:\
:dv=/dev/????/?:br#????:el=^C^S^Q^U^D:ie=%$:oe=^D:
to one set to your port (like /dev/cua/a) and baud rate (like 9600):
hardwire:\
:dv=/dev/cua/a:br#9600:el=^C^S^Q^U^D:ie=%$:oe=^D:
NOTE: Never run tip from a cmdtool. Use a shelltool, xterm, or some other window without scrollbars. The scrollbars may confuse tip's <carriage return> processing.
There are exceptions to this, but if you never run tip in a scrollbar-type window, you won't have to remember all the ways it does and does not work.
Now use your edited "hardwire" entry from /etc/remote and type:
prompt# tip hardwire (or "tip hardwire2")
you should see "connected"
type:
ATE1V1<carriage return>
(This will work for all Hayes-compatible modems, even cheapies.)
Now, issue the appropriate AT commands to program the modem. (See the section called Basic Modem Programming. Don't forget to write the new settings out to the modem's NonVolatile RAM.
/etc/remote, verify the modem cable.
<carriage return>~. (This means to type 3 separate keys, one at a time, of <carriage return> <tilde> <period> This will also exit rlogin, so if you're running tip through an rlogin, make that <carriage return>~~. (<carriage return> <tilde> <tilde> <period>) or you'll only exit rlogin.)
/dev/cua/a. Convoluted, eh?)
mysystem" entry, and dials the
number 14155551234 via a 19200bps 7 bits, no parity connection on
/dev/cua/a.
/etc/remote example
The following sample /etc/remote file is set up for:
See the remote(4) man page for all the possible options.
cuaa:dv=/dev/cua/a:br#19200:
cuab:dv=/dev/cua/b:p8:br#9600
mysystem:pn=14155551234:tc=UNIX-19200:
hardwire:\
:dv=/dev/cua/b:p8:br#9600:el=^C^S^Q^U^D:ie=%$:oe=^D:
tip0|tip19200:tc=UNIX-19200:
tip9600:tc=UNIX-9600:
UNIX-9600:\
:el=^D^U^C^S^Q^O@:du:at=hayes:ie=#$%:oe=^D:br#9600:tc=dialb:
UNIX-19200:\
:el=^D^U^C^S^Q^O@:du:at=hayes:ie=#$%:oe=^D:br#19200:tc=diala:
diala:\
:dv=/dev/cua/a:
dialb:\
:p8: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
Enabling Solaris For a Bidirectional Modem
IMPORTANT NOTES:
ttyadm: -V: invalidparameter", then make sure that root's default shell is /sbin/shand
not csh.
prompt# eeprom ttya-ignore-cd=true [this means use HW carrier detect]
prompt# eeprom ttya-rts-dtr-off=true
prompt# init 6
(Is it critical to reboot now? No. But, you'll need to reboot at some time.)
prompt# sacadm -l -t ttymon
"Invalid request, ttymon does not exist"
then the ttymon port monitor is not configured.
PMTAG PMTYPE FLGS RCNT STATUS COMMAND
zsmon ttymon - 0 ENABLED /usr/lib/saf/ttymon
prompt# sacadm -a -p zsmon -t ttymon -c /usr/lib/saf/ttymon -v `ttyadm -V`
(Note: The string "zsmon" is known as a PMTAG.)
Type:
prompt# pmadm -l
PMTAG PMTYPE SVCTAG FLGS ID <PMSPECIFIC>
zsmon ttymon ttya u root /dev/term/a I - .........
Then you need to remove the existing service. Issue this command and insert the PMTAG and SVCTAG found in the previous command by typing:
prompt# pmadm -r -p zsmon -s ttya
^ ^
(PMTAG) (SVCTAG)
Putting this in a script is a Very Good Idea because if you make a mistake, you can easily fix the problem and rerun the script. Don't try to do this without a script--there are too many typing errors waiting to be made in these commands.
Type in the following script as a file (for instance, /sbin/add_modem), make it executable, then run it.
add_modem shell script
#!/bin/sh # add_modem shell script. Must be run as root from bourne shell # 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 # LOGINMSG The login message which will be displayed. # -p zsmon PMTAG, name of this port monitor # -s ttya SVCTAG, modem is on ttya. you may want ttyb # -d /dev/term/$PORT Actual port device. # -l contty5H Ttylabel, defined in /etc/ttydefs file. (speed # setting. contty5H=19200 baud) # -b Flag for bidirectional port use # -S n Turn software carrier off (modem supplies # hardware carrier detect signal) # "dial in/out on serial port" This is a comment you'll see on pmadm -l ######################################################################## LOGINMSG="Always be nice to your sysadm. You may now login. " # set PORT = either a or b PORT="a" #---------------------------------------- # choose your speed setting. See /etc/ttydefs for more, or build your # own from the examples in the rest of this article. # contty5H = 19200bps, 7 bits even parity, as supplied by Sun # conttyH = 9600bps, 7 bits even parity, as supplied by Sun TTYSPEED="contty5H" #---------------------------------------- # 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 this port. # You can ignore any error messages from this next command. # If you see the message "Invalid request, ttya does not exist under zsmon", # You may be trying to remove a port monitor which does not exist. /usr/sbin/pmadm -r -p zsmon -s tty$PORT #---------------------------------------- # Create the new port monitor /usr/sbin/pmadm -a -p zsmon -s tty$PORT -i root \ -v `/usr/sbin/ttyadm -V` -fu -m "`/usr/sbin/ttyadm \ -p "$LOGINMSG" -d /dev/term/$PORT -s /usr/bin/login -l $TTYSPEED -b \ -S n -m ldterm,ttcompat`" -y "dial in/out on serial port" ############ end of add_modem script ###################################
Make the script executable by typing: prompt# chmod 700 /sbin/add_modem
then run it with: prompt# /sbin/add_modem
For more information, see the section, Tip and /etc/remote.
Enabling Solaris For A Dial-out-only Modem
If there is no port monitor running on the port, then the Sun will not try to spawn a login. So, you have to remove any port monitor on the port. There is much disagreement over whether these eeprom settings are required. Just use them and it will work.
prompt# eeprom ttya-ignore-cd=true [this means use HW carrier detect]
prompt# eeprom ttya-rts-dtr-off=true
prompt# init 6
(Is it critical to reboot now? No. But, you'll need to reboot at some time.)
prompt# pmadm -l
PMTAG PMTYPE SVCTAG FLGS ID <PMSPECIFIC>
zsmon ttymon ttya u root /dev/term/a I - /.....
Then you need to remove the existing service. Insert the PMTAG and SVCTAG tokens with the output of the command above.
prompt# pmadm -r -p zsmon -s ttya
^ ^
(PMTAG) (SVCTAG)
If you haven't already programmed the modem, go to the section, "Tip and /etc/remote" on page If you haven't already programmed the modem, go to the section, "8.