[Nut-upsdev] Developing the UPS side of the UPS-NUT equation (via usbhid)

Charles Lepple clepple at gmail.com
Sat Mar 8 00:03:39 UTC 2014

On Mar 7, 2014, at 11:24 AM, Rob Groner wrote:

> Charles,
> Thank you so much for the information.  I'm trying to digest it along with the other docs I have, the example code from Microchip, and a USB HID tutorial I found online.

I realize that some of the descriptions can be a bit vague, so if you want to post a link to the HID tutorial, I can try to describe what is going on there.

> So, if I understand correctly....  When the device first connects, it sends a huge dump of data

(the HID Report Descriptor)

> (which the usbhid driver shows when you use the debug option) which fully describes the data it is capable of sending.

Correct. At some point, the usbhid-ups driver starts asking the UPS for reports corresponding to the variables it needs, but that initial traffic is from reading the HID Report Descriptor, then looking up the report IDs from the parsed descriptor.

> The usage id's, pages, etc use values from the USBHID spec, but the actual data can be defined as needed by the device (in terms of width and ranges), and then the device assigns an arbitrary (but I'm assuming unique) report ID to the description so that when it needs to send the data, it can do so simply with a Report ID and the described data.  

That's it.

Charles Lepple
clepple at gmail

More information about the Nut-upsdev mailing list