How to configure modems

From Wiki-UX.info
Jump to: navigation, search

Abstract

This configuration details how to create the special device files (dsf) for Dial-in and Dial-out modems. This modem are use to remotely connect to the serial port of the system and obtain console access. Using modems to establish ppp/ip connection is not covered.

Device Files

HP-UX does not provide dsf for use with modems by default. To create them, first determine the hardware path and port number of the Serial Adapter or MUX host bus adaptor (MUX HBA):

# ioscan -fnkC tty
Class     I  H/W Path  Driver      S/W State H/W Type  Description
===================================================================
tty       0  8/0/0     mux2        CLAIMED   INTERFACE MUX
                      /dev/diag/mux0    /dev/diag/tty0p7  /dev/tty0p1
                      /dev/diag/tty0p0  /dev/mux0         /dev/tty0p7
                      /dev/diag/tty0p1  /dev/tty0p0
tty       1  8/20/2    asio0       CLAIMED   INTERFACE Built-in RS-232C
                      /dev/diag/mux1  /dev/mux1       /dev/tty1p0

The output shows three serial interfaces. The one at hardware path 8/0/0 using the mux driver and one at hardware path 8/20/2 using the standard serial asio driver. The mux1 and mux2 driver are use normally for card with more that two serial ports, like the 8/32 MUX HBA.

In this example, let's use the one at hardware path 8/20/2, which corresponds to the Built-in RS-232C port on the back of the machine. Check hardware diagrams if you need to determinate the port to hardware part correspondence.

HP-UX 11i v1 / v2 using SAM

1. Start-up SAM.

+ ===              System Administration Manager (crd370) (1)                  +
¦File View Options Actions                                                Help ¦
¦                       Press CTRL-K for keyboard help.                        ¦
¦SAM Areas                                                                     ¦
¦------------------------------------------------------------------------------¦
¦  Source   Area                                                               ¦
¦+---------------------------------------------------------------------------+ ¦
¦¦ SAM      Accounts for Users and Groups ->                                 ^ ¦
¦¦ SAM      Auditing and Security         ->                                   ¦
¦¦ SAM      Backup and Recovery           ->                                   ¦
¦¦ SAM      Disks and File Systems        ->                                   ¦
¦¦ SAM      Display                       ->                                   ¦
¦¦ SAM      Kernel Configuration          ->                                   ¦
¦¦ SAM      Networking and Communications ->                                   ¦
¦¦ SAM      Performance Monitors          ->                                   ¦
¦¦ SAM      Peripheral Devices            ->                                   ¦
¦¦ SAM      Printers and Plotters         ->                                   ¦
¦¦ SAM      Process Management            ->                                   ¦
¦¦ Other    Resource Management           ->                                   ¦
¦¦ SAM      Routine Tasks                 ->                                   ¦
¦¦ SAM      Run SAM on Remote Systems                                        v ¦
¦+---------------------------------------------------------------------------+ ¦
¦                                                                              ¦
+------------------------------------------------------------------------------+

2. Select "Peripheral Devices"

+ ===              System Administration Manager (crd370) (1)                  +
¦File View Options Actions                                                Help ¦
¦                       Press CTRL-K for keyboard help.                        ¦
¦SAM Areas:Peripheral Devices                                                  ¦
¦------------------------------------------------------------------------------¦
¦  Source   Area                                                               ¦
¦+---------------------------------------------------------------------------+ ¦
¦¦ ..(go up)                                                                 ^ ¦
¦¦ SAM      Cards                                                              ¦
¦¦ SAM      Device List                                                        ¦
¦¦ SAM      Disks and File Systems         ->                                  ¦
¦¦ SAM      Instruments                                                        ¦
¦¦ SAM      Monitor Configuration                                              ¦
¦¦ SAM      Printers and Plotters          ->                                  ¦
¦¦ SAM      Tape Drives                                                        ¦
¦¦ SAM      Terminals and Modems                                               ¦
¦¦ SAM      Uninterruptable Power Supplies                                     ¦
¦¦                                                                             ¦
¦¦                                                                             ¦
¦¦                                                                             ¦
¦¦                                                                           v ¦
¦+---------------------------------------------------------------------------+ ¦
¦                                                                              ¦
+------------------------------------------------------------------------------+

3. Select Terminal and Modems

