[Nut-upsdev] usbhid-ups pull request for consideration

Stephen J. Butler stephen.butler at gmail.com
Sat Apr 19 05:23:16 UTC 2014

I've added a pull request with changes to drivers/libusb and
drivers/usbhid-ups mainly. They are to resolve issues I encountered when
setting up a Tripp Lite SMART1500LCDT, but I think they're generally useful
to the community. Here is the pull request comment I sent:


Had trouble getting nut to work for my new Tripp Lite SMART1500LCDT. So in
best open source fashion, I hacked at it till it worked. Couple things in
this pull request:

1. Scale values for some of the SMART1500LCD parameters.

2. With my hardware and kernel, usbhid-ups wouldn't run more than 10
minutes before exiting with a fatal error. This seems to be related to
holding usb_claim_interface() the entire life of the program. I've
refactored claim_interface/release_interface calls to be around only when
work is being done. Now usbhid-ups has run for 24+ hours without issue.

3. The very nature of USB in a home means that sometimes the driver will
lose communications with the UPS (accidently unplug the hub, needed a port
for a camera, etc). This shouldn't be a fatal error. I've tried to detect
these situations and let usbhid-ups retry gracefully. Also, at startup the
UPS no longer has to be immediately present. It will keep retrying
upsdrv_initups() until it finds one (only implemented for usbhid-ups, but
someone could do the work for other drivers).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20140419/5b0eac6b/attachment.html>

More information about the Nut-upsdev mailing list