[EdCert previous] [EdCert next] [EdCert top]

Talking Serially: Modem Configuration in HP-UX

Device Files

HP-UX does not provide device special files for use with modems by default. To create them, first determine the hardware path, and port number for the modem port:

# ioscan -C tty -fn
Class     I  H/W Path  Driver      S/W State   H/W Type     Description
========================================================================
tty       0  2/0/4     asio0       CLAIMED     INTERFACE    Built-in RS-232C
                      /dev/diag/mux0  /dev/mux0       /dev/tty0p0   
tty       1  5/0/2     asio0       CLAIMED     INTERFACE    Built-in RS-232C
                      /dev/diag/mux1  /dev/mux1       /dev/tty1p0   

The output shows two serial interfaces, HP-UX calls them card instances, one at hardware path 2/0/4, and one at hardware path 5/0/2. In this example, let's use the one at hardware path 2/0/4, which corresponds to the first serial port on the back of the machine. To create the the device special files for this port issue the following commands:

In both of these commands, the -d option specifies the device driver (asio0 in this case), the -H option specifies the hardware path (2/0/4 in this case), the -v option specifies verbose mode, and the -a option specifies the access mode (1 for a dial-out modem, 2 for a dial-in modem, and 0 for direct connect). The -i in the command for making a direct connect device, is used only for direct connect. For more information on these and other mksf options, see its manual page.

Dial-In Configuration

Edit the /etc/inittab to include an appropriate entry to run a getty process on the modem port. A typical entry looks like this:

ttp0:234:respawn:/usr/sbin/getty -h -t 240 ttyd0p0 9600

In the process field, the arguments to getty are as follows:

After modifying the inittab, issue the command init q to activate the changes.

The /etc/ttytype and /etc/gettydefs files are used the same as with terminals.

Dial-Out Configuration

Add an entry to the /etc/uucp/Devices file for the dial-out modem port's previously created device special file. Also, add a "Direct" line for debugging purposes. Devices file entries take the following form:

ACU device-file - speed dialer
Direct device-file - speed direct

For example:

ACU cul0p0 - 2400 hayes
Direct cua0p0 - 2400 direct

Change these parameters to fit your modem, paying attention to what is allowed by the Dialers file (or, alternatively, make an addition to the Dialers file.

The modem should now be ready to dial-out. Use the command:

cu -s speed -l device-file telephone-number

replacing speed with the configured speed, device-file with the appropriate device special file, and telephone-number with the phone number to be dialed.

To make a direct connection to the modem for debugging, issue the command:

cu -s speed -l device-file -m dir

Terms used: device driver, UUCP.



[EdCert previous] [EdCert next] [EdCert top]