printcap for HP DeskJet 500 as serial printer
Hello I'm trying to setup a HP DeskJet 500 as a serial printer under Linux (SuSE 6.4). It also prints, but, although the source document can be recognized, the printouts are filled with garbage (funny characters, lines and dots in random places, ...) and typically printed on many more pages than intended. It works when attached to the parallel port and it works as a serial (and parallel) printer under M$-Windows, so the problem is probably the configuration of the serial port under Linux, although the default settings seem to match those of the printer. I've been experimenting a bit using stty and different printcap entries, but so far without success. However plain (us-)ascii files dumped directly to /dev/ttyS0 do come out OK. The printcap generated by YaST (and which doesn't work) looks as follows (comments excluded): ascii|lp1|djet500-a4-ascii-mono-300|djet500 a4 ascii mono 300:\ :lp=/dev/ttyS0:\ :br#9600:\ :ty=ixon -imaxbel -ixany -ixoff -crtscts:\ :sd=/var/spool/lpd/djet500-a4-ascii-mono-300:\ :lf=/var/spool/lpd/djet500-a4-ascii-mono-300/log:\ :af=/var/spool/lpd/djet500-a4-ascii-mono-300/acct:\ :if=/var/lib/apsfilter/bin/djet500-a4-ascii-mono-300:\ :la@:mx#0:\ :tr=:cl:sh:sf: # lp|lp2|djet500-a4-auto-mono-300|djet500 a4 auto mono 300:\ :lp=/dev/ttyS0:\ :br#9600:\ :ty=ixon -imaxbel -ixany -ixoff -crtscts:\ :sd=/var/spool/lpd/djet500-a4-auto-mono-300:\ :lf=/var/spool/lpd/djet500-a4-auto-mono-300/log:\ :af=/var/spool/lpd/djet500-a4-auto-mono-300/acct:\ :if=/var/lib/apsfilter/bin/djet500-a4-auto-mono-300:\ :la@:mx#0:\ :tr=:cl:sh:sf: # raw|lp3|djet500-a4-raw|djet500 a4 raw:\ :lp=/dev/ttyS0:\ :br#9600:\ :ty=ixon -imaxbel -ixany -ixoff -crtscts:\ :sd=/var/spool/lpd/djet500-a4-raw:\ :lf=/var/spool/lpd/djet500-a4-raw/log:\ :af=/var/spool/lpd/djet500-a4-raw/acct:\ :if=/var/lib/apsfilter/bin/djet500-a4-raw:\ :la@:mx#0:\ :tr=:cl:sh:sf: # If anyone could help with suggestions for how to modify this or perhaps even with a working printcap file, I would be most grateful. /Markus Svensén svensen@cns.mpg.de # # Copyright (c) 1983 Regents of the University of California. # All rights reserved. # # Redistribution and use in source and binary forms are permitted # provided that this notice is preserved and that due credit is given # to the University of California at Berkeley. The name of the University # may not be used to endorse or promote products derived from this # software without specific prior written permission. This software # is provided ``as is'' without express or implied warranty. # # @(#)etc.printcap 5.2 (Berkeley) 5/5/88 # # DecWriter over a tty line. #lp|ap|arpa|ucbarpa|LA-180 DecWriter III:\ # :br#1200:fs#06320:tr=\f:of=/usr/lib/lpf:lf=/usr/adm/lpd-errs: #lp:lp=/dev/lp0:sd=/usr/spool/lp0:of=/usr/lib/lpf: lf=/usr/adm/lpd-errs # # Generic printer: #lp:lp=/dev/lp0:sd=/var/spool/lpd/lp0:sh # # typical remote printer entry #ucbvax|vax|vx|ucbvax line printer:\ # :lp=:rm=ucbvax:sd=/usr/spool/vaxlpd:lf=/usr/adm/lpd-errs: #varian|va|Benson Varian:\ # :lp=/dev/va0:sd=/usr/spool/vad:mx#2000:pl#58:px#2112:py#1700:tr=\f:\ # :of=/usr/lib/vpf:if=/usr/lib/vpf:tf=/usr/lib/rvcat:cf=/usr/lib/vdmp:\ # :gf=/usr/lib/vplotf:df=/usr/local/dvif:\ # :vf=/usr/lib/vpltdmp:lf=/usr/adm/lpd-errs: #versatec|vp|Versatec plotter:\ # :lp=/dev/vp0:sd=/usr/spool/vpd:sb:sf:mx#0:pw#106:pl#86:px#7040:py#2400:\ # :of=/usr/lib/vpfW:if=/usr/lib/vpsf:tf=/usr/lib/vcat:cf=/usr/lib/vdmp:\ # :gf=/usr/lib/vplotf:vf=/usr/lib/vpltdmp:lf=/usr/adm/lpd-errs:\ # :tr=\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\ #\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\ #\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n: # #lp|panasonic:lp=/dev/lp1:sd=/usr/spool/lp/panasonic:lf=/usr/bin/mail:mc#1:\ # ft=$$c$$p$$r$$f:hl#2:fl#3:ht=$$c$$n$$r$$t:sh: # # HP Laser jet plus #lp|hpj:\ # :lp=/dev/lp1:\ # :sd=/usr/spool/lp1:\ # :mx#0:\ # :of=/usr/spool/lp1/hpjlp: # :lf=/usr/spool/lp1/hp-log: # #lp|Generic dot-matrix printer entry:\ # :lp=/dev/lp1:\ # :sd=/var/spool/lp1/lp:sh:\ # :if=/usr/bin/lpf:\ # :df=/var/spool/lp1/filter.ps:\ # :tf=/var/spool/lp1/filter.ps:\ # :af=/var/spool/lp1/lp-acct:\ # :lf=/var/spool/lp1/lp-err: ### BEGIN apsfilter: ### djet500 a4 mono 300 ### # Warning: Configured for apsfilter, do not edit the labels! # apsfilter setup Mon Nov 19 20:47:39 CET 2001 # ascii|lp1|djet500-a4-ascii-mono-300|djet500 a4 ascii mono 300:\ :lp=/dev/ttyS0:\ :br#9600:\ :ty=ixon -imaxbel -ixany -ixoff -crtscts:\ :sd=/var/spool/lpd/djet500-a4-ascii-mono-300:\ :lf=/var/spool/lpd/djet500-a4-ascii-mono-300/log:\ :af=/var/spool/lpd/djet500-a4-ascii-mono-300/acct:\ :if=/var/lib/apsfilter/bin/djet500-a4-ascii-mono-300:\ :la@:mx#0:\ :tr=:cl:sh:sf: # lp|lp2|djet500-a4-auto-mono-300|djet500 a4 auto mono 300:\ :lp=/dev/ttyS0:\ :br#9600:\ :ty=ixon -imaxbel -ixany -ixoff -crtscts:\ :sd=/var/spool/lpd/djet500-a4-auto-mono-300:\ :lf=/var/spool/lpd/djet500-a4-auto-mono-300/log:\ :af=/var/spool/lpd/djet500-a4-auto-mono-300/acct:\ :if=/var/lib/apsfilter/bin/djet500-a4-auto-mono-300:\ :la@:mx#0:\ :tr=:cl:sh:sf: # raw|lp3|djet500-a4-raw|djet500 a4 raw:\ :lp=/dev/ttyS0:\ :br#9600:\ :ty=ixon -imaxbel -ixany -ixoff -crtscts:\ :sd=/var/spool/lpd/djet500-a4-raw:\ :lf=/var/spool/lpd/djet500-a4-raw/log:\ :af=/var/spool/lpd/djet500-a4-raw/acct:\ :if=/var/lib/apsfilter/bin/djet500-a4-raw:\ :la@:mx#0:\ :tr=:cl:sh:sf: # ### END apsfilter: ### djet500 a4 mono 300 ###
I use something fairly simple for plotting. This entry simply passes the data to the serial port. No filtering is done. My cad package generates a hpgl file and the plotter reads it. As a last resort setserial can be used to change serial port parameters. Brian Marr. # ##RAW PRINTER ENTRY plotter|lp4:\ :lp=/dev/ttyS1:\ :sd=/var/spool/lpd/plotter:\ :sh:\ :mx#0: On Friday 23 November 2001 18:42, you wrote:
Hello
I'm trying to setup a HP DeskJet 500 as a serial printer under Linux (SuSE 6.4). It also prints, but, although the source document can be recognized, the printouts are filled with garbage (funny characters, lines and dots in random places, ...) and typically printed on many more pages than intended.
It works when attached to the parallel port and it works as a serial (and parallel) printer under M$-Windows, so the problem is probably the configuration of the serial port under Linux, although the default settings seem to match those of the printer. I've been experimenting a bit using stty and different printcap entries, but so far without success. However plain (us-)ascii files dumped directly to /dev/ttyS0 do come out OK. The printcap generated by YaST (and which doesn't work) looks as follows (comments excluded):
ascii|lp1|djet500-a4-ascii-mono-300|djet500 a4 ascii mono 300:\
:lp=/dev/ttyS0:\ :br#9600:\ :ty=ixon -imaxbel -ixany -ixoff -crtscts:\ :sd=/var/spool/lpd/djet500-a4-ascii-mono-300:\ :lf=/var/spool/lpd/djet500-a4-ascii-mono-300/log:\ :af=/var/spool/lpd/djet500-a4-ascii-mono-300/acct:\ :if=/var/lib/apsfilter/bin/djet500-a4-ascii-mono-300:\ :la@:mx#0:\ :tr=:cl:sh:sf:
# lp|lp2|djet500-a4-auto-mono-300|djet500 a4 auto mono 300:\
:lp=/dev/ttyS0:\ :br#9600:\ :ty=ixon -imaxbel -ixany -ixoff -crtscts:\ :sd=/var/spool/lpd/djet500-a4-auto-mono-300:\ :lf=/var/spool/lpd/djet500-a4-auto-mono-300/log:\ :af=/var/spool/lpd/djet500-a4-auto-mono-300/acct:\ :if=/var/lib/apsfilter/bin/djet500-a4-auto-mono-300:\ :la@:mx#0:\ :tr=:cl:sh:sf:
# raw|lp3|djet500-a4-raw|djet500 a4 raw:\
:lp=/dev/ttyS0:\ :br#9600:\ :ty=ixon -imaxbel -ixany -ixoff -crtscts:\ :sd=/var/spool/lpd/djet500-a4-raw:\ :lf=/var/spool/lpd/djet500-a4-raw/log:\ :af=/var/spool/lpd/djet500-a4-raw/acct:\ :if=/var/lib/apsfilter/bin/djet500-a4-raw:\ :la@:mx#0:\ :tr=:cl:sh:sf:
#
If anyone could help with suggestions for how to modify this or perhaps even with a working printcap file, I would be most grateful.
/Markus Svensén svensen@cns.mpg.de
---------------------------------------- Content-Type: text/plain; charset="us-ascii"; name="printcap" Content-Transfer-Encoding: 7BIT Content-Description: ---------------------------------------- ---------------------------------------- Content-Type: text/plain; charset="us-ascii"; name="Attachment: 2" Content-Transfer-Encoding: 7BIT Content-Description: ----------------------------------------
participants (2)
-
Brian Marr
-
Markus Svensén