[Nut-upsdev] USB HID Spec help (passing strings)

Rob Groner rgroner at RTD.com
Fri Aug 28 18:21:43 UTC 2015


We're wrapping up our first version of the UPS we're making, and so I'm going over the USB code and came across one loose end.  The serial number of the unit (iSerialNumber according to the USB HID doc) is a constant, but it's of course a different constant for each UPS.  Right now we store that value in the Flash on the device, but the only way I've seen to pass the serial number over USB is to encode it as a constant in the code and then reference it as a USB HID String Index.  We aren't going to rebuild/program for each UPS, so there must be a way to take the value in flash memory and send that as the serial number.  In other words, how do you send a "variable" length string across USB?  Actually, the length can be known ahead of time, but the data itself will be the variable.

I know this is the NUT dev list, but USB help is VERY HARD to find, and I've gotten more and better help on understanding USB than anywhere else.

Rob Groner
Software Engineer Level II

RTD Embedded Technologies, Inc.
ISO 9001 and AS9100 Certified
Ph: +1 814-234-8087
www.rtd.com<http://www.rtd.com/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20150828/c8c05dc1/attachment.html>


More information about the Nut-upsdev mailing list