Re: parport patch / lp_readback

Martin Buck (Martin-2.Buck@student.uni-ulm.de)
Thu, 24 Apr 97 19:36 CDT


> The problem with the printer device (at the moment) is that you can open it
> once, not twice or multiple times. The best way for a status monitor or
> whatever is to use a modified printer daemon like LPRng. This daemon handles
> all reads and writes from and to lp.

I was thinking about a daemon that creates a named pipe in /dev that can be
used by lpd (or any other program that wants to access the printer) to send
the data to the printer. The only problem with this approach: programs
using the named pipe don't know anything about the status of the printer,
because the errnos for "out of paper" and the like can't be sent through a
pipe. :-(

I'll have a look at LPRng to see if it makes this task easier.

> As you see, we are polling inside the driver, but this is the only
> possiblity to wait without interrupt configured.

Is the nibble mode able to use interrupts if the printer device is
configured for interrupts?

Martin

--
/* Martin Buck                      E-Mail: martin-2.buck@student.uni-ulm.de */
/* Student of electrical engineering   WWW: http://www.uni-ulm.de/~s_mbuck1/ */
/* University of Ulm, Germany  Snail-Mail: Paukengasse 2, 89077 Ulm, Germany */
#include <disclaimer.h>            /* PGP Key available    MIME-Mail welcome */