Hi Paul,<br><br><div class="gmail_quote">2012/10/11 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 class="im">Arnaud Quette <aquette.dev <at> <a href="http://gmail.com" target="_blank">gmail.com</a>> writes:<br>
<br>
><br>
><br>
> Hi Paul<br>
</div>> 2012/8/19 Paul Barber <p <at> <a href="http://barbz.com.au" target="_blank">barbz.com.au</a>><br>
<div class="im">> Hi all,<br>
> I have an eaton ENV800HA connected for a freebsd 9.0 box with nut 2.6.5<br>
installed (on the supported list).<br>
><br>
> The UPS is connected using the Blazer_USB driver (not sure how to check its<br>
version).<br>
><br>
> When I kick off upsd it detects the UPS no problems and I get all my<br>
information:<br>
><br>
> battery.charge: 100battery.voltage: 13.60battery.voltage.high:<br>
13.00battery.voltage.low: 10.40battery.voltage.nominal: 12.0device.type:<br>
<a href="http://upsdriver.name" target="_blank">upsdriver.name</a>: blazer_usbdriver.parameter.pollinterval: 2driver.parameter.port:<br>
/dev/ugen1.5driver.version: 2.6.5-Unversioned directorydriver.version.internal:<br>
0.09input.current.nominal: 3.0input.frequency: 50.2input.frequency.nominal:<br>
50input.voltage: 245.0input.voltage.fault: 244.5input.voltage.nominal:<br>
240output.voltage: 245.0ups.beeper.status: enabledups.delay.shutdown:<br>
30ups.delay.start: 180ups.load: 4ups.productid: 5161ups.status:<br>
</div>OLups.temperature: 25.0ups.type: offline / line interactiveups.vendorid: 0665<br>
<div class="im">><br>
> However after a random amount of time I get the following error:<br>
> blazer_usb[4466]: Permissions problem: Input/output error<br>
><br>
> Followed by:<br>
> upsd[4468]: Can't connect to UPS [EatonUPS] (blazer_usb-EatonUPS): No such<br>
</div>file or directoryupsmon[4566]: Poll UPS [EatonUPS <at> localhost] failed -<br>
Driver not connectedupsmon[4566]: Communications with UPS EatonUPS <at><br>
localhost lostupssched-cmd: Communications with the UPS EatonUPS <at> localhost<br>
are lostupsmon[4566]: Poll UPS [EatonUPS <at> localhost] failed - Driver not<br>
<div class="im">connected<br>
><br>
> Ive tried the basics and chmod 777'd the ugen1.5 port (not a problem it if<br>
works for a while) but worth a shot.<br>
><br>
> After doing some reading on here I ran /usr/local/libexec/nut/./blazer_usb -u<br>
root -DDD -a EatonUPS which on its first run worked for 72 seconds, but 330<br>
seconds on the second run before ending with:<br>
><br>
><br>
> 327.930857   send: Q1 328.193486   read: (247.0 247.0 247.0 004 50.0 13.6 25.0<br>
00001001 329.940841   send: Q1 330.177471   read: (247.0 247.0 247.0 004 50.0<br>
13.6 25.0 00001001 331.950574   send: Q1 332.193457   read: (247.0 247.0 247.0<br>
004 50.0 13.6 25.0 00001001 338.860148   send: Unknown error 338.860204 <br>
 Permissions problem: Input/output error<br>
><br>
> Ive also found the following message in the log when I start upsd:<br>
> root: Unknown USB device: vendor 0x0665 product 0x5161 bus uhub2<br>
><br>
><br>
><br>
> is this msg different from the one when you initially plug your UPS USB cord? <br>
><br>
><br>
>  Any ideas where to go from here?<br>
><br>
><br>
</div>> good question!blazer_usb will reconnect upon certain error, like your IO<br>
one.but the thing is that device permissions must allow that.<br>
<div class="im">> Ie, on Linux, udev is in charge of setting the permissions for NUT on all<br>
</div>known devices.thus, upon any kind of disconnection/reconnection, NUT will be<br>
<div class="im">able to establish again the communication.you should dig around<br>
</div>this...cheers,Arnaud-- Linux / Unix / Opensource Engineering Expert - Eaton -<br>
<a href="http://opensource.eaton.comNetwork" target="_blank">http://opensource.eaton.comNetwork</a> UPS Tools (NUT) Project Leader -<br>
<a href="http://www.networkupstools.org" target="_blank">http://www.networkupstools.org</a><br>
> Debian Developer - <a href="http://www.debian.orgFree" target="_blank">http://www.debian.orgFree</a> Software Developer -<br>
<a href="http://arnaud.quette.fr" target="_blank">http://arnaud.quette.fr</a><br>
><br>
><br>
> _______________________________________________<br>
> Nut-upsuser mailing list<br>
> Nut-upsuser <at> <a href="http://lists.alioth.debian.org" target="_blank">lists.alioth.debian.org</a><br>
> <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><br>
<br>
Had a bit more of a play with this and still couldn't make it work.<br>
<br>
Ive tried this now also on openindiana with the latest nut - same issue works<br>
for 5 minutes then drops out with stale data errors (at the same time as the<br>
permission errors in BSD).<br>
<br>
Ive played with the polling times out to 30 seconds and this hasn't made a<br>
difference.<br>
<br>
Also when it does go to stale data it wont also detect again (I had the same<br>
problems on free bsd)<br>
<br>
For example:<br>
paul@indy:/opt/nut/bin# ./blazer_usb -u root -DDD -a trust<br>
Network UPS Tools - Megatec/Q1 protocol USB driver 0.09 (2.6.5)<br>
   0.000000     debug level is '3'<br>
   0.093158     Checking device (0665/5161) (/dev/usb/665.5161/0)<br>
   0.100375     - VendorID: 0665<br>
   0.100413     - ProductID: 5161<br>
   0.100433     - Manufacturer: INNO TECH<br>
   0.100455     - Product: USB to Serial<br>
   0.100475     - Serial Number: 20100826<br>
   0.100493     - Bus: /dev/usb<br>
   0.100513     Trying to match device<br>
   0.100533     Device matches<br>
   0.100601     Trying megatec protocol...<br>
   0.101337     send: Q1<br>
   0.351941     read: (248.5 248.5 248.5 003 50.0 13.6 25.0 00001001<br>
   0.352107     Status read in 1 tries<br>
   0.352139     Supported UPS detected with megatec protocol<br>
   0.352710     send: F<br>
   0.511933     read: #240.0 003 12.00 50.0<br>
   0.511997     Ratings read in 1 tries<br>
   0.512731     send: I<br>
   0.571931     read: I<br>
   0.571972     blazer_vendor: short reply<br>
   0.571994     Vendor information read 1 failed<br>
   0.572876     send: I<br>
   0.641968     read: I<br>
   0.642009     blazer_vendor: short reply<br>
   0.642031     Vendor information read 2 failed<br>
   0.642748     send: I<br>
   0.701980     read: I<br>
   0.702021     blazer_vendor: short reply<br>
   0.702042     Vendor information read 3 failed<br>
   0.702066     Vendor information unavailable<br>
   0.702087     No values provided for battery high/low voltages in ups.conf<br>
   0.702120     Using 'guestimation' (low: 10.400000, high: 13.000000)!<br>
   0.702142     Battery runtime will not be calculated (runtimecal not set)<br>
   0.702718     send: Q1<br>
   0.961973     read: (248.5 248.5 249.0 003 50.0 13.6 25.0 00001001<br>
   0.962584     dstate_init: sock /var/ups/blazer_usb-trust open on fd 7<br>
   0.963367     send: Q1<br>
   1.211876     read: (249.0 248.5 248.5 003 50.0 13.6 25.0 00001001<br>
   2.962548     send: Q1<br>
   3.231991     read: (248.5 248.5 248.5 003 50.0 13.6 25.0 00001001<br>
   4.952462     send: Q1<br>
   5.211943     read: (248.5 249.0 248.5 003 50.0 13.6 25.0 00001001<br>
   6.942513     send: Q1<br>
   7.201996     read: (249.0 248.5 248.5 003 50.0 13.6 25.0 00001001<br>
^C<br>
<br>
Then after it drops out:<br></blockquote><div><br>I'd like to see the continuation of the trace above, including the drop out and reconnection attempts.<br><br>I would also need the 2 following info:<br>- what is the actual status of the device file (/dev/usb/665.5161/0), i.e permissions<br>
- any usb related messages from your system log.<br>the below "(0000/0000)" for "Checking device" implies that there is a kernel issue.<br>it should be as above (0665/5161).<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

paul@indy:/opt/nut/bin# ./blazer_usb -u root -DDD -a trust<br>
Network UPS Tools - Megatec/Q1 protocol USB driver 0.09 (2.6.5)<br>
   0.000000     debug level is '3'<br>
   3.972638     Checking device (0000/0000) (/dev/usb/665.5161/0)<br>
   8.949923     Failed to open device, skipping. (Invalid argument)<br>
   8.983461     No supported devices found. Please check your device<br>
availability with 'lsusb'<br>
and make sure you have an up-to-date version of NUT. If this does not help,<br>
try running the driver with at least 'subdriver', 'vendorid' and 'productid'<br>
options specified. Please refer to the man page for details about these options<br>
(man 8 blazer).<br>
<br>
Any suggestions where to next?</blockquote><div><br>I still don't have a clear visibility on USB with *BSD.<br>which exact BSD are you using?<br>what is the result of an "ldd ./blazer_usb"?<br>there are known issues with the libusb re-implementation on FreeBSD...<br>
<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Im considering tossing the UPS and buying an APC.<br clear="all"></blockquote></div><br>understandable.<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>