*BSD News Article 24258


Return to BSD News archive

Newsgroups: comp.os.386bsd.questions
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!usenet.ins.cwru.edu!news.csuohio.edu!stever
From: stever@csuohio.edu (Steve Ratliff)
Subject: Re: 0.9 Parallel Printer problems
Message-ID: <1993Nov21.033950.16139@news.csuohio.edu>
Sender: news@news.csuohio.edu (USENET News System)
Organization: Cleveland State University
X-Newsreader: Tin 1.1 PL5
References: <2clahg$a91@panix.com>
Date: Sun, 21 Nov 1993 03:39:50 GMT
Lines: 90

Douglas Williams (drw@panix.com) wrote:
: In <9311192341.AA17083@cthulhu> mike.long@analog.com (Mike Long) writes:
: 
: >I tried to get my parallel printer to work with NetBSD 0.9 last night.
: >I couldn't get it working with either the lpt or the lpa drivers.
: [...]
: 
: I had problems similar to these.  I tried all the port addresses 
: and saw no indication that the kernel was detecting my parallel 
: port -- until I accidentally booted the machine with the printer 
: cable disconnected.  I finally saw the line
: 	lpt0 at 0x3bc - 0x3c3 irq 7 on isa
: amongst the startup messages.  The same worked for lpa0.  I connected
: the cable and restarted lpd, and it proceeded to send all the queued
: jobs to the printer.  
: 
: I'm still having problems with the output though.  Does anyone know if
: there exists an appropriate printcap entry and filters for laserjetII
: compatibles, or specifically for a Okidata OL400?

	I got the following filters from the printer.shar file posted on
agate by Andrew Moore.  I made two very, very minor alterations to the
two filters.  Since the master reset escape sequence seems to set my
Okidata 400 into landscape mode (non-Laserjet standard behavior) I
added an explicit portrait escape sequence to if_ljet3.  I also changed
the Gutter and width on the df_ljet3, (where it says don't change this
:)) to decrease the margins and allow close to 80 characters in each
column.


# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	df_ljet3
#	if_ljet3
#	printcap
#
echo x - df_ljet3
sed 's/^X//' >df_ljet3 << 'END-of-df_ljet3'
X#!/bin/sh
X# Page layout variables
XLINES=75
XTOPMARGIN=4
XLEFTMARGIN=1
XVMI=5
XGUTTER=5
X# internal variables: DO NOT CHANGE
Xwidth=`expr 170 + 2 \* $GUTTER`
X# Reset the printer
Xprintf "\033E"
X# set line termination to cr->cr; lf->cr+lf; ff->cr+ff
Xprintf "\033&k2G"
X# select landscape orientation
Xprintf "\033&l1O"
X# setup the page: vmi, enable perf skip
Xprintf "\033&l${VMI}c1L"
X# Top margin TOPMARGIN lines
Xprintf "\033&l${TOPMARGIN}E"
X# Text Length $LINES lines
Xprintf "\033&l${LINES}F"
X# left margin of LEFTMARGIN chars
Xprintf "\033&a${LEFTMARGIN}L"
X# select 16.6 pitch font
Xprintf "\033(s16.6H"
Xcat - | sed "//d" | pr -2 -n:${GUTTER} -w${width} -e -f -l${LINES} -b -
Xprintf "\033E"
END-of-df_ljet3
echo x - if_ljet3
sed 's/^X//' >if_ljet3 << 'END-of-if_ljet3'
X#!/bin/sh
Xprintf "\033E\033&k2G\033&l0O"
Xcat -
Xprintf "\033E"
X
END-of-if_ljet3
echo x - printcap
sed 's/^X//' >printcap << 'END-of-printcap'
X#	@(#)printcap	5.3 (Berkeley) 6/30/90
X
Xlp|local laser printer lpt1:\
X	:lp=/dev/lpa0:sd=/var/spool/lpd:lf=/var/log/lpd-errs:sh:\
X	:if=/usr/local/filters/if_ljet3:\
X	:df=/usr/local/filters/df_ljet3:
END-of-printcap
exit