<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 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 href="http://www.networkupstools.org" target="_blank">http://www.networkupstools.org</a><br>Debian Developer - <a href="http://www.debian.org" target="_blank">http://www.debian.org</a><br>Free Software Developer - <a 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 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 href="http://www.networkupstools.org" target="_blank">http://www.networkupstools.org</a><br>
              Debian Developer - <a href="http://www.debian.org" target="_blank">http://www.debian.org</a><br>
              Free Software Developer - <a href="http://arnaud.quette.fr" target="_blank">http://arnaud.quette.fr</a><br>
              <br>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
  </div></div></div>

</blockquote></div><br><br><div class="gmail_signature"><div dir="ltr"><br></div></div>
</div></div></div>