<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello Arno,<br>
<br>
FreeNAS doesn't come with a compiler and I had to compile with the
patch on FreebBSD-9.3 and then copy the produced mge-shut.
Unfortunately it didn't work out. For every try I was getting
"Connection Refused" and when I tried
/usr/local/libexec/nut/mge-shut -D -a <ups_name> I was always
getting 'No matching HID UPS found'.<br>
<br>
I returned back to the USB connection now which seem to work better.<br>
<br>
Thank you very much for your help anyway.<br>
<br>
Best regards,<br>
Panagiotis<br>
<br>
<div class="moz-cite-prefix">On 7/4/2015 10:20 πμ, Arnaud Quette
wrote:<br>
</div>
<blockquote
cite="mid:CAFm_bUji-mtckg=c=eRAHDXjt7MTVO4YNi7EeZSO==46eETmTw@mail.gmail.com"
type="cite">
<div dir="ltr">Hi Panagiotis
<div>
<div class="gmail_extra"><br>
<div class="gmail_quote">2015-04-06 9:13 GMT+02:00
Panagiotis Kritikakos <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:panagiotis.kritikakos@nikitec.gr"
target="_blank">panagiotis.kritikakos@nikitec.gr</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> Hello Arno,<br>
<br>
Can apply the patch directly or should I recompile
nut?<br>
</div>
</blockquote>
<div> <br>
</div>
<div>not sure to fully understand your comment, but...<br>
</div>
<div>this is a source code patch, so you indeed have to
apply it to the NUT source code (from within the source
tree, "patch -p1 < ../path/to/patch_file), and then
recompile (make, at least, or configure).<br>
</div>
<div>note that the configure flags should be adapted to
your specific distro to ensure easier testing.<br>
</div>
<div>not sure about FreeNas ones, but that can be found in
their package repos.<br>
</div>
<div><br>
<div class="gmail_extra">cheers,<br clear="all">
</div>
Arno<br>
-- <br>
Eaton Data Center Automation - Opensource Leader<br>
NUT (Network UPS Tools) Project Leader - <a
moz-do-not-send="true"
href="http://www.networkupstools.org" target="_blank">http://www.networkupstools.org</a><br>
Debian Developer - <a moz-do-not-send="true"
href="http://www.debian.org" target="_blank">http://www.debian.org</a><br>
Free Software Developer - <a moz-do-not-send="true"
href="http://arnaud.quette.fr" target="_blank">http://arnaud.quette.fr</a><br>
<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>
<div class="h5"> <br>
<div>On 3/4/2015 5:06 μμ, Arnaud Quette wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hello Panagiotis
<div class="gmail_extra"><br>
<div class="gmail_quote">2015-04-03 14:28
GMT+02:00 Panagiotis Kritikakos <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:panagiotis.kritikakos@nikitec.gr" target="_blank">panagiotis.kritikakos@nikitec.gr</a>></span>:<br>
<blockquote class="gmail_quote"
style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">Hello
Arno,<span><br>
<br>
<blockquote class="gmail_quote"
style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
Question: have you also tested
oldmge-shut?<br>
Otherwise, that might be interesting
to do so and send back the results
of these tests...<br>
</blockquote>
</span> Yes, I've tried this as well
with worse results unfortunately. This
driver seems to be even more unstable.
When it gets able to set communication
with the UPS (which is not always the
case), it usually lost it again after a
while.<br>
<br>
~# /usr/local/libexec/nut/oldmge-shut
-DD -a ups-filesrv01<br>
Network UPS Tools - Eaton / SHUT driver
0.70 (2.7.2)<span><br>
0.000000 debug level is '2'<br>
</span> 0.000882 entering
upsdrv_initups()<br>
0.001019 entering
shut_ups_start()<br>
<br>
0.028445 Communication with UPS
established<br>
0.028457 entering
shut_get_descriptor(n 21, 9)<br>
0.111394 shut_wait_ack(): ACK
received<br>
0.185328 entering
shut_get_descriptor(n 01, 18)<br>
0.273455 shut_wait_ack(): ACK
received<br>
0.423238 Device Descriptor:<br>
bLength: 0x12<br>
bDescriptorType:
0x01<br>
bcdUSB: 0x0110<br>
bDeviceClass: 0x00<br>
bDeviceSubClass:
0x00<br>
bDeviceProtocol: 0x00<br>
bMaxPacketSize0:
0x08<br>
idVendor: 0x0463<br>
idProduct: 0xffff<br>
bcdDevice:
0x0100<br>
iManufacturer: 0x01<br>
iProduct:
0x02<br>
iSerialNumber: 0x03<br>
bNumConfigurations: 0x01<br>
<br>
0.423251 entering
shut_get_descriptor(n 22, 1538)<br>
0.525087 shut_wait_ack(): ACK
received<br>
9.705471 Unable to get Report
Descriptor<br>
<br>
<br>
It there a possibility to be an issue of
the UPS, or the connection between the
serial port of the machine and the UPS?<br>
</blockquote>
<div><br>
<br>
</div>
<div>thanks for the confirmation with
oldmge-shut. I'm not astonished on the
results, but was worth a try.<br>
<br>
</div>
<div>I've double checked the related code
difference for mge-shut between 2.7.1
and 2.7.2.<br>
</div>
<div>Again, the only diff I see is the one
pointed previously (setline...).<br>
</div>
<div>So, it would be great if you could
test this patch (through some reboots)
and report back.<br>
</div>
<div><br>
</div>
<div>Then, I don't think it's an issue
with the device.<br>
</div>
<div>There is a long run TODO (mentioned
in the header of libshut.c) that is the
baudrate negotiation.<br>
</div>
<div>The driver still communicates at
2400bauds, which is not that much for
such verbose units. We could go at least
for 9600 on these units, which is 4
times faster already.<br>
</div>
<div>This may cause some slowness and
behavior issues as you're experiencing,
under some circumstances.<br>
</div>
</div>
For example, the test using a 5SC750 on
Linux (Debian Jessie) shows that report
descriptor (size 1538) takes ~10 seconds to
be retrieved, which is quite long.<br>
</div>
<div class="gmail_extra">Then, even if this
"new"mge-shut is a lot better than the
oldmge-shut, it can still be perfected on
the error handling (and not optimal cases),
which you may be hitting.<br>
</div>
<div class="gmail_extra">And finally, the
notification handling could also help to
poll less the unit, while being notified of
critical status changes.<br>
</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">cheers,<br
clear="all">
</div>
<div class="gmail_extra">Arno<br>
</div>
<div class="gmail_extra">-- <br>
<div>
<div dir="ltr">Eaton Data Center
Automation - Opensource Leader<br>
NUT (Network UPS Tools) Project Leader -
<a moz-do-not-send="true"
href="http://www.networkupstools.org"
target="_blank">http://www.networkupstools.org</a><br>
Debian Developer - <a
moz-do-not-send="true"
href="http://www.debian.org"
target="_blank">http://www.debian.org</a><br>
Free Software Developer - <a
moz-do-not-send="true"
href="http://arnaud.quette.fr"
target="_blank">http://arnaud.quette.fr</a></div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</blockquote>
<br>
</body>
</html>