On Sun, 13 Nov 2005, Johannes Zweng wrote:

> On Sun, 13 Nov 2005 11:10:19 -0500 (EST)
> Alan Stern <[EMAIL PROTECTED]> wrote:
> 
> > On Sun, 13 Nov 2005, Johannes Zweng wrote:
> > 
> > > 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.)
> 
> I checked the value in /sys/bus/usb/devices/4-2/bNumConfigurations
> 
> And this value definitly changes to 1 after switching to configuartion
> 2 by doing "echo 2 > /sys/bus/usb/devices/4-2/bConfigurationValue".
> 
> So it's not possible to switch back to configuration 1 the same
> way because the device claims to have only one configuration after the
> change.
> 
> 
> > > 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?
> 
> Yes, this was a typo, sorry.
> The device id changes from 22b8:4902 to 22b8:4901. I determined this
> values via sysfs in "idVendor" and "idProduct". But "lsusb -v" also
> reports these values.
> 
> 
> To give you an idea what happens during the configuration switch, here
> an extract of udevmonitor's output while switching to configuration 2:
> 
> UEVENT[1131897292]
> remove@/devices/pci0000:00/0000:00:11.2/usb4/4-2/4-2:1.0
> UEVENT[1131897292] 
> remove@/devices/pci0000:00/0000:00:11.2/usb4/4-2/4-2:1.1
> UEVENT[1131897292] 
> remove@/devices/pci0000:00/0000:00:11.2/usb4/4-2
> 
> UEVENT[1131897295] 
> add@/devices/pci0000:00/0000:00:11.2/usb4/4-2
> UEVENT[1131897295]
> add@/devices/pci0000:00/0000:00:11.2/usb4/4-2/4-2:1.5
> UEVENT[1131897295]
> add@/devices/pci0000:00/0000:00:11.2/usb4/4-2/4-2:1.6
> UEVENT[1131897295]
> add@/devices/pci0000:00/0000:00:11.2/usb4/4-2/4-2:1.8

Aha!  So the phone _does_ disconnect itself and then reconnect.  In 
between it changes its descriptors.

In essence, the kernel thinks the phone has been unplugged and in its
place is a completely new device, with only one configuration.

To put the phone back into its original configuration, you might need to 
reset it, maybe even unplug the USB cable.  A port reset might or might 
not be good enough.

Or maybe all you have to do is set the configuration to 0 (which means
unconfigured).  Perhaps that will switch the phone back to its original
setting, with both configs available.

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