Hi Paul,<br><br>as told privately, I will there be acting as an individual, since Eaton current stance is to not allow me to support NUT users nor to do my NUT leader tasks on my working hours for a few weeks now!<br><br>the current Eaton support is limited to Frederic's work on the Windows port, and Vaclav integration works (clock_gettime and monotonic).<br>
<br><div class="gmail_quote">2012/10/15 Paul Barber <span dir="ltr"><<a href="mailto:p@barbz.com.au" target="_blank">p@barbz.com.au</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

  
    
  
  <div bgcolor="#FFFFFF" text="#000000"><div><div class="h5">
    <div>On 11/10/2012 2:46 PM, Paul Barber
      wrote:<br>
    </div>
    <blockquote type="cite">
      <pre>Arnaud Quette <aquette.dev <at> <a href="http://gmail.com" target="_blank">gmail.com</a>> writes:

</pre>
      <blockquote type="cite">
        <pre>Hi Paul
2012/8/19 Paul Barber <p <at> <a href="http://barbz.com.au" target="_blank">barbz.com.au</a>>
Hi all,
I have an eaton ENV800HA connected for a freebsd 9.0 box with nut 2.6.5 
</pre>
      </blockquote>
      <pre>installed (on the supported list).
</pre>
      <blockquote type="cite">
        <pre>The UPS is connected using the Blazer_USB driver (not sure how to check its 
</pre>
      </blockquote>
      <pre>version).
</pre>
      <blockquote type="cite">
        <pre>When I kick off upsd it detects the UPS no problems and I get all my 
</pre>
      </blockquote>
      <pre>information:
</pre>
      <blockquote type="cite">
        <pre>battery.charge: 100battery.voltage: 13.60battery.voltage.high: 
</pre>
      </blockquote>
      <pre>13.00battery.voltage.low: 10.40battery.voltage.nominal: 12.0device.type: 
<a href="http://upsdriver.name" target="_blank">upsdriver.name</a>: blazer_usbdriver.parameter.pollinterval: 2driver.parameter.port: 
/dev/ugen1.5driver.version: 2.6.5-Unversioned directorydriver.version.internal: 
0.09input.current.nominal: 3.0input.frequency: 50.2input.frequency.nominal: 
50input.voltage: 245.0input.voltage.fault: 244.5input.voltage.nominal: 
240output.voltage: 245.0ups.beeper.status: enabledups.delay.shutdown: 
30ups.delay.start: 180ups.load: 4ups.productid: 5161ups.status: 
OLups.temperature: 25.0ups.type: offline / line interactiveups.vendorid: 0665
</pre>
      <blockquote type="cite">
        <pre>However after a random amount of time I get the following error:
blazer_usb[4466]: Permissions problem: Input/output error

Followed by:
upsd[4468]: Can't connect to UPS [EatonUPS] (blazer_usb-EatonUPS): No such 
</pre>
      </blockquote>
      <pre>file or directoryupsmon[4566]: Poll UPS [EatonUPS <at> localhost] failed - 
Driver not connectedupsmon[4566]: Communications with UPS EatonUPS <at> 
localhost lostupssched-cmd: Communications with the UPS EatonUPS <at> localhost 
are lostupsmon[4566]: Poll UPS [EatonUPS <at> localhost] failed - Driver not 
connected
</pre>
      <blockquote type="cite">
        <pre>Ive tried the basics and chmod 777'd the ugen1.5 port (not a problem it if 
</pre>
      </blockquote>
      <pre>works for a while) but worth a shot.
</pre>
      <blockquote type="cite">
        <pre>After doing some reading on here I ran /usr/local/libexec/nut/./blazer_usb -u 
</pre>
      </blockquote>
      <pre>root -DDD -a EatonUPS which on its first run worked for 72 seconds, but 330 
