Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Sep 2002 11:26:17 -0400
From:      Robert Kedoin <robert@kedoin.com>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Strings on uhid devices
Message-ID:  <228FA25B-D09B-11D6-9048-000393820C8C@kedoin.com>

next in thread | raw e-mail | index | archive | help
I've been trying to figure out how to talk to a UPS that is connected 
via USB on FreeBSD 4.6.1-RELEASE. Since it's a HID device it connects 
as /dev/uhid0. My question is how do I get to the string descriptor of 
a uhid device.

Specifically, a UPS device has a usage in the hid report descriptor 
called "iProduct" which is a "string index" describing the product 
itself. I presume, and this is my first time trying to work with a USB 
device, that I need to lookup the "string index" value in the string 
descriptor. ugen provides an ioctl called USB_GET_STRING_DESC which 
returns a string for an index. However, that doesn't seem to be 
available for uhid devices.

Is this an enhancement that needs to be made to the uhid driver (to 
provide access to other USB descriptors (device, configuration, 
interface, endpoints, as well as string) or is there some way to get a 
string from a "string index" that I'm not seeing ?

Thank you very much,

Robert Kedoin
robert@kedoin.com


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?228FA25B-D09B-11D6-9048-000393820C8C>