[PARPORT] Parport programming again


Jason Fritz (J.Fritz@ericsson.com)
Tue, 30 Nov 1999 12:07:17 -0700


I'm in desperate need of information on how to do serious parallel port
programming for Linux. I have a box (which is built in-house) that
receives input over the parallel port data lines, and attempts to send back
state information via the printer status lines (ack, paper empty, select,
and error, to be exact).

The program I have now simply opens /dev/lp1 and writes bytes to it. It
uses "ioctl(fp, LPGETSTATUS, &status)" to read the status of the box. The
problem is that if the status lines indicate a printer error due to the
state of the box, I am unable to write to the port! It just blocks forever
until the box changes state in such a way that it appears the "printer" is
ready again.

I have already received two kernal patches from Tim (thanks!), as well as
played with the "tunelp" command to try to get the port to ignore the
printer status and just keep writing bytes. However, none of this has
worked and I am still stuck.

I am totally willing to rewrite the software to use a different library to
control the port, if such a thing exists. I wonder how all you driver
programmers are writing drivers for scanners, drives, and such. Any
information on how to begin such work would be appreciated, such as where I
can find documentation.

Thank you,
Jason Fritz

-- To unsubscribe, send mail to: linux-parport-request@torque.net --
-- with the single word "unsubscribe" in the body of the message. --



This archive was generated by hypermail 2.0b3 on Tue 30 Nov 1999 - 14:13:53 EST