Charles Lepple
2014-Aug-16 21:25 UTC
[Nut-upsuser] Call for testing: removal of usb_set_altinterface() call
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 at gmail -------------- next part -------------- A non-text attachment was scrubbed... Name: issue_138_usb_altinterface.patch Type: application/octet-stream Size: 9594 bytes Desc: not available URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20140816/94353b8c/attachment.obj>
Charles Lepple
2014-Aug-27 02:22 UTC
[Nut-upsdev] Call for testing: removal of usb_set_altinterface() call
Let's try the dev list. Anyone have a spare USB UPS they can test against? The fix is for Tripp Lite and OS X, but I'm looking for other data points because the code is common to nearly *all* of the USB drivers, and could break them. Thanks! On Aug 16, 2014, at 5:25 PM, Charles Lepple <clepple at gmail.com> wrote:> 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 at gmail > >-------------- next part -------------- A non-text attachment was scrubbed... Name: issue_138_usb_altinterface.patch Type: application/octet-stream Size: 9594 bytes Desc: not available URL: <http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20140826/a74a9548/attachment.obj>
Maybe Matching Threads
- Call for testing: removal of usb_set_altinterface() call
- Call for testing: removal of usb_set_altinterface() call
- Unable to use nut-2.7.4 with Eaton 5E1500I USB
- Need help with Tripp Lite SMART1300LCDT NUT v2.7.3
- Need help with Tripp Lite SMART1300LCDT NUT v2.7.3