SUMMARY: Printcap for HP Laserjet 4Mp(lus)

From: Fernando Dias (fmmd@silvac.pt)
Date: Wed Jul 27 1994 - 21:51:40 CDT


Hi everybody,

Here goes the summary regarding the printcap support for a HP LaserJet 4Mp.

jwilliam@lattice.com (J. William Yu) said:

Here's my printcap entry for an HP4m. I'm not sure how much that will
help...
 
Also - I have the same copy of Printcap City. Sorry I couldn't get
you a later one...
 
--------------------------------------------------------------
hp4|hp4m-lsv|lptest:\
        :mx#0:lp=/var/spool/hp4/.null:\
        :sd=/var/spool/hp4:\
        :lf=/var/spool/hp4/log:\
        :of=/usr/lib/hpnp/hplj.of.sh:\
        :if=/usr/lib/hpnp/hplj.if.sh:
 

walsh@planet8.sp.paramax.com (Dan Walsh) said:

This is a entry form our /etc/printcap file on a 4.1.3 SunOS machine.
The first entry is for single sided paper printing and the second is for
double sided paper.
 
See Below:
 
hp4-u1n29|hp6|hp4_u1n29|Postscript & PCL HP U1P29 4Si MX:\
      :mx#0:\
      :lp=/var/spool/lpd/request/hp4-u1n29/.null:\
      :sd=/var/spool/lpd/request/hp4-u1n29:\
      :lf=/var/spool/lpd/log:\
      :of=/usr/lib/hpnp/hplj.of.sh:\
      :if=/usr/lib/hpnp/hplj.if.sh:
#
hp4-u1n29d|hp6d|hp4_u1n29d|Postscript & PCL HP U1P29 4Si MX(2 sided):\
      :mx#0:\
      :lp=/var/spool/lpd/request/hp4_u1n29/.null:\
      :sd=/var/spool/lpd/request/hp4_u1n29d:\
      :lf=/var/spool/lpd/log:\
      :of=/usr/lib/hpnp/hplj.of.sh:\
      :if=/usr/lib/hpnp/hplj.if.sh:
 

flosbach@vsun04.ag01.kodak.com (Juergen Flosbach) said:

Hallo
 
I havn't got a printcap entry for the HP 4MPlus. But I have the the entry for
HP 4M. I hope this will help you too.
 
 
----- Begin Included Message -----
 
> I just purchased and installed a HP4M laser printer on my Sun.
> I'm stoked - it works wonderfully! There seems to be a lot of net
> traffic about this combination, so I decided to post about the
> experience.
>
> Of course, your mileage may vary - and if your a mighty Sun God
> sysadmin this message isn't for you. I'm not really a system administrator,
> but I play one at home...
>
> My system is a SS1 under 4.1.3 - the printer is driven through
> a serial port (ttyb). All of my examples relate to this configuration.
>
> 0. Unpack the printer, perform setup. Print all the neat diagnostic
> pages. Set the serial configuration for RS-232, XON/XOFF handshaking
> and 9600 baud.
>
> 1. Pick the serial port which will be used. Check /etc/ttytab to ensure
> that getty is disabled for that port.
>
> 2. Update /etc/printcap - here is my entry:
>
> lp|myprinter|hp4m:\
> :lp=/dev/ttyb:\
> :br#9600:\
> :sh:\
> :ms=-parity,onlcr,ixon:\
> :sd=/var/spool/lpd:\
> :st=/var/spool/lpd/status:
>
> These definitions are spelled out in the printcap manpage. In english,
> this says to use the ttyb serial port at 9600 baud, no parity, new lines
> are CR/LF and use XON/XOFF handshaking. Inhibit the banner page.
> Spool the jobs to /var/spool/lpd, and keep the status messages there too.
>
> 3. Ensure that lpd is started. My system starts lpd in /etc/rc
>
> 4. Halt the system. While under control of the monitor, type 'printenv'
> and check the serial configuration. Mine says:
>
> ttyb-mode 9600,8,n,1,-
> ttyb-rts-dtr-off true
> ttyb-ignore-cd true
>
> Of course, you can change these values w/'setenv'
>
> (I would not be surprised to learn that this step is completely
> superfluous and that only the printcap entry matters. The semester is
> over in 11 weeks, and I'll take a look then!)
>
> 5. Connect the RS-232 cable between the printer and your Sun.
> My HP4MP uses a DB-9 (female) and my SS1 uses a DB-25 (female).
> HP does not supply a cable, so plan accordingly! The connection
> is straight through (i.e. no null adapter required).
>
> 6. Boot the system. Use 'lpr' to send a small ASCII job to the printer.
> If you get garbage, or nothing - check the RS-232 parameters on the
> printer. Then check the printcap. Is lpd running? Check /var/adm/messages
> for clues. I did try to use hardware handshaking, but gave up after an
> attempt or two.
>
> 7. If your previous experiment works, try a PS file. I tried some quick
> examples w/TeX through dvips - they worked great!
>
 
>From Eric Havinga:
 
On an IPX running 4.1.3 we use this entry:
 
hp2:\
        :lp=/dev/ttyb:\
        :br#19200:rw:fc#0000374:fs#0000003:xc#0:xs#0040040:sh:\
        :sd=/usr/spool/hp2:\
        :lf=/usr/spool/hp2/log:mx#0:\
        :if=/usr/spool/hp2/hpfilter:
 
 
 
This is the hpfilter:
 
#!/bin/sh
#
# Save the stdin under an arbitrary (unused) file descriptor so
# we don't lose the input before we need it
#
 
exec 5<&0
exec 0</dev/null
 
PATH=/bin:/usr/bin:/usr/ucb:/etc:/usr/etc
export PATH
 
USER=UNKNOWN
HOST=`hostname`
DATE=`date`
 
# Sleep time (in seconds) to wait for emulation timeout (Serial Comm)
TIMEOUT=5
 
#
# Parse off the command line for the login and host information
#
 
for i
do case $1 in
        -n) USER=${2-$USER}
                shift
                ;;
        -n*) USER=`echo $1 | sed "s/^..//"`
                ;;
        -h) HOST=${2-$HOST}
                shift
                ;;
        -h*) HOST=`echo $1 | sed "s/^..//"`
                ;;
        *)
                ;;
        esac
        if test $# -gt 0
        then shift
        fi
