____________

Revision 1.13, 5/20/2000

You can also download the printer-friendly, ascii text version of Celeste's Tutorial on Solaris 2.x Modems and Terminals. Right-click and choose "Save Link As" for either Unix compressed format (*.Z) (31K bytes) or ZIP format (*.gz) (21K bytes)

This document is a tutorial that will teach you everything you should need to know about connecting asynchronous modems and terminals to a Sun SPARC or x86 workstation under Sun's Solaris 2.0-2.8 (Solaris 8). It does not cover the specifics of setting up PPP, nor Sun's 4.x releases. An abridged version of this information has been published in some 1995 issues of Unix Review.

..Celeste Stokely, Web Architecture and Project Management Consultant
Stokely Consulting, 22 Six Shooter Drive, Silver City NM 88061-9791
Main: (505) 534-3140, FAX: (505) 534-3141
http://www.stokely.com, celeste@stokely.com

Celeste's Tutorials on Solaris 2.x/SunOS 4.1.3+ Modems & Terminals are available at http://www.stokely.com. Download the plaintext version from ftp://ftp.stokely.com/pub/. See our Web site for lots of Unix Serial Port & Sysadm Resources!

____________

[DOCUMENT TOP]
[NEXT SECTION]Lawyer Section

Revision History

______________________

[DOCUMENT
TOP]
[PREVIOUS
SECTION]Revision History
[NEXT
SECTION]Introduction

Lawyer Section

!!! Copyright © 1995-2000 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.

______________________________________________________________________

[DOCUMENT TOP]
[PREVIOUS SECTION]Lawyer Section
[NEXT SECTION]Which Modem Should You Use?

Introduction

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!

Setting up modems and terminals under Unix is often painful. If you had modem and terminal connection down to a science in SunOS 4.x, you're probably having trouble understanding it in Solaris 2.x. Solaris 2.x uses the SYSV-ish approach instead of the SunOS 4.x BSD approach. BSD uses getty and friends to spawn login, while SYSV uses port monitors and new friends.

If this is your first attempt at hooking up a modem or terminal to a Unix machine, I'll give you a sound strategy to use and walk you through it. It's not really hard once you learn a few basics.

The Sun manuals and Answerbook have had a few incorrect back quotes in vital places. Following their instructions probably won't give you error messages, but they may not work, either. However, Answerbook will explain all the details of port monitors, if you want to understand them in detail.

Sun's admintool Serial Port Manager works for many simple modem and terminal setups. But when it doesn't work, you need to know how to run the various setup commands by hand.

!!! WARNING: I have very strong feelings about modems and serial ports, their uses, their manufacturers, and their support. My clients ask me to make their modems work and keep working, so I tend to use only modems that are robust, highly configurable, fast, and well-supported. They're not cheap, but neither is a System Administrator's time. I use cheap modems for doorstops and bookends.

______________________________________________________________________

[DOCUMENT TOP]
[PREVIOUS SECTION]Introduction
[NEXT SECTION]Celeste's Strategy for Configuring Modems and Terminals

Which Modem Should You Use?

There are hundreds of Hayes-compatible, asynchronous modems on the market today. Most of them can be made to work on a Sun for dial-out. Many can work for dial-in. Several will work gracefully for bidirectional (dial-in and dial-out) use. Fewer still will bring a smile to a sysadm's heart.

If you're trying to connect a non Hayes-compatible modem to your Sun, this article won't work for you.

This article covers the basic setup for many common serial port usages, such as:

This article specifically does not cover:

In general, you get what you pay for. A $49 modem will cost you a fortune in the time it takes to get it running. A $499 modem can often be configured and running in under 20 minutes and give you little grief in day-to-day use.

Types of Modem Usage

Match your modem to your intended use for it. Don't buy a cheap 2400bps modem to transfer all your company's mail and netnews. If your Internet service provider offers your UUCP connection only over Telebit WorldBlazers, you should strongly consider buying a Telebit WorldBlazer and dedicate it to that use. If they're not a Telebit site and plan on staying that way, there are faster, more widely-compatible modems available for a LOT less money.

My current favorite is the USRobotics Courier V.Everything. Next month, who knows what will be the darling? I have so many "former favorite" modems in my office that it's starting to look like a modem museum.

If you have to support a lot of dial-in users with a wide collection of random modems, then you need something which can happily work with all the possible user modems. That means you need one that will run at least 28800bps. The 56K modem manufacturers have finally agreed on a single standard, so these modems will become great for your users, in time. Plan on spending $250-$600 for a solid, production-quality modem.

Modem Programming

In deciding which modem to buy, a key consideration is how you can program the modem. Some modems use DIP switches, some are programmed by connecting to the modem and setting software registers, some use both methods. You get more programming flexibility with software registers, and this is important when you'll be connecting to a lot of different modem types.

If a modem has only DIP switches available, it probably will be hard to make it do everything you need for lots of different connections. It's probably also an old, slow modem. I call these "cheap PC modems" and avoid them like Internet spam get-rich-quick schemes.

Modem Speed

One of the most important features to look for is the modem's ability to run at split speeds. You really want to run the Sun-to-modem connection at a fixed speed (the DTE rate or serial rate) all the time, and let the modem negotiate the modem-to-modem speed (DCE rate or line speed) independently.

Beware, because many inexpensive modems can't do this. If your modem doesn't do this, you and your users will have to hit <break> until the speeds sync up. This drives users (and you) crazy!

You should try to run the Sun-to-modem (DTE) connection at 9600bps, 19200bps, or 38400bps. A Sun can NOT run the CPU serial port at 14400bps. But, that's ok because all the 14400 modems I've ever seen can run at 19200bps DTE speed. You can also run at slower speeds, but why bother? Buy a faster modem than you think you need and you'll get more use out of it in the long run.

There are a few kernel hacks available to run the Sun CPU serial ports at higher speed. Use them at your own risk. I do NOT recommend them--they're too unstable for most purposes. The Sun CPU serial ports and their drivers are bad enough without hacking on them yourself.

