[Foomatic] My Lexmark X125 driver needs to read from the printer

David Chappell David.Chappell at trincoll.edu
Tue Jan 13 07:34:58 PST 2004


Till Kamppeter wrote:

> The Samsung winprinter driver "ml85p" has a similar problem. It also 
> need bi-directional access. What I did there was the following:
>
> - The driver opens the printer device and reads and writes directly to 
> the printer, as you suggested."ml85p" has /dev/lp0 hardcoded, but you 
> should introduce an option to select the device file on which the 
> printer is connected.
>
> - The spooler should under no circumstances open the device, so that 
> the driver does not encounter the device busy. So the print queue must 
> be set up to print to /dev/null. This should be mentioned in the 
> comment text of the driver XML file for your driver.
>
> - Your driver does not need to send data to stdout, the spooler has to 
> send this data to /dev/null anyway.
>
> - The printer must be locally connected with the computer on which the 
> driver is executed, it cannot be hooked on an ethernet printbox 
> (JetDirect or so) or on a remote Windows server.
>
Does this code really belong in the driver?  The only reason I can think 
of is if the driver actually uses the returned data stream.  I think 
that the driver should generate the byte stream and then pass it on to 
the spooler for transmission.  The spooler can then take care of 
whatever has to be done to send it over a paralell port, USB, TCP, etc 
without getting locked up.  Interface-specific codes just doesn't belong 
in the driver.








More information about the Printing-foomatic mailing list