If you have a USB UPS, and can rebuild NUT from source (tarball or Git), please 
read on.

I was trying to fix a problem specific to OS X and Tripp Lite UPSes, but it 
turns out that the redundant call to usb_set_altinterface(0) is right in the 
middle of the common NUT USB driver code, affecting pretty much any USB UPS 
that we support. So I would like to get a little additional testing before 
merging this. (Thanks to Steve Ballantyne for testing this on a different Tripp 
Lite model.)

Basically, this call to usb_set_altinterface() should not be needed (alternate 
interfaces are not often implemented in USB), but it appears that OS X might be 
sending this control message internally, and the extra call in the NUT source 
causes problems. Rather than rip it out completely, I made it configurable, 
just in case someone runs across an UPS that needs the old behavior.

The full branch is visible here: 
https://github.com/networkupstools/nut/compare/issue_138_altinterface_value

A few other fixes and reorganizations crept into this patch, but they are 
either just reorganization (08c721d...) or a workaround for the *.orig files 
that patch typically leaves behind (4fc6f73...).

https://github.com/networkupstools/nut/commit/08c721d67ca232d52c6b7d5e67182d56009f8cc7
https://github.com/networkupstools/nut/commit/4fc6f738478e60be9d306cff9eb0f1e38cb53d78

When you test, it would be best to unplug and re-plug the UPS USB connection so 
that we are not relying on any previous USB setup. Please indicate your OS and 
UPS type when testing.

Thanks,

-- 
Charles Lepple
clepple@gmail


Attachment: issue_138_usb_altinterface.patch
Description: Binary data

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

Reply via email to