Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Jan 2008 15:34:53 +0000
From:      Anton Shterenlikht <mexas@bristol.ac.uk>
To:        freebsd-questions@freebsd.org
Subject:   Solved: Re: /dev/lpt0: Device busy, lptcontrol: ioctl: Operation not supported
Message-ID:  <20080124153453.GA1546@mech-aslap33.men.bris.ac.uk>
In-Reply-To: <20080123124756.GA1246@mech-aslap33.men.bris.ac.uk>
References:  <20080123124756.GA1246@mech-aslap33.men.bris.ac.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jan 23, 2008 at 12:47:56PM +0000, Anton Shterenlikht wrote:
> 
> My printing stopped working quite suddenly.
> 
> Until today I used FBSD-6.3-prerelease (today I updated to 6.3-stable)
> on compaq armada 1700 laptop to print on a parallel HP laserjet 2100
> printer in text mode and for postscript via apsfilter. All was fine.
> 
> Then I got another parallel printer, epson lq-550 24-pin dot matrix,
> and played with printing on both printers by just unplugging one
> and plugging the other to the laptop's parallel port. For a while
> all was fine.
> 
> However, after several days, I cannot now print on either printer.
> With laserjet I get
> 
> # lptest 20 20 > /dev/lpt0
> /dev/lpt0: Device busy.
> 
> With matrix printer I get
> # lptest 20 20 > /dev/lpt0
> #
> 
> but nothing is printed.
> 
> I tried to play with lptcontrol, but I get the following:
> 
> # lptcontrol -i -d /dev/lpt0.ctl
> lptcontrol: ioctl: Operation not supported
> # lptcontrol -s -d /dev/lpt0.ctl
> lptcontrol: ioctl: Operation not supported
> 
> I updated the OS and rebuilt the kernel: FreeBSD 6.3-STABLE
> Wed Jan 23 10:46:54 GMT 2008, but that didn't help.
> 
> In my device.hints I have the following printer related lines:
> hint.ppc.0.at="isa"
> #hint.ppc.0.irq="7"
> 
> to enable the polling mode.
> 
> My parallel port settings:
> 
> # grep ppc /var/run/dmesg.boot
> ppc0: <Parallel port> at port 0x378-0x37f on isa0
> ppc0: Generic chipset (EPP/NIBBLE) in COMPATIBLE mode
> ppbus0: <Parallel port bus> on ppc0
> #
> 
> There is nothing in the /var/log/lpd-errs.
> 
> My questions:
> 
> 1.	Could I have fried my parallel chip by changing the printers with
> 	laptop powered on? How can I check this?

Well, it seems there was some problem with the parallel chip.

I tried various flags with ppc(4), polling and interrupt mode, with no
luck, the "device busy" message was still there, and nothing would print.

After that I decided to switch the machine off and on again, not just a hot
reboot. And that did help, both printers are working fine.

Perhaps due to hot swithching of printers there was some charge(?)
on the parallel port chip, which made it appear busy.. 

-- 
Anton Shterenlikht
Room 2.6, Queen's Building
Mech Eng Dept
Bristol University
University Walk, Bristol BS8 1TR, UK
Tel: +44 (0)117 928 8233 
Fax: +44 (0)117 929 4423



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080124153453.GA1546>