Monday, June 13, 2005

Serial Device Administration in Solaris

DCE – Data communications equipment: modems
DTE – Data terminal equipment: the serial ports on terminals & computers
Note: In RS-232 standard, DTE uses pin 2 to transmit data & pin 3 to receive, DCE does the reverse.
RS-232 standard – a standard for the function of the (up to) 25 pins found on serial connections.
serial port – a port that uses RS-232 standard (Solaris 7 systems have serial ports a & b [/dev/term/a & /dev/term/b])
modem – converts digital data to & from electrical analog signals
null modem cable – allows two DTE devices to communicate via serial ports
data carrier detect – connection established (RS-232 pin 8)
port monitor program – monitors RS-232 circuits on it’s serial ports and provides info to applications

Modem Access Modes - Three Configurations

  • Inbound – answers incoming calls
  • Oubound – makes outgoing calls
  • Bidirectional – both answers incoming and makes outgoing calls
Service Access Facility - SAF

SAF provides services for serial ports & network connections. Under the SAF, systems may access services using a variety of port monitors, including ttymon, the listener, and port monitors written expressly for a user's application.

SAF consists of two levels: the top administrative level is concerned with port monitor administration, the lower level with service administration.

SAF Terms:

service- a service is a process that is started, these processes monitor & setup connections using serial ports & network interfaces.

port - an externally seen access point on a system, a port may be an incoming phone line, serial port, etc.

Service Access Controller – sacthe controlling process (the upper-level program of SAF), starts & controls the lower-level SAF programs (port monitors)
  • sac daemon is started in /etc/inittab (system levels 2, 3 & 4)
  • reads: /etc/saf/_sysconfig the sac configuration file
  • reads: /etc/saf/_sactab lists port monitors to start

Port Monitorsmanage & monitor ports (lower-level SAF program), port monitors are processes that are responsible for monitoring a set of incoming ports on a machine.

  • A port monitor's major purpose is to detect incoming service requests and to dispatch them appropriately.
  • Some examples of port management are setting the line speed on incoming phone connections, binding an appropriate network address, reinitializing the port when the service terminates, outputting a prompt, etc.
  • A port monitor's administrative file is named /var/saf/pmtag/_pmtab (where pmtag is the tag of the port monitor); _pmtab is maintained by the pmadm command in conjunction with a port monitor specific administrative command (ie ttyadm for ttymon, nlsadmin for listen)
Port Monitors:
  • ttymon – monitors serial ports, connects a specified service to a port, uses /etc/ttydefs for communications settings (baud rate, etc.). {Default tag is zsmon}
  • listen – network listener daemon, this process ``listens'' to a network for service requests, accepts requests when they arrive, and invokes servers in response to those service requests. {Default tag is tcp}
SAF Commands
  • sacadm – admin command for the SAC (add, remove, start, stop port monitors)·
  • pmadm –admin command for the Port Monitors (add, remove, enable, disable services) (modifies _pmtab file)
  • ttyadm – formats ttymon data for the pmadm & sacadm commands
  • nlsadmin – formats listener data for the pmadm & sacadm commands


  1. Select Browse -> Serial Ports
  2. Click on the port
  3. Select Edit -> Modify
  4. For Template select Terminal – Hardwired
  5. Select the baud rate
  6. Modify the name in the Terminal Type field if desired (terminfo entry)
  7. Click on OK
Adding Bidirectional Modem
  1. Select Browse -> Serial Ports
  2. Click on the port
  3. Select Edit -> Modify
  4. For Template select Modem – Bidirectional
  5. Select the baud rate
  6. Modify the name in the Terminal Type field if desired (terminfo entry)

Tip Commands

  • The tip utility establishes a full-duplex terminal connection to a remote host.Once the connection is established, a remote session using tip behaves like an interactivesession on a local terminal.
  • Typed characters are normally transmitted directly to the remote machine (which does the echoing as well).
  • Escape commands starting with a tilde (~) can be used to perform some functions (like drop connection, file copy, BREAK, etc.)
  • Uses /etc/remote file which contains entries describing remote systems & line speeds used by tip.
  • Configured by the .tiprc file in the user’s home directory which is read when tip command is used.

Using device: tip /dev/term/b
Using hostname: tip dbserver
Using phone #: tip 703-855-5555

/etc/remote has descriptions of remote hosts such as serial port to use, baud rate, modem settings,& phone number.
/etc/phones if the phone number in the /etc/remote file is an @ symbol, tip uses the /etc/phones file which associates hostnames with a phone number. Each phone number found for a system is tried until either a connection is established, or an end of file is reached

Format of lines:
system-name phone-number

1 comment:

Anonymous said...

Hi, I was out blogging and found your aite. It certainly got my attention and interest. I was looking for Disk Drives
information and even though this isn't a perfect match I enjoyed your site. Thanks for the read!