I'm programming a USB device that interacts with usb-uhci on a Linux host. I think I've handled most control messages correctly, but I'm not sure about the string descriptors. For instance, I've tried to set up a string descriptor for the USB vendor field. It seems to me that the driver requests this at the point where it's needed by host software that wants to display it. One such event is the startup of usbview. When I execute this application, the host sends at least two GET_DESCRIPTOR requests. These are:
wValue : 0x0300 wIndex : 0 wLength : 4
and
wValue : 0x0301 wIndex : <language code> wLength : 0xff
To the first, I try to respond with a list of language codes. <language code> in the 2nd is the first language code in that list. I have returned value 1 in the iManifacturer field of the device descriptor (i.e. the wValue in the 2nd request seems to ask for the "manifacturer" string.) When I try to respond to the 2nd request, I get another identical one. This repeats a number of times. The string is *not* displayed in usbview.
So I guess I don't quite understand how to respond to these requests. A couple of details I'm not sure about:
1. The USB 1.1 spec says "String descriptors use UNICODE encodings". Which annoys me a great deal, as it fails to specify *what kind unicode*. Should the string be in UTF-8 format, or 16 or 32-bit? 2. My string is shorter than the wLength (0xff), which is a situation I suppose I need to handle specially, but I'm not sure I understand exactly how. The spec also says (in section 9.4.3): "If the descriptor is shorter than the wLength field, the device indicates the end of the control transfer by sending a short packet when further data is requested," but what exactly does this mean? Should I assume that "further data is requested" when the 2nd request is received? If so, how do I know it is, and that the request is not just a re-issue of the original one? Or is "further data" requested in some other manner?
Any help would be appreciated.
- Toralf
------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel