[Nut-upsdev] SUN_LIBUSB

Wallis, Chase Civ USAF AFMC 519 SMXS/MXDEA Chase.Wallis at hill.af.mil
Tue Dec 29 21:25:39 UTC 2009

Hi all,


I've been trying to get a TrippLite 700DV  communicating with nut in
Solaris. The problem was that I would successfully send a message to the
ups, but wouldn't be able to receive anything. After some snooping
around I found this bit of code in libusb.c libusb_get_interrupt(). 





                usleep(timeout * 1000);


                return 0;


                /* FIXME: hardcoded interrupt EP => need to get EP descr
for IF descr */

                ret = usb_interrupt_read(udev, 0x81, (char *)buf,
bufsize, timeout);

                if (ret > 0) {

                                upsdebugx(6, " ok");

                } else {

                                upsdebugx(6, " none (%i)", ret);


                return ret;




It seems that when using Sun libusb, nut completely blocks out the read
attempt. I removed the preprocessor directives and voila. Worked
perfectly. There must have been a reason for this at some point, but I
can't find any comments on the issue. And it seems to be unnecessarily
blocking out usb communication when using Sun libusb. Does anyone know
the reason for this? Should I work around the issue in the tripplite_usb
driver, or can it be fixed directly in libusb.c? Maybe other UPS drivers
on SUN haven't been working for this reason...




Chase Wallis


Air Force Civilian

Phone: (801) 586 5600

Address: 6137 Wardleigh Road, Bldg. 1515 Rm 178, Hill AFB UT, 84056-5843


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20091229/67e448df/attachment-0001.htm>

More information about the Nut-upsdev mailing list