+ ===                   Terminals and Modems (crd370) (1)                      +
¦File View Options Actions                                                Help ¦
¦                       Press CTRL-K for keyboard help.                        ¦
¦Terminals and Modems                                           0 of 1 selected¦
¦------------------------------------------------------------------------------¦
¦  Device File Name   Type      Hardware Path   Port Number   Speed (baud)     ¦
¦+---------------------------------------------------------------------------+ ¦
¦¦ /dev/console       Console   8/0/0           0             0              ^ ¦
¦¦                                                                             ¦
¦¦                                                                             ¦
¦¦                                                                             ¦
¦¦                                                                             ¦
¦¦                                                                             ¦
¦¦                                                                             ¦
¦¦                                                                             ¦
¦¦                                                                             ¦
¦¦                                                                             ¦
¦¦                                                                             ¦
¦¦                                                                             ¦
¦¦                                                                             ¦
¦¦                                                                           v ¦
¦ <------------------------------------------------------------------------->+ ¦
¦                                                                              ¦
+------------------------------------------------------------------------------+

4. Select "Actions, Add Modem..."

+ ===                   Terminals and Modems (crd370) (1)                      +
¦File View Options Actions                                                Help ¦
¦                  ¦ Add Terminal...     ¦eyboard help.                        ¦
¦Terminals and Mode¦ Add Modem...        ¦                      0 of 1 selected¦
¦------------------¦ =================== ¦-------------------------------------¦
¦  Device File Name¦ (nothing selected)~ ¦ath   Port Number   Speed (baud)     ¦
¦+-----------------+---------------------+-----------------------------------+ ¦
¦¦ /dev/console       Console   8/0/0           0             0              ^ ¦
¦¦                                                                             ¦
¦¦                                                                             ¦
¦¦                                                                             ¦
¦¦                                                                             ¦
¦¦                                                                             ¦
¦¦                                                                             ¦
¦¦                                                                             ¦
¦¦                                                                             ¦
¦¦                                                                             ¦
¦¦                                                                             ¦
¦¦                                                                             ¦
¦¦                                                                             ¦
¦¦                                                                           v ¦
¦ <------------------------------------------------------------------------->+ ¦
¦                                                                              ¦
+------------------------------------------------------------------------------+

5. Add modem using the required settings. For example, dial-in / dial-ou with 19200 baud rate speed.

+                             Add Modem (crd370)                              ++
¦+---------------------------------------------------------------------------+¦¦
¦¦ +------------------------------------------------------------------------+^¦¦
¦¦ ¦ 8/0/0             mux2         MUX (3 ports)                           ^¦¦¦
¦¦ ¦ 8/20/2            asio0        Built-in RS-232 Interface               ¦¦¦¦
¦¦ ¦                                                                        v¦¦¦
¦¦  <---------------------------------------------------------------------->+¦¦¦
¦¦ [ Diagnose Missing Card... ]                                              ¦¦¦
¦¦                                                                            ¦¦
¦¦           [ Port Number... ] 0                                             ¦¦
¦¦                                                                            ¦¦
¦¦     [ Speed (Baud Rate)... ] 19200                                         ¦¦
¦¦                                                                            ¦¦
¦¦ [X] Use Device for Calling Out                                             ¦¦
¦¦                                                                            ¦¦
¦¦ [ ] Receive In-coming Calls (start getty process)                          ¦¦
¦¦                                                                            ¦¦
¦¦ [ ] CCITT Modem (European standard modems)                                 ¦¦
¦¦                                                                            ¦¦
¦¦ [ ] Use Hardware Flow Control Device Files (RTS/CTS protocol)             v¦¦
¦+---------------------------------------------------------------------------+¦¦
¦-----------------------------------------------------------------------------¦¦
¦ [   OK   ]                      [ Cancel ]                      [  Help  ]  ¦¦
+-----------------------------------------------------------------------------++

6. Complete the installation and exit from SAM interface.

