On Sun, 13 Nov 2005, Johannes Zweng wrote:

> Hi,
> 
> since a few days I own a new usb device (a Motorola V3 mobile phone)
> which seems to cause some troubles. 
> 
> In short:
> =========
> The phone offers two usb configurations and in the second
> configuration it offers three interfaces, BUT the interfaces are
> numbered 5, 6 and 8 which leads to the following kernel messages:
> 
> usb 4-2: config 1 has an invalid interface number: 5 but max is 2
> usb 4-2: config 1 has an invalid interface number: 6 but max is 2
> usb 4-2: config 1 has an invalid interface number: 8 but max is 2
> usb 4-2: config 1 has no interface number 0
> usb 4-2: config 1 has no interface number 1
> usb 4-2: config 1 has no interface number 2
> (tested with brand new 2.6.14.2 kernel without any patches)
> 
> 
> More details:
> =============
> The usb device offers 2 configurations ("bNumConfigurations" contains
> the value 2) which corresponds to the two modes the phone supports:
> 
> Configuration 1 is AT mode, where the phone acts like an usb modem and
> I can send AT commands using the device nodes created by the "cdc_acm"
> module. In this mode it offers two interfaces with device classes 02
> and 0a.
> 
> Configuration 2 corresponds to the proprietary P2K mode of Motorola. In
> this configuration the phone offers 3 interfaces which all use
> vendor-specific device classes and protocols as in all interfaces the
> fields "bInterfaceClass" and "bInterfaceProtocol" contain the value
> "ff".
> 
> Everything normal until here.
> 
> The weird thing is, that the 3 interfaces are not numbered 0, 1
> and 2 but instead 5, 6 and 8! This leads to the pretty warning messages
> above.
> 
> Also to mention (because I don't know if this is normal behaviour of an
> usb device or not):
> 
> 1.) When I plug in the phone and it's using configuration 1 (AT modem
> mode) "bNumConfigurations" reports 2 available configurations, but
> AFTER SWITCHING to configuration 2 it only reports one available
> configuration (via "bNumConfigurations").

What exactly do you mean: via "bNumConfigurations"?  Do you mean that 
"lsusb -v" reports a different value?  Does the value in 
/proc/bus/usb/devices change?  What about the value in the sysfs file?  
(Those last two should _not_ be able to change unless the phone 
disconnects itself.)

> 2.) Also the device id of the device changes from "22b8:4902" to
> "22b8:4902" when I change to configuration 2.

Those two values are in fact the same.  I'll assume you meant one of them 
to be different.

Again, where do you determine these ID values?

> But my main problem still is that there is no interface 0 in
> configuration 2. 
> (Long version: I use VMware to use some motorola windows tools
> which require configuration 2 - aka P2K mode - of the phone but VMware
> claims that it cannot find interface 0 on the device.)
> 
> 
> So I just wanted to ask, if it's legal for an usb device to have a
> configuration where the interfaces are not numbered beginning from 0?

No, it isn't.  Some manufacturers do it anyway.  Linux accepts such
devices and will work with them, but prints out the warning messages
you saw in the log.

> I don't have much knowledge on usb specifications and I didn't find
> some info about this in the usb specifications (until now).

In the USB 2.0 spec, read the entry for bInterfaceNumber in Table 9-12.  
See also the paragraph at the bottom of p. 244 (section 9.2.3).

Alan Stern



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to