This chapter describes how you can attach a printer or plotter to an HP Netstation. Topics include:
If you have problems with the printer installation, refer to If the Printer Will Not Print.
Which devices you can connect depends largely on your host computer. In general, all HP printers are supported on any multi-vendor system. Other printers that can plug into the Netstation and have their own model scripts are also supported.
/usr/spool/lp/model
For HP-UX 10.x systems:
/var/spool/lp/model
Note that HP plotters with model numbers HP 7440a, HP 7475a, HP 7550a, HP 7570a, HP 7595a, or HP 7596a require a different setup method from other printers or plotters.
Printer and plotter types that do not have a model script may work with the
dumb
and dumbplot
scripts respectively.
This section explains how to connect a printer or plotter to the Netstation and how to test the connection.
To connect a parallel printer to the Netstation, use a Centronics-style cable (HP 24542D). The parallel port is optional on the HP ENVIZEX II Netstation (order HP Part Number C5215A).
To connect a serial printer to the Netstation, use an HP 24542G cable. If your Netstation has two serial ports, you can connect the printer to either serial port. To configure the Serial Port to work with the printer:
[F12]
to access the configuration screens.
[Terminal]
, then [Serial (1)]
or [Serial (2)]
depending
on whether the printer is connected to the first or second serial port.
[Network]
, then [SLIP(1)]
, [SLIP(2)]
, [PPP(1)]
, or [PPP(2)]
depending on whether you are using SLIP or PPP on port 1 or 2.
[Activate]
button to disable it.
HP Netstations have print tests you can use with non-PostScript printers to test the Netstation-to-printer connection.
[F12]
to access the configuration screens.
[Diagnostic]
, then [Printer Test]
.
[Start Test]
.
If your printer does not print the Netstation's configuration, check the cable and the printer for problems.
There are two different ways you can set up your Netstation to support local printing:
If you plan to use remport
and JetDirect,
do the following:
Set up your Netstation to load the following extensions:
remport
(remote ports)
parallel
(if the printer is connected through a parallel port)
serial
(if the printer is connected through a serial port)
The administration script (xtadm
) makes it easy
for you to add a Netstation's printer or plotter to the print spooler
and provides a script to test the operation
of the printer or plotter.
The "Printers, plotters" section of the administration script prompts you for all the information required to set up a printer or plotter on the print spooler.
Before you begin, you need to know the following:
To begin:
Printers, plotters
from the main menu.
Check operation of a printer or plotter
.
The administration script
uses ping
to verify that the Netstation is connected
to the network, then sends a test file to the printer.
This test bypasses the print spooler.
If the test fails, check that the Netstation and the printer are
properly connected and configured.
Add a printer or plotter.
The script prompts you as necessary. To access
the online help, at the prompt, type: ?
To learn how to print a file, see Printing a File.
To use HP 7440A, HP 7475A, HP 7550A, HP 7570A, HP 7595A, or HP 7596A plotters with HP Netstations, you must use a pseudo-terminal driver as follows:
To assign the plotter daemon to the master side of the pseudo-terminal driver, follow these steps:
cp /opt/hpxt/enware2/share/examples/hpnptyd.sh /sbin/init.d/hpnptyd.sh
ln -s /sbin/init.d/hpnptyd.sh /sbin/rc3.d/S400hpnptyd.sh ln -s /sbin/init.d/hpnptyd.sh /sbin/rc2.d/K400hpnptyd.sh
The change will take effect when the host is rebooted. If you wish to start the daemon now, type:
/sbin/init.d/hpnptyd.sh start
In the sample setup script:
/dev/ptym/ptyr8
specifies the master side
of the pseudo-terminal driver ptyr8
.
The name you choose should be as high as possible to reduce the
likelihood that another program will grab the pty.
Also, you will need it to set up the
slave side of the pseudo-terminal driver.
-x
specifies the terminal name or IP address of
the Netstation to which the printer is attached (xterm2
in this example).
-p
identifies the serial or the parallel port on the Netstation:
9100
to send the data to the serial port.
9102
to send the data to the second serial port (if present).
9101
to send the data to the parallel port.
To assign the slave side of the pseudo-terminal driver,
use sam
as follows:
sam
[Printers and Plotters]
.
[Actions]
pulldown, choose:
"Add Printer/Plotter Requiring Nonstandard Device File..."
Printer name
, choose a unique name.
You may use the Netstation's terminal name.
Printer Model/Interface
, use
hp7440a, hp7475a, hp7550a, hp7570a, hp7595a, or hp7596a.
Printer Device File Name
, type in the name of the slave side of
the pseudo-terminal driver.
For example, if the /etc/rc
entry has
/dev/ptym/ptyr8
, the printer device file name is /dev/pty/ttyr8
.
Printer device file name
if one exists.
This default name is incorrect.
Printer Class
to suit your system or leave it blank.
Before you begin you need to know the following:
smit
Devices
Printer/Plotter
Print Spooling
Add a Print Queue
Printer Attached to Xstation
smit
prompts you for all the necessary information.
To learn how to print a file, see Printing a File.
If you plan to use LPR and LPD, do the following:
On the Netstation that has the direct printer connection:
cd /opt/hpxt/enware2/xthome/bin
cp directives
ipaddress.directives
# noshow auto App lpd=lpd "Berkeley LPR printer daemon"
On every Netstation that will use the printer:
cd /opt/hpxt/enware2/xthome/bin
cp directives
ipaddress.directives
# Driver LPRdrvr=drvr/lprExt "Remote printer driver (BSD/RFC 1179)" # Auto extension Alias=drvr/aliasExt "Name alias extension" # prerequisite LPRdrvr = Alias
For more information about the directives file in general, see Customizing the directives File.
LPR queue =
queue:
host:
remqueue:
desc:
f
l
f
o
For example:
LPR queue = laser:dave1x:HPLaserJ:"Dave's desk"
LPR Leader =
queue:
string
This defines a string that will be sent to the printer before
the print file.
To include a non-printable character,
use \x
followed by a hex code or
\o
followed by an octal code.
The Esc character can be represented by \x1b
.
For example,
LPR Leader = laser:"\x1b(s20v(s1S"
switches a PCL printer to print text.
LPR Trailer =
queue:
string
This defines a string that will be sent to the printer after the print file. For example,
LPR Trailer = laser:"\x1b(s12v(s0S"
returns a PCL printer to graphics mode.
LPR Local Spool Threshold =
queue:
n
This variable defines how much Netstation memory should be used for buffering data. There are three possible cases:
0
This is a special case
that says that the print file should be sent to the printer directly,
without being buffered in memory or sent to a spool file.
The file is sent to the printer with a data file size
value of 0
(which means 'unknown').
For example,
LPR Local Spool Threshold = laser:0says that files are sent directly to the printer.
data file size
of 0. (They assume that the print file is empty.)
Do not set the spool threshold to 0 unless you are confident that
the LPD at the other end can accept it.
The LPD shipped with HP Netstation Software handles this situation correctly.
LPR Spool Path =
queue:
path
(where path is the directory that will contain spooled print files.
By default, this is
/opt/hpxt/enware2/spool
) created during HP Netstation Software installation.
To print a file, use:
lp -d
printername filename
For example:
lp -dxterm1par data.output
-d
option, make the local printer the default by
typing one of the following command lines in the
$HOME/.xsession
or (for HP VUE users)
$HOME/.vueprofile
file:
set lpdest=
printername
LPDEST=
printername
export LPDEST
To print a file, use:
lpr -P
printcap_name
lp -d
printcap_name
Examples:
lpr -P700xpr data.output
lp -d700xpr data.output
To print PostScript files, you can use:
lpr -P
printcap_name -h
file
For example:
lpr -P700xpr -h data.ps
You can query the configuration and status of your parallel printer using any SNMP-supported printer utility (for example, JetAdmin). For more information on SNMP, refer to Using SNMP.