How to retrieve iManufacturer/iProduct information from
libusb20?
Hans Petter Selasky
hselasky at c2i.net
Sun Jun 7 23:05:32 UTC 2009
On Sunday 07 June 2009 04:45:20 Jack Twilley
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()...
After you find the string index, you can use the
following function to get strings:
int
libusb20_dev_req_string_simple_sync(struct
libusb20_device *pdev,
uint8_t index, void *ptr, uint16_t len);
--HPS
More information about the freebsd-usb
mailing list