Subject: Re: lpt question
To: Jeremy C. Reed <reed@reedmedia.net>
From: MLH <mlh@goathill.org>
List: netbsd-help
Date: 06/18/2003 16:12:18
> 
> On 18 Jun 2003, MLH wrote:
> 
> > The NetBSD lpa/lpt won't open without proper handshake on the
> > parallel port (apparently).
> >
> > How does one open the parallel port to directly control it without
> > expecting printer handshake?
> >
> > $ uisp -v -dlpt=/dev/lpa0 -dprog=maxi --wr_fuse_l=0xda
> > /dev/lpa0: Device busy
> 
> This is just like the error I used to get with CUPS last year.
> 
> CUPS's parallel was doing:
>  open(device, O_WRONLY)
> 
> And for my working lpt0 and lpa0 it was returning error 16, "Device busy".
> This happened on different hardware. Randomly, when I turned on or off the
> printer and ran that ./parallel at the same time (within the one second),
> it successfully opened the /dev/lpt0 or /dev/lpa0 (and no "Device busy)
> 
> My workaround was to ignore EBUSY (16).

Yes, I had run across your case.  In my case, the parallel interface
for programming the atmel controller doesn't implement the busy
handshake and it appears that NetBSD has no way to work with the
device otherwise. Hacked up the programming code quite a bit, but
there were too many problems.  Since this is a mb par port, I don't
think I want to try pulling BUSY low to satisfy NetBSD. Too many
potential problems, I think.

Thanks