Subject: Re: Need with help with printer...
To: None <netbsd-help@netbsd.org>
From: Roger Brooks <R.S.Brooks@liverpool.ac.uk>
List: netbsd-help
Date: 02/22/1999 17:24:08
On 19 Feb 1999, Perry E. Metzger wrote:

>
>Brian Stark <bstark@siemens-psc.com> writes:
>> I'm running 1.3.3/i386 and I am seeing the following message from the
>> kernel each time I try to print to a HP LaserJet 5L:
>> 
>>   Feb 19 00:09:04 raisin /netbsd: lpt0: offline
>> 
>> What is causing this to come out?
>
>The kernel is detecting that a line on the connector to the printer is 
>asserting the printer is in an offline state. Why? Who knows.

I have a similar problem with an aged Canon PW1156 dot-matrix printer.
What is happening is that the lpt driver asserts the INIT line (which is
supposed to reset the printer to its power-on state) every time the
device is opened.  Examination of the driver code shows that the driver
then expects the printer to come ready within 250 msec, and if it doesn't
you get the above message.  If the device doesn't come ready within 16 sec
(which could be a real possibility with something like an LJ IIISi with
PostScript, which takes ages to reset itself), the open returns EBUSY.

My solution is to use the non-resetting version of the device (minor number
+ 64):

	cd /dev
	./MAKEDEV lpt64

Then edit /etc/printcap (assuming you're using the BSD spooler) and change
/dev/lpt0 to /dev/lpt64.  Of course now you will have to make sure that
one way or another you send a PCL reset to the printer before every file.


Roger

------------------------------------------------------------------------------
Roger Brooks (Systems Programmer),          |  Email: R.S.Brooks@liv.ac.uk
Computing Services Dept,                    |  Tel:   +44 151 794 4441
The University of Liverpool,                |  Fax:   +44 151 794 4442
PO Box 147, Liverpool L69 3BX, UK           | 
------------------------------------------------------------------------------