Note: Sun Ultra 2 and newer machines are reported to be able to run the cpu serial ports faster than 38400bps with Solaris 2.6 and greater. Your line speed may vary.

If you crave more speed than 38400bps, you need to look into SBUS serial- port expander cards with DMA, or even network-connected terminal servers, and modems which are even MORE expensive. If you need a lot of high-speed serial connections, network terminal servers are probably the way you should go.

Flow Control and Parity

When you run at higher speeds (9600bps and above), you MUST worry about flow control. Ideally, you want hardware flow control where the Sun and modem play the right games with the RTS/CTS lines to say "shut up" and "give me more"

Historically, the Sun CPU ports have not been able to use incoming hardware flow control, only outgoing. Sun has released some patches to enable incoming flow control. For Solaris 2.4, use Patch # 102845, available to Sun Support contract customers from http://sunsolve.sun.com. Sometimes, the patch just doesn't work. Sometimes it does. It's worth a try for 2.4. If it doesn't work and you must have hardware flow control, look into the higher-end SBUS-based serial port expander cards. I don't know if this problem is fixed in later versions of Solaris.

If the patch doesn't work for you, you can consider using software (XON/XOFF) flow control. But, NEVER use software flow control with UUCP/PPP or the protocol will go nuts from the unexpected XON and XOFF characters. If you can't use hardware flow control with UUCP/PPP, it's better to use no flow control at all and let UUCP/PPP do its own packet throttling.

If hardware flow control is a must-have (and it's becoming that way for most of us), then buy a DMA-type SBUS serial port card with hardware flow control from a reputable vendor. I do not recommend Sun's SPC card for this use. I have some suggestions for vendors in Vendor List later in this document, and on our Unix Serial Port Resources WWW page.

I run my own communications server without port-level flow control on my 13 UUCP connections at 38400bps and all the mail and NetNews gets delivered just fine.

Try to always run your ports and modems at 8 bits, no parity. Parity on serial port transmissions is an outdated concept when you're using modern, error-correcting modem protocols. By default, the Sun CPU ports run at 7 bits, even parity (7E1). I'll explain how to run them at 8 bits, no parity (8N1). If you've got a legitimate use for odd, mark, or space parity, I want to hear from you!

______________________________________________________________________

[DOCUMENT TOP]
[PREVIOUS SECTION]Which Modem Should You Use?
[NEXT SECTION]Tip and /etc/remote

Celeste's Strategy for Configuring Modems and Terminals

This strategy gives you flexibility and maintainability in your serial port configurations. It will work for nearly all configurations.

!!! Important Rule: Add and configure only 1 modem or terminal at a time. Get it working, then move on to the next one. Any other approach will result in madness. I been there, done that. Trust me.

There are actually very few steps.

Purists may argue that this modem-port configuration has extra, unneeded steps or leaves the port monitor in bidirectional mode for incoming-only connections. I find that if a sysadm sets up a port for only dial-in or dial- out, someday he or she will want the port to be bidirectional. Setting things up for this in the beginning means you'll have easier success in the future. And, it doesn't hurt anything.

Ok, So What Do I Do?

To use a port for dial-out only:

To use a port for dial-in only:

To use a port for bidirectional operations:

This will configure a port for both dial-in and dial-out use:

To configure a dumb terminal on a port:

This will configure a port for a dumb terminal instead of a modem:

If you want to use UUCP, you must configure it as well. This article will tell you about setting up parity and flow control in UUCP, but doesn't cover all the other UUCP file changes. For that, get the O'Reilly and Associates book Using and Managing UUCP, if you can find it. It's out of print. For PPP FAQs and how-tos, see our site's PPP section.

Simple, huh? Find the parts of this article that do the pieces you want, modify the scripts as needed, and go for it!

______________________________________________________________________

[DOCUMENT TOP]
[PREVIOUS SECTION]Celeste's Strategy for Configuring Modems and Terminals
[NEXT SECTION]Basic Modem Programming

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 pinout of the splitter cable can be found at our site's Sun Serial Port and Serial Cable Pinouts section.

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
  1. Edit tip's configuration file, /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:
    

    Go to step 2

  2. Run tip:
    !!! 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.)

/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

______________________________________________________________________

[DOCUMENT TOP]
[PREVIOUS SECTION]Tip and /etc/remote
[NEXT SECTION]Enabling Solaris For a Bidirectional Modem

Basic Modem Programming

Dust off your modem manual and have it handy. Use tip to connect to the modem and program the modem registers. Be sure to write out the modem's registers to NonVolatile RAM when you're done. Program the modem with:

Useful Modem Register Settings

The USR Courier V.34 and Telebit Worldblazer modem setting are our own work. The USR V.Everything settings are courtesy of Doug Hughes at Auburn University. These settings have worked well in bidirectional, interactive dial-in, UUCP and PPP applications. Other modem settings can be found at our site's Modem Register Settings.

