Kernel Bug Tracker – Bug 4563
read from usblp don't work
Last modified: 2005-08-19 09:18:50 UTC
Distribution: Fedora Core 3
Hardware Environment: EPSON Printer on Notebook
Software Environment: Kernel 2.6.9, 2.6.10. 2.6.11, readin of Printer
informations via the status monitor mtink.
Problem Description: The read() call is no more blockink as for older kernel.
Furthermore read may return characters which are not
send bay the printer.
The poll call don't block for the POLLIN event query.
Steps to reproduce: cat /dev/usb/lp0 is suffincientz in order to see that
the read call is not blocking. Attaching an EPSON
printer via USB and querying datas fail
What kernel did the read() call block for you?
We need more information here. Does the driver not work properly?
I try to read data fronn the printer and I expect that if the
printer have nothing to send to my application, the read call
On the 2.4 kernel serie the call was blocking, this is no more
the the fact with the 2.6 kernels.
In my opinion the driver dont work properl. If an application issue
an open("/dev/usb/lp0", O_RDWR); as consecutive read has to block
unless an appropriate system call make the read call non blocking.
What for data do you need ?
Sorry, but that's not the way the driver works anymore.
Not much I can do about it...
Therefore the parallel printer port and the usb printer port will
work differently, this is not a nice feature.
Ok, I just tested this with my printer, and 2.6.13-rc6, and it blocks if no
data is to be read from the printer. So yes, it does work like 2.4 this way.
Perhaps your printer really is responding with data?