Subject: Re: USB printer/scanner combo
To: Lennart Augustsson <lennart@augustsson.net>
From: Jeff Rizzo <riz@boogers.sf.ca.us>
List: current-users
Date: 02/21/2004 22:49:50
On Sat, Feb 07, 2004 at 09:59:27PM +0100, Lennart Augustsson wrote:
> The scanner part is probably on another "interface".  There's no
> generic interface driver, I'm afriad.  It would be easy to make one.
> 
> 	-- Lennart

So, after a couple weeks of no time, I've finally found a few hours to
poke around at this today.  You are indeed correct that it's on another
"interface" - I've been poking around the USB code a bit to determine
what a generic interface driver might entail, but it may be a case of
trying to learn too many things at once.   Would the ugen driver
be adapted to handle attachment to an interface rather than a
configuration, or am I way off base here?  (I'm afraid that I'm revealing
the depth of my ignorance here :)

I think I've learned quite a bit by perusing the usb code (and the
usb spec, but more the code ;), and turning on the debugging;  I'm
interested and willing to put some code together to at least attach
something, given some information regarding an appropriate starting point
and a good deal of patience.
(an example of a driver that attaches multiple interfaces would
be great!)

Here's the output of 'usbctl' for the device, too, in case it inspires a
"don't bother; it's not worth it because of XXX".  :)

Thanks,
+j


DEVICE addr 2
DEVICE descriptor:
bLength=18 bDescriptorType=device(1) bcdUSB=1.10 bDeviceClass=0 bDeviceSubClass=0
bDeviceProtocol=0 bMaxPacketSize=8 idVendor=0x04b8 idProduct=0x0808 bcdDevice=100
iManufacturer=1(EPSON) iProduct=2() iSerialNumber=3() bNumConfigurations=1

CONFIGURATION descriptor 0:
bLength=9 bDescriptorType=config(2) wTotalLength=55 bNumInterface=2
bConfigurationValue=1 iConfiguration=4(USB MFP) bmAttributes=c0 bMaxPower=2 mA

INTERFACE descriptor 0:
bLength=9 bDescriptorType=interface(4) bInterfaceNumber=0 bAlternateSetting=0
bNumEndpoints=2 bInterfaceClass=255 bInterfaceSubClass=255
bInterfaceProtocol=255 iInterface=5()

ENDPOINT descriptor:
bLength=7 bDescriptorType=endpoint(5) bEndpointAddress=1-in
bmAttributes=bulk wMaxPacketSize=64 bInterval=0

ENDPOINT descriptor:
bLength=7 bDescriptorType=endpoint(5) bEndpointAddress=2-out
bmAttributes=bulk wMaxPacketSize=64 bInterval=0

INTERFACE descriptor 1:
bLength=9 bDescriptorType=interface(4) bInterfaceNumber=1 bAlternateSetting=0
bNumEndpoints=2 bInterfaceClass=7 bInterfaceSubClass=1
bInterfaceProtocol=2 iInterface=6()

ENDPOINT descriptor:
bLength=7 bDescriptorType=endpoint(5) bEndpointAddress=4-out
bmAttributes=bulk wMaxPacketSize=64 bInterval=0

ENDPOINT descriptor:
bLength=7 bDescriptorType=endpoint(5) bEndpointAddress=3-in
bmAttributes=bulk wMaxPacketSize=64 bInterval=0

current configuration 1


> 
> Jeff Rizzo wrote:
> >I haven't even begun to play with this, so a simple "RTFM" (esp.
> >with a pointer to the appropriate FM) will do nicely...
> >
> >I've recently acquired an Epson Stylus CX5400, which is a scanner/printer
> >combo.  It seems to show up OK as a printer:
> >
> >ulpt0 at uhub4 port 2 configuration 1 interface 1
> >ulpt0: EPSON USB MFP, rev 1.10/1.00, addr 5, iclass 7/1
> >ulpt0: using bi-directional mode
> >
> >(although I haven't actually tried using it yet)
> >
> >...but I don't see any additional attachment for a the other
> >functionality.  I was assuming it would attach as a 'ugen'.
> >
> >Is there any support for something like this, and if so, what do I need
> >to do to enable it?
> >
> >Thanks,
> >+j
> 

-- 
Jeff Rizzo                                         http://boogers.sf.ca.us/~riz