<div dir="ltr">Thanks a lot for the explanation! I finally start to really understand. I had a look at megatec protocol document, but I was still missing parts (hard days at university, so my brain is already knocked out when I start).<div>

Now I finally got that USB/krauler string number actually equals to standard megatec command index +2 (as first 2 USB string are reserved).<div style>(Small parenthesis: the information command response should start with # while it starts with P#; not relevant now but weird).</div>

<div style><br></div><div style>Between sunday and monday I should have time to check for code path. I will post result as soon as possible.</div><div style><br></div><div style>About USBlyzer, it seems it's possible, so I hope flavio might send new captures.</div>

<div style><br></div><div style>From USBlyzer website:<br><h2 style="font-size:13px;color:rgb(85,85,85);margin:0px 0px 0.6em;font-family:Verdana,Arial,Helvetica,sans-serif;line-height:15px">Capturing Hot-Plugged Devices</h2>

<p style="margin:0.6em 0em;text-align:justify;color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:11px;line-height:15px">USBlyzer is a featured USB traffic monitoring software that allows you to not only monitor the activity of the devices already present, but also monitor the devices activity at the time of connection. If you have no idea which USB device activity you want to monitor and analyze you probably might want to enable automatic capturing for hot-plugged devices option. To do this, select <strong style="color:rgb(85,85,85)">Capture->Capture Hot-plugged</strong> menu item. When this option is on, the capture will be enabled automatically for any <abbr title="Universal Serial Bus">USB</abbr> devices that you plug into the computer while USBlyzer is in capture mode.</p>

</div><div style><br></div><div style><br></div><div style><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/1/10 Charles Lepple <span dir="ltr"><<a href="mailto:clepple@gmail.com" target="_blank">clepple@gmail.com</a>></span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Jan 9, 2013, at 2:36 PM, Rob Power wrote:<br>
<br>
> Asking for string 13 --> output: ..#.2.3.0...0. .0.0.2. .1.2...0.0. .5.0...0... (Unknown command)<br>
<br>
</div>String 13 (0xd) is the USB/krauler version of "F", and the expected first character in the response is "#" (as confirmed above). The rest of the string is static parameters, parsed here: <a href="http://trac.networkupstools.org/projects/nut/browser/tags/v2.6.5/drivers/blazer.c#L296" target="_blank">http://trac.networkupstools.org/projects/nut/browser/tags/v2.6.5/drivers/blazer.c#L296</a><br>


<div class="im"><br>
> Status: beep = 1 (capture n. 0013-0010)<br>
> Asking for string 7 --> output:  ..U.P.S. .N.o. .A.C.K. (should be Q command)<br>
> Asking for string 12 --> output: P.#. . ..... (Unknown command)<br>
<br>
</div>Similarly, string 12 (0xc) is "I", the vendor request. The response is parsed here: <a href="http://trac.networkupstools.org/projects/nut/browser/tags/v2.6.5/drivers/blazer.c#L348" target="_blank">http://trac.networkupstools.org/projects/nut/browser/tags/v2.6.5/drivers/blazer.c#L348</a><br>


<div class="im"><br>
> ask string 13 (Meaning: "hey, I'm sending you a manteinance command")<br>
> ask string <command number> (Meaning: "do this/do that")<br>
> expecting "ups no ack" response<br>
> ask string 12 (Meaning: "hey, have you done last thing I asked?")<br>
<br>
</div>I'm pretty sure there isn't any stored state for those commands. It's a really simple protocol, aside from the obfuscation introduced with the USB-to-serial converter.<br>
<br>
I forgot that we have the protocol library documents online:<br>
<br>
<a href="http://www.networkupstools.org/ups-protocols/megatec.html" target="_blank">http://www.networkupstools.org/ups-protocols/megatec.html</a><br>
<div class="im"><br>
> PS: I hope I may eventually make some tries adding debug options to the code in next days (more probably next week). What values do you suggest to print out? "buf" variable for example?<br>
<br>
</div>'buf' is probably empty if there is an EPROTO error being returned. I would say just add a few lines to confirm that my suspicions are correct regarding what path is being taken through the code.<br>
<br>
Does USBlyzer have an option to dump the whole initialization sequence (up until the point that things start to repeat)? That might shed some light on what else is being sent (or if there is yet another langid_fix value that is needed).<br>


<span class="HOEnZb"><font color="#888888"><br>
--<br>
Charles Lepple<br>
clepple@gmail<br>
<br>
<br>
<br>
</font></span></blockquote></div><br></div>