[Nut-upsuser] Problems with usbhid-ups and CyberPower CP1500 on 2.6.0

Arjen de Korte nut+users at de-korte.org
Thu Mar 17 08:12:52 UTC 2011


Citeren Charles Lepple <clepple op gmail.com>:

> Arjen: do we actually have any cases of reports larger than 8 bytes?

Yes. At least the MGE Evolution series uses reports that are larger  
than 8 bytes.

> If so, should we mark this as a quirk for CyberPower devices?

Well, I still don't understand why we can't read with an arbitrary  
buffer length in the libusb call in the first place. This should be  
handled by the library (not the application).

> Also, it
> seems like we need to distinguish between returning 0 and <0 from the
> libusb call. Currently, we are reading errno when a zero-length packet
> is being read.

This too is broken. If we attempt to read a report and libusb can't  
return any data, it should at least give us a hint why. I really feel  
that this should be handled by the library, not NUT.

Best regards, Arjen
-- 
Please keep list traffic on the list (off-list replies will be rejected)




More information about the Nut-upsuser mailing list