Re: Multiple USB Endpoints

Alan Stern <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
On Fri, 16 Nov 2007, Martin Owens wrote:

> OK, I'll have to type this up by hand as it's on a different machine:
> 
> T: Bus=01 Lev=01 Prnt=01 Port=00 Cn
> 
> t=01 Dev#=4 Spd=12 MxCh=0
> D: Ver=1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=16 #Cfgs=1
> P: Vendor=0fca ProdIF=0006 Rev=1.06
> D: Manufacturer=Research in Motion
> S: Product=RIM Mass Storage Device
> S: SerialNumner=[NOTDISCLOSED]
> C:* #Ifs=1 Cfg#=1 Atr=80 MxPwr=100mA
> I:* If#=0 Alt=0 #EPs=2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
> E: Ad=89(I) Atr=01(Bulk) MxPS=64 Ivl=0ms
> E: Ad=0a(O) Atr=02(Bulk) MxPS=64 Ivl=0ms
> 
> That is in default mode 'Mass storage only' I'll have to type up the
> second mode which changes the usb id:
> 
> T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=4 Spd=12 MxCh=0
> D: Ver=1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=16 #Cfgs=1
> P: Vendor=0fca ProdIF=0006 Rev=1.06
> D: Manufacturer=Research in Motion
> S: Product=RIM Composite Device
> S: SerialNumner=[NOTDISCLOSED]
> C:* #Ifs=2 Cfg#=1 Atr=80 MxPwr=500mA
> I:* If#=0 Alt=0 #EPs=8 Cls=ff(vend.) Sub=01 Prot=ff Driver=(none)
> E: Ad=81(I) Atr=02(Bulk) MxPS=64 Ivl=0ms
> E: Ad=02(O) Atr=02(Bulk) MxPS=64 Ivl=0ms
> E: Ad=83(I) Atr=02(Bulk) MxPS=64 Ivl=0ms
> E: Ad=04(O) Atr=2(Bulk) MxPS=64 Ivl=0ms
> E: Ad=85(I) Atr=02(Bulk) MxPS=64 Ivl=0ms
> E: Ad=06(O) Atr=02(Bulk) MxPS=64 Ivl=0ms
> E: Ad=87(I) Atr=02(Bulk) MxPS=64 Ivl=0ms
> E: Ad=08(O) Atr=02(Bulk) MxPS=64 Ivl=0ms
> I:* If#=0 Alt=0 #EPs=2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
> E: Ad=89(I) Atr=01(Bulk) MxPS=64 Ivl=0ms
> E: Ad=0a(O) Atr=02(Bulk) MxPS=64 Ivl=0ms
> 
> As you can see it needs to be put in the second mode anyway, but there
> is a third mode which is just the database stuff, without the mass
> storage device. I believe the existing barry project is attempting to
> claim all interfaces including the MSD one which is where it runs into
> problems.

Okay, that seems straightforward enough.  The solution is (obviously) 
to make the barry project avoid trying to claim the mass-storage 
interface.

It shouldn't be hard to do.  You can tell which interface is 
mass-storage by checking whether the bInterfaceClass value is 0x08.  If 
it is, simply have the program skip over the interface.  The function 
call you need to avoid is usb_claim_interface().

Alan Stern


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.