<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">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.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">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.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Rob Groner<br>
Software Engineer Level II<span style="font-size:12.0pt;font-family:"Times New Roman",serif"><br>
<br>
<b><span style="color:#A70C28">RTD Embedded Technologies, Inc.</span></b><br>
</span><b><i><span style="font-size:10.0pt;font-family:"Times New Roman",serif;color:black">ISO 9001 and AS9100 Certified</span></i></b><span style="font-size:10.0pt;font-family:"Times New Roman",serif;color:black"><br>
Ph: +1 814-234-8087<br>
</span><span style="font-size:10.0pt;font-family:"Times New Roman",serif"><a href="http://www.rtd.com/"><span style="color:blue">www.rtd.com</span></a><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>