done
 
#
# Configuration dependent variables
#
LOG=/usr/spool/hp2/log
SETUPFILE=/usr/spool/hp2/setup
RESETFILE=/usr/spool/hp2/reset
 
#
# Test LOG for writability
#
 
if [ ! -w $LOG ]
then
    echo "Can't open log file $LOG for writing." | mail root $USER
    exit 2
fi
 
#
# Begin the log entry
#
 
echo `date` >> $LOG
echo "hpfilter: Beginning File Transfer" >> $LOG
 
#
# Recover the stdin file descriptor
#
 
exec 0<&5
 
#
# Communications option is serial or parallel, so all we have
# to do is put the data onto stdout. Then sleep until the comm
# timeout on the printer is reached, so no other jobs can be
# concatenated onto this one
#
 
( cat $SETUPFILE - $RESETFILE ) 2>> $LOG
sleep $TIMEOUT
 
#
# Log that we've finished, and exit happily
#
 
echo `date` >> $LOG
echo "hpfilter: File Transfer Complete" >> $LOG
echo >> $LOG
 
exit 0
 
 
This is the resetfile:
 
 
^[E
 
And this the setup:
 
 
^[&k2G
 
>From Mel :
 
#This entry uses the Sun transcript filters
#
lw|lw|ps|postscript:\
        :lp=/dev/lw:sd=/var/spool/lw:rg=lw1allow:\
        :lf=/var/spool/lw/lw-log:af=/var/spool/lw/lw.acct:\
        :br#38400:rw:fc#0000374:fs#0000003:xc#0:xs#0040040:mx#0:sf:sb:\
        :if=/usr/tran/sparc/lib/psif:\
        :of=/usr/tran/sparc/lib/psof:gf=/usr/tran/sparc/lib/psgf:\
        :nf=/usr/tran/sparc/lib/psnf:tf=/usr/tran/sparc/lib/pstf:\
        :rf=/usr/tran/sparc/lib/psrf:vf=/usr/tran/sparc/lib/psvf:\
        :cf=/usr/tran/sparc/lib/pscf:df=/usr/tran/sparc/lib/psdf:
 
Thanks
 
***************************************************************************
# #
# Luis F. Vallejo Support #
# Senior Support Engineer Polaris Service Inc. #
# Internet : lv@polaris1.com 257 Cedar Hill Street #
# Phone : 800-626-1661 Marlborough,MA 01752-3005 #
# U.S.A. #
# #
***************************************************************************
 
 
----- End Included Message -----
 

Thanks everybody for the prompt help. I hope this summary helps other people.

............................................................................
.. ..
.. Fernando Mariano Dias E-Mail: fmmd@silvac.pt ..
.. ..
.. Silvac, Lda. Tel: (+351) 1 3951378 ..
.. Av. 24 de Julho, 6 - A Tel: (+351) 1 601369 ..
.. 1200 Lisboa, Portugal - Europe Fax: (+351) 1 601206 ..
............................................................................



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:09:06 CDT