[Nut-upsdev] APC USB UPS vs FreeBSD 6.x

Arjen de Korte nut+users at de-korte.org
Sat May 30 12:54:21 UTC 2009


Citeren Daniel O'Connor <doconnor at gsoft.com.au>:

> I have a customer who just bought an APC Back-UPS XS 1300 LCD and I
> thought I'd try the latest NUT with it (on an old-ish FreeBSD 6.x
> system).
>
> It sees the UPS but I can't actually query it for data, in the
> usbhid-ups debug output I see..
>   30.840512     HIDGetEvents: failed to buffer report: Result too large
>   30.840600     Got -34 HID objects...
>   30.840681     Quick update...

This is probably due to a broken libusb. Looking at the dump of the  
report descriptor, it looks like this UPS should be supported.

> upsc gives..
> downie:~>upsc ups1 at localhost
> ups.status: WAIT
> downie:~>upsc ups1 at localhost
> Error: Data stale

Initially, the server can connect to the driver. You can see that,  
because it sets ups.status to WAIT, indicating that it has  
successfully sent the DUMPALL command and is now waiting for the  
reply. That's the last thing we hear, the driver never replies, not  
even to the PINGs that we send.

> Any ideas? The libusb support in 6.x is pretty crappy so maybe it's
> that :(

If it is very slow in timing out on the USB communication, that could  
be a problem. The following worries me:

    1.272355	upsdrv_updateinfo...
   30.839759	file_report_buffer: expected 4 bytes, but got 128!

This means the HIDGetEvents() functions takes almost 30 seconds to  
return, where we expect it to return almost immediately. This means  
the interrupt pipeline is not being handled correctly. Since the  
driver stalls so long here, the server will give up on it. My first  
suggestion would be to check if upgrading libusb helps, possibly by  
trying it out on a more recent OS.

Best regards, Arjen
-- 
Please keep list traffic on the list




More information about the Nut-upsdev mailing list