[comp.sys.sun] HP IIP & SPARCstations

jeh@mech4.coe.northeastern.edu (James Hinds) (03/22/91)

I am involved with setting up a series of SUN SPARCstations for novice
Unix users.  They are coming from DOS and bringing their HP printers with
them.  I have been unsuccessful to date in having plain ASCII text be
printed.  The major problem seems to be in serial communication.  If I get
any output, it continues to print, even after the file is removed from the
system.  Sometimes the system doesn't show any queued files but will
print.  And sometimes the printer goes code 22 [error in the buffer].  I
have tried a variety of serial cable's and am presently using a genuine HP
serial cable.  I am using an input filter 'iffil', that I grabbed off
Sun-Spots and have also tried having 'offil', but this doesn't change the
output problem. 

SUN has been very useless, they cannot agree on what filters or printcap
one should be using.  HP doesn't want to address this as it is seen as
software, i.e. UNIX problem.

I am sure there is someone who is using SUN's and HP's together.  And this
may have already been answered elsewhere.  But the Spots aren't being
received here anymore.  I desire to hear from someone who has solved this
[I'm sure simple] problem.  Please contact me on E-mail at:
jeh@meceng.coe.northeastern.edu 	or Jim Hinds 617-437-5558

Below is part of the printcap I have been using with duplicate entries as
I have been testing.

#------- HP LaserJet attached to this machine on serial port A
#
hps|hplaser|HP-LaserJet-IIP:\
        :lp=/dev/ttya:rm=mech2:\
        :br#9600:rw:\
        :fc#0177777:fs#0321:\
        :mc=1:mx#0:sh:\
        :sd=/var/spool/hps:\
        :ms=-parity,-cstopb,-clocal,-cread,crtscts,-opost:\
        :lf=/var/spool/hps/error_log:\
#       :if=/usr/local/print/iffil:\
#       :of=/usr/local/print/offil:
#       :of=/usr/lib/hpfilter:
        :of=/var/spool/hp/in_filter:
#
#------- HP LaserJet attached to this machine on parallel port 1
#------- of a 386i
#This entry sent from Sun
hp|mech2-pp0|hpIIp:\
        :lp=/dev/pp0:rm=mech2:\
        :mx#0:sh:\
        :sd=/var/spool/hp:\
        :ms=-parity,-cstopb,-clocal,-cread,ixon:\
        :lf=/var/spool/hp/error_log:\
#       :of=/usr/lib/hpfilter:
        :of=/var/spool/hp/in_filter:

	Thanks for your time and efforts.

elliss@eecae.ee.msu.edu (Stew Ellis) (03/26/91)

jeh@mech4.coe.northeastern.edu (James Hinds) writes:

>I am involved with setting up a series of SUN SPARCstations for novice
>Unix users.  They are coming from DOS and bringing their HP printers with
>them.

I have just hooked up an original HP Deskjet to a Sun 3 running SunOS 4.1
and Openwindows 2.  My printcap follows:

lp|hplj|HP LaserJet:\
        :lp=/dev/ttyb:\
        :sd=/usr/spool/lp:\
        :br#19200:pw#80:\
        :ms=-parity,-cstopb,-clocal,-cread,crtscts,ixon,-opost:\
        :sh:of=/usr/lib/hplaserjet:

The of (/usr/lib/hplaserjet) consists of:

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

        NOTE:   Before the characters k2G you need to perform the following 
                commands:

                CTRL-V,CTRL-[,&

                This imbeds an escape code and & code into the file.  These 
                codes WILL NOT show up when you cat the file, only when you 
                vi the file.

        Chmod 555 hplaserjet

        lpr a test file.

I have successfully sent both ASCII and binary (xpr output of xwd) to the
printer.  I am having some trouble with ghostscript 2.11 but I suspect it
is not the printcap or filter.

Good luck.

  R.Stewart (Stew) Ellis                    / _______________________________/
  elliss@frith.egr.msu.edu            ENGINEERING & MANAGEMENT INSTITUTE