Opening /dev/usb/lp0 fails while printing

Justin Huang justin.huang at liteon.com
Wed Apr 23 00:57:41 PDT 2008


I can access my USB printer via /dev/usb/lp0. The printer is a bidi printer, which receives print data from this usb interface (bulk out) and also send status data to the host via the same interface (bulk in).
I'm planning to create a program which opens /dev/usb/lp0, reads status data and then display some human-readable information. It sounds good, right?
My problem is... when I launch the program and then make a print, the printer seems to be locked and the print job cannot be sent out from the backend. I'm using open() with O_RDONLY flag. What can I do to allow my program and the backend filter access the printer at the same time? I'm not planning to modify the backend program. Thanks a lot!




More information about the cups mailing list