<br><div class="gmail_quote">2009/7/17 Greg Vickers <span dir="ltr">&lt;<a href="mailto:daehenoc@optusnet.com.au">daehenoc@optusnet.com.au</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Arnaud,<br>
<div><div></div><div class="h5"></div></div></blockquote><div><br>Hey Greg,<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>
<div class="h5"><br>
&gt; Arnaud Quette &lt;<a href="mailto:aquette.dev@gmail.com">aquette.dev@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; Hi Greg<br>
&gt;<br>
&gt; first, a thank to Kjell too...<br>
&gt;<br>
&gt; 2009/7/12 Greg Vickers &lt;<a href="mailto:daehenoc@optusnet.com.au">daehenoc@optusnet.com.au</a>&gt;<br>
&gt;<br>
&gt; &gt; Hi Kjell,<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Kjell Claesson wrote:<br>
&gt; &gt;<br>
&gt; &gt;&gt; Hi all,<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt; Hi Greg,<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;  I&#39;ve got a Powerware 5110 UPS that I&#39;m trying to set up with nut in<br>
&gt; &gt;&gt;&gt; Ubuntu.  I&#39;ve installed nut and configured the first two files:<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; $ cat /etc/nut/nut.conf<br>
&gt; &gt;&gt;&gt; MODE=standalone<br>
&gt; &gt;&gt;&gt; $ cat /etc/nut/ups.conf<br>
&gt; &gt;&gt;&gt; [pw5110]<br>
&gt; &gt;&gt;&gt;        driver = bcmxcp_usb<br>
&gt; &gt;&gt;&gt;        port = auto<br>
&gt; &gt;&gt;&gt; #       port = /dev/bus/usb/002/002<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt; Yes the port should be auto.<br>
&gt; &gt;&gt; And if you use the latest libusb you should have a device<br>
&gt; &gt;&gt; at /dev/bus/usb/002/002 that you have found.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;&gt; When I try to test this configuration with the following command:<br>
&gt; &gt;&gt;&gt; $ sudo upsdrvctl start pw5110<br>
&gt; &gt;&gt;&gt; Network UPS Tools - UPS driver controller 2.4.1<br>
&gt; &gt;&gt;&gt; Network UPS Tools - BCMXCP UPS driver 0.21 (2.4.1)<br>
&gt; &gt;&gt;&gt; USB communication subdriver 0.17<br>
&gt; &gt;&gt;&gt; Can&#39;t set POWERWARE USB configuration<br>
&gt; &gt;&gt;&gt; Unable to find POWERWARE UPS device on USB bus<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt; To make a real test that it read the usb you can do the following.<br>
&gt; &gt;&gt; Set libusb debug to 3.<br>
&gt; &gt;&gt; sudo export LIBUSB_DEBUG=3<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Then run the driver in debug (not by upsdrvctl).<br>
&gt; &gt;&gt; sudo /path/to/bcmxcp_usb -DD -u -a pw5110<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Now it should spit out some info. You end it by ctrl-c.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Report back and we can have a look.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; We may have a bug here, but it is not confirmed as our tests<br>
&gt; &gt;&gt; does not reveal it.<br>
&gt; &gt;&gt;<br>
&gt; &gt;<br>
&gt; &gt; After leaving my Ubuntu host overnight, I&#39;ve turned it on and the nut<br>
&gt; &gt; daemon was running when I tried the above check.  I stopped that<br>
&gt; daemon and<br>
&gt; &gt; the above test worked just fine!  I didn&#39;t change anything and now<br>
&gt; it&#39;s<br>
&gt; &gt; working just fine.<br>
&gt; &gt;<br>
&gt; &gt; Thank you for the information about the debug test!  All OK now! :)<br>
&gt;<br>
&gt; well, ok now, but there is still something under the hood!<br>
&gt; my guess is that the udev update change introduced by Scott James<br>
&gt; doesn&#39;t fully refresh the udev rights.<br>
&gt; I&#39;ve not taken the time to validate it though, so mea culpa.<br>
&gt; the result is basically that if you don&#39;t unplug/replug your device or<br>
&gt; reboot your system after nut installation, the udev rule is not applied.<br>
<br>
</div></div>I did try unplugging and replugging the USB cable the UPS was attached by, and still couldn&#39;t contact the UPS correctly.  I have also had trouble on this system with the IR receiver on my TV tuner card not reappearing on a reboot, I have to do a shutdown and turn the host back on to get the IR receiver device to reappear.  I didn&#39;t diagnose this IR receiver problem until after that night, so I suspect that this may have impacted the UPS communication as well.<br>

</blockquote><div><br>you&#39;re running Jaunty, right?<br>what perms do you have on your device (when it was not nut)?<br>a simple test (I&#39;ve just replayed here) is to remove nut (don&#39;t purge, you&#39;ll keep your config), unplug your UPS USB cord, plug it back and check the device, ie /dev/bus/usb/XXX/YYY<br>
where XXX is the Bus number and YYY the Device number, as given by lsusb.<br><br>here it was vboxusers (due to VirtualBox installed here).<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

However, now when I do a reboot, the UPS is detected just fine - go figure.<br>
<br>
At one point I was suspicious that the udev rule wasn&#39;t being run, and tried copying it into /etc/udev/rules.d, and un/re-plugging the UPS, but to no avail.<br>
<div class="im"></div></blockquote><div><br>/etc/udev/rules.d is now for local rules (ie the ones created by the user/sysadmin).<br>the distro rules now sits in /lib/udev/rules.d...<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">
&gt; I&#39;ll try to check that tomorrow, and make some more progress on 2.4.1-4,<br>
&gt; which will be a major Debian update.<br>
</div></blockquote></div><br>ok, I&#39;ve validated that the faulty bits is the new call to udevadm (thanks Scott James for this change!)<br>udevadm trigger --action=change<br clear="all">that is not sufficient to refresh (coldplug) the device perms without the before mentioned system reboot or device unplug/replug...<br>
the problem is that the previous call (udevadm trigger --subsystem-match=usb_device) will refresh all USB devices, resulting in a kind of reset.<br>I&#39;ve gotta check for a more suitable solution.<br><br>cheers,<br>Arnaud<br>
-- <br>Linux / Unix Expert R&amp;D - Eaton - <a href="http://www.eaton.com/mgeops">http://www.eaton.com/mgeops</a><br>Network UPS Tools (NUT) Project Leader - <a href="http://www.networkupstools.org/">http://www.networkupstools.org/</a><br>
Debian Developer - <a href="http://www.debian.org">http://www.debian.org</a><br>Free Software Developer - <a href="http://arnaud.quette.free.fr/">http://arnaud.quette.free.fr/</a><br><br>