On Wed, 29 Jun 2005 09:55:49 -0400 (EDT) Alan Stern wrote:

| On Tue, 28 Jun 2005, slashboot wrote:
| 
| > Hello
| > 
| > I'm writing a cups backend for an USB printer with prorietary status
| > information. The USB standard status IOCTL (LPGETSTATUS) call works
| > fine but to get further information about the printer I need to write
| > a vendor specific command on the endpoint 0 and get a structure giving
| > extended status of the printer. Windows usbprint driver implements a
| > IOCTL_USBPRINT_VENDOR_GET_COMMAND macro that does this task. Linux
| > driver apparently doesn't.
| > 
| > First solution is to add a new IOCTL command and patch the usblp.c
| > driver and make necessary calls. This solution will oblige the final
| > user to recompile the kernel (module or builtin driver) which is not
| > practical for most users.
| 
| IMO this is your best option.  In time the new ioctl will make its way
| into the official kernel and then users won't need to do anything special.
| 
| > Second solution is to write a new driver for the printer. This driver
| > will relay on usb.h functions. Not a very easy task.
| 
| And probably no easier for users than modifying the existing driver.
| 
| > Third solution, and I'm not sure if it can be done : making the calls
| > inside the cups backend (the backend is called with root priviliges).
| 
| It's not clear going behind the back of the usb-lp driver is a good idea.

I agree with Alan's positions.

One other possible option is to compare how HPOJ works and uses
libusb for extended functionality.
  http://hpoj.sourceforge.net/

---
~Randy


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to