DOCUMENT ID:  1129-02

SYNOPSIS:     Procedure to setup dial-in and dial-out modem on x86

OS RELEASE:   

PRODUCT:      Solaris x86

KEYWORDS:     setup dial-in dial-out modem COM port


DESCRIPTION:

Procedure to setup dial-in and dial-out modem on x86.


SOLUTION:

Preparation of the COM port:

1. Connect the modem as instructed by the modem manufacturer.

2. Make sure that the /kernel/drv/asy.conf file shows your modem
   port being enabled.  By default, only COM1 port is enabled.

   If not, uncomment your modem's COM port, and reboot your system
   with reconfiguration option:

     #touch /reconfigure; init 6.

Here is an example of setting up 9600 baud modem on the COM2 port.
The device filenames are: /dev/cua/b, /dev/term/b, /dev/cua1, and
/dev/tty01; they are linked to the /devices/isa(or esa)/asy@.....
files.


How to setup Dial-Out Modem Service (for the 'cu' utility):
===========================================================

1. If you are configuring your modem for DIAL-OUT only, you may
   use either /dev/cua lines or /dev/term lines to call out from.
   Otherwise, for bi-directional modem access, you should use
   /dev/cua lines for dial-out - do not /dev/term devices for
   dial-out.

   edit the /etc/uucp/Devices.  Add the following line:

     ACU    term/b    -   9600  direct

2. Now your modem is ready for dial-out.

   Use "cu -l" or "cu phone-number" - You should get
   the "connected" message back from cu utility.

   ex> #cu -lterm/b
        Connected (OS message)
        at        (you type)
        OK        (modem response)
        atdt 2135551212 (you type)
        ...

How to setup Dial-In Modem Service:
==================================

1. Type: #sacadm -l -t ttymon
   You should remove other ttymon service if you do not use them.
   Initially, system sets up PMTAG of 'ttymon_mb' and 'ttymon0',
   and you can remove them.  Type:

     #sacadm -r -p ttymon_mb.
     #sacadm -r -p ttymon0.

2. Type: #sacadm -l -p zsmon
   If it returns: "Invalid request, zsmon does not exist," you
   need to set one up.  It will come real handy to write a couple
   of scripts for the modem configuration.  Create sacadm
   configuration script file:
   vi edit the /sacadm.modem and type in the lines below,
   then chmod 755 /sacadm.modem.  Then type: #/sacadm.modem


   #!/bin/sh
   VERS=`ttyadm -V`
   sacadm -a -p zsmon -t ttymon -c /usr/lib/saf/ttymon -v $VERS -y
   "comments"

   Type: "sacadm -l -p zsmon"
   It will show:

   PMTAG   PMTYPE    FLGS  RCNT  STATUS      COMMAND
   zsmon   ttymon    -     0     ENABLED     /usr/lib/saf/ttymon
   #comments

3. Create pmadm configuration script file:
   You only need to edit the value of PORT, TTYLABEL, or BIDIR
   depending on your case.  vi edit /pmadm.modem and type in the
   lines below, then chmod 755 /pmadm.modem.  Then run:
   #/pmadm.modem

#!/bin/sh
VERS=`ttyadm -V`
SVCTAG_PORT=b     #this means setting up service on the COM2 port.
TTYLABEL=conttyH    #this is based on 9600 baud rate - see
/etc/ttydefs file.
BIDIR=-b   #for bidirectional, or leave it blank for dial-in only.
pmadm -a -p zsmon -s $SVCTAG_PORT -i root -v $VERS -fu -m "`ttyadm
\
-d /dev/term/$SVCTAG_PORT -s /usr/bin/login -l $TTYLABEL $BIDIR -m
\
ldterm,ttcompat`" -y "comments"

4. Type: #pmadm -l -p zsmon
   It will show:

PMTAG       PMTYPE      SVCTAG         FLGS ID       
zsmon       ttymon      b              u    root     /dev/cua/b b
-
 /usr/bin/login - 2400 ldterm,ttcompat login:  - - -  #BIDIR COM2

Here, "b" on SVCTAG refers to the COM2 port, and "b -" after
/dev/cua/b refers to bi-directional.  If you are configuring for a
dial-in only, this value will be "- -" instead.

5. Now you are ready for dial-in.  ps -ef |grep tty should show
   the "/usr/lib/saf/ttymon" process running.  It will fork
   another ttymon process on the SVCTAG port when the Carrier
   Detect is detected on the port.
   Please note that 'ttymon' replaces the old 'getty' process.
   /etc/getty is linked to /usr/lib/saf/ttymon for compatibility.


Tips for Troubleshooting Configuration:
======================================

a. Examine your Label definition in the /etc/ttydefs file.
   'conttyH' is defined in the  /etc/ttydefs file, and this value
   sets up your modem connecting speed and other basic terminal
   characteristics.  You can choose different definitions in the
   file to fit your case.

   ex> conttyH is defined as below in /etc/ttydefs:
       conttyH:9600 opost onlcr:9600 hupcl sane::contty1H.

   refer to the man page on 'stty' for further explanation.

b. Modem settings vary depending on the model of modem you have.
   Refer to the manufacturer's manual for all the available
   settings.  Most modem will understand AT Hayes command set,
   which is sometimes imperative debuging modem setting first
   time.  Depending on the COM port hardware and your modem
   characteristic,  the necessary setting for x86 will vary.

   For dial-in, be sure to:
       > turn off echo (ate0)
       > turn on Carrier Detect on port activity (at&c1)
       > turn on Terminal Ready (either at&d0 or &d1 depending on
                                 your COM port hardware)

c. If your modem communication seems to be hung, try "Ctrl-Q" from
   calling modem end to see if your terminal is waiting for X-ON
   flow control key.

d. If your modem seems to be hanging, try to restart ttymon:
     # pmadm -r -p zsmon -s b
     # sacadm -r -p zsmon -s b
   Here, -r means remove, -s b means svctab b port.
   Then repeat the setup for dial-in above.

e. If you are running cu under OpenWindows, be aware that
   'cdmtool' does not work with 'cu' - choose 'shelltool'.


DATE APPROVED: 11/20/95