Operating System - HP-UX
1752676 Members
6170 Online
108789 Solutions
New Discussion юеВ

Printers on HP-UX Version 11

 
SOLVED
Go to solution
markab2
Occasional Contributor

Printers on HP-UX Version 11

Hi

Ive just added an HP2564B printer to our unix box using SAM and add printer option etc.
The printer is connected to a JetDirect box and vi TCP/IP.

When i use the lp -dPRINTER filename for a text based document it just line feeds and prints nothing. Are there other commands needed for these sort of printers.

We used to print via HP3000 Spoolmate without problems.

Hope someone can help.

THanks

Mark
4 REPLIES 4
OldSchool
Honored Contributor

Re: Printers on HP-UX Version 11

1) this seems to be some kind of dot-matrix printer, correct?
2) from what I can find, its 10-15 years old?

"...HP2564B printer to our unix box using SAM and add printer option etc..."

well, the "add printer option etc..." is the important part. what kind of printer (local, remote, networked) did you add in sam? What model script did you use?

Bill Hassell
Honored Contributor
Solution

Re: Printers on HP-UX Version 11

Did you use hppi or addqueue to add the printer, or did you use SAM? SAM will present 2 very different options: remote and network printer. When you have a JetDirect box, never use remote.

Now to see if the printer will work at all, use the hpnpf command like this:

hpnpf -x 12.34.56.78 -N /etc/profile

where: 12.34.56.78 is the JetDirect address. If this works, delete the printer and use addqueue to add the printer like this:

addqueue -h 12.34.56.78 -q my2564b -i 1020 -r off -t off -b off

If you want separator (banner) pages, use -b on. To find the model script ID number, use addqueue -l


Bill Hassell, sysadmin
markab2
Occasional Contributor

Re: Printers on HP-UX Version 11

Cheers Bill

That worked a treat using hpnpf

If I use addqueue to add the printer, do I need to add it to the host file. Also would you use hpnpf to print or lp. Would you use lpstat to display the printer.

Hope you can help.

Thanks

Mark
Bill Hassell
Honored Contributor

Re: Printers on HP-UX Version 11

> That worked a treat using hpnpf

hpnpf is the underlying network communication program for JetDirect software.

> If I use addqueue to add the printer, do I need to add it to the host file.

I am not a fan of printer hostnames. The IP address is what will ultimately be used to communicate with the JetDirect box and hostnames can get messy when the hostname resolver is not well understood or managed. The files /etc/nsswitch.conf, /etc/resolv.conf and /etc/hosts (and others) control where the symbolic name can be translated into an IP address. Usually, DNS, NIS and LDAP services are managed by other groups and they don't always keep things up to date. Since printers are typically added once, using the IP address results in more success.

> Also would you use hpnpf to print or lp. Would you use lpstat to display the printer.

hpnpf just prints simple ASCII files with no special features like landscape, duplex, compressed format, etc. You use the lp command so you can take advantage of the printer script's options. lpstat is a very primitive tool and is only useful to see if anything is queued up for the printers.


Bill Hassell, sysadmin