SunSolve Internal

Infodoc ID   Synopsis   Date
12687   Modem setup guide for Solaris   21 Jun 1996

Description Top

Solaris 2.3/2.4 Modem configuration and Bi-direction Port Configuration
                (Version 1.8b, 12/20/95  Christopher Kovacs)

I.  Introduction.

The steps in this guide are designed to solve the most common modem
configuration problem, which is no login prompt on dialin or garbage
on dialin.  The solution to this problem is to initialize the modem
with the tip command before attempting a dialin session.  The commands
to initialize the modem are in the appendix at the end of 
this document.  The modem must be initialized before the port login
is enabled, or you might be denied access to the port because of the modem
forcing the login to activate and own the port.  The modem must
be reinitialized if the power fails because the modem will then usually 
reset itself to factory defaults.  The initialize string command must be sent
at the same baud rate as the login speed.  If the tip command does not
use the same baud rate as the login, the modem will not work for dialin
but will work for dialout. 

The following information provides very basic and minimal modem
installation instructions.  These instructions give details on
installing a modem on a Solaris 2.3 or 2.4 Sun system using the standard
ttya or ttyb port.  It describes a common method and should prevent any
issues or problems that might arise. Follow the procedures in sections
II, III, and IV to install a modem.


II.  Initial Sun setup. 

