|
Configuring Port for Modems, Printers and Terminals with HP-UX RealPort Configuring Port for Modems, Printers and Terminals with HP-UX RealPort Configuring ports for modems, terminals and printers in HP-UX and RealPort
Setting up ports for terminals:
- Connect terminals to the ports (using a null modem, if necessary)
and test the connections to each terminal by entering the following
command for each port added:
date > /dev/ttya01
(Assuming the terminal is connected to ttya01.)
- (Please note that in the above, the "date" command is used as a simple
test, to provide text output that can be redirected; there is no other
significance to "date" in this test.)
- tty devices within HP-UX require Carrier Detect. This must either be
tied high within the cable or you can force it high in the driver by
typing:
ditty forcedcd ttya01
- If the date appears on the terminal's screen, the device is properly
connected.
- If the date does not appear on the terminal's screen, then that
terminal is not receiving data; check the power, cables, connections, etc.
- If nonsense characters are printed on the terminal's screen, check the
baud rates, data bits, stop bits, and parity setting on your terminal
(UNIX default parameters are 9600 baud, 8 data bits, 1 stop bit, and no
parity).
- Edit the new terminal entries in the /etc/inittab file to enable ports for login.
The following entries have been automatically added for the boards
(and ports) installed:
Xx01:23:off:/etc/getty ttya01 H
Xx02:23:off:/etc/getty ttyb02 H... ...and so on.
- Change the word "off" to "respawn" for each terminal you want to be enabled.
- The numbers associated with each "tty" represent port number ("ttya01"
is Port 1, "ttya08" is Port 8).
- The last number or letter (H) is an entry into the /etc/gettydefs file,
which may be set to any of the allowable baud rates. (Check your operating
system's documentation.) In this example, "H" specifies 9600 baud, 8 data bits,
1 stop bit, and no parity.
- Finally, enter the following command to get the login prompt on the
screen:
init q
Setting up ports for serial printers:
- To prepare a port for connection to a printer used for a direct connection
(not using the lp print queue).
ditty -w 30 printer [baud rate and flow control options] ttya01
This command is recommended for any port that has a printer connected to it.
The command may be placed in the /etc/conf/digi/drp-boot.sh file, so that
it is automatically executed whenever the system is booted. Refer to the
/etc/conf/digi /drp-boot.sh and the manual pages for ditty for more info.
- Setting up a print queue for a printer directly connected to a port.
For example to setup a print queue called "ps15" on port 15 (ttya15)
and using the lp print model "dumb" for the interface.
- chmod 666 /dev/ttya15
-- This will change permissions to read-write.
- lpshut
-- This will stop the lp scheduler for ALL print queues.
- lpadmin -pps15 -mmodel -v/dev/ttya15
-- This will create a new print queue. Refer to manual pages for lpadmin.
- lpsched
-- This will restart the lp scheduler.
- enable ps15
-- This enables print requests for "ps15".
- accept ps15
-- This allows "ps15" to accept print requests.
Setting up ports for bi-directional modems
- On the HP-UX server.
Edit the new modem entries in the /etc/inittab file to enable ports for
dial-in. The following entries have been automatically added for the ports
installed:
Xx01:23:off:/etc/getty ttya01 H
Xx02:23:off:/etc/getty ttyb02 H ... and so on.
- Change the word "off" to "respawn" for each port you want to
be enabled.
- The numbers associated with each "tty" represent port number
("ttya01" is Port 1, "ttya08" is Port 8).
- The last number or letter (H) is an entry into the /etc/gettydefs file,
which may be set to any of the allowable baud rates. (Check your operating
system's documentation.) In this example, "H" specifies 9600 baud, 8 data bits,
1 stop bit, and no parity.
init q
- In /usr/lib/uucp/Devices, make the Direct line look like this:
Direct cua01 - 38400 direct
[also, the D in Direct has to be the first character on the line]
- Comment out any ACU lines relating to this device until dialin is
working properly.
Note: If an ACU entry is necessary for correct operation of the modem
in dialout applications. Refer to your modem manual or to the modem
manufacturer for the correct modem initialization string to use for your
modem.
- connect to the modem:
cu -l /dev/cua01 -s 38400
at&w [train modem to port speed]
~. [tilde period, to end cu]
- On the PortServer type:
set port ra=## dev=prn
If using RJ45-8 pin cable:
set flow ra=## altpin=on
The port is now configured for dial-in/out.
|