DOCUMENT ID: 1124-02 SYNOPSIS: How to set up a serial terminal using Solaris x86 OS RELEASE: PRODUCT: Solaris x86 KEYWORDS: serial terminal modem ttymon listen port monitor DESCRIPTION: Instructions for setting up a serial terminal. SOLUTION: Modems and terminals aren't very useful on their own; they require access to computing resources. The main mechanism for gaining access to a service is through a port monitor. A port monitor is a program that continuously watches out for requests to log in, or requests to access printers or files. There are two types of port monitors included in Solaris x86 operating system: ttymon and listen. The listen port monitor controls access to network services, fielding remote print and file system requests. The listen port monitor does not come into play when you set up modems and terminals. The ttymon port monitor provides access to the login services needed by modems and terminals. Modems and terminals are not much good unless you can use them to log in to the computer and start typing commands. To make this possible, you'll need to set up a ttymon port monitor (using SAF) to process login requests from these devices. There are three basic tasks required to set up a serial port device such as a modem or terminal. 1. Use the sacadm command to add a port monitor (if none is present). 2. Use the pmadm command to designate a service to be associated with the new port monitor. 3. Edit one or more communications-related files, as needed. The first two tasks involve using SAF commands. The communications-related files mentioned affect how modems and terminals communicate. The files you may need to edit include /etc/ttydefs, /etc/uucp/Devices, and /etc/uucp/Dialers. SAF commands require that you supply arguments to specify one or more of the following items: Name of a port monitor: The 'pmtag' argument is the name you assign to a specific instance of a port monitor. You can give the port monitors any name you like, provided the name is unique and no longer than 14 characters. However, it's wise to assign names that contain the word 'ttymon', so that such monitors will be easily identifiable as being of ttymon-type when you list them using the sacadm -l command. Baud rate and line discipline: The ttylabel argument specifies which entry in the /etc/ttydefs file to use when searching for the proper baud rate and line discipline. Device path: The dev_path argument is the full path name of the TTY port device file. That is, dev_path is the path to the file in the /dev directory for the port to which the modem or terminal is attached. For example, the path name for an terminal attached to serial port B is /dev/term/b. Comments (optional): Both the 'pmadm' and 'sacadm' commands allow you to add comments using a '-y' flay when adding a port monitor or service. Your comments are included in the display when you later list port monitors or services using the -l flag. Enclose your comments withing quotation marks. Instructions for Setting up a Terminal Setting up a terminal is really quite easy. This section includes step-by-step instructions for performing the tasks related to terminals. 1. Type ttyadm -V and note the port monitor version number: #ttyadm -V 1 # 2. Type the sacadm command. Substitute the appropriate port monitor tag for pmtag and substitute the correct version number (as obtained in the previous step) for vers. #sacadm -a -p ttymonb -t ttymon -c /usr/lib/saf/ttymon -v 1 | | ^^^pmtag ^^^vers 3. Use the pmadm command to add a login service. Substitute the arguments as appropriate. #pmadm -a -p ttymonb -s b -i root -fu -v 1 -m "`ttyadm -d /dev/term/b -l 9600 \ -s /usr/bin/login `" In this command ttymonb=pmtab, b=svctag, 1=vers, /dev/term/b=dev_path 4. Connect and turn on the terminal. Attach all cords and cables. See the documentation accompanying the terminal for connection instructions. A quick and easy way to test the terminal connections is to pipe the /etc/passwd file to the terminal. If everything is setup correctly, you should see the passwd file displayed on the screen. Use the following command: cat /etc/passwd >/dev/term/b Following is a list of very useful SAF commands: sacadm -l -- The system displays all port monitors sacadm -a -p ttymonb -t ttymon -c /usr/lib/saf/ttymon -v 1 -y "TTY Ports a & b" -- To add a ttymon port monitor Where: -a is the add port monitor flag -p specifies the pmtag ttymonb as the port monitor tag -t specifies the port monitor type as ttymon -c defines the command string used to start the port monitor -v specifies the version number of the port monitor -y defines a comment to describe this instance of the port monitor sacadm -l -p ttymonb -- To kill a ttymon port monitor Where: -k is the kill port monitor status flag -p specifies the pmtag ttymonb as the port monitor tag sacadm -s -p ttymonb -- To start a killed ttymon port monitor Where: -s is the start port monitor status flag -p specifies the pmtag ttymonb as the port monitor tag sacadm -d -p ttymonb -- To disable a ttymon port monitor Where: -d is the disable port monitor status flag -p specifies the pmtag ttymonb as the port monitor tag sacadm -e -p ttymob -- To enable the port monitor status flag Where: -e is the enable port monitor status flag -p specifies the pmtag ttymonb as the port monitor tag sacadm -r -p ttymonb -- To remove a ttymon port monitor Where: -r is the remove port monitor status flag -p specifies the pmtag ttymonb as the port monitor tag Note: Removing a port monitor deletes all the configuration files associated with it. Port monitor configuration files cannot be updated or changed using sacadm. To reconfigure a port monitor, remove it and add a new one. DATE APPROVED: 10/10/95