[Nut-upsuser] MGE Nova AVR 600 USB on FreeBSD

Patrick Agrain patrick.agrain at alcatel-lucent.fr
Wed Feb 21 10:17:24 CET 2007


Hi all,

At 09:31 21/02/2007, you wrote:
>2007/2/20, Rob Wise <rob at wonk.org>:
>>Just to follow up on my recent success - it seems the workaround is
>>not working 100%.  I stopped getting data from the UPS after a while
>>and had to restart usbhid-ups to get it working again.  I ran it with
>>-DDDD and caught the following just before it died:
>>---Start output---
>>parsing BelowRemainingCapacityLimit
>>hid_lookup_usage: found 850042
>>Path depth = 4
>>0: Usage(00840004)
>>1: Usage(00840024)
>>2: Usage(00840002)
>>3: Usage(00850042)
>>=>> Before exponent: 0, 0/0)
>>=>> After conversion: 0.000000 (0), 0/0)
>>upsdrv_updateinfo...
>>Waiting for notifications...
>>Notification: (0 bytes) =>
>>Report[i]: (0 bytes) =>
>>parsing UPS
>>hid_lookup_usage: found 840004
>>parsing PowerSummary
>>hid_lookup_usage: found 840024
>>parsing PresentStatus
>>hid_lookup_usage: found 840002
>>parsing ACPresent
>>hid_lookup_usage: found 8500d0
>>Path depth = 4
>>0: Usage(00840004)
>>1: Usage(00840024)
>>2: Usage(00840002)
>>3: Usage(008500d0)
>>Entering libusb_get_report
>>Can't retrieve Report 2 (5): Input/output error
>>==================================================
>>= device has been disconnected, try to reconnect =
>>==================================================
>>Closing device
>>Reopening device
>>Checking device (0463/FFFF) (/dev/usb0//dev/ugen0)
>>- VendorID: 0463
>>- ProductID: ffff
>>- Manufacturer: unknown
>>- Product: unknown
>>- Serial Number: unknown
>>- Bus: /dev/usb0
>>Trying to match device
>>Device does not match - skipping
>>No appropriate HID device found
>>upsdrv_updateinfo...
>>
>>=>Got to reconnect!
>>
>>==================================================
>>= device has been disconnected, try to reconnect =
>>==================================================
>>Closing device
>>usbhid-ups in free(): error: chunk is already free
>>Abort
>>---END output---
>>
>>At that point it had been running for about 8 hours.  Any ideas?
>
>not an idea, but comments:
>The usb problem is huger than thought (not limited to interrupt handling)
>It seems that the ugen <-> UPS connection is lost somewhere, and can't
>be reattached ("Device does not match - skipping").
>
>When in the above situation, does relaunching newhidups / usbhid-ups
>solves the point (=> does the driver start and run fine?)
>
>It seems freebsd has got some more work to be done on the USB stack...

Similar problem has been "resolved" by skipping the USB String matching 
sequence in libhid.c :  match_function_exact()
The "Device Match" is therefore only made on Vendor and Product IDs.

Of course, this is only a workaround ;-)
This problem appears also on a kernel.org-based linux.

For information, here are the logs we had :
[root at xa000000 root]# newhidups -a ups_on_usb -DD

<...>

upsdrv_updateinfo...
Waiting for notifications...
process_status_info: online
process_status_info: !dischrg
process_status_info: chrg
process_status_info: !shutdownimm
process_status_info: !lowbatt
upsdrv_updateinfo...
Waiting for notifications...
process_status_info: online
process_status_info: !dischrg
process_status_info: chrg
process_status_info: !shutdownimm
Can't retrieve Report 1 (-32/32): Broken pipe
==================================================
= device has been disconnected, try to reconnect =
==================================================
Closing device
Reopening device
Checking device (0000/0000) (003/001)
- VendorID: 0000
- ProductID: 0000
- Manufacturer: unknown
- Product: unknown
- Serial Number: unknown
- Bus: 003
Trying to match device
Device does not match - skipping
Checking device (0000/0000) (002/001)
- VendorID: 0000
- ProductID: 0000
- Manufacturer: unknown
- Product: unknown
- Serial Number: unknown
- Bus: 002
Trying to match device
Device does not match - skipping
Checking device (0463/FFFF) (002/002)
- VendorID: 0463
- ProductID: ffff
- Manufacturer: unknown <----------------- Now skipped !
- Product: unknown              <----------------- Now skipped !
- Serial Number: 1HDF44001      <----------------- Now skipped !
- Bus: 002
Device does not match - skipping
No appropriate HID device found
upsdrv_updateinfo...

<...>

Hope it helps.

Regards,
Patrick Agrain




More information about the Nut-upsuser mailing list