forsite
2009-May-18 18:00 UTC
[Nut-upsuser] Cyberpower Value 600E UPS (USB) is not recognized by usbhid-ups under FreeBSD 7.2
Hi, Have anybody tried Cyberpower Value 600E (USB) under FreeBSD? usbhid-ups from nut 2.4.1 does not recognize (find) the device on my machine. [root at substance /usr/local/libexec/nut]# uname -a FreeBSD substance.dyndns.org 7.2-RELEASE FreeBSD 7.2-RELEASE #0: Fri May 1 08:49:13 UTC 2009 root at walker.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 [root at substance /usr/local/libexec/nut]# dmesg | grep uhid uhid0: <CPS UPS VALUE, class 0/0, rev 1.10/0.01, addr 2> on uhub0 [root at substance /usr/local/libexec/nut]# ls -l /dev/uhid0 crw-rw---- 1 uucp wheel 0, 79 18 May 20:51 /dev/uhid0 [root at substance /usr/local/libexec/nut]# usbdevs -v Controller /dev/usb0: addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x0000), rev 1.00 port 1 addr 2: low speed, self powered, config 1, UPS VALUE(0x0501), CPS(0x0764), rev 0.01 port 2 powered Controller /dev/usb1: addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x0000), rev 1.00 port 1 powered port 2 powered Controller /dev/usb2: addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x0000), rev 1.00 port 1 powered port 2 powered Controller /dev/usb3: addr 1: high speed, self powered, config 1, EHCI root hub(0x0000), Intel(0x0000), rev 1.00 port 1 powered port 2 powered port 3 addr 2: high speed, power 100 mA, config 1, Basics Portable(0x7450), Maxtor(0x0d49), rev 1.22 port 4 powered port 5 powered port 6 powered [root at substance /usr/local/libexec/nut]# cat /usr/local/etc/nut/ups.conf [CyberPower] driver = usbhid-ups port = auto desc = "Substance" [root at substance /usr/local/libexec/nut]# ./usbhid-ups -a CyberPower -DDD Network UPS Tools - Generic HID driver 0.34 (2.4.1) USB communication driver 0.31 debug level is '3' upsdrv_initups... No appropriate HID device found No matching HID UPS found Any ideas what could be wrong here? Thanks in advance, forsite
Arjen de Korte
2009-May-18 19:24 UTC
[Nut-upsuser] Cyberpower Value 600E UPS (USB) is not recognized by usbhid-ups under FreeBSD 7.2
Citeren forsite <forsite op gmail.com>: [...]> [root op substance /usr/local/libexec/nut]# ./usbhid-ups -a CyberPower -DDD > Network UPS Tools - Generic HID driver 0.34 (2.4.1) > USB communication driver 0.31 > debug level is '3' > upsdrv_initups... > No appropriate HID device found > No matching HID UPS found > > > Any ideas what could be wrong here?This vendorid:productid combination is supported by nut-2.4.1 out of the box, so most likely, it is a permissions problem. Try running ./usbhid-ups -u root -DD -a CyberPower to rule this out. We've had some postings on how to set this up on FreeBSD in the past, so browse the archives if this indeed turns out to be the problem. Best regards, Arjen -- Please keep list traffic on the list
forsite
2009-May-19 08:13 UTC
[Nut-upsuser] Cyberpower Value 600E UPS (USB) is not recognized by usbhid-ups under FreeBSD 7.2
Hmm... Interesting. I have looked through the mailing-list archives and encountered that libusb-based packages such as NUT do not work with uhid* device nodes (where my UPS currently sits). http://lists.alioth.debian.org/pipermail/nut-upsuser/2008-July/004260.html I suppose I need to find a workaround. I will keep you posting on the results. Rgs, forsite
Daniel O'Connor
2009-May-20 07:53 UTC
[Nut-upsuser] Cyberpower Value 600E UPS (USB) is not recognized by usbhid-ups under FreeBSD 7.2
On Tue, 19 May 2009, forsite wrote:> Have anybody tried Cyberpower Value 600E (USB) under FreeBSD? > usbhid-ups from nut 2.4.1 does not recognize (find) the device on my > machine. > [root at substance /usr/local/libexec/nut]# dmesg | grep uhid > uhid0: <CPS UPS VALUE, class 0/0, rev 1.10/0.01, addr 2> on uhub0 > > [root at substance /usr/local/libexec/nut]# ls -l /dev/uhid0 > crw-rw---- 1 uucp wheel 0, 79 18 May 20:51 /dev/uhid0...> Any ideas what could be wrong here?As you found later, the problem is that the uhid driver grabs the UPS but NUT needs ugen to get it before it can talk (unlike Linux libusb can't kick the kernel driver off the device). You can try not loading uhid as a work around and see if it works (it should do, make sure you chmod /dev/ugenX* as required). The actual fix is to add an entry in the blacklist for uhid devices in /usr/src/sys/dev/usb/usb_quirks.c (around line 115) for the vendor/id of your UPS. I think you also need to add an entry to /usr/src/sys/dev/usb/usbdevs for the UPS itself. That requires a kernel rebuild BTW. If you give me the output of 'usbdevs -v' I can whip up a quick patch. -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 188 bytes Desc: This is a digitally signed message part. URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20090520/df111db4/attachment.pgp>