Operating System - HP-UX
1820895 Members
3872 Online
109628 Solutions
New Discussion юеВ

Adding/printing in HP-UX 11.0

 
Felipe Rodriguez_1
Frequent Advisor

Adding/printing in HP-UX 11.0

I have read a few posts on this issue but can't figure out how to solve my problem.

I'm working on a test box trying to become familiar with this OS (I'm a newbie). I'm trying to add/print to a network printer.

I cannot find a printer installed, looked in /etc/lp/member.

Tried adding with command
lpadmin -pPRINTER_NAME -mLASERJET4 -v/dev/null

This worked but I can't print: "can't accept request for destination". I figure I need to tell it where in the network it is (IP Address), but don't know how.
Also, the printer is a Laserjet 8100N but I could not find anything closely resembling this model in /usr/lib/lp/model. Don't know if this is a problem.

Can't use SAM, but I would like to do it manually anyway.

Help!

9 REPLIES 9
Geoff Wild
Honored Contributor

Re: Adding/printing in HP-UX 11.0

enable the queue:

enable PRINTER_NAME

Or accept it:

accept PRINTER_NAME

To see status, do a:

lpstat -pPRINTER_NAME

Rgds...Geoff





Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Jeff_Traigle
Honored Contributor

Re: Adding/printing in HP-UX 11.0

You're right... you need to tell it where the remote printer is located. See the following thread:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=263186

Also, for HP printers using the JetDirect print servers, you can install the JetDirect Printer Installer software:

http://h20180.www2.hp.com/apps/Lookup?h_query=jet+direct+printer+installer&h_tool=software&h_lang=en

This will give you functionality control for the various HP models, which you will not have if you set them up as remote printers with lpadmin.
--
Jeff Traigle
Felipe Rodriguez_1
Frequent Advisor

Re: Adding/printing in HP-UX 11.0

The enable command was successful, but I still get the same reply when I try to print "can't accept...". By the way, the command I used is:

lp -dPRINTER_NAME /.profile

I did the lpstat and the return is, "idle", "enabled" and "fence priority 0"
DCE
Honored Contributor

Re: Adding/printing in HP-UX 11.0

Felipe,
Look at the following link - it tells you how to install the printer configuration you want, as well as giving the the download location from HP

http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?lang=en&cc=us&objectID=bpj07384

HTH
Dave
Felipe Rodriguez_1
Frequent Advisor

Re: Adding/printing in HP-UX 11.0

Is it possible to do this without installing the JD software?
Felipe Rodriguez_1
Frequent Advisor

Re: Adding/printing in HP-UX 11.0

OK, I installed the software and it looks like it works. But I still can't print.

Using the menu options, I can print a test page, but I can't print something like my .profile file.

Grrr.
Felipe Rodriguez_1
Frequent Advisor

Re: Adding/printing in HP-UX 11.0

I couldn't end a couple of root lp jobs, so I ended up rebooting. After that, I removed the configured printer and added a new one.

Printer is now working.

Thanks.
Geoff Wild
Honored Contributor

Re: Adding/printing in HP-UX 11.0

Noew that you have the software installed - here's how I add a queue:

addqueue -i 9998 -q QUEUENAME -h pinrtername.yourdomain.com


Also, this script is handy:


# cat /opt/hpnpl/bin/lpst
#!/bin/sh
#
# check printer status
# Geoff Wild

if [ $# -lt 1 -o \( $# -gt 1 -a $# -lt 4 \) ]
then
echo "Usage:"
echo "lpst \"printer\""
echo "Example:"
echo "lpst W052"
exit 1
fi
echo " "
/usr/sbin/ping $1 -n 2
echo " "
lpstat -p$1 -v$1
echo " "
echo "Output Requests"
echo "-----------------------------------------------------------"
lpstat -o$1
echo " "
lpstat -r
echo " "

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Bill Hassell
Honored Contributor

Re: Adding/printing in HP-UX 11.0

It's really important to understand that there are TWO network printing methods for HP-UX. The first (and least reliable, least configurable) is to configure the printer as a "remote" printer. This uses the lpr/lpd protocol and disables all the lp -o options. This is required if the remote printer uses a non-HP LAN card or the printer is really a print server such as Windows. The man page for lpadmin shows an example for adding a remote printer.

The other method is to use the JetDirect software. Now (newer) HP LAN cards do know how to use lpd/lpr protocol but as mentioned, this is far too primitive to be of much use. So you download the current version of HP Printer Installer (hppi) and either run the hppi programs and follow the menus, or use the addqueue command (which is much simpler). The LAN card must already have an IP address (and subnet mask and router) assigned to it (usuallty from the front panel of the printer) before using addqueue. The command would be:

/usr/hpnpl/bin/addqueue -h 12.34.56.78 -q my_laserjet

where -h is the IP address (no hostname is necessary) and -q is the print queue name, whatever you'd like to call the printer. hppi and addqueue do not use the model directory because network printing requires a special program to communicate (hpnpf) with the LAN cards. The script is picked automatically based on the printer model and the options are listed in the man page, most typically: man net_ljx000. See also man pages for hpnpadmin for troubleshooting. SAM adds network printers (ie, JetDirect LAN cards) by running hppi.


Bill Hassell, sysadmin