Opening /dev/usb/lp0 fails while printing

Justin Huang justin.huang at liteon.com
Wed Apr 23 20:27:27 PDT 2008


> Justin Huang wrote:
> > 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!
>
> You can't, it's a single device and doesn't support multiplexing.
>
> --

That's too bad. I found some devices named as /dev/usbdev5.4_ep01
or /dev/usbdev5.4_ep81. They seem to represent the endpoints of the USB
printer. I tried to open each of them but failed. Is there any method
I can try to allow my program open a single endpoint of the USB device?





More information about the cups mailing list