Subject: Re: Belkin Bluetooth vs aue vs ubt
To: Nathan J. Williams <nathanw@wasabisystems.com>
From: Terry Moore <tmm@mcci.com>
List: tech-kern
Date: 03/12/2007 19:55:55
Hi Nathan,

Your descriptors are a little confusing.  The VID/PID don't match 
what I thought were the VID/PID that was problematic, 0x050D/0x0121.

But this device illustrates one of the corner cases that common class 
doesn't talk about.  If bInterfaceClass/subclass/proto are zero, and 
bDeviceClass/subclass/proto are zero, you can only do vendor-specific matches.

One of the difficult things about USB is that it really demands a 
globally-aware probe mechanism that can resolve multiple possible 
matches in favor of the "most specific".  Windows and Mac OS X both 
have this.  When selecting a driver, each match is given a score, and 
the match with the best score is used. (Windows only makes this 
decision the first time the device is seen, and then remembers a 
vid/pid/rev/{location|serialnum} string, which is used the next time 
the device appears.  Mac OS X simply repeats the vote every enumeration.

It's going to be hard to make USB enumeration work nicely if the 
system can only use a simple sequential probe-until-claimed paradigm.

I run NetBSD in VMs these days, and USB in VMware VMs is generally so 
fragile and dangerous to the host that I turn it off.  So I'm 
completely unaware of how USB works in NetBSD these days and I 
suppose it's likely that I'm missing the point somehow.

--Terry

At 03:23 PM 3/12/2007 -0400, Nathan J. Williams wrote:
>Stephen Borrill <netbsd@precedence.co.uk> writes:
>
> >> Would still be good if you or someone else could provide
> >> some more descriptor data. The easiest way is to build
> >> sysutils/usbutil from pkgsrc and call
> >> usbctl /dev/usb0 -a 2
> >
> > I can provide this for the ubt device, but not an aue one
> > (attached). Nathan?
>
>Sure.
>
>DEVICE addr 2
>DEVICE descriptor:
>bLength=18 bDescriptorType=device(1) bcdUSB=1.10 bDeviceClass=0 
>bDeviceSubClass=0
>bDeviceProtocol=0 bMaxPacketSize=8 idVendor=0x066b idProduct=0x2203 
>bcdDevice=101
>iManufacturer=1(LINKSYS Inc.) iProduct=2(LINKSYS USB Adapter) 
>iSerialNumber=3(754a02) bNumConfigurations=1
>
>CONFIGURATION descriptor 0:
>bLength=9 bDescriptorType=config(2) wTotalLength=39 bNumInterface=1
>bConfigurationValue=1 iConfiguration=0() bmAttributes=a0 bMaxPower=286 mA
>
>INTERFACE descriptor 0:
>bLength=9 bDescriptorType=interface(4) bInterfaceNumber=0 bAlternateSetting=0
>bNumEndpoints=3 bInterfaceClass=0 bInterfaceSubClass=0
>bInterfaceProtocol=0 iInterface=0()
>
>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
>
>ENDPOINT descriptor:
>bLength=7 bDescriptorType=endpoint(5) bEndpointAddress=3-in
>bmAttributes=interrupt wMaxPacketSize=8 bInterval=1
>
>current configuration 1
>
>----------
>
>         - Nathan