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

Till Kamppeter till.kamppeter at gmx.net
Sun Jan 11 14:07:26 PST 2004


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.

    Till


Mark Roth wrote:
> I've hit a snag while trying to integrate my latest Lexmark X125 driver with
> foomatic.
> 
> One of my testers found that my driver locks up the printer when large files
> are sent to it.  After much investigation and many headaches, I found that the
> printer is trying to send status information back to the PC.  If I don't read
> this status information, the printer gets a buffer overflow and locks up after
> a while.
> 
> I've modified my driver to take the device name as input and it opens the
> device for O_RDWR.  As it's writing to the printer, it also reads the status
> information, clearing the buffer.  All works well.
> 
> I'm now trying to figure out how to write my foomatic driver DB entry.	I need
> to specify in the prototype element that the device name needs to be passed
> (e.g. /dev/usb/lp0).  I also want to make sure foomatic doesn't send the output
> of my driver to the printer (I guess I can solve this problem by not producing
> any stdout).
> 
> Any suggestions?
> 
> Thanks,
> - Mark
> _______________________________________________
> Foomatic-devel mailing list
> Foomatic-devel at linuxprinting.org
> http://www.linuxprinting.org/cgi-bin/mailman/listinfo/foomatic-devel
> 
> 






More information about the Printing-foomatic mailing list