[Nut-upsuser] Tripp Lite OMNI1000 LCD issues

Arjen de Korte nut+users at de-korte.org
Tue Apr 22 09:15:27 UTC 2008

> Attached is approx 30 sec of output from the following command:

Hmmm, it looks like we're flushing the wrong stream in HIDDumpTree() in
drivers/libhid.c. We should flush 'stderr' instead of 'stdout' here. I'll
fix that later today.

> # /usr/src/nut-2.2.1/drivers/usbhid-ups -u root -DD -a trippy > poop.out
> 2>&1
> No extra code or printf's are in the the above exec.
> Note that "dstate_init: sock..." does not appear in the output.

Indeed, it doesn't. It turns out that your UPS is constantly generating
input reports, so that the driver never gets past the initial
upsdrv_updateinfo() call. That is odd, usually we only expect to receive
this if there is an event that needs our attention. As the comments in the
'drivers/usbhid-ups.c' file already mention, we probably should cap the
number of input reports we process:

	/* Get HID notifications on Interrupt pipe first */
	/* TODO: cap number of times we check for events? */
	while ((evtCount = HIDGetEvents(udev, event, MAX_EVENT_NUM)) > 0) {

If you replace the 'while' with 'if', you'll probably be fine. Having said
that, it makes sense to upgrade to nut-2.2.2-pre2 as well (this has the
same bug), since that also fixed some other issues with the 'usbhid-ups'

Best regards, Arjen
Eindhoven - The Netherlands
Key fingerprint - 66 4E 03 2C 9D B5 CB 9B  7A FE 7E C1 EE 88 BC 57

More information about the Nut-upsuser mailing list