It will probably take a few tries to get all the right settings into your modem. No, you don't need to set ALL the S registers this way. These have been tweaked for the client's application. Your mileage will definately vary, but the entries below on these modems, from the "B0 (or B1) C1" through the "S00=001" are very good ones to use, IMHO.

  1. USRobotics Courier V.32bis V.34 Fax Settings
       B0  C1  E1  F1  M1  Q2  V0  X0
       BAUD=38400  PARITY=N  WORDLEN=8
       DIAL=TONE   ON HOOK   TIMER
       &A0  &B1  &C1  &D2  &G0  &H1  &I0  &K1  &L0  &M4  &N0
       &P0  &R1  &S0  &T5  &X0  &Y1  %N6  
    
       S00=001  S01=000  S02=255  S03=013  S04=010  S05=008  S06=002  S07=060  
       S08=002  S09=006  S10=007  S11=070  S12=255  S13=000  S14=000  S15=000  
       S16=000  S17=000  S18=000  S19=000  S20=000  S21=010  S22=017  S23=019  
       S24=150  S25=005  S26=001  S27=000  S28=008  S29=020  S30=000  S31=000  
       S32=009  S33=000  S34=000  S35=000  S36=000  S37=000  S38=000  S39=000  
       S40=000  S41=000  S42=126  S43=200  S44=015  S45=000  S46=000  S47=000  
       S48=000  S49=000  S50=000  S51=000  S52=000  S53=000  S54=064  S55=000  
       S56=000  S57=000  
    
       Dip Switches: (UP=dip switch up, DN=dip switch down)
    
         1  UP  DTR normal
         2  DN  Numeric messages (a starting point for tip usage)
         3  DN  Display Result Codes
         4  UP  Modem does not echo commands
         5  UP  Modem answers on 1st ring, or DN for no auto-answer
         6  UP  CD indicates the modem is online and carrier signal is present
         7  DN  suppress result codes in answer mode
         8  DN  Normal AT command set recognition
         9  DN  on Escape code (+++) modem stays online
         10 UP  Power on loads registers from NFRAM
    
  2. USRobotics Courier V.Everything Settings
        B0  C1  E1  F1  M1  Q0  V1  X7
        BAUD=115200 PARITY=N  WORDLEN=8
        DIAL=HUNT   ON HOOK   TIMER
     
        &A3  &B1  &C1  &D2  &G0  &H1  &I0  &K3  &L0  &M4  &N0
        &P0  &R2  &S0  &T5  &X0  &Y1  %N6  #CID=0
          
     
        S00=003  S01=000  S02=043  S03=013  S04=010  S05=008  S06=002  S07=060
        S08=002  S09=006  S10=007  S11=070  S12=050  S13=000  S14=001  S15=000
        S16=000  S17=000  S18=000  S19=000  S20=000  S21=010  S22=017  S23=019
        S24=150  S25=005  S26=001  S27=000  S28=008  S29=020  S30=000  S31=000
        S32=005  S33=000  S34=000  S35=000  S36=000  S37=000  S38=000  S39=000
        S40=000  S41=000  S42=126  S43=200  S44=015  S45=000  S46=000  S47=000
        S48=000  S49=000  S50=000  S51=001  S52=000  S53=000  S54=064  S55=000
        S56=000  S57=000  S58=000  S59=000  S60=000  S61=000  S62=000  S63=000
        S64=000  S65=000  S66=000  S67=000  S68=000  S69=000  S70=000
    
  3. Telebit WorldBlazer Settings
       B1  E1  L1  M0  Q2  T   V0  X0  Y0 
       &C1 &D3 &G0 &J0 &L0 &Q0 &R3 &S4 &T4 &X0 
       S000=1   S001=0   S002=43  S003=13  S004=10  S005=8   S006=2   S007:90 
       S008=2   S009=6   S010=14  S011=70  S012:255 S018=0   S025=5   S026=1  
       S038=0   S041:1   S045=0   S046=0   S047=4   S048=0   S050=0   S051:253
       S056=17  S057=19  S058:2   S059:15  S060=0   S061:0   S062=15  S063=0  
       S064:1   S068=255 S069=0   S090=0   S092:1   S093=8   S094=1   S100=0  
       S104=0   S105=1   S111:30  S112=1   S151=4   S155=0   S180=2   S181=1  
       S183=25  S190=1   S191:6   S253=10  S254=1   S255=255 
    

______________________________________________________________________

[DOCUMENT TOP]
[PREVIOUS SECTION]Basic Modem Programming
[NEXT SECTION]Enabling Solaris For A Dial-out-only Modem

Enabling Solaris For a Bidirectional Modem

