[Nut-upsdev] Newhidups gets unbound after a while - Workaround

Patrick Agrain patrick.agrain at alcatel.fr
Thu Jun 1 06:55:12 UTC 2006


Hi all,

Back from holidays, I worked a little around this problem and found a 
workaround for the non-reconnection of the device.

I comment the 3 tests concerning strings (Vendor, Product and Serial) in 
libhid.c: match_function_exact().
Therefore the match routine gets only busy with the ProductID and VendorID 
and the device is reconnected :

Logs:
<...>
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)
Found Manufacturer Index :3			<--- Add. trace : Removed
usb_get_string:Unable to get supported language <--- Add. trace : Removed
usb_get_string_simple returns -1		<--- Add. trace : Removed
Found Product Index :2			<--- Add. trace : Removed
usb_get_string:Unable to get supported language <--- Add. trace : Removed
usb_get_string_simple returns -1		<--- Add. trace : Removed
usb_get_string:Unable to get supported language <--- Add. trace : Removed
- 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)
No Manufacturer string Index			<--- Add. trace : Removed
Found Product Index :2			<--- Add. trace : Removed
usb_get_string:Unable to get supported language <--- Add. trace : Removed
usb_get_string_simple returns -1		<--- Add. trace : Removed
usb_get_string:Unable to get supported language <--- Add. trace : Removed
- 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)
Found Manufacturer Index :1 		<--- Add. trace : Removed
usb_get_string:Unable to get supported language <--- Add. trace : Removed
usb_get_string_simple returns -110 	<--- Add. trace : Removed
Found Product Index :2 		<--- Add. trace : Removed
- VendorID: 0463
- ProductID: ffff
- Manufacturer: unknown
- Product: ELLIPSE
- Serial Number: 1HDF44001
- Bus: 002
Trying to match device
match_function_exact() : return 1 	<--- Add. trace : Removed
Device matches
Device reopened successfully
upsdrv_updateinfo...
process_status_info: online
process_status_info: !dischrg
process_status_info: chrg
process_status_info: !shutdownimm
process_status_info: !lowbatt
process_status_info: !overload
process_status_info: !replacebatt
process_status_info: !off
upsdrv_updateinfo...
<...>

I know this is not the way to correct the problem, but with this workaround 
( invisible from user point of view ), I will have more time to get deeper 
into details. And there is also the disconnection problem to solve.

I will wait for the 2.0.4 version to see what could be integrated.

Note : on my test unit, it is now working the last 15 hours without 
interruption... and continue.

Regards,
Patrick Agrain




More information about the Nut-upsdev mailing list