[Nut-upsdev] Getting 'Data stale' error with bcmxcp_usb for a PowerWare 5115 on OSX

Charlie Garrison garrison at zeta.org.au
Sat Mar 13 13:03:33 UTC 2010

Good evening,

On 10/03/10 at 7:54 AM -0500, Charles Lepple <clepple at gmail.com> wrote:

>On Wed, Mar 10, 2010 at 4:08 AM, Charlie Garrison <garrison at zeta.org.au> wrote:
>>Good evening,
>>On 8/03/10 at 11:54 PM -0500, Charles Lepple <clepple at gmail.com> wrote:
>>>If you have time to add some upslogx() calls to the driver, I would be
>>>interested in comparing the errors you are experiencing when not running in
>>>debug mode. When the tripplite_usb driver is in the background, it logs the
>>>3/8/10 11:26:04 PM tripplite_usb[22267] Error reading S value: Device
>>>detached? (error 0: libusb/darwin.c usb_setup_iterator:
>>>IOServiceGetMatchingServices: unknown error
>>I'm not seeing anything like that.
>The second part of the error comes from usb_strerror(), so can you
>change line 155 in your modified version to:
>upslogx(LOG_WARNING, "usb_interrupt_read is %d (%s)", res, usb_strerror());

I changed that line, and output in terminal showed 'no error', eg:

   usb_interrupt_read is 25 (No error)

And console log (after process forks) showed errors such as:

   bcmxcp_usb[71254] usb_interrupt_read is -6 (usb_bulk_read: An 
error occured during read (see messages above))

I couldn't see any 'messages above'; I'm not sure what that 
refers to.

So I asked google about that error and during my reading, I got 
a clue about libusb versions. I'm using the mac ports system and 
it was (or I was) confused about which version of libusb was 
being used. It was on old version (0.1.12, even though 1.0.6 was 
installed). Anyway, after removing the 0.1.12 version I'm now 
getting `configure` errors with libusb-1.0.6. In particular:

configure: error: "USB drivers requested, but libusb not found."

I was getting other errors which were solved by adding symlinks 
for different versions/names; eg:

   $ ln -s libusb-1.0.pc /opt/local/lib/pkgconfig/libusb.pc
   $ ln -s libusb.h /opt/local/include/libusb-1.0/usb.h
   $ ln -s libusb-1.0.0.dylib /opt/local/lib/libusb.dylib
   $ ln -s libusb-1.0.a /opt/local/lib/libusb.a
   $ ln -s libusb-1.0.la /opt/local/lib/libusb.la

That silenced all the other errors, but I'm still getting the 
"libusb not found" error.

For reference, configure prints:

   checking for libusb version via pkg-config... 1.0.6 found
   checking for libusb cflags... -I/opt/local/include/libusb-1.0
   checking for libusb ldflags... -L/opt/local/lib -lusb-1.0
   checking for usb.h... yes
   checking for usb_init... no

Should I be able to use libusb-1.0.6? I asked google about this 
configure error too but couldn't find anything useful.

OK, I'm getting in a bit over my head, but after staring at code 
for libusb-1.0 it looks like the API has changed, and that would 
explain why `usb_init` check fails. I'll revert to 0.1.12; 
please advise if I should persist with upgrading to 1.0.6.

And is there anything else I can test to help resolve this issue?

Thanks again,

    Ꮚ Charlie Garrison ♊ <garrison at zeta.org.au>
    〠 PO Box 141, Windsor, NSW 2756, Australia

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org

More information about the Nut-upsdev mailing list