SUMMARY: HP LJ-II printcap

From: Bill Campillo (va18276@cae802.tu.hac.com)
Date: Wed Aug 02 1995 - 11:48:32 CDT


Thanks for the help.
I requested printcap for an HP LaserJet II on a SPARC Station x
running 4.1.3_u1.

Here's the summary:
############################################################################

This is the printcap entries for the HP laser printer

hp|hp|HP laser:\
        :lp=/dev/bpp0:\
        :sd=/var/spool/hp:\
        :lf=/var/spool/hp/log:\
        :mx#0:sh:sb:sf:\
        :of=/usr/lib/hp.filter:

Spaces before : in printcap must be 'tab' and you need to create the dir
in /var/spool called hp, then 'touch' a file called hp. also add the
filter to /usr/lib.

This is the filter referenced in the hp printcap. It address the
carriage return/linefeed problem inherant to HP printers and UNIX.

#!/bin/sh
/usr/bin/echo -n '^[&k2G'
/usr/bin/cat
        exit 0

In 'vi' you press control+v then esc to enter the esc charater (^[)

The following information allows connection of a HP laser printer
to a Sun Sparc using 4.1.x OS. Fixes cr/lf problems.

#############################################################################

#
# HP Laserjet 2
#
hplj2_ee630|HPLJ2_EE630|eeps12|EEPS12:\
        :lp=/dev/ttya:\
        :br#9600:\
        :sh:\
        :ms=-cstopb,cs8,-evenp,-oddp,-istrip,-opost,onlcr,ixon:\
        :sd=/var/spool/hplj2_ee630:\
        :lf=/var/spool/hplj2_ee630/log:

#
hplj2_acadg015|HPLJ2_acadg015|sbeafac|SBEAFAC:\
        :lp=/dev/ttyb:\
        :br#19200:\
        :sh:\
        :ms=-cstopb,cs8,-evenp,-oddp,-istrip,-opost,onlcr,ixon:\
        :sd=/var/spool/hplj2_acadg015:\
        :lf=/var/spool/hplj2_acadg015/log:

#
hplj2_ben202|HPLJ2_BEN202|PS|ps|benedict|BENEDICT|lw|LW:\
        :lp=/dev/ttya:\
        :br#38400:\
        :mx#0:\
        :sh:\
        :ms=-evenp,-oddp,cstopb,-opost,-istrip,ixon,ixoff,crtscts:\
        :sd=/var/spool/hplj2_ben202:\
        :lf=/var/spool/hplj2_ben202/log:\
        :tr=\004:

#############################################################################

hplj2:\
        :lp=/dev/ttya:\
        :sd=/var/spool/hplj2:\
        :lf=/var/spool/hplj2/log:\
        :af=/var/spool/hplj2/acct:\
        :of=/usr/local/lib/hplaserjet:\
        :br#9600:pw#80:\
        :ms=-parity,-cstopb,-clocal,-cread,crtscts,ixon,-opost:\
        :sb:sf:sh:

----------------- begin /usr/local/lib/hplaserjet -------------------------

#!/bin/csh -f
#
# This is the output filter form use with HP laserjets I and II.
# All it does is send the escape sequence to the printer, so that:
# CR is mapped to CR
# LF is mapped to CR LF
# FF is mapped to CR FF
# note that on the next line the "^[" is a real escape character
# just in case it gets lost in the mail (if this is mailed)

/usr/bin/echo -n '^[&k2G'
/usr/bin/cat
if ($status == 0) then
        exit 0
else
        exit 1
endif

------------------- end /usr/local/lib/hplaserjet -------------------------

Don't forget to "chmod 755 /usr/local/lib/hplaserjet" and make doubly sure
that the "^[" above is truly a single escape character.

If you've never entered a real escape character into a file using "vi", all
you have to do in input mode is first type ctrl-V and then type the escape.
Then hit another escape to get yourself out of input mode.

Also, the printcap above is for a serial printer. If your printer is
parallel, then "lp=/dev/bpp0" and there are no "br" or "ms" sections.

#############################################################################

Special thanks to:
tim@access.access.com
don@mtu.edu
and to our local Sun pre-sales rep.

I also got a bunch of sales info for serial/parallel interfaces from
lisa@magma.COM



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:10:30 CDT