How to retrieve iManufacturer/iProduct information from libusb20?

Sylvestre Gallon ccna.syl at gmail.com
Sun Jun 7 14:16:45 UTC 2009


On Sun, Jun 7, 2009 at 4:45 AM, Jack Twilley<jmt at twilley.org> wrote:
> I have been looking through the source to usbconfig and other tools trying
> to figure out how to retrieve the iManufacturer and iProduct strings.  The
> libusb20 man page describes the libusb20_dev_get_device_desc() function but
> there's no useful information on the struct it returns.  The include file
> looks as if the struct is automagically generated by macros within macros
> which is too complicated for me to figure out without help.  Any ideas?
>  There's gotta be a better way than using LIBUSB20_DEVICE_DESC()...
>
> Jack.


You can use the function libusb20_dev_get_device_desc() that
returns a struct LIBUSB20_DEVICE_DESC_DECODED *. The field
idVendor and idProduct in the struct LIBUSB20_DEVICE_DESC_DECODED
are what you are looking for :)

Cheers,

-- 
Sylvestre Gallon (http://devsyl.blogspot.com)
Fifth Grade Student @ Epitech & Researcher @ LSE
R&D @ Rathaxes (http://www.rathaxes.org)


More information about the freebsd-usb mailing list