seconds on the second run before ending with:
</pre>
      <blockquote type="cite">
        <pre>327.930857   send: Q1 328.193486   read: (247.0 247.0 247.0 004 50.0 13.6 25.0 
</pre>
      </blockquote>
      <pre>00001001 329.940841   send: Q1 330.177471   read: (247.0 247.0 247.0 004 50.0 
13.6 25.0 00001001 331.950574   send: Q1 332.193457   read: (247.0 247.0 247.0 
004 50.0 13.6 25.0 00001001 338.860148   send: Unknown error 338.860204  
 Permissions problem: Input/output error
</pre>
      <blockquote type="cite">
        <pre>Ive also found the following message in the log when I start upsd:
root: Unknown USB device: vendor 0x0665 product 0x5161 bus uhub2



is this msg different from the one when you initially plug your UPS USB cord? 


 Any ideas where to go from here?


good question!blazer_usb will reconnect upon certain error, like your IO 
</pre>
      </blockquote>
      <pre>one.but the thing is that device permissions must allow that.
</pre>
      <blockquote type="cite">
        <pre>Ie, on Linux, udev is in charge of setting the permissions for NUT on all 
</pre>
      </blockquote>
      <pre>known devices.thus, upon any kind of disconnection/reconnection, NUT will be 
able to establish again the communication.you should dig around 
this...cheers,Arnaud-- Linux / Unix / Opensource Engineering Expert - Eaton - 
<a href="http://opensource.eaton.comNetwork" target="_blank">http://opensource.eaton.comNetwork</a> UPS Tools (NUT) Project Leader - 
<a href="http://www.networkupstools.org" target="_blank">http://www.networkupstools.org</a>
</pre>
      <blockquote type="cite">
        <pre>Debian Developer - <a href="http://www.debian.orgFree" target="_blank">http://www.debian.orgFree</a> Software Developer - 
</pre>
      </blockquote>
      <pre><a href="http://arnaud.quette.fr" target="_blank">http://arnaud.quette.fr</a>
</pre>
      <blockquote type="cite">
        <pre>_______________________________________________
Nut-upsuser mailing list
Nut-upsuser <at> <a href="http://lists.alioth.debian.org" target="_blank">lists.alioth.debian.org</a>
<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser" target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser</a>
</pre>
      </blockquote>
      <pre>Had a bit more of a play with this and still couldn't make it work.

Ive tried this now also on openindiana with the latest nut - same issue works 
for 5 minutes then drops out with stale data errors (at the same time as the 
permission errors in BSD).

Ive played with the polling times out to 30 seconds and this hasn't made a 
difference.

Also when it does go to stale data it wont also detect again (I had the same 
problems on free bsd)

For example:
paul@indy:/opt/nut/bin# ./blazer_usb -u root -DDD -a trust
Network UPS Tools - Megatec/Q1 protocol USB driver 0.09 (2.6.5)
   0.000000     debug level is '3'
   0.093158     Checking device (0665/5161) (/dev/usb/665.5161/0)
   0.100375     - VendorID: 0665
   0.100413     - ProductID: 5161
   0.100433     - Manufacturer: INNO TECH
   0.100455     - Product: USB to Serial
   0.100475     - Serial Number: 20100826
   0.100493     - Bus: /dev/usb
   0.100513     Trying to match device
   0.100533     Device matches
   0.100601     Trying megatec protocol...
   0.101337     send: Q1
   0.351941     read: (248.5 248.5 248.5 003 50.0 13.6 25.0 00001001
   0.352107     Status read in 1 tries
   0.352139     Supported UPS detected with megatec protocol
   0.352710     send: F
   0.511933     read: #240.0 003 12.00 50.0
   0.511997     Ratings read in 1 tries
   0.512731     send: I
   0.571931     read: I
   0.571972     blazer_vendor: short reply
   0.571994     Vendor information read 1 failed
   0.572876     send: I
   0.641968     read: I
   0.642009     blazer_vendor: short reply
   0.642031     Vendor information read 2 failed
   0.642748     send: I
   0.701980     read: I
   0.702021     blazer_vendor: short reply
   0.702042     Vendor information read 3 failed
   0.702066     Vendor information unavailable
   0.702087     No values provided for battery high/low voltages in ups.conf
   0.702120     Using 'guestimation' (low: 10.400000, high: 13.000000)!
   0.702142     Battery runtime will not be calculated (runtimecal not set)
   0.702718     send: Q1
   0.961973     read: (248.5 248.5 249.0 003 50.0 13.6 25.0 00001001
   0.962584     dstate_init: sock /var/ups/blazer_usb-trust open on fd 7
   0.963367     send: Q1
   1.211876     read: (249.0 248.5 248.5 003 50.0 13.6 25.0 00001001
   2.962548     send: Q1
   3.231991     read: (248.5 248.5 248.5 003 50.0 13.6 25.0 00001001
   4.952462     send: Q1
   5.211943     read: (248.5 249.0 248.5 003 50.0 13.6 25.0 00001001
   6.942513     send: Q1
   7.201996     read: (249.0 248.5 248.5 003 50.0 13.6 25.0 00001001
^C

Then after it drops out:

paul@indy:/opt/nut/bin# ./blazer_usb -u root -DDD -a trust
Network UPS Tools - Megatec/Q1 protocol USB driver 0.09 (2.6.5)
   0.000000     debug level is '3'
   3.972638     Checking device (0000/0000) (/dev/usb/665.5161/0)
   8.949923     Failed to open device, skipping. (Invalid argument)
   8.983461     No supported devices found. Please check your device 
availability with 'lsusb'
and make sure you have an up-to-date version of NUT. If this does not help,
try running the driver with at least 'subdriver', 'vendorid' and 'productid'
options specified. Please refer to the man page for details about these options
(man 8 blazer).

Any suggestions where to next? Im considering tossing the UPS and buying an APC.

Paul




_______________________________________________
Nut-upsuser mailing list
<a href="mailto:Nut-upsuser@lists.alioth.debian.org" target="_blank">Nut-upsuser@lists.alioth.debian.org</a>
<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser" target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser</a></pre>
    </blockquote></div></div>
    Sorry Arnaud,<br>
    <br>
    I swapped over to openindiana 151a6 as I was having less USB issues
    with other devices; My problem with this is more stale data (moving
    away from bsd fixed the permission error).<br>
    <br>
    This is set with a 30 second polling interval at the driver (not
    upsmon).<br>
    <br>
    Running blazer_usb -ddd drops out anywhere from 30 minutes to 4
    hours - it does a send but just stops and never gets a read back.<br>
       <i> 1.951518     dstate_init: sock /var/ups/blazer_usb-eaton open
      on fd 7</i>
    <div><i>   1.952147     send: Q1</i></div>
    <div><i>   2.201114     read: (246.0 246.0 246.0 010 50.2 13.6 25.0
        00001001</i></div>
    <div><i>  31.952338     send: Q1</i></div>
    <div><i>  32.221149     read: (246.5 246.5 246.5 010 50.2 13.6 25.0
        00001001</i></div>
    <div><i>  61.952325     send: Q1</i></div>
    <div><i>…</i></div>
    <div><i>1951.954098     send: Q1</i></div>
    <div><i>1952.231155     read: (244.1 244.1 244.1 011 50.0 13.6 25.0
        00001001</i></div>
    <div><i>1986.588222     send: Q1</i></div>
    <br>
    <br>
    When I run the full package my mileage varies as above - anywhere
    from 30 minutes to 4 hours.<br>
    <br>
    <div>
      <div><i>paul@indy:/opt/nut/script$ sudo ./nut start</i></div>
      <div><i>paul@indy:/opt/nut/script$ Broadcast Message from paul
          (???) on indy Mon Oct 15 06:29:39...</i></div>
      <div><i>Communications with UPS eaton@localhost established</i><i><br>
        </i><i>...</i><i><br>
        </i></div>
      <div>
        <div><i>paul@indy:/opt/nut$ ./bin/upsc eaton@localhost</i></div><div class="im">
        <div><i>battery.charge: 100</i></div>
        <div><i>battery.voltage: 13.60</i></div>
        <div><i>battery.voltage.high: 13.00</i></div>
        <div><i>battery.voltage.low: 10.40</i></div>
        <div><i>battery.voltage.nominal: 12.0</i></div>
        <div><i>device.type: ups</i></div>
        <div><i><a href="http://driver.name" target="_blank">driver.name</a>: blazer_usb</i></div>
        </div><div><i>driver.parameter.pollinterval: 30</i></div>
        <div><i>driver.parameter.port: auto</i></div>
        <div><i>driver.version: 2.6.5</i></div>
        <div><i>driver.version.internal: 0.09</i></div>
        <div><i>input.current.nominal: 3.0</i></div>
        <div><i>input.frequency: 50.0</i></div>
        <div><i>input.frequency.nominal: 50</i></div>
        <div><i>input.voltage: 248.5</i></div>
        <div><i>input.voltage.fault: 248.5</i></div>
        <div><i>input.voltage.nominal: 240</i></div>
        <div><i>output.voltage: 248.5</i></div><div class="im">
        <div><i>ups.beeper.status: enabled</i></div>
        <div><i>ups.delay.shutdown: 30</i></div>
        <div><i>ups.delay.start: 180</i></div>
        </div><div><i>ups.load: 10</i></div><div class="im">
        <div><i>ups.productid: 5161</i></div>
        <div><i>ups.status: OL</i></div>
        <div><i>ups.temperature: 25.0</i></div>
        <div><i>ups.type: offline / line interactive</i></div>
        <div><i>ups.vendorid: 0665</i></div>
        </div><div><i>paul@indy:/opt/nut$ </i></div>
        <div><i>….</i></div>
      </div>
    </div>
    <div><i>Oct 15 13:32:41 indy upsd[1513]: [ID 702911 daemon.notice]
        Data for UPS [eaton] is stale - check driver</i><i><br>
      </i><i> Oct 15 13:32:45 indy upsmon[1516]: [ID 702911
        daemon.error] Poll UPS [eaton@localhost] failed - Data stale</i><i><br>
      </i><i> Oct 15 13:32:45 indy upsmon[1516]: [ID 702911
        daemon.notice] Communications with UPS eaton@localhost lost</i><i><br>
      </i><i> Oct 15 13:32:49 indy upsmon[28220]: [ID 702911
        daemon.error] Poll UPS [eaton@localhost] failed - Data stale</i><i><br>
      </i><i> Oct 15 13:32:49 indy upsmon[28220]: [ID 702911
        daemon.notice] Communications with UPS eaton@localhost lost</i><i><br>
      </i><i> ...</i><i><br>
      </i> </div>
    <i> Stop the service &</i><i><br>
    </i><i> Oct 15 13:34:00 indy blazer_usb[1511]: [ID 702911
      daemon.notice] Parse error on sock: Invalid ctx buffer</i><i><br>
    </i><i> Oct 15 13:34:09 indy upsmon[28220]: [ID 702911 daemon.error]
      Poll UPS [eaton@localhost] failed - Server disconnected</i><br>
    <br>
    <br>
    Nothing shows up in the logs other than what is here - permissions
    for the device are drwxr-xr-x   3 root root   3 2012-10-14 18:18
    665.5161/0<br></div></blockquote><div><br>the msg may be related to 'ugen' (the usb generic kernel driver), libusb, or the device node name too<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
    Ill keep testing and see if I can break it where i cant find the
    device (as per last time) but that was on openindiana 151a5 so not
    sure if somethings been fixed in a6.<span class="HOEnZb"><font color="#888888"></font></span><br></div></blockquote></div><br>in can't say. If you look at the changelog, grep for 'ugen'...<br><br>back on your issue, could you:<br>
- restart the driver in debug mode 5 (-DDDDD), after doing an 'export USB_DEBUG=3' which should enable libusb trace<br clear="all">- catch the error trace, including ~ 1 mn before.<br>you can automate stopping the driver with a simple shell loop, that check the driver staleness using 'upsc' and if so, kill it.<br>
I can provide a snippet if needed.<br><br>cheers,<br>Arnaud<br>-- <br>Network UPS Tools (NUT) 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>