+                             Add Modem (crd370)                              ++
¦+---------------------------------------------------------------------------+¦¦
¦¦                                                                           ^¦¦
¦¦ Choose a Mux/Serial Card:                                                  ¦¦
¦¦   Hardware Path     Driver       Description                               ¦¦
¦¦ ++                            Note (crd370)                            +-+ ¦¦
¦¦ ¦¦                                                                     ¦ ^ ¦¦
¦¦ ¦¦ The modem has been added.  Three device files were created:         ¦ ¦ ¦¦
¦¦ ¦¦                                                                     ¦ v ¦¦
¦¦  ¦ /dev/cul1p0                                                         ¦>+ ¦¦
¦¦ [¦ /dev/ttyd1p0                                                        ¦   ¦¦
¦¦  ¦ /dev/cua1p0                                                         ¦   ¦¦
¦¦  ¦                                                                     ¦   ¦¦
¦¦  ¦                                                                     ¦   ¦¦
¦¦  ¦ You may still need to physically connect the device and turn it on. ¦  ¦¦¦
¦¦  ¦---------------------------------------------------------------------¦  ¦¦¦
¦¦ [¦                             [[ OK    ]]                             ¦  ¦¦¦
¦¦  +---------------------------------------------------------------------+  ¦¦¦
¦¦ [X] Receive In-coming Calls (start getty process)                         ¦¦¦
¦¦                                                                           v¦¦
¦+---------------------------------------------------------------------------+¦¦
¦-----------------------------------------------------------------------------¦¦
¦ [   OK   ]                      [ Cancel ]                      [  Help  ]  ¦¦
+-----------------------------------------------------------------------------++
+ ===                   Terminals and Modems (crd370) (1)                      +
¦File View Options Actions                                                Help ¦
¦                       Press CTRL-K for keyboard help.                        ¦
¦Terminals and Modems                                           0 of 2 selected¦
¦------------------------------------------------------------------------------¦
¦  Device File Name   Type      Hardware Path   Port Number   Speed (baud)     ¦
¦+---------------------------------------------------------------------------+ ¦
¦¦ /dev/console       Console   8/0/0           0             0              ^ ¦
¦¦ /dev/ttyd1p0       Modem     8/20/2          0             19200            ¦
¦¦                                                                             ¦
¦¦                                                                             ¦
¦¦                                                                             ¦
¦¦                                                                             ¦
¦¦                                                                             ¦
¦¦                                                                             ¦
¦¦                                                                             ¦
¦¦                                                                             ¦
¦¦                                                                             ¦
¦¦                                                                             ¦
¦¦                                                                             ¦
¦¦                                                                           v ¦
¦+<-                                                                        >+ ¦
¦                                                                              ¦
+------------------------------------------------------------------------------+

7. Confirm the creation of the special device files.

# ioscan -fnkC tty
Class     I  H/W Path  Driver      S/W State H/W Type  Description
===================================================================
tty       0  8/0/0     mux2        CLAIMED   INTERFACE MUX
                      /dev/diag/mux0    /dev/diag/tty0p7  /dev/tty0p1
                      /dev/diag/tty0p0  /dev/mux0         /dev/tty0p7
                      /dev/diag/tty0p1  /dev/tty0p0
tty       1  8/20/2    asio0       CLAIMED   INTERFACE Built-in RS-232C
                      /dev/cua1p0     /dev/diag/mux1  /dev/tty1p0
                      /dev/cul1p0     /dev/mux1       /dev/ttyd1p0

8. Review the affected configuration files.

# ll /dev/cul1p0 /dev/ttyd1p0 /dev/cua1p0
crw-r--r--   1 bin        bin          1 0x010001 Mar 17 00:40 /dev/cua1p0   <--- Direct connect dsf
crw-r--r--   1 bin        bin          1 0x010001 Mar 17 00:40 /dev/cul1p0   <--- Dial-out dsf
crw--w----   1 uucp       bin          1 0x010002 Mar 17 00:40 /dev/ttyd1p0  <--- Dial-in dsf

# lssf /dev/cul1p0 /dev/ttyd1p0 /dev/cua1p0
asio0 card instance 1 port 0 callout at address 8/20/2 /dev/cul1p0
asio0 card instance 1 port 0 callin at address 8/20/2 /dev/ttyd1p0
asio0 card instance 1 port 0 callout at address 8/20/2 /dev/cua1p0

# grep getty /etc/inittab
cons:123456:respawn:/usr/sbin/getty console console            # system console
#ttp1:234:respawn:/usr/sbin/getty -h tty0p1 9600
#ttp2:234:respawn:/usr/sbin/getty -h tty0p2 9600
#ttp3:234:respawn:/usr/sbin/getty -h tty0p3 9600
#ttp4:234:respawn:/usr/sbin/getty -h tty0p4 9600
#ttp5:234:respawn:/usr/sbin/getty -h tty0p5 9600
a0:3:respawn:/usr/lbin/uucp/uugetty -r -t 60 -h ttyd1p0 19200   <--- Dial-in dsf
  • Note: SAM does not add entries on "/etc/uucp/Devices". This may be needed if you need to send special initialization strings to the modem upon start.

SAM log review

Asio single port card

----- Adding Modem

      select code = 8/20/2; port = 8/20/2; baud rate = 0
    * mkterm.sh: Executing the command:
          mksf -a1  -d asio0 -I 1 /dev/cul1p0
    * mkterm.sh: Executing the command:
          mksf -a2  -d asio0 -I 1 /dev/ttyd1p0
    * mkterm.sh: Executing the command:
          inittab -e1 ttyd1p0 19200
    * inittab: Adding "/etc/inittab" entry:
          a0:3:respawn:/usr/lbin/uucp/uugetty -r -t 60 -h ttyd1p0 19200
    * mkterm.sh: Executing the command:
          init q
    * mkterm.sh: Executing the command:
          mksf -a1  -d asio0 -I 1 /dev/cua1p0

Mux2 multiport card on port 7

On multiport mux cards providing the correct driver and port number is required. For example, mux2 and port # 7.

----- Adding Modem
      select code = 8/0/0; port = 8/0/0; baud rate = 7
    * mkterm.sh: Executing the command:
          mksf -a1  -d mux2 -I 0 -p 7 /dev/cul0p7
    * mkterm.sh: Executing the command:
          mksf -a2  -d mux2 -I 0 -p 7 /dev/ttyd0p7
    * mkterm.sh: Executing the command:
          inittab -e0 ttyd0p7 19200
    * inittab: Adding "/etc/inittab" entry:
          a0:3:respawn:/usr/sbin/getty -h ttyd0p7 19200
    * mkterm.sh: Executing the command:
          inittab -d ttyd0p7
    * inittab: Disabling "/etc/inittab" entry:
          a0:3:off:/usr/sbin/getty -h ttyd0p7 19200
    * mkterm.sh: Executing the command:
          init q
    * mkterm.sh: Executing the command:
          mksf -a1  -d mux2 -I 0 -p 7 /dev/cua0p7


HP-UX v3

In HP-UX 11i v3 the Service Administration Manager (SAM) has been superseeded by the System Management Homepage (SMH). Some capabilities, like modem configuration have not been ported at the time of this article from SAM to SMH. So is requiered to manually set-up this connections dsf and configuration files.

For example, this is an HP-UX 11i v3 ioscan output before creating the special device files for the modems.

# ioscan -fnkC tty
Class     I  H/W Path  Driver S/W State   H/W Type     Description
==================================================================
tty       0  0/0/1/0   asio0   CLAIMED     INTERFACE    PCI SimpleComm (103c1290)
                      /dev/diag/mux0  /dev/mux0       /dev/tty0p0
tty       1  0/0/1/1   asio0   CLAIMED     INTERFACE    PCI Serial (103c1048)
                      /dev/GSPdiag1   /dev/mux1       /dev/tty1p2
                      /dev/diag/mux1  /dev/tty1p0     /dev/tty1p4

Dial-out modem

# /usr/sbin/mksf -d asio0 -H 0/0/1/0 -a1 -v
        making cul0p0 c 1 0x000001

Dial-in modem

# /usr/sbin/mksf -d asio0 -H 0/0/1/0 -a2 -v
        making ttyd0p0 c 1 0x000002

For a debuging direct connection to the modem

# /usr/sbin/mksf -d asio0 -H 0/0/1/0 -a0 -v
        making tty0p0 c 1 0x000000

This is the HP-UX 11i v3 ioscan after before creating the special device files for the modems.

# ioscan -fnkC tty
Class     I  H/W Path  Driver S/W State   H/W Type     Description
==================================================================
tty       0  0/0/1/0   asio0   CLAIMED     INTERFACE    PCI SimpleComm (103c1290)
                      /dev/cul0p0     /dev/mux0       /dev/ttyd0p0
                      /dev/diag/mux0  /dev/tty0p0
tty       1  0/0/1/1   asio0   CLAIMED     INTERFACE    PCI Serial (103c1048)
                      /dev/GSPdiag1   /dev/mux1       /dev/tty1p2
                      /dev/diag/mux1  /dev/tty1p0     /dev/tty1p4
  • Notes:
Add an getty entry on /etc/inittab for "/dev/ttyd0p0" port if it will answer dial-in connections.
Change the -d <driver> -p <port number> to the mksf command if adding the dsf for a MUX HBA.

Cable pinout

24542M

9000/345 & 9000/375 Serial Modem cable
9000/700 Serial Modem cable
For use on the internal 9 pin serial port)

Signal CPU Pin Flow direction CDE Pin Signal
CD 1 <--------- 8 CD*
RD 2 <--------- 3 RD*
TD 3 ---------> 2 TD*
DTR 4 ---------> 20 DTR*
GND 5 <--------> 7 GND*
DSR 6 ---------- 6 DSR
RTS 7 ---------- 4 RTS
CTS 8 ---------- 5 CTS
RI 9 <--------- 22 RI

40233A

9000/800 Series Modem cable

Signal CPU Pin Flow direction CDE Pin Signal
Gnd 1 ---------- 1 Gnd
RD 2 <--------- 3 TD
TD 3 ---------> 2 RD
RTS 4 <--------- 8 DCD
DSR 6 ---------> 20 DTR
GND 7 <--------> 7 GND
DCD 8 ---------> 4 RTS
9 <--------- 22 RI
DTR 20 <--------- 6 DSR
RI 22 <--------- 5 CTS

Notes:

This cable is a standard IBM AT style 9 to 25 pin modem cable.
This cable will not work on 98644 style interfaces used on earlier 9000/300 machines. They need the 92221M cable, or the supplied adapter.
The lines marked with * are usually the ones needed for modem use.

Reference

Authors