Serial Ports

Team-Fly    

Solaris™ Operating Environment Boot Camp
By David Rhodes, Dominic Butler
Table of Contents
Chapter 14.  Connecting Serial Devices


Sun computers normally come with two onboard serial ports, although some have one physical port that is internally wired to provide two ports when a special "splitter cable" is used.

Each port has two devices associated with it. They are defined in a way that follows a similar convention to the SCSI devices mentioned in Chapter 17, "Adding SCSI Devices." This means that they have an instance number, a physical device name, and a logical device name. Here, we'll only concern ourselves with the logical device names, which will be found in the term and cua subdirectories of /dev:

 hydrogen# cd /dev hydrogen# ls -lL cua total 0 crw-------   1 uucp     uucp      29,131072 Sep  4  1997 a crw-------   1 uucp     uucp      29,131073 Feb 11  1996 b hydrogen# ls -lL term total 0 crw--w----   1 root     tty       29,  0 Nov 12 08:03 a crw-rw-rw-   1 root     sys       29,  1 Mar 17  1997 b hydrogen# 

We can see that all the devices share the same major number (29), as we would expect, but the minor numbers are quite different. Let's quickly look at the physical names for one of the ports:

[View full width]

hydrogen# ls -l cua/a lrwxrwxrwx 1 root other 35 Oct 25 1998 cua/a -> ../../devices/obio/zs@0, graphics/ccc.gif100000:a,cu hydrogen# ls -l term/a lrwxrwxrwx 1 root other 32 Oct 25 1998 term/a -> ../../devices/obio/zs@0, graphics/ccc.gif100000:a hydrogen#

This shows that /dev/term/a and /dev/cua/a are the same physical device. The reason that two logical entries are provided has to do with the ways the serial ports are used for incoming and outgoing connections.

Normally, the serial port cannot be opened until the Carrier Detect (DCD) signal is high. If a modem is connected to the port, it will enable DCD when it answers an incoming call. This will allow the port to be opened and used, allowing a getty process to offer the incoming user a login prompt.

While this works fine for incoming connections, it means that any outgoing ones will hang waiting for DCD to be enabled before they can open the port. Obviously this won't happen because the modem is being used to dial out, rather than detecting an incoming call. To get around this, the cua devices have "software carrier" enabled, allowing them to be opened without DCD being enabled.

In summary, the devices and their functions are listed here:

  • /dev/term/* (used for incoming connections)

  • /dev/cua/* (used for outgoing connections)

Now that we've seen the types of devices that are available, and the settings we can apply to them, let's find out how to configure them.


    Team-Fly    
    Top
     



    Solaris Operating Environment Boot Camp
    Solaris Operating Environment Boot Camp
    ISBN: 0130342874
    EAN: 2147483647
    Year: 2002
    Pages: 301

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net