I have changed over to CentOS5 on some of our computers. I had been using Mandriva 2006 and the nut software worked using: driver = newhidups port = auto Using the same version of nut with the same config files on CentOS5, I get the following error output from 'upsdrvctl': Network UPS Tools - UPS driver controller 2.0.4 Network UPS Tools: New USB/HID UPS driver 0.28 (2.0.4) No matching USB/HID UPS found Driver failed to start (exit status=1) The following libusb files are installed: libusb-0.1.12-5.1 libusb-devel-0.1.12-5.1 Using ./configure --with-user=ups the lines for libusb show: checking for libusb cflags... checking for libusb libs... -lusb All UPSs are Belkin F6H375-USB. I have searched the internet and your mailing lists with no solution. Any help will be appreciated, David
On 6/3/07, dcw <dwoody1 at charter.net> wrote:> I have changed over to CentOS5 on some of our computers. I had been using > Mandriva 2006 and the nut software worked using: > > driver = newhidups > port = autoDid you set up udev (or hotplug) to change ownership of the USB node for the UPS (probably under either /proc/bus/usb or /dev/bus/usb)? See scripts/udev or scripts/hotplug as appropriate. Are you installing from source or RPMs?> Using the same version of nut with the same config files on CentOS5, I get the > following error output from 'upsdrvctl': > > Network UPS Tools - UPS driver controller 2.0.4 > Network UPS Tools: New USB/HID UPS driver 0.28 (2.0.4) > > No matching USB/HID UPS found > Driver failed to start (exit status=1)If the udev/hotplug idea doesn't work, try starting the driver manually to see what the error is: /path/to/newhidups -a <name-of-ups> -DD -- - Charles Lepple
Thanks for your quick reply! On Sunday 03 June 2007 1:45 pm, you wrote:> On 6/3/07, dcw <dwoody1 at charter.net> wrote: > > I have changed over to CentOS5 on some of our computers. I had been using > > Mandriva 2006 and the nut software worked using: > > > > driver = newhidups > > port = auto > > Did you set up udev (or hotplug) to change ownership of the USB node > for the UPS (probably under either /proc/bus/usb or /dev/bus/usb)? See > scripts/udev or scripts/hotplug as appropriate.I had not done that. The source did not have scripts/udev but did have scripts/hotplug. I read the README for scripts/hotplug and installed the 2 files as follows: [root]->l /etc/hotplug/usb total 8 -rwxr-xr-x 1 root root 478 Jun 3 14:07 libhidups -rw-r--r-- 1 root root 1502 Jun 3 14:08 libhid.usermap It also said: call 'update-usb.usermap' or equivalent if needed Using yum whatprovides indicates that there are no packages that provide this. I do not know what the equivalent would be.??> Are you installing from source or RPMs?I downloaded the 2.0.4 source tar.gz from networkupstools.org.> > Using the same version of nut with the same config files on CentOS5, I > > get the following error output from 'upsdrvctl': > > > > Network UPS Tools - UPS driver controller 2.0.4 > > Network UPS Tools: New USB/HID UPS driver 0.28 (2.0.4) > > > > No matching USB/HID UPS found > > Driver failed to start (exit status=1) > > If the udev/hotplug idea doesn't work, try starting the driver > manually to see what the error is: > > /path/to/newhidups -a <name-of-ups> -DDI ran the /etc/hotlug/usb/libhidups manually and verified the results. Then ran: /usr/local/ups/bin/newhidups -a ups -DD displays: Network UPS Tools: New USB/HID UPS driver 0.28 (2.0.4) debug level is '2' Checking device (050D/0375) (001/005) - VendorID: 050d - ProductID: 0375 - Manufacturer: unknown - Product: unknown - Serial Number: unknown - Bus: 001 Trying to match device Device matches failed to claim USB device, trying 2 more time(s)... detaching kernel driver from USB device... failed to detach kernel driver from USB device... trying again to claim USB device... failed to claim USB device, trying 1 more time(s)... detaching kernel driver from USB device... failed to detach kernel driver from USB device... trying again to claim USB device... failed to claim USB device, trying 0 more time(s)... detaching kernel driver from USB device... failed to detach kernel driver from USB device... trying again to claim USB device... Unable to get HID descriptor (error sending control message: Operation not permitted) Checking device (0000/0000) (001/001) - VendorID: 0000 - ProductID: 0000 - Manufacturer: unknown - Product: unknown - Serial Number: unknown - Bus: 001 Trying to match device Device does not match - skipping No appropriate HID device found No matching USB/HID UPS found The command '[root]->l /proc/bus/usb/001' displays: total 0 -rw-r--r-- 1 root root 43 May 28 07:26 001 -rw-r--r-- 1 root root 57 May 28 07:26 003 -rw-r--r-- 1 ups ups 52 Jun 3 14:22 005 The last entry appears to be the UPS as that is the time I un-pluged and re-pluged the ups. Thanks, David
On 6/3/07, dcw <dwoody1 at charter.net> wrote:> Thanks for your quick reply! > > On Sunday 03 June 2007 1:45 pm, you wrote: > > On 6/3/07, dcw <dwoody1 at charter.net> wrote: > > > I have changed over to CentOS5 on some of our computers. I had been > > > using Mandriva 2006 and the nut software worked using: > > > > > > driver = newhidups > > > port = auto > > > > Did you set up udev (or hotplug) to change ownership of the USB node > > for the UPS (probably under either /proc/bus/usb or /dev/bus/usb)? See > > scripts/udev or scripts/hotplug as appropriate. > > I had not done that. The source did not have scripts/udev but did have > scripts/hotplug. I read the README for scripts/hotplug and installed the 2 > files as follows: > [root]->l /etc/hotplug/usb > total 8 > -rwxr-xr-x 1 root root 478 Jun 3 14:07 libhidups > -rw-r--r-- 1 root root 1502 Jun 3 14:08 libhid.usermap > > It also said: call 'update-usb.usermap' or equivalent if needed > Using yum whatprovides indicates that there are no packages that provide > this. I do not know what the equivalent would be.??Not sure either. Actually, in both 2.0.4 and 2.0.5, the scripts/udev directory was named "scripts/hotplug-ng" for historical reasons.> > Are you installing from source or RPMs? > > I downloaded the 2.0.4 source tar.gz from networkupstools.org.I believe there were some bugs in newhidups that got fixed in 2.0.5, but I don't remember the details.> > > Using the same version of nut with the same config files on CentOS5, I > > > get the following error output from 'upsdrvctl': > > > > > > Network UPS Tools - UPS driver controller 2.0.4 > > > Network UPS Tools: New USB/HID UPS driver 0.28 (2.0.4) > > > > > > No matching USB/HID UPS found > > > Driver failed to start (exit status=1) > > > > If the udev/hotplug idea doesn't work, try starting the driver > > manually to see what the error is: > > > > /path/to/newhidups -a <name-of-ups> -DD > > I ran the /etc/hotlug/usb/libhidups manually and verified the results. > Then ran: > /usr/local/ups/bin/newhidups -a ups -DD displays: > > Network UPS Tools: New USB/HID UPS driver 0.28 (2.0.4) > > debug level is '2' > Checking device (050D/0375) (001/005) > - VendorID: 050d > - ProductID: 0375 > - Manufacturer: unknown > - Product: unknown > - Serial Number: unknown > - Bus: 001 > Trying to match device > Device matches > failed to claim USB device, trying 2 more time(s)... > detaching kernel driver from USB device... > failed to detach kernel driver from USB device... > trying again to claim USB device... > failed to claim USB device, trying 1 more time(s)... > detaching kernel driver from USB device... > failed to detach kernel driver from USB device... > trying again to claim USB device... > failed to claim USB device, trying 0 more time(s)... > detaching kernel driver from USB device... > failed to detach kernel driver from USB device... > trying again to claim USB device... > Unable to get HID descriptor (error sending control message: Operation not > permitted) > Checking device (0000/0000) (001/001) > - VendorID: 0000 > - ProductID: 0000 > - Manufacturer: unknown > - Product: unknown > - Serial Number: unknown > - Bus: 001 > Trying to match device > Device does not match - skipping > No appropriate HID device found > No matching USB/HID UPS found > > The command '[root]->l /proc/bus/usb/001' displays: > > total 0 > -rw-r--r-- 1 root root 43 May 28 07:26 001 > -rw-r--r-- 1 root root 57 May 28 07:26 003 > -rw-r--r-- 1 ups ups 52 Jun 3 14:22 005 > > The last entry appears to be the UPS as that is the time I un-pluged and > re-pluged the ups.If you post some details about how other packages (possibly including gphoto2 or gpsd) manage USB device permissions, we can adapt the documentation to cover Mandriva as well. -- - Charles Lepple -------------------------------------------------------
On Sunday 03 June 2007 3:33 pm, you wrote:> On 6/3/07, dcw <dwoody1 at charter.net> wrote: > > Thanks for your quick reply! > > > > On Sunday 03 June 2007 1:45 pm, you wrote: > > > On 6/3/07, dcw <dwoody1 at charter.net> wrote: > > > > I have changed over to CentOS5 on some of our computers. I had been > > > > using Mandriva 2006 and the nut software worked using: > > > > > > > > driver = newhidups > > > > port = auto > > > > > > Did you set up udev (or hotplug) to change ownership of the USB node > > > for the UPS (probably under either /proc/bus/usb or /dev/bus/usb)? See > > > scripts/udev or scripts/hotplug as appropriate. > > > > I had not done that. The source did not have scripts/udev but did have > > scripts/hotplug. I read the README for scripts/hotplug and installed the > > 2 files as follows: > > [root]->l /etc/hotplug/usb > > total 8 > > -rwxr-xr-x 1 root root 478 Jun 3 14:07 libhidups > > -rw-r--r-- 1 root root 1502 Jun 3 14:08 libhid.usermap > > > > It also said: call 'update-usb.usermap' or equivalent if needed > > Using yum whatprovides indicates that there are no packages that provide > > this. I do not know what the equivalent would be.?? > > Not sure either. Actually, in both 2.0.4 and 2.0.5, the scripts/udev > directory was named "scripts/hotplug-ng" for historical reasons. > > > > Are you installing from source or RPMs? > > > > I downloaded the 2.0.4 source tar.gz from networkupstools.org. > > I believe there were some bugs in newhidups that got fixed in 2.0.5, > but I don't remember the details.I downloaded the 2.0.5 tar file, configured, make and installed. I also followed the readme in scripts.hotplug-ng as well. I then ran: [root]->/usr/local/ups/bin/newhidups -a ups -DD Network UPS Tools: 0.28 USB communication driver 0.28 - core 0.30 (2.0.5) debug level is '2' Checking device (050D/0375) (001/007) - VendorID: 050d - ProductID: 0375 - Manufacturer: unknown - Product: unknown - Serial Number: unknown - Bus: 001 Trying to match device This particular Belkin device (050d/0375) is not (or perhaps not yet) supported by newhidups. Try running the driver with the '-x productid=0375' option. Please report your results to the NUT developer's mailing list. Device does not match - skipping Checking device (0000/0000) (001/001) - VendorID: 0000 - ProductID: 0000 - Manufacturer: unknown - Product: unknown - Serial Number: unknown - Bus: 001 Trying to match device Device does not match - skipping No appropriate HID device found No matching HID UPS found NOTE: the paragraph about Belkin. But this device works when I boot with Mandriva 2006 using the newhidups driver.> > > > Using the same version of nut with the same config files on CentOS5, > > > > I get the following error output from 'upsdrvctl': > > > > > > > > Network UPS Tools - UPS driver controller 2.0.4 > > > > Network UPS Tools: New USB/HID UPS driver 0.28 (2.0.4) > > > > > > > > No matching USB/HID UPS found > > > > Driver failed to start (exit status=1) > > > > > > If the udev/hotplug idea doesn't work, try starting the driver > > > manually to see what the error is: > > > > > > /path/to/newhidups -a <name-of-ups> -DD > > > > I ran the /etc/hotlug/usb/libhidups manually and verified the results. > > Then ran: > > /usr/local/ups/bin/newhidups -a ups -DD displays: > > > > Network UPS Tools: New USB/HID UPS driver 0.28 (2.0.4) > > > > debug level is '2' > > Checking device (050D/0375) (001/005) > > - VendorID: 050d > > - ProductID: 0375 > > - Manufacturer: unknown > > - Product: unknown > > - Serial Number: unknown > > - Bus: 001 > > Trying to match device > > Device matches > > failed to claim USB device, trying 2 more time(s)... > > detaching kernel driver from USB device... > > failed to detach kernel driver from USB device... > > trying again to claim USB device... > > failed to claim USB device, trying 1 more time(s)... > > detaching kernel driver from USB device... > > failed to detach kernel driver from USB device... > > trying again to claim USB device... > > failed to claim USB device, trying 0 more time(s)... > > detaching kernel driver from USB device... > > failed to detach kernel driver from USB device... > > trying again to claim USB device... > > Unable to get HID descriptor (error sending control message: Operation > > not permitted) > > Checking device (0000/0000) (001/001) > > - VendorID: 0000 > > - ProductID: 0000 > > - Manufacturer: unknown > > - Product: unknown > > - Serial Number: unknown > > - Bus: 001 > > Trying to match device > > Device does not match - skipping > > No appropriate HID device found > > No matching USB/HID UPS found > > > > The command '[root]->l /proc/bus/usb/001' displays: > > > > total 0 > > -rw-r--r-- 1 root root 43 May 28 07:26 001 > > -rw-r--r-- 1 root root 57 May 28 07:26 003 > > -rw-r--r-- 1 ups ups 52 Jun 3 14:22 005 > > > > The last entry appears to be the UPS as that is the time I un-pluged and > > re-pluged the ups. > > If you post some details about how other packages (possibly including > gphoto2 or gpsd) manage USB device permissions, we can adapt the > documentation to cover Mandriva as well.Mandriva is the OS that works. It is CentOS5 that does not. I have a usb scanner. It is 001 in the directory listing just above this. Let me know what other information you need. David -------------------------------------------------------
Charles Lepple
2007-Jun-03 22:42 UTC
[Nut-upsdev] Fwd: [Nut-upsuser] Can not find the Belkin F6H375-USB
Sounds like we should add 0375 to drivers/belkin-hid.c. I'm going to add it to the trunk, but I'll hold off on adding it to branches/Testing in case anyone sees a problem with it. ---------- Forwarded message ---------- From: dcw <dwoody1 at charter.net> Date: Jun 3, 2007 5:50 PM Subject: Re: [Nut-upsuser] Can not find the Belkin F6H375-USB To: Charles Lepple <clepple at gmail.com> [...] [root]->/usr/local/ups/bin/newhidups -a ups -DD Network UPS Tools: 0.28 USB communication driver 0.28 - core 0.30 (2.0.5) debug level is '2' Checking device (050D/0375) (001/007) - VendorID: 050d - ProductID: 0375 - Manufacturer: unknown - Product: unknown - Serial Number: unknown - Bus: 001 Trying to match device This particular Belkin device (050d/0375) is not (or perhaps not yet) supported by newhidups. Try running the driver with the '-x productid=0375' option. Please report your results to the NUT developer's mailing list. [...] NOTE: the paragraph about Belkin. But this device works when I boot with Mandriva 2006 using the newhidups driver. -- - Charles Lepple
On Sunday 03 June 2007 9:56 pm, dcw wrote:> On Sunday 03 June 2007 9:44 pm, you wrote: > > On 6/3/07, dcw <dwoody1 at charter.net> wrote: > > > On Sunday 03 June 2007 5:49 pm, you wrote: > > > > On 6/3/07, Charles Lepple <clepple at gmail.com> wrote: > > > > > Since you said this worked under 2.0.4 on Mandriva, I will suggest > > > > > that this product ID be added to the driver for the next release. > > > > > (The 2.0.4 Belkin HID driver apparently didn't check the VID at > > > > > all, just the PID.) > > > > > > But the 2.0.4 does not work on CentOS5 which is a clone of RHEL5. > > > The 2.0.5 does not work on CentOS5 either. > > > I added the following line to /etc/udev/rules.d/025_nut-usbups.rules > > > for version 2.0.5: > > > SYSFS{idVendor}=="050d", SYSFS{idProduct}=="0375", MODE="664", > > > GROUP="ups" > > > > > > This did not help. > > > > Did you unplug and replug the USB cable after adding this? (I think > > there might be a way to tell udev to rescan, but I don't know off the > > top of my head how that works.) > > I am sure I did but I did again, just to make sure. > > > What does the /proc/bus/usb node for the UPS look like (ls -l)after/usr/local/ups/bin/newhidups -x productid=0375 -u root -D auto> > you add the rule and re-plug the UPS? > > Everything is owned by root as follows: > [root]->l /proc/bus/usb > total 0 > dr-xr-xr-x 2 root root 0 May 28 07:26 001 > -r--r--r-- 1 root root 0 Jun 3 21:51 devices > [root]->l /proc/bus/usb/001 > total 0 > -rw-r--r-- 1 root root 43 May 28 07:26 001 > -rw-r--r-- 1 root root 57 May 28 07:26 003 > -rw-r--r-- 1 root root 52 Jun 3 21:51 009 > > > > I assume that since it works on Mandriva 2006 and not CentOS5 that > > > there is a configuration error on CentOS separate from the nut > > > software. Would CentOS mailing list be the best place to ask about that > > > or stay with this thread and see if others have any input? > > > > Can't hurt to ask on the CentOS lists. Someone here might have some > > other suggestions, but that's all I have based on the error messages > > you sent before.I have not gotten anything from CentOS yet but I did continue to do some research. The following command finds the UPS: /usr/local/ups/bin/newhidups -x productid=0375 -u root -D auto Trying several different combinations of the above command line I have to have both: -x productid=0375 and -u root for it to work. the ups.conf now looks like: driver = newhidups productid=0375 port = auto adding the productid line did not help I added these lines /etc/udev/rules.d/nut-usbups.rules: # Belkin - Belkin-UBS SYSFS{idVendor}=="050d", SYSFS{idProduct}=="0375", MODE="660", GROUP="ups" Adding that line did not help either. FYI, when compiling nut, I use ./configure --with-user=ups and user ups is in group ups. SO, then I tried the upsdrvctl command with -root as an option and it appeared to work. Running upsd gave a permission denied error. What permissions and how do they need to be set for the upsd command to work? David> Will post with CentOS. Will let you know what happens. > > Thanks for your help, > > David > > _______________________________________________ > Nut-upsuser mailing list > Nut-upsuser at lists.alioth.debian.org > http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser-- RD Woodyard, Inc. -------------------------------------------------------
See additional comments below. On Monday 04 June 2007 6:07 pm, dcw wrote:> On Sunday 03 June 2007 9:56 pm, dcw wrote: > > On Sunday 03 June 2007 9:44 pm, you wrote: > > > On 6/3/07, dcw <dwoody1 at charter.net> wrote: > > > > On Sunday 03 June 2007 5:49 pm, you wrote: > > > > > On 6/3/07, Charles Lepple <clepple at gmail.com> wrote: > > > > > > Since you said this worked under 2.0.4 on Mandriva, I will > > > > > > suggest that this product ID be added to the driver for the next > > > > > > release. (The 2.0.4 Belkin HID driver apparently didn't check the > > > > > > VID at all, just the PID.) > > > > > > > > But the 2.0.4 does not work on CentOS5 which is a clone of RHEL5. > > > > The 2.0.5 does not work on CentOS5 either. > > > > I added the following line to /etc/udev/rules.d/025_nut-usbups.rules > > > > for version 2.0.5: > > > > SYSFS{idVendor}=="050d", SYSFS{idProduct}=="0375", MODE="664", > > > > GROUP="ups" > > > > > > > > This did not help. > > > > > > Did you unplug and replug the USB cable after adding this? (I think > > > there might be a way to tell udev to rescan, but I don't know off the > > > top of my head how that works.) > > > > I am sure I did but I did again, just to make sure. > > > > > What does the /proc/bus/usb node for the UPS look like (ls -l) > > after/usr/local/ups/bin/newhidups -x productid=0375 -u root -D auto > > > > you add the rule and re-plug the UPS? > > > > Everything is owned by root as follows: > > [root]->l /proc/bus/usb > > total 0 > > dr-xr-xr-x 2 root root 0 May 28 07:26 001 > > -r--r--r-- 1 root root 0 Jun 3 21:51 devices > > [root]->l /proc/bus/usb/001 > > total 0 > > -rw-r--r-- 1 root root 43 May 28 07:26 001 > > -rw-r--r-- 1 root root 57 May 28 07:26 003 > > -rw-r--r-- 1 root root 52 Jun 3 21:51 009 > > > > > > I assume that since it works on Mandriva 2006 and not CentOS5 that > > > > there is a configuration error on CentOS separate from the nut > > > > software. Would CentOS mailing list be the best place to ask about > > > > that or stay with this thread and see if others have any input? > > > > > > Can't hurt to ask on the CentOS lists. Someone here might have some > > > other suggestions, but that's all I have based on the error messages > > > you sent before. > > I have not gotten anything from CentOS yet but I did continue to do some > research. The following command finds the UPS: > /usr/local/ups/bin/newhidups -x productid=0375 -u root -D auto > > Trying several different combinations of the above command line I have to > have both: > -x productid=0375 > and > -u root > for it to work. > > the ups.conf now looks like: > driver = newhidups > productid=0375 > port = auto > > adding the productid line did not help > > I added these lines /etc/udev/rules.d/nut-usbups.rules: > # Belkin - Belkin-UBS > SYSFS{idVendor}=="050d", SYSFS{idProduct}=="0375", MODE="660", GROUP="ups" > Adding that line did not help either. > > FYI, when compiling nut, I use ./configure --with-user=ups > and user ups is in group ups. > > SO, then I tried the upsdrvctl command with -root as an option and it > appeared to work. > Running upsd gave a permission denied error. > What permissions and how do they need to be set for the upsd command to > work?After more research here is what makes it work the ups.conf now looks like: [ups] driver = newhidups productid=0375 port = auto Inserted the following lines to /etc/udev/rules.d/nut-usbups.rules: # Belkin - Belkin-UBS SYSFS{idVendor}=="050d", SYSFS{idProduct}=="0375", MODE="660", GROUP="ups" Then run: /usr/local/ups/bin/upsdrvctl -u root start chown ups:ups /var/state/ups/* /usr/local/ups/sbin/upsd /usr/local/ups/sbin/upsmon /usr/local/ups/bin/upsc ups@$HOSTNAME ups.status The upsc command displays: 0L CHRG I assume the chown command above indicates that there is still a configuration that is wrong somewhere. Everything in /usr/local/ups is owned ups:ups. Everthing in /var/state is owned by ups:ups After upsdrvctl is run there are files in /var/state/ups that have the ownership changed to root:root. Any ideas? David> David > > > Will post with CentOS. Will let you know what happens. > > > > Thanks for your help, > > > > David > >______________________________________________ Nut-upsuser mailing list Nut-upsuser at lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser -------------------------------------------------------