!!! IMPORTANT NOTES:

  1. Login as root and type:
          prompt# eeprom ttya-ignore-cd=true  [this means use HW carrier detect]
          prompt# eeprom ttya-rts-dtr-off=true
    

    go to step 2

  2. Reboot the system by typing:
            prompt# init 6
    

    (Is it critical to reboot now? No. But, you'll need to reboot at some time.)

    Go to step 3

  3. Make sure the modem is properly connected to your port and already programmed. Make sure the cable is ok. Your cable needs at least lines 1,2,3,4,5,6,7,8, and 20, all straight through, with none crossed. A 25-pin cable, wired "straight through" is fine. A Null Modem cable will NOT work.

    Go to step 4

  4. Is the Solaris 2.x port monitor, ttymon, configured and running? Login as root and type:
            prompt# sacadm -l -t ttymon
    
  5. Configure an instance of ttymon called zsmon:
      prompt# sacadm -a -p zsmon -t ttymon -c /usr/lib/saf/ttymon -v `ttyadm -V` 
    

    (Note: The string "zsmon" is known as a PMTAG.)

    Go to step 6

  6. Is there a service running on the zsmon port monitor?

    Type:

          prompt# pmadm -l
    
  7. Make a script which will remove any existing port monitor and create a new bidirectional port service.

    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

Download add_modem as text file

#!/sbin/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.

______________________________________________________________________

[DOCUMENT TOP]
[PREVIOUS SECTION]Enabling Solaris For a Bidirectional Modem
[NEXT SECTION]Setting Up A Terminal on Solaris 2.x

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. They are not used, once a port monitor is running. Just use them and it won't hurt anything.

  1. Login as root and type:
            prompt# eeprom ttya-ignore-cd=true [this means use HW carrier detect]
            prompt# eeprom ttya-rts-dtr-off=true
    

    go to step 2

  2. Reboot the system by typing:
            prompt# init 6
    

    (Is it critical to reboot now? No. But, you'll need to reboot at some time.)

    Go to step 3

  3. Make sure the modem is properly connected and already programmed. Make sure the cable is ok. Your cable needs at least lines 1,2,3,4,5,6,7,8, and 20, all straight through, with none crossed. A 25-pin cable, wired "straight through" is fine. A Null Modem cable will NOT work.

    Go to step 4

  4. Is there a service running on the zsmon port monitor? Type:
          prompt# pmadm -l
    

______________________________________________________________________

[DOCUMENT TOP]
[PREVIOUS SECTION]Enabling Solaris For A Dial-out-only Modem
[NEXT SECTION]Setting Serial Port Modes

Setting Up A Terminal on Solaris 2.x

!!! IMPORTANT NOTES:

  1. Is the Solaris 2.x port monitor, ttymon, configured and running? Login as root and type:
            prompt# sacadm -l -t ttymon
    
  2. Configure an instance of ttymon called zsmon:
      prompt# sacadm -a -p zsmon -t ttymon -c /usr/lib/saf/ttymon -v `ttyadm -V`
    

    (Note: The string "zsmon" is known as a PMTAG.)

  3. Is there a service running on the zsmon port monitor? Type:
          prompt# pmadm -l
    
  4. Setup the terminal
  5. Enable Solaris for the terminal

add_terminal shell script

Download add_terminal as text file

#!/sbin/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
# LOGINMSG                 The login message which will be displayed.
# -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 vt100                 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
# -S y                     Turn on software carrier
##########################################################################
LOGINMSG="Always be nice to your sysadm. You may now login. "
PORT="a"
#----------------------------------------
# choose your speed setting. See /etc/ttydefs for more settings,
# or build your own from the examples in the rest of this article.
#      conttyH =   9600bps, 7 bits even parity, as supplied by Sun
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.
# (Yes, I know you're not using the outgoing side of the port, but if you
# do this now, it will be ready when you someday put a modem on the port.)
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
# You can ignore any error messages from this next command.
# 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.
#     QUOTE-ALERT: The single quotes delimiting the port-disabled message
#                  [terminal disabled] are FORWARD QUOTES
/usr/sbin/pmadm -a -p zsmon -s tty$PORT -i root -fu \
-v `/usr/sbin/ttyadm -V` -m "`/usr/sbin/ttyadm -l $TTYSPEED \
-p "$LOGINMSG" -d /dev/term/$PORT -T vt100 -i 'terminal disabled' \
 -s /usr/bin/login -S y`"
############ end of add_terminal script ###################################

Make the script executable by typing: prompt# chmod 700 /sbin/add_terminal

then run it with: prompt# /sbin/add_terminal

______________________________________________________________________

[DOCUMENT TOP]
[PREVIOUS SECTION]Setting Up A Terminal on Solaris 2.x
[NEXT SECTION]Configuring Serial Ports for UUCP

Setting Serial Port Modes

Sun doesn't supply all the serial ports modes you're likely to want as stock entries in /etc/ttydefs. (Sun seems to think that the whole world wants to run as 7 bits, even parity.) I'll show you how to set up the entries in /etc/ttydefs to match your own needs.

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 can 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.(This works intermittently for me, so use this at your own risk.)
nextlabel
If the user indicates that the current terminal setting is not appropriate by sending a <break>, ttymon searches 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.

If you have been clever enough to buy a modem which can handle split baud rates, then you and your users will never have to hit <break> again in order to match up the baud rate between modems.

!!! 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.

/etc/ttydefs examples

These examples should make you comfortable with the basics. I've been advocating the use of 8 bits, no parity and the "38400bps, 8bits, no parity example" (below) shows you how to set that up. (Each entry should be on 1 line. Some are split here just so this document will print correctly.)

  1. 19200bps, 7bits, even parity example

    contty5H, as supplied by Sun, is 19200bps, 7 bits even parity

            contty5H:19200 opost onlcr:19200 hupcl sane::contty6H
    

    This is equivalent to:

            contty5H:19200 evenp opost onlcr:19200 sane evenp hupcl::contty6H
    

    or

            contty5H:19200 parenb -parodd opost onlcr:19200 sane parenb -parodd hupcl::contty6H
    
  2. 19200bps, 7bits, no parity example

    To change contty5H to "7 bits, no parity" (-parenb):

            contty5H:19200 -parenb opost onlcr:19200 sane -parenb hupcl::contty6H
    
  3. 19200 7bits, odd parity example

    To change contty5H to "7bits, odd parity" (parenb parodd, or oddp):

            contty5H:19200 parenb parodd opost onlcr:19200 sane parenb parodd hupcl::contty6H
    

    or

            contty5H:19200 oddp opost onlcr:19200 sane oddp hupcl::conttyH
    
  4. 38400bps, 8bits, no parity example

    To make a "38400bps, 8 bits no parity, hardware flow control" entry with no chance of selecting another DTE rate--my own personal favorite:

    contty6H:38400 -parity opost onlcr:38400 sane -parity crtscts hupcl::contty6H
    
  5. Unmodified /etc/ttydefs from Solaris 8

    Note the higher speeds Solaris 8 can use, if you have an Ultra 10 or better. (Perhaps the Ultra 5 can do these speeds, I'm not sure.)

    # VERSION=1
    460800:460800 hupcl:460800 hupcl::307200
    307200:307200 hupcl:307200 hupcl::230400
    230400:230400 hupcl:230400 hupcl::153600
    153600:153600 hupcl:153600 hupcl::115200
    115200:115200 hupcl:115200 hupcl::76800
    76800:76800 hupcl:76800 hupcl::57600
    57600:57600 hupcl:57600 hupcl::38400
    38400:38400 hupcl:38400 hupcl::19200
    19200:19200 hupcl:19200 hupcl::9600
    9600:9600 hupcl:9600 hupcl::4800
    4800:4800 hupcl:4800 hupcl::2400
    2400:2400 hupcl:2400 hupcl::1200
    1200:1200 hupcl:1200 hupcl::300
    300:300 hupcl:300 hupcl::460800
    
    460800E:460800 hupcl evenp:460800 evenp::307200
    307200E:307200 hupcl evenp:307200 evenp::230400
    230400E:230400 hupcl evenp:230400 evenp::153600
    153600E:153600 hupcl evenp:153600 evenp::115200
    115200E:115200 hupcl evenp:115200 evenp::76800
    76800E:76800 hupcl evenp:76800 evenp::57600
    57600E:57600 hupcl evenp:57600 evenp::38400
    38400E:38400 hupcl evenp:38400 evenp::19200
    19200E:19200 hupcl evenp:19200 evenp::9600
    9600E:9600 hupcl evenp:9600 evenp::4800
    4800E:4800 hupcl evenp:4800 evenp::2400
    2400E:2400 hupcl evenp:2400 evenp::1200
    1200E:1200 hupcl evenp:1200 evenp::300
    300E:300 hupcl evenp:300 evenp::19200
    
    auto:hupcl:sane hupcl:A:9600
    
    console:9600 hupcl opost onlcr:9600::console
    console1:1200 hupcl opost onlcr:1200::console2
    console2:300 hupcl opost onlcr:300::console3
    console3:2400 hupcl opost onlcr:2400::console4
    console4:4800 hupcl opost onlcr:4800::console5
    console5:19200 hupcl opost onlcr:19200::console
    
    contty:9600 hupcl opost onlcr:9600 sane::contty1
    contty1:1200 hupcl opost onlcr:1200 sane::contty2
    contty2:300 hupcl opost onlcr:300 sane::contty3
    contty3:2400 hupcl opost onlcr:2400 sane::contty4
    contty4:4800 hupcl opost onlcr:4800 sane::contty5
    contty5:19200 hupcl opost onlcr:19200 sane::contty
    
    4800H:4800:4800 sane hupcl::9600H
    9600H:9600:9600 sane hupcl::19200H
    19200H:19200:19200 sane hupcl::38400H
    38400H:38400:38400 sane hupcl::2400H
    2400H:2400:2400 sane hupcl::1200H
    1200H:1200:1200 sane hupcl::300H
    300H:300:300 sane hupcl::4800H
    
    conttyH:9600 opost onlcr:9600 hupcl sane::contty1H
    contty1H:1200 opost onlcr:1200 hupcl sane::contty2H
    contty2H:300 opost onlcr:300 hupcl sane::contty3H
    contty3H:2400 opost onlcr:2400 hupcl sane::contty4H
    contty4H:4800 opost onlcr:4800 hupcl sane::contty5H
    contty5H:19200 opost onlcr:19200 hupcl sane::conttyH
    

______________________________________________________________________

[DOCUMENT TOP]
[PREVIOUS SECTION]Setting Serial Port Modes
[NEXT SECTION]File format: /etc/saf/{pmtag}/_pmtab and /etc/saf/_sactab

Configuring Serial Ports for UUCP

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
8 bits, no parity
P_EVEN
7 bits, even parity
P_ODD
7 bits, odd parity
P_ONE
7 bits, "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.

UUCP Parity-per-system example: Setting up a port within UUCP to run with 8 bits, 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 (8 bits, no parity or 8N1).

UUCP Parity-for-all-systems example: 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......

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 for some releases of Solaris 2.x to enable hardware flow control on some systems' CPU serial ports. It may work on your system, but it may not.

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) may also help your throughput. (This is a good use for a Telebit WorldBlazer.) 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.

  1. UUCP HW flow for all systems: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:

            tbfast  =W-,  "" \dA\pTE1.... \EATDT\T\r\c CONNECT STTY=crtscts
    
  2. UUCP HW flow for some systems: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
    

______________________________________________________________________

[DOCUMENT TOP]
[PREVIOUS SECTION]Configuring Serial Ports for UUCP
[NEXT SECTION]Customizing the login message (Solaris 2.0-2.3)

File format: /etc/saf/{pmtag}/_pmtab and /etc/saf/_sactab

Sometimes, it's easier to just edit the _pmtab file directly and restart the port monitor, rather than fussing with pmadm. (This is not for the faint of heart or those not feeling confident about their ability to recover from trashing their Solaris system.)

If you're comfortable with hacking the file yourself, you'll need to know the format of the _pmtab file. Many thanks to Andrew Miller (amiller@snm.com) for providing this dissection! I haven't exhaustively tested this, but I trust Mr. Miller's work. Refer to the pmadm(1M) man page for more discussion of these fields.

/etc/saf/*/_pmtab:
  {svc_tag}:{flags}:{id}:reserved:reserved:reserved:
  {device_path}:{tty_flags}:{return_count}:{service_path}:{timeout_seconds}:
  {tty_def}:{streamio_modules}:{login_prompt}:{disabled_msg}:{term_type}:
  {softcar_yn}:# {comment}
/etc/saf/_smtab:
  {pm_tag}:{pm_type}:{flags}:{restart_count}:{monitor_path args} # comment

This is one of my own /etc/saf/zsmon/_pmtab lines. (This is really 1 line, but you'll get the idea.):

  ttya:u:root:reserved:reserved:reserved:/dev/term/a:b::/usr/bin/login
  ::contty5H:ldterm,ttcompat:Please login and be nice. :::n:#dial in/out
  on serial port a

And here's my own /etc/saf/_sactab

  tcp:listen::999:/usr/lib/saf/listen tcp #
  zsmon:ttymon::0:/usr/lib/saf/ttymon     #

______________________________________________________________________

[DOCUMENT TOP]
[PREVIOUS SECTION]File format: /etc/saf/{pmtag}/_pmtab and /etc/saf/_sactab
[NEXT SECTION]Customizing the login message (Solaris 2.4 and higher)

Customizing the login message (Solaris 2.0-2.3)

Solaris versions 2.0-2.3 and Solaris 2.4-higher differ in how they set up the pre- login message. These instructions are for Solaris 2.0-2.3. For Solaris 2.4-higher, see the section "Customizing the login message (Solaris 2.4-higher)".

You can change the message displayed when login executes by using the "-p" flag of ttyadm. This can be used to display a fixed string ("Login please"), to display the contents of a file ("`cat /etc/myloginmsg`"), or to run a text-producing program ("`uname -n` login ").

In fact, Sun's default /etc/inittab produces the console login prompt with a combination of a fixed string and a program's output:

   co:234:respawn:/usr/lib/saf/ttymon -g -h -p "`uname -n` console login: " 
   -T sun -d /dev/console -l console -m ldterm,ttcompat
!!! WARNING: I haven't tested this completely. There is probably a maximum amount of text that can be displayed. Use caution. And, let me know if you find other good tricks to use with the login message.
  1. Setting the login prompt to a fixed string:(as seen in add_modem and add_terminal):
      #!/sbin/sh
      LOGINMSG="Welcome to ACME Widget Corp. Please login. "
      /usr/sbin/pmadm -r -p zsmon -s ttya
      /usr/sbin/pmadm -a -p zsmon -s ttya -i root -v \
      `/usr/sbin/ttyadm -V` -fu -m "`/usr/sbin/ttyadm \
      -p "$LOGINMSG" -d /dev/term/a \
      -s /usr/bin/login -l conttyH -b -S n -m ldterm,ttcompat`" -y "comment"
    
  2. Setting the login prompt to the contents of a file:(/etc/myloginmsg)
      #!/sbin/sh
      LOGINMSG="`cat /etc/myloginmsg`"
      /usr/sbin/pmadm -r -p zsmon -s ttya
      /usr/sbin/pmadm -a -p zsmon -s ttya -i root -v \
      `/usr/sbin/ttyadm -V` -fu -m "`/usr/sbin/ttyadm \
      -p "$LOGINMSG" -d /dev/term/a \
      -s /usr/bin/login -l conttyH -b -S n -m ldterm,ttcompat`" -y "comment"
    
  3. Setting the login prompt to the output of a program and a fixed string:
      #!/sbin/sh
      LOGINMSG="Please login to the `uname -n` machine: "
      /usr/sbin/pmadm -r -p zsmon -s ttya
      /usr/sbin/pmadm -a -p zsmon -s ttya -i root -v \
      `/usr/sbin/ttyadm -V` -fu -m "`/usr/sbin/ttyadm \
      -p "$LOGINMSG" -d /dev/term/a \
      -s /usr/bin/login -l conttyH -b -S n -m ldterm,ttcompat`" -y "comment"
    

______________________________________________________________________

[DOCUMENT TOP]
[PREVIOUS SECTION]Customizing the login message (Solaris 2.0-2.3)
[NEXT SECTION]Solaris x86 Issues

Customizing the login message (Solaris 2.4-higher)

Solaris versions 2.0-2.3 and Solaris 2.4-higher differ in how they set up the pre- login message. These instructions are for Solaris 2.4-higher. For Solaris 2.0-2.3, see the section "Customizing the login message (Solaris 2.0-2.3)".

The contents of the file /etc/issue are displayed before the login prompt of all incoming serial port dial-in and telnet connection by the program "login". /etc/issue is a plain, ascii file and can be edited with any text editor.

Example: If /etc/issue contains:

    This is the contents
    of the /etc/issue
    file on sunhost.

Then a user initiating a telnet session to sunhost (telnet sunhost) would see:

    Trying 192.9.200.2 ...
    Connected to sunhost.
    Escape character is '^]'.
    
    UNIX(r) System V Release 4.0 (sunhost)
    
    This is the contents
    of the /etc/issue
    file on sunhost.
     
    login: 

______________________________________________________________________

[DOCUMENT TOP]
[PREVIOUS SECTION]Customizing the login message (Solaris 2.4)
[NEXT SECTION]Vendor List

Solaris x86 Issues

Solaris x86 2.0-2.5 and COM2

By default, versions of Solaris x86 prior to 2.6 enable only COM1. If you are adding an internal modem to an existing system with two COM ports, be sure to set the modem to a valid COM setting and non-conflicting interrupt, or disable COM2 in the system and configure the modem to standard COM2 settings (io=2f8 irq=3). See Sun's X86 Device Configuration Guide for further details.

  1. Boot Solaris 2.x x86 and log in as root.
  2. Edit the asy.conf file.
    (for Solaris 2.4 x86) # vi /kernel/drv/asy.conf
    (for Solaris 2.5 x86) # vi /platform/i86pc/kernel/drv/asy.conf
  3. Uncomment second entry for COM2.
    (The following is for Solaris 2.4 x86)

    Download asy.conf as text file

    #
    # Copyright (c) 1992 Sun Microsystems, Inc.  All Rights Reserved.
    #
     
    #ident "asy.conf    1.6     94/05/17 SMI"
     
    name="asy" class="sysbus" interrupts=12,4 reg=0x3f8,0,0 ioaddr=0x3f8;
    #
    # Note: To enable COM2 uncomment the following entry, and it may require
    #       reconfiguration of SMC device if you are using SMC Enet with
    #       default configuration (which also uses IRQ 3).  (See smc.conf file.)
    #
    #name="asy" class="sysbus" interrupts=12,3 reg=0x2f8,0,0 ioaddr=0x2f8;
    ^ Remove this comment sign (#)
    
  4. Save and exit the file.
  5. Enable reconfiguration reboot.
    # touch /reconfigure
  6. Reboot the system.
    # sync ; reboot

Solaris x86 2.6 and COM2

A serial or modem device is not automatically recognized by Solaris. Normally, Solaris 2.6 will find the COM1 and COM2 ports for a system and enable them by default. If you have a COM3 or COM4, some or all of the ports may not be recognized by Solaris. This can even happen with some serial devices at the standard COM1 and COM2 settings with all other serial devices in the system disabled.

The ultimate cause of this may be fixed in a future Driver Update, so only try this if the latest Driver Update from http://access1.sun.com or the SunSoft Compuserve forum has been applied and you are still experiencing the problem.

Do not share IRQs from an ISA device, like a serial port, with any other device. If you are adding a COM3 or COM4 device, as is typical for a plug-in modem card, use an IRQ (5 is often available) that is not being used by another card in your system.

If it is not possible to set it to a non-standard COM port IRQ, you may have to disable one of the built-in COM ports for your system. Sun recommends disabling COM2, since COM1 is searched for mice by sending out codes and waiting for a response. These characters can cause some modems to behave strangely.

For Solaris x86 2.5.1 and earlier, these problems were handled by editing the asy.conf file. While Solaris 2.6 does not come with such a file, it does honor it just as the previous versions did. Note that this one has COM2 disabled by default. You should only enable devices that actually exist on your system.

If you use this technique, save your existing asy.conf as asy.conf.orig in the /platform/i86pc/kernel/drv directory.

  1. Boot Solaris 2.6 x86 and log in as root.
  2. Locate the /platform/i86pc/kernel/drv/asy.conf/asy.conf file and save it.
    # cp /platform/i86pc/kernel/drv/asy.conf /platform/i86pc/kernel/drv/asy.conf.orig
    
  3. Replace /platform/i86pc/kernel/drv/asy.conf with the following asy.conf file.

    Download asy.conf as text file

    #
    # Copyright (c) 1992 Sun Microsystems, Inc.  All Rights Reserved.
    #
    #ident "asy.conf    1.7     96/12/18 SMI"
    
    name="asy" class="sysbus" interrupts=12,4 reg=0x3f8,0,0 ioaddr=0x3f8;
    ignore-hardware-nodes=1;
    #
    # Note: To enable COM2 uncomment the following entry, and it may require
    #       reconfiguration of SMC device if you are using SMC Enet with
    #       default configuration (which also uses IRQ 3). (See smc.conf file.)
    #
    #name="asy" class="sysbus" interrupts=12,3 reg=0x2f8,0,0 ioaddr=0x2f8;
     
    # COM3:                                                                
    #   In order to enable COM3, the following entry must be uncommented and
    #   possibly edited.
    #   You must ensure that the "interrupts" "reg" and "ioaddr" values
    #   correspond to your hardware.  See the section on configuring additional
    #   serial ports in your x86 device configuration manual or answerbook for
    #   further details.
    #
    #
    # This entry uses its own unique interrupt (IRQ5)
    #name="asy" class="sysbus" interrupts=12,5 reg=0x3e8,0,0 ioaddr=0x3e8;
    
    # COM4:
    #   In order to enable COM3, the following entry must be uncommented and
    #   possibly edited.
    #
    #   You must ensure that the "interrupts" "reg" and "ioaddr" values
    #   correspond to your hardware.  See the section on configuring additional
    #   serial ports in your x86 device configuration manual or answerbook for
    #   further details.
    #
    # This entry uses its own unique interrupt (IRQ9)
    #name="asy" class="sysbus" interrupts=12,9 reg=0x2e8,0,0 ioaddr=0x2e8;
    
  4. Edit asy.conf and uncomment second entry for COM2.
    #name="asy" class="sysbus" interrupts=12,3 reg=0x2f8,0,0 ioaddr=0x2f8;
    ^Remove this comment sign (#)
    
    
  5. Save and exit the file.
  6. Enable reconfiguration upon reboot.
      # touch /reconfigure
    
  7. Reboot the system.
      # sync ; reboot
    

Further information is available from Sun's access1.sun.com site, in How to add a serial port at a non-standard IRQ and Adding new Plug-N-Play devices to Solaris 2.6


Solaris 7 x86 (2.7) and COM2

(This section, added in February 1999, would not have been possible without the help of many of our readers. Contributors include Cagri Yucel (cyucel@is.ku.edu.tr), Jim (puppy@biosys.net). Thanks, folks!)

Choose either the automatic or more manual methods below, depending on how much you like fussing with files versus point-and-click.

Automatic, Device Configuration Asistant Method:

  1. Boot your machine, and press the ESC (escape) key to enter the Device Configuration Assistant during the boot.
  2. Choose Add Device or View/Edit Devices and add a Serial Port with the IO=2F8 and IRQ=3.
  3. Continue with the reboot and Solaris automatically performs a reconfigure boot. The new port should magically appear.

More manual method, using Device Configuration Asistant:

  1. Make sure the com port the internal modem corresponds to is DISABLED in the BIOS.
  2. Boot the system, login as root, and add these lines to /platform/i86pc/kernel/drv/asy.conf
    name="asy" class="sysbus" interrupts=12,4 reg=0x3f8,0,0 ioaddr=0x3f8;
    ignore-hardware-nodes=1;
    name="asy" class="sysbus" interrupts=12,3 reg=0x2f8,0,0 ioaddr=0x2f8;
    
  3. In a window, type reboot
  4. While the system is booting, press ESC to enter the Device Configuration Assistant
  5. Press F2 to scan system bus. Press F4 to select Device Tasks.
  6. Select View/Edit Devices then press F2 again to see a list of system devices and cards. Look for something that slightly resembles an internal modem, like this for a modem on cua/b - com 2:
    PnP ISA ETT0001 port 2F8-2FF IRQ3
    
  7. Confirm that the I/O address matches a com port (either 2f8 for COM1 or 3f8 for COM1) and the interrupt request is ok (3 for COM2 or 4 for COM1).
  8. Press F2 to continue, press F3 for back, press F2 to continue again.
  9. On the next screen, select the default boot device (marked with a "*") and then press F2 to boot the kernel.
  10. When the machine is booted, login as root, go to Application Manager, then to Admintool.
  11. In Admintool select Browse, then select Serial Ports. Then at last you can set up your Internal Modem as you so desire.


PC serial ports and internal modems

(This section was contributed in October 1998 by Jay Ts of Metran Technology. Jay Ts is a Linux and Unix consultant with many years of experience in system administration and programming. He can be reached at jayts@bigfoot.com, http://jayts.cx, 1-888-282-0549.)

The design of the PC architecture includes up to four "standard" serial ports using interrupts (IRQs) 3 and 4, and different I/O Ports:

COM#    IRQ     I/O Port
----    ---     --------
COM1    4       0x3f8        Look at those numbers carefully;
COM2    3       0x2f8        they're not exactly intuitive. ;-)
COM3    4       0x3e8
COM4    3       0x2e8

Usually, modern PC motherboards will have two serial ports included on the motherboard, with a default configuration of COM1 and COM2. This configuration, along with many other hardware parameters, and the date and time, are stored in a small area of battery-backed RAM (separate from main memory), sometimes referred to as "CMOS" because early implementations (at least) were done with CMOS static RAM. Another term used for the hardware parameters is "BIOS settings" because they are set using the system's builtin (ROM) firmware, the BIOS setup program. ("BIOS" stands for "Basic Input/Output System" and was originally used by MS-DOS to perform low-level hardware access, and controls the initial boot procedures when the system is powered on or reset.)

There are a large number of PC motherboard manufacturers, and more than one company that develops BIOS ROMs (notably, AMI, Award and Phoenix), all with a plethora of revisions, so the details of how the setup program works varies considerably from one motherboard model to another. However, there are some common functions. When you boot the computer, there will usually be a message reporting how to enter the BIOS setup program. Once you have done that, you will need to use the setup program's menu selections to find the screen where you have options regarding how to configure the serial ports. Sometimes, you may only be able to enable or disable them, and in other cases, you may be able to configure each to be COM1, COM2, COM3, COM4 or disabled.

Now, about those internal modems. Typically, they are implemented to look like one of the standard serial ports, probably COM2 by default (because COM1 is almost always used for the mouse).

There are some exceptions to this, notably the USR WinModem, which is a cost-reduced design that moves much of the modem's functions out of hardware, and into software that is provided with the product, and only runs under Windows. My advice is that if your system has one of these, that you remove it from the system, return it for a refund if possible, and if not, chuck it into the trash, and get yourself a real modem. So far, I do not know of one single case of a WinModem working with any version of Unix. Likewise, if you have a modem that is not implemented to act like a serial port, your best option is probably to replace it with one that has a more standard implementation.

If your internal modem is configured as COM2, you'd better make sure that neither of the "normal" serial ports on the motherboard is also configured as COM2. That would be an obvious hardware conflict, which shouldn't be expected to work. Often (always?) this conflict will be detected by the BIOS during system bootup, and you will be asked to enter the setup program to correct it. In any case, either reconfigure the conflicting motherboard serial port, or just disable it.

Another conflict may happen if one of the motherboard's serial ports shares an IRQ with the modem. Note in the above listing that COM1 shares IRQ4 with COM3, and COM2 shares IRQ3 with COM4. This is a notorious source of difficulty. Theoretically, it is possible to have devices sharing an interrupt, as long as they use different I/O ports, but in practice, the implementations of specific motherboards and operating systems may prevent them from actually working together. The result of an incompatibility can be as minor as a flaky serial port, or as major as a system crash or lockup.

You might think that it would be safe to configure the "extra" serial port on the motherboard as COM3 or COM4 and not plug anything (terminal, external modem, whatever) into it. Or only use it when the internal modem's not in use. But it can still be a problem.

If you want to be safe, make sure that COM1 is enabled for the mouse, COM2 is reserved for the modem, and that no serial port in the system is configured as COM3 or COM4. Check your modem card to see if there are jumpers to allow you to configure the COM port that it uses. And of course, make sure that no other hardware in the system is using the same IRQ as the modem.

If none of this works, I can suggest these options:

  1. Try different BIOS settings, even if they are not what I recommend. (And be prepared to to reboot your system without using the mouse, if necessary.)
  2. Try a different modem.
  3. Contact the motherboard vendor, and see if they have an update for the BIOS ROM chip(s).
  4. Try a different motherboard.
  5. Find a patch that updates the operating system's serial port driver.
  6. Give up. :-)

Serial device naming in Solaris x86

The kind folks at Progressive Systems have alerted us that the serial device naming scheme is different in Sparc Solaris and X86 Solaris, for Solaris 2.6-2.7. For Solaris 8 (2.8), the x86 device names match the Sparc names. So, make changes to this article's add_modem and add_terminal scripts as necessary.

 
   Sparc name         x86 name               x86 name
   (all releases)     (Solaris 2.6-2.7)      (Solaris 8)
   --------------     -----------------      -----------
   /dev/term/n        /dev/ttynn             /dev/term/n
   /dev/ttyn          /dev/ttydn             /dev/ttyn
   /dev/cua/n         /dev/cuan              /dev/cua/n

______________________________________________________________________

[DOCUMENT TOP]
[PREVIOUS SECTION]Solaris x86 Issues

Vendor List

This list of vendors is vastly incomplete. These are just some of the companies whose products and/or services my readers, clients, and I have been usually satisfied with.

A longer list of vendors and other Unix Serial Port information can be found on our Serial Port Resources page. If you have had a happy experience with other vendors of serial-port-based products for Suns, send me the info and I'll include them in this list.

Companies, their products, and their support staffs change regularly, so your "satisfaction mileage" may vary. (I don't receive any money or special favors from any of these folks, nor would I consider it. I'm just a picky consumer, like you.)

Serial cards:

Also see our Serial Cards and Terminal Servers page.

Modems:

PPP:

Also see our PPP page.

Kermit/C-Kermit:

Zmodem (rzsz) Verion 3.xx:

Terminal Servers:

Also see our Serial Cards and Terminal Servers page.

Publishers:

This document on ftp servers: (Thanks to the ftp-server managers!)


Celeste Stokely is an outspoken and pro-user Web Architecture and Project Management consultant who has been trying to make the world safer for Unix System Administrators since 1983.

She lives in southwestern New Mexico USA near the Gila Wilderness Area, and runs Stokely Consulting with her husband, Peter, 2 bouncy cats named L.B. and Sparcy, and an ever-increasing number of cheerful tropical fish. Celeste can be reached via email at celeste@stokely.com.