Re: hiddev
Paul Stewart <[email protected]>
| Newsgroups | gmane.linux.usb.devel |
|---|---|
| Message-ID | <[email protected]> |
In message <[email protected]> you write: >Hi, > >In linux/Documentation/usb/hiddev.txt I read the following: > >> 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? The range of this index isn't known to the USB device driver code, and for all we know, it may not even be contiguous. Wen you do a HIDIOCGSTRING, this calls through to the USB code that does a string descriptor request to the device. Usually it doesn't make sense to read all the string descriptors from 0 to "n", since the descriptors only make sense in the context of their use, and the indices do not imply their purpose. The way things generally work is that some report descriptors implicitly return strings by returning a descriptor with an integer in it which is really an index into the string table which you should be able to get the string equivalent via HIDIOCGSTRING. If the string doesn't exist, usually the integer is 0. A web search for HIDIOCGSTRING shows a couple of sample usages in hidups.c/upsinfo.c. On Fri 10 Aug Folkert van Heusden also wrote: > 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: Hopefully that's as much information as you need. However the strings by themselves with no context as to how they are used don't seem to me of much use... -- Paul ------------------------------------------------------------------------- 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/ _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel