|
From: Tim R. <ti...@pr...> - 2012-12-13 18:11:14
|
Walker, Richard wrote: >> Are you fetching descriptor type 7, or are you fetching string (type 3) >> descriptor number 7? Those are two different things. Rather than >> subvert the meaning of the actual OTHER_SPEED_CONFIGURATION descriptor... > I'm not sure. I know that the value we need is an ascii-encoded string, so I suspect it will be a string type. I've included the technical description from the data sheet, so that maybe the implementation will be obvious to someone more familiar with the USB protocol. > > Currently the debug info that I need to access is described in the data sheet as: > > 2.3.5.17: String Descriptor for Other Speed Configuration String > > offset field value in byte order > -------- ------- ------------------------------ > 0 bDescLength 0x4e > 1 bDesciptorType 0x03 > 2 wLangID debug information encoded ascii string bDescriptorType = 3 means it is a string descriptor. You just need to know which string descriptor it is. There are a number of string descriptors (usually 1=manufacturer, 2=product, 3=serial number); you just need to know which one it is. The documentation probably tells you that; there should be an "Other Speed Configuration Descriptor" listed that has an iConfiguration value. That's the number you need. So, libusb_get_string_descriptor( dev, (the iConfiguration number), 0x0409, buffer, length ). -- Tim Roberts, ti...@pr... Providenza & Boekelheide, Inc. |