<div dir="ltr"><div><div><div><div><div>Hi to all and happy new year!<br></div>I'm writing here as I'm trying to get nut supporting the UPS in the subject; I didn't check well before buying and nowI discovered this is kinda bad hardware (it doesn't have a valid USB id, it just reports 0000:0001 and linux support doesn't really work as they stated), but before changing it I wanted to try to find a solution to get it work with nut and hopefully help other people with the same problem.<br>
</div><br></div>I posted before into nuts-upsuser mailing list ( <a href="http://lists.alioth.debian.org/pipermail/nut-upsuser/2012-December/008165.html" target="_blank">http://lists.alioth.debian.org/pipermail/nut-upsuser/2012-December/008165.html</a> ) but the topic moved to the dev area so I'll try to resume all the relevant info in this mail.<br>
</div><div><br></div><div>At the end you'll find my configuration, output errors are in the attachment log.txt.<br></div><div>I tried to sniff some commands from Tecnoware software UPSilon2000 (windows version, the only one working).<br>
</div><div>Sniffing results (here: <a href="https://docs.google.com/open?id=0B9DltUspeUMtamFnRDlqazhLRTg" target="_blank">https://docs.google.com/open?id=0B9DltUspeUMtamFnRDlqazhLRTg</a> ) seem to confirm langid_fix value (0409).<br>
</div>
<div><br></div><div>On the other side, the problem seems to be due to some differences in command string numbering or their prefix:<br><br></div><div><font size="1">[nut actual blazer_usb code snippet:]<br></font><pre><font size="1"><span>static</span> <span>int</span> krauler_command(<span>const</span> <span>char</span> *cmd, <span>char</span> *buf, <span>size_t</span> buflen)
{
<span>/*</span>
<span> * Still not implemented:</span>
<span> * 0x6 T<n> (don't know how to pass the parameter)</span>
<span> * 0x68 and 0x69 both cause shutdown after an undefined interval</span>
<span> */</span>
<span>const</span> <span>struct </span>{
<span>const</span> <span>char</span> *str; <span>/* Megatec command */</span>
<span>const</span> <span>int</span> index; <span>/* Krauler string index for this command */</span>
<span>const</span> <span>char</span> prefix; <span>/* character to replace the first byte in reply */</span>
} command[] = {
{ <span>"Q1\r"</span>, 0x03, <span>'('</span> },
{ <span>"F\r"</span>, 0x0d, <span>'#'</span> },
{ <span>"I\r"</span>, 0x0c, <span>'#'</span> },
{ <span>"T\r"</span>, 0x04, <span>'\r'</span> },
{ <span>"TL\r"</span>, 0x05, <span>'\r'</span> },
{ <span>"Q\r"</span>, 0x07, <span>'\r'</span> },
{ <span>"C\r"</span>, 0x0b, <span>'\r'</span> },
{ <span>"CT\r"</span>, 0x0b, <span>'\r'</span> },
{ NULL }
};<br></font></pre><pre><br></pre><pre>TL (0x05) or CT (0x0b) code seems not to be used in the relative sniffed file and 0x07 (Q in nut coding) seems to be related to "UPS No Ack" string).<br></pre><br></div>
Unfortunately I could only capture a few commands before leaving homr and right now I have no access to the UPS from windows to complete the sniffing, but I can still try nut (and any patch) in linux through remote shell.<br>
</div><div>If anyone who knows more about Megatec driver or has any hints, he's more than welcome.</div><div><br></div><div style>Thanks in advance,</div><div style>Rob</div><div style><br></div><div style>-------------------------------<br>
<br></div><div><br></div>Settings:<div><br><div><div>
[ERA_LCD]</div><div> driver = blazer_usb</div><div> subdriver = krauler</div><div> langid_fix=0x409</div><div> port = /dev/bus/usb/002/002<br></div><div> vendorid = 0001</div><div> productid = 0000</div>
<div> desc = "Tecnoware UPS ERA 0.8"</div><div><br></div><div>port was setted according to lsusb output:</div><div>$ lsusb</div><div>[...]</div><div>Bus 002 Device 002: ID 0001:0000 Fry's Electronics</div>
<br><div><div><div><div><div><div></div></div></div></div></div></div></div></div></div>