1.  Install the modem on the Sun system.  Use either ttya or ttyb and
    make sure that the rs-232 cable is a "straight through" cable with
    pins 1-8 and pin 20 provided. (You can also use an all 25 to 25 pin cable.)

    Do NOT use a null modem (cross over) cable or a null modem gender adapter
    cable.

    If you are using a system that shares ports a and b, such as the
    sparc 10, Classic/LX, etc, and you would like to use port b for
    the modem port, you must use a splitter cable.  This splitter
    cable is available from SunExpress. (p/n: X985A or 530-1869/C9.


2.  Add the following  entries  to the "/etc/ttydefs" file.  This file is used
    by the system for modem port speeds.


        38400m:38400 hupcl:38400 hupcl crtscts::38400m
        19200m:19200 hupcl:19200 hupcl crtscts::19200m
        9600m:9600 hupcl:9600 hupcl crtscts::9600m

 
    Remember, the 14000 and 28800 baud rates are modem-to-modem speeds and
    do not correlate to the actual modem port speed.


3.  Verify that there is no port monitor service on the port that is being
    configured by entering the command:

         pmadm -p zsmon -l

PMTAG          PMTYPE         SVCTAG         FLGS ID       <PMSPECIFIC>
zsmon          ttymon         ttya           u    root     /dev/term/a - - 
/usr/bin/login - 9600 ldterm,ttcompat login:  - vt100 y  #Terminal 
zsmon          ttymon         ttyb           u    root     /dev/term/b - - 
/usr/bin/login - 9600 ldterm,ttcompat login:  - vt100 y  #Terminal 

    If a service is present, as indicated by the above output, remove
    the service by entering:

        pmadm -p zsmon -r -s <SVCTAG value from above, i.e. ttya or ttyb>



III. Modem Setup.

Modem setup is the responsibility of the customer.  This is because the
various of  types of modems and modem manufactures.  The customer must
review the modem documentation and setup the modem according to the
guidelines required by the Sun system (see section V).  If there are
questions regarding modem setup, refer to the modem manufacture's
documentation and their support.  Appendix B contains examples of modem
initialization/register setups.  This information has been gathered and
can change because of modem firmware version levels, modems models and
added features.  Use this only as a guide.

To set the modem registers up correctly, you must be able
to access the modem and its port.


1.  Prepare to communicate with the modem using the tip utility program.
    
        tip -9600 /dev/cua/a  should work and does not require editing
        /etc/remote. A different speed can be substituted as well
        as a different device name. You must specify a speed or the default, 
        300 baud, will be used.

        a.  Modify the "/etc/remote" file and add the following
            entry to the file after the "hardwire:\" entry.
            Always use the same speed to tip to the modem as
            the login process is set to use.  

        For ttya port:

          hardwire:\ 
             :dv=/dev/term/b:br#9600:el=^C^S^Q^U^D:ie=%$:oe=^D:
          modem1:\                            <--- add this and next line
             :dv=/dev/cua/a:br#9600:                        after above entry
                               ^
                               |_ appropriate baudrate*
                                  must match the login speed 

        For ttyb port:

          hardwire:\                          
             :dv=/dev/term/b:br#9600:el=^C^S^Q^U^D:ie=%$:oe=^D: 
          modem1:\                            <--- add this and next line
             :dv=/dev/cua/b:br#9600:                        after above entry
                               ^
                               |_ appropriate baudrate*
                                  must match the login speed 


        * When using a 28.8k modem, use 38400; for a 14.4 modem,
          use 19200; and for a 9600 modem use 9600.


        b.  Change the permissions and owner of the modem port:

                chmod 666 /dev/cua/a ; chown uucp /dev/cua/a

                          -- or this for port b --

                chmod 666 /dev/cua/b ; chown uucp /dev/cua/b


        c.  After modifying the "/etc/remote" file and changing the
            permission of the port(s), start up a shell tool (if using
            openwindows) and issue the following command:

                tip modem1

            you should get a "connected" message.  If you get
            anything else, for example, "all ports busy",
            check the "/etc/remote" device entry.

        d.  Verify that the modem is responding to commands type
            typing:

                at (cr)

            you should see an OK displayed. 

                Note - Execute tip in a shell tool that does not have 
                scrolling enabled, otherwise a carriage return (cr) is not
sent.

            If not, check the connection and see if the RD or SD
            lights dimly flash when typing on the keyboard.  If
            not, check the cable connection between the serial port
            and modem.


2.  Modem register/initialization

        a.  Refer to Appendix B, Common Modem Initialization Strings, 
            and see if the modem type is referenced.  If so,
            set the dip switches, then use that string to initialize
            the modem.  For example, the US Robotic Courier Modem string is:

                AT&F1&B1&C1&D2X0S0=1&W

        b.  If you do not know the initialization string,  refer to
            the modem manuals.  The following lists the guide lines
            to set the modem registers.  If you still can not figure
            out the initialization string, refer to the modem manufacture's
            technical support.
                
        c.  After setting up the modem, exit the "tip" utility by
            typing the following sequence:

                        <CR>~.

           The above sequence is a "carriage return" followed by a
            "~" character and a "." character.





IV.  Starting the Login Process.

The following creates a port monitor service to allow login
from a modem.


1.  Using the Administration Tool program (admintool), add a bidirectional
    modem service.  If you cannot use the admintool, refer to appendix A.

        a. Click on the "Serial Port Manager" icon.

        b. Highlight the desired port with left mouse button.

        c. With the right mouse button, press the edit button once. Then,
           with the right mouse button, press the "Modify Service" field.
           This will display a new pop-up menu.

        d. Press the "Use Template" menu button with the right mouse button and
           select the "Modem - Bidirectional" menu item.

        e. Press the "Baud Rate: " menu button and select "Other".

        f. A new pop up-window will appear.  Enter either 38400m, 19200m, or
           9600m according to the desired baud rate of the modem. Then press
           the "Apply" button.

                Note -  Use the 38400m entry for 28800 baud modems,
                the 19200m entry for 14400 baud modems, and 9600m entry
                for 9600 baud modems.


        g. Enter the type of terminal that is going to be logging into
           the system, i.e. vt100.

        h.  Verify all fields that data was entered and then press the
            "Apply" button.

        i.  Quit the admintool and it's windows.


2.  Verify that a port monitor was configured by typing the following
    command:

        pmadm -p zsmon -l

PMTAG          PMTYPE         SVCTAG         FLGS ID       <PMSPECIFIC>

zsmon          ttymon         ttyb           u    root     /dev/term/b b -
/usr/bin/login - 9600m ldterm,ttcompat login:  - dialup n  #Modem - 
Bidirectional

    If a port monitor is not listed for that port, go back to setup 3 and
    try again, make sure that when completing the fields, press the "Apply"
    button.  If the port monitor still is not listed, call Sun support
    for further help.



V.  Modem Guidelines.

Sun's policy on support of modems is  strictly  to give guidelines
and not set up individual modems and modem registers.  The following
guidelines are given below:


         o  Make sure the modem uses data terminal ready (DTR).  When
            the system drops DTR, the modem should hang up.  If the DTR
            signal is not asserted, the modem should not answer.

         o  Use hardware carrier detect (CD).  The modem raises the CD
            line only when there is an active carrier signal on the phone
            connection.  When the carrier drops, either because the other
            end is terminated or the phone connection is broken, the system
            is notified and acts appropriately.

         o  Modems should only send result codes in answer mode or not
            at all.

         o  The modem serial port speed must be at a fixed baud
            rate.  If the modem does not support this feature, do not
            use it on a Sun/Unix system.

         o  Hardware flow control must be used between the Sun system
            and the modem.  Turn off the modem's software flow control
            if available.




                        A P P E N D I X  A


The following procedure is provided for users who do not have access
to the OpenWindows interface and cannot use the Admintool.


Setting up Bi-directional modem service from the command line.


1. Check to see if a zsmon process is running under SAC by typing the
   following command:

# sacadm -l
PMTAG          PMTYPE         FLGS RCNT STATUS     COMMAND
tcp            listen         -    0    ENABLED    /usr/lib/saf/listen tcp # 
zsmon          ttymon         -    0    ENABLED    /usr/lib/saf/ttymon # 
 

2.  If you do not see a zsmon entry under PMTAG, execute the following
    command:

  sacadm -a -p zsmon -t ttymon -c /usr/lib/saf/ttymon -v `ttyadm -V`

    Check again to see if the zsmon entry is present (STATUS will be
    STARTING, this is normal).

3.  Check to see if a zsmon port monitor is present by executing the
    following command:

         pmadm -p zsmon -l
PMTAG          PMTYPE         SVCTAG         FLGS ID       <PMSPECIFIC>
zsmon          ttymon         ttyb           u    root     /dev/term/b b - 
/usr/bin/login - 9600m ldterm,ttcompat login:  - - n  #Modem - Bidirectional

 4. If a port monitor for zsmon is present, remove it by executing the 
    following command:

        pmadm -r -p zsmon -s <SVCTAG>

    Note - the <SVCTAG> value is found by using the output of the previous
    command.  In the above example, this value will be "ttyb".


 5. Now configure your port monitor:

        a.  Create or edit a file called pm_script. A sample pm_script is
below.

           Note - remember to change the service name, port, and baud rate
           of the script to match or installation environment.

---- begin script -------
#!/bin/sh
#       script to add a port monitor

PATH=PATH$:/usr/sbin:
export PATH

# Below is the ttydefs entry for baudrate usage.  Use one of the
# following, 38400m, 19200m, or 9600m
ttydefs=9600m

# Below specifies the port to use. Use either "/dev/term/a" or "/dev/term/b"
mport=/dev/term/b

# Below specifies the service name. Use either "ttya" or "ttyb" depending
# on the port being used.
service=ttyb

# Note that the single quote characters in the command line below are a
# "back quote", or "back tick".  This is normally found below the "~"
# "tilda" key. This is noted for clarity since some printers do not
# print this character correctly and is printed as a "forward quote" or
# "forward tick" character.

pmadm -a -p zsmon  -s $service -i root -fu -v `ttyadm -V` -m "`ttyadm -Sn      
  -d $mport -b -m ldterm,ttcompat -l $ttydefs -s /usr/bin/login`"         -y
"Modem - Bidirectional"

------- end script -----------


6.  Change the permission of the file for execution and execute the
    script (chmod 755 pm_script).


7. Verify that the port monitor is present:

        Note - The entry should look like the output below, but the
        baudrate and service tag might be different.

# pmadm -p zsmon -l
PMTAG          PMTYPE         SVCTAG         FLGS ID       <PMSPECIFIC>
zsmon          ttymon         ttyb           u    root     /dev/term/b b -
/usr/bin/login - 9600m ldterm,ttcompat login:  - - n  #Modem - Bidirectional




                                A P P E N D I X  B

Common Modem Initialization Strings

The following contains modem initialization strings to initialize modems
for use as dialin and dialout on Sun Solaris systems.


---------------------------------------------------------------
Hayes Optima/Acura, Generic Modems:
Use This entry for modems not listed in this file.

        AT&FN0Q2X0&C1&D2S0=1&W

---------------------------------------------------------------
US Robotics Courier Modems:

        AT&F1&B1&C1&D2X0S0=1&W


           dip switch settings:
                Switch             Setting
                  1                  OFF
                  2                  OFF
                  3                  ON
                  4                  OFF
                  5                  OFF*
                  6                  OFF
                  7                  ON*
                  8                  ON
                  9                  OFF
                 10                  OFF

---------------------------------------------------------------
US Robotics Modems:

        AT&F1&B1&C1&D2X0S0=1&W

---------------------------------------------------------------
Telebit Modems:

            WorldBlazer, T3000, or T1600 modem:
                    AT &F3 E1 X0 &S0 S2=255 S45=255 S48=0 S58=2 &W
                    AT SO=1 S59=15 S68=255 S111=255 S180=2 &C1 &W

            T2500, TrailBlazer Plus, T2000 or T1000 modem:
                    AT &F X0 Q4 S45=255 S48=1 S51=254 S52=2 S54=3 &W
                    AT SO=1 S58=2 S64=1 S66=1 S95=2 S97=1 S106=1 S131=1 &W

---------------------------------------------------------------
GVC 288 V.34 Modem:

        AT&F2E0Q1S0=1&C1&D2&W&W1

---------------------------------------------------------------
Black Box Corporation, Modem 144FX:

        ATN0S37=0S0=1Q1&C1&D2&K3&W

---------------------------------------------------------------


                        A P P E N D I X   C

Troubleshooting Advice

This section gives advice about the most common problems of installing a modem
on a Sun Solaris system.  Most of all problems are the result of having
the modem incorrectly configured.  


"Garbage from Sun system with remote system logging in"

  This usually is an indication that the modem speed and the configured
  port monitor speed is not matched.  Check the modem speed and make
  certain that it matches the speed of the Sun system.  Connect back to
  the modem, using tip, and verify the modem configuration.  Remember, the
  modem must be able to lock the modem speed and match the port monitor
  speed (the speed configured using the admintool).

---------------------------------------------

"When I make a call, the remote modem answers, I can hear the modems
negotiating, then the modem hangs up CALL FAILED."

  This is probably down to a setting on one or both modems forcing it to
  use a particular connect speed or compression protocol - if one modem
  can't manage to connect up to the other modem, the modem will hang up.
  Check settings of BOTH modems.

---------------------------------------------


"What does `all ports busy' from the tip utility mean?"

  Another process has the port open; this might be another tip session
  or another program like lp. It could also be a port monitor.

  The way to find out is:

  As root if the device is /dev/cua/a 

  fuser /dev/cua/a
  /dev/cua/a:      652o     651o      <---- These are the processes using
                                          this port.

  You can now use ps -ef to get the program that is using the port.

  Note - PID's are 652 & 651 ( drop the o ) 

  If the process using port is /usr/bin/login or ttymon then: 

   1. Somebody has dialed into your machine; the modem will be active. 
   2. Modem is asserting DCD all the time.  The modem must be configured
      so that the Data Carrier Detect is asserted only when a carrier is
      detected from the remote modem.  Refer to the modem documentation.

---------------------------------------------


"What does 'permission denied or link down' message from the tip utility
mean?"

    Make sure that you have "dv=/dev/cua/a" or "dv=/dev/cua/b" in the 
    hardwire entry of the "/etc/remote" file.  Check also in
    "/var/spool/locks" for a lock file LCK.* and remove that file. 
    Check the permissions on the serial device (/dev/cua/a or
    /dev/cua/b) and ownership.

---------------------------------------------


"Modems do not disconnect properly or a user stays logged in even after
disconnecting."

  The modem is not configured correctly.  The modem must be configured
  so that the Data Carrier Detect is asserted only when a carrier is
  detected from the remote modem.  Refer to the modem documentation.

---------------------------------------------


"Nothing happens when we try to tip to the modem"

  Check the cabling to the modem.  Make sure that the proper port is being
used.
  Also, make certain that "tip" is being used from a shell tool and NOT 
from a command tool.


"When dialing into the Sun, the modem never picks up the phone."

  The modem is not configured properly.  Check to see if the modem is
  setup for auto-answer (usually S0=1).  Make sure that the DTR
  or TR light is lit on the modem, indicating that the Data Terminal
  Ready is asserted from the Sun.  If it is not, the ttymon process is
  either hung or is not running.  Try re-initialing the port for
  bi-directional modem use.

---------------------------------------------


"Parity problems"

  I get a login but its corrupted, (Logn: or Logi ) if I press <RETURN>
  nothing happens but it does if I press <LF> or "control-J".

  Reconfigure the remote computers serial port setup for 8 data bits,
  1 stop bit, and no parity.


---------------------------------------------


"I can't log in; password fails." 

  This is a parity problem.  The originating terminal or tip session is
  using a parity that is different from that used by the ttymon.

---------------------------------------------


"When do you modify the eeprom settings?"

  Don't change the eeproms unless you are trying to get a terminal
  working at boot prom level.

---------------------------------------------


"No login prompt"

  Check to see if a ttymon process is started and enter the command below:

   ps -ef | grep ttymon
      root   208   204 80   Sep 21 ?        0:01 /usr/lib/saf/ttymon
      root 17258   208  2 10:42:43 ?        0:00 /usr/lib/saf/ttymon

  The pid of 208 is the parent ttymon process and the pid of 17258 is
  the child process for term/b.

  Call into the system and see if the ttymon process TTY has changed
  from "?" to "term/b". See below:

   ps -ef | grep ttymon
    root   208   204 80   Sep 21 ?        0:01 /usr/lib/saf/ttymon
    root 17258   208  6 10:42:43 term/b   0:00 /usr/lib/saf/ttymon

  If this does not occur, check to see of the serial port has been
  configured properly and the port monitor service is present by
  entering:

   pmadm -p zsmon -l 
 PMTAG          PMTYPE         SVCTAG         FLGS ID       <PMSPECIFIC>
 zsmon          ttymon         ttyb           u    root     /dev/term/b b -
 /usr/bin/login - 9600m ldterm,ttcompat login:  - tvi925 n  #Modem -
 Bidirectional

 Also verify that the port monitor service baud rate matches
 the modem baud rate.  Use the tip utility and connect back into the
 modem.
Product Area Utilities
Product Modems
OS Solaris 2.x
Hardware n/a

Top

SunWeb Home SunWeb Search SunSolve Home Simple Search

Sun Proprietary/Confidential: Internal Use Only
Feedback to SunSolve Team