Re: [Nut-upsuser] Cyberpower Value 600E UPS (USB) is not recognized by usbhid-ups under FreeBSD 7.2

2009-05-21 Thread forsite
> Better to get it committed to FreeBSD. I have sent a PR with the patch
> in it so it should be committed.

Good idea and thanks for this. But having looked through FreeBSD PR
list I see a number of similar PRs which are still open.

http://www.freebsd.org/cgi/query-pr.cgi?pr=usb/132785
http://www.freebsd.org/cgi/query-pr.cgi?pr=usb/129251
http://www.freebsd.org/cgi/query-pr.cgi?pr=usb/115935

So I believe mentioning the issue in the NUT documentation/FAQ would
be anyway feasible.

Kind regards,
forsite

___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser


Re: [Nut-upsuser] Cyberpower Value 600E UPS (USB) is not recognized by usbhid-ups under FreeBSD 7.2

2009-05-20 Thread Daniel O'Connor
On Thu, 21 May 2009, forsite wrote:
> Daniel, fantastic - your patch was exactly what was needed.

Great!

> 2_developers: I believe this is a standard situation for CyberPower
> USB devices under FreeBSD.  So you may wish to add the solution
> provided by Daniel into the FAQ or at least to mention on the
> compatibility page
> (http://www.networkupstools.org/compat/stable.html) that using
> CyberPower with FreeBSD requires patching the kernel.

Better to get it committed to FreeBSD. I have sent a PR with the patch 
in it so it should be committed.

-- 
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


signature.asc
Description: This is a digitally signed message part.
___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] Cyberpower Value 600E UPS (USB) is not recognized by usbhid-ups under FreeBSD 7.2

2009-05-20 Thread Daniel O'Connor
On Thu, 21 May 2009, forsite wrote:
> P.S. Apparently, this relates not only to CyberPower, but will likely
> be relevant for any UPS-USB device which under GENERIC kernel is
> claimed by uhidX (not ugenX) driver.

Yes, it is quite annoying..

I wonder if the uhid device could be modified to reject UPS class HID 
devices..

-- 
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


signature.asc
Description: This is a digitally signed message part.
___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] Cyberpower Value 600E UPS (USB) is not recognized by usbhid-ups under FreeBSD 7.2

2009-05-20 Thread forsite
P.S. Apparently, this relates not only to CyberPower, but will likely
be relevant for any UPS-USB device which under GENERIC kernel is
claimed by uhidX (not ugenX) driver.

___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser


Re: [Nut-upsuser] Cyberpower Value 600E UPS (USB) is not recognized by usbhid-ups under FreeBSD 7.2

2009-05-20 Thread forsite
Daniel, fantastic - your patch was exactly what was needed.

> I checked your original post, this should do it.
> I've only tested it compiles though :)
> --- sys/dev/usb/usb_quirks.c    (revision 192375)
> +++ sys/dev/usb/usb_quirks.c    (working copy)

[r...@substance /usr/local/libexec/nut]# dmesg | grep uhid

[r...@substance /usr/local/libexec/nut]# dmesg | grep ugen
ugen0:  on uhub0

[r...@substance /usr/local/libexec/nut]# ./usbhid-ups -a CyberPower
Network UPS Tools - Generic HID driver 0.34 (2.4.1)
USB communication driver 0.31
Using subdriver: CyberPower HID 0.2

Thanks a lot again for your help and quick response.

==>

2_developers: I believe this is a standard situation for CyberPower
USB devices under FreeBSD.  So you may wish to add the solution
provided by Daniel into the FAQ or at least to mention on the
compatibility page (http://www.networkupstools.org/compat/stable.html)
that using CyberPower with FreeBSD requires patching the kernel.

Kind regards,
forsite

___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser


Re: [Nut-upsuser] Cyberpower Value 600E UPS (USB) is not recognized by usbhid-ups under FreeBSD 7.2

2009-05-20 Thread Daniel O'Connor
On Wed, 20 May 2009, Daniel O'Connor wrote:
> 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.

I checked your original post, this should do it.

I've only tested it compiles though :)

-- 
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

Index: sys/dev/usb/usb_quirks.c
===
--- sys/dev/usb/usb_quirks.c(revision 192375)
+++ sys/dev/usb/usb_quirks.c(working copy)
@@ -120,6 +120,8 @@
ANY, { UQ_KBD_IGNORE }},
  { USB_VENDOR_METAGEEK, USB_PRODUCT_METAGEEK_WISPY24X,
ANY, { UQ_KBD_IGNORE }},
+ { USB_VENDOR_CYBERPOWER, USB_PRODUCT_CYBERPOWER_1500CAVRLCD,
+   ANY, { UQ_KBD_IGNORE }},
  { 0, 0, 0, { 0 } }
 };


signature.asc
Description: This is a digitally signed message part.
___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] Cyberpower Value 600E UPS (USB) is not recognized by usbhid-ups under FreeBSD 7.2

2009-05-20 Thread Daniel O'Connor
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.
> [r...@substance /usr/local/libexec/nut]# dmesg | grep uhid
> uhid0:  on uhub0
>
> [r...@substance /usr/local/libexec/nut]# ls -l /dev/uhid0
> crw-rw  1 uucp  wheel0,  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


signature.asc
Description: This is a digitally signed message part.
___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] Cyberpower Value 600E UPS (USB) is not recognized by usbhid-ups under FreeBSD 7.2

2009-05-19 Thread forsite
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

___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser


Re: [Nut-upsuser] Cyberpower Value 600E UPS (USB) is not recognized by usbhid-ups under FreeBSD 7.2

2009-05-18 Thread forsite
Dear Arjen,

Many thanks for your prompt reply.

> 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

Actually, I have tried this also (I should have mentioned this in my
previous posting).  Moreover, I have set permissions to USB devices to
make them accessible for the uucp user, so I hope the permissions
should be ok.

[r...@substance /usr/local/libexec/nut]# ./usbhid-ups -u root -DD -a CyberPower
Network UPS Tools - Generic HID driver 0.34 (2.4.1)
USB communication driver 0.31
debug level is '2'
upsdrv_initups...
No appropriate HID device found
No matching HID UPS found

Could it be that FreeBSD recognizes my CyberPower device a little bit
different than any Linux machine (say, the device signature as
recognized by USB driver is different) - so a small patch of the nut
source code may improve the situation?

Can I debug nut or libusb further to see what is going on inside?

Thanks a lot,
forsite

___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser


Re: [Nut-upsuser] Cyberpower Value 600E UPS (USB) is not recognized by usbhid-ups under FreeBSD 7.2

2009-05-18 Thread Arjen de Korte

Citeren forsite :

[...]


[r...@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


___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser