On Wed, 22 Oct 2008, Tim Roberts wrote:
>
rliou@... wrote:
> >
> > I need to detect if my USB 2.0 device is connected through a USB 1.1
> > hub so I can handle the device accordingly. The value of bcdUSB in the
> > descriptor and device qualifier always shows me 200H(USB 2.0) with or
> > without the hub. How do I get the actual USB speed for a device with a
> > low/full speed hub in the middle?
> >
>
> Do you have an "other speed configuration descriptor"? If so, you
> should be able to fetch the current configuration descriptor and see
> which one you got. Your device should return the "other speed"
> descriptor if it connects as USB 1.1.
A USB 2.0 device will _never_ connect as USB 1.1. No matter what speed
it operates at, it will always report its bcdUSB value as 0x0200. This
is required by the USB 2.0 spec.
Furthermore, you can't rely on the "other speed config" descriptor to
tell you what speed a USB 2.0 device is running at. If it's running at
full speed then the "other speed config" descriptor will be for a
high-speed configuration, and vice versa, if it's running at high speed
then the "other speed config" descriptor will be for a full-speed
configuration.
Either way, you still have to figure out which configuration is for
which speed. There's no direct way to do this, since the speed isn't
part of the config descriptor.
Alan Stern
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/_______________________________________________
Libusb-devel mailing list
Libusb-devel@...
https://lists.sourceforge.net/lists/listinfo/libusb-devel