[Nut-upsuser] USBDEVFS_CONTROL failed cmd usbhid-ups

Thomas Gutzler thomas.gutzler at gmail.com
Fri Nov 27 06:24:04 UTC 2009


Arjen de Korte wrote:
> Citeren Thomas Gutzler <thomas.gutzler at gmail.com>:
> 
> There are several things to try out now:
> 
> 1) Upgrade to the latest version from the trunk. Previously, we would
> ignore reports that are larger than expected. We no longer do that and
> instead trim off any excess bytes. This in order to be able to better
> debug if things go wrong. It would be helpful to see what the UPS is
> returning if it is sending us more data than expected.

Ok, I've checked out svn://svn.debian.org/nut/trunk
(why does the website say it's version 2.5, when configure.in says
AC_INIT(nut, 2.4.1)?)

> 2) We might also want to skip the step of reading the feature report
> after reading an interrupt report. In order to do that, change line 773
> in usbhid-ups.c from
> 
>     if (HIDGetDataValue(udev, event[i], &value, (i > 0) ? poll_interval
> : 0) != 1)
> to
>     if (HIDGetDataValue(udev, event[i], &value, poll_interval) != 1)
> 
> This will use the interrupt report as we receive it. In both cases, run
> the driver in debug mode 3 (like you did before).

Ok, I've done the modification in the source and built everything. I
assume it's ok to just run the new driver but keep everything else? So I
killed the old usbhid-ups process and fired up the new one. Took a while
for a re-connect to happen, so I've done a bit of deleting in the log
but I think all important info is still in there.

Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: usbhid.debug2.gz
Type: application/x-gzip
Size: 16193 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20091127/3c12adc0/attachment.bin>


More information about the Nut-upsuser mailing list