> > > HIDIOCGSTRING - struct hiddev_string_descriptor (read/write) Gets a > > > string descriptor from the device. The caller must fill in the "index" > > > field to indicate which descriptor should be returned. > > Can you please tell me in what range this index is? > > Please refer to USB specification. > The string descriptor indexes are fully optional and are referenced by the > other descriptors (device descriptors, configuration descriptors, etc). So > the valid range differs from device to device and depends of how much of > the descriptor information has available the corresponding string (human > readable) representation.
Yes I understood that. I needed this info to investigate an USB device for which no documentation exists. But I think I found the information that I need: in linux/drivers/usb/core/message.c there's the following code snippet: result = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), USB_REQ_GET_DESCRIPTOR, USB_DIR_IN, (USB_DT_STRING << 8) + index, langid, buf, size, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ That means that index may not be bigger then 255 as else it would garble the value of 'USB_DT_STRING << 8'. Folkert van Heusden -- Multitail - gibkaja utilita po sledovaniju log-fajlov i vyvoda kommand. Fil'trovanie, raskrašivanie, slijanie, vizual'noe sravnenie, i t.d. http://www.vanheusden.com/multitail/ ---------------------------------------------------------------------- Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel