<br><div class="gmail_quote">2009/7/17 Greg Vickers <span dir="ltr"><<a href="mailto:daehenoc@optusnet.com.au">daehenoc@optusnet.com.au</a>></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>
> Arnaud Quette <<a href="mailto:aquette.dev@gmail.com">aquette.dev@gmail.com</a>> wrote:<br>
><br>
> Hi Greg<br>
><br>
> first, a thank to Kjell too...<br>
><br>
> 2009/7/12 Greg Vickers <<a href="mailto:daehenoc@optusnet.com.au">daehenoc@optusnet.com.au</a>><br>
><br>
> > Hi Kjell,<br>
> ><br>
> ><br>
> > Kjell Claesson wrote:<br>
> ><br>
> >> Hi all,<br>
> >>><br>
> >> Hi Greg,<br>
> >><br>
> >> I've got a Powerware 5110 UPS that I'm trying to set up with nut in<br>
> >>> Ubuntu. I've installed nut and configured the first two files:<br>
> >>><br>
> >>> $ cat /etc/nut/nut.conf<br>
> >>> MODE=standalone<br>
> >>> $ cat /etc/nut/ups.conf<br>
> >>> [pw5110]<br>
> >>> driver = bcmxcp_usb<br>
> >>> port = auto<br>
> >>> # port = /dev/bus/usb/002/002<br>
> >>><br>
> >> Yes the port should be auto.<br>
> >> And if you use the latest libusb you should have a device<br>
> >> at /dev/bus/usb/002/002 that you have found.<br>
> >><br>
> >><br>
> >>> When I try to test this configuration with the following command:<br>
> >>> $ sudo upsdrvctl start pw5110<br>
> >>> Network UPS Tools - UPS driver controller 2.4.1<br>
> >>> Network UPS Tools - BCMXCP UPS driver 0.21 (2.4.1)<br>
> >>> USB communication subdriver 0.17<br>
> >>> Can't set POWERWARE USB configuration<br>
> >>> Unable to find POWERWARE UPS device on USB bus<br>
> >>><br>
> >>><br>
> >> To make a real test that it read the usb you can do the following.<br>
> >> Set libusb debug to 3.<br>
> >> sudo export LIBUSB_DEBUG=3<br>
> >><br>
> >> Then run the driver in debug (not by upsdrvctl).<br>
> >> sudo /path/to/bcmxcp_usb -DD -u -a pw5110<br>
> >><br>
> >> Now it should spit out some info. You end it by ctrl-c.<br>
> >><br>
> >> Report back and we can have a look.<br>
> >><br>
> >> We may have a bug here, but it is not confirmed as our tests<br>
> >> does not reveal it.<br>
> >><br>
> ><br>
> > After leaving my Ubuntu host overnight, I've turned it on and the nut<br>
> > daemon was running when I tried the above check. I stopped that<br>
> daemon and<br>
> > the above test worked just fine! I didn't change anything and now<br>
> it's<br>
> > working just fine.<br>
> ><br>
> > Thank you for the information about the debug test! All OK now! :)<br>
><br>
> well, ok now, but there is still something under the hood!<br>
> my guess is that the udev update change introduced by Scott James<br>
> doesn't fully refresh the udev rights.<br>
> I've not taken the time to validate it though, so mea culpa.<br>
> the result is basically that if you don't unplug/replug your device or<br>
> 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'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'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're running Jaunty, right?<br>what perms do you have on your device (when it was not nut)?<br>a simple test (I've just replayed here) is to remove nut (don't purge, you'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'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">
> I'll try to check that tomorrow, and make some more progress on 2.4.1-4,<br>
> which will be a major Debian update.<br>
</div></blockquote></div><br>ok, I'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've gotta check for a more suitable solution.<br><br>cheers,<br>Arnaud<br>
-- <br>Linux / Unix Expert R&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>