On Thu, Apr 22, 2010 at 10:45:33AM -0400, Kelvin Ku wrote:
> On Tue, Apr 20, 2010 at 03:13:07PM +0200, Arjen de Korte wrote:
> > Citeren Kelvin Ku <[email protected]>:
> >
> >> Note that the problematic unit, upsserv7, exhibits the USB disconnect 
> >> behavior even when it's the only UPS connected to the host.
> >
> > If possible, run it in debug mode
> >
> >     /path/to/usbhid-ups -DD -a upsserv7
> >
> > and watch the output when it (re)connects. Chances are that the device  
> > is reporting different serial numbers (or none at all) depending whether 
> > this is the first connection made or a later one. We've seen such erratic 
> > behavior before on other devices. This will make it impossible for the 
> > driver to reconnect. You'll be specifically interested in lines with 
> > "Serial Number" in them (and a few lines of context before and after it).
> 
> I swapped the USB cable on upsserv7 for a new one and the connection was 
> stable
> for a day. It started flaking out again today, though, so I tried what you
> suggested. Here's the syslog before I stopped the NUT service:

Another UPS of the same model connected to a different host is generating the
same flooding. As it stands, I can't monitor any of these Tripp Lite UPSs (I
have four of them) because of these spontaneous disconnects. Note that I
hacked in support for this model as follows:

--- nut-2.4.3/drivers/tripplite-hid.c.0 2010-03-24 10:34:10.238494000 -0400
+++ nut-2.4.3/drivers/tripplite-hid.c   2010-03-24 10:39:26.166498000 -0400
@@ -81,6 +81,9 @@
        { USB_DEVICE(TRIPPLITE_VENDORID, 0x4002), battery_scale_1dot0 },
        /* e.g. TrippLite SmartOnline SU1500RTXL2ua */
        { USB_DEVICE(TRIPPLITE_VENDORID, 0x4003), battery_scale_1dot0 },
+       /* e.g. TrippLite SmartOnline SU2200XLA */
+       { USB_DEVICE(TRIPPLITE_VENDORID, 0x4004), battery_scale_1dot0 },
+
 
        /* HP R/T 2200 INTL (like SMART2200RMXL2U) */
        { USB_DEVICE(HP_VENDORID, 0x1f0a), battery_scale_1dot0 },
[kel...@ti94 nut-2.4.3-1.fc12.src]$ cat nut-2.4.3-tripplite.patch 
--- nut-2.4.3/scripts/udev/nut-usbups.rules.in.0        2010-03-24 
10:32:35.773119000 -0400
+++ nut-2.4.3/scripts/udev/nut-usbups.rules.in  2010-03-24 10:33:21.767269000 
-0400
@@ -102,6 +102,8 @@
 ATTR{idVendor}=="09ae", ATTR{idProduct}=="4002", MODE="664", 
GROUP="@RUN_AS_GROUP@"
 #  e.g. TrippLite SmartOnline SU1500RTXL2ua  - usbhid-ups
 ATTR{idVendor}=="09ae", ATTR{idProduct}=="4003", MODE="664", 
GROUP="@RUN_AS_GROUP@"
+#  e.g. TrippLite SmartOnline SU2200XLA  - usbhid-ups
+ATTR{idVendor}=="09ae", ATTR{idProduct}=="4004", RUN+="/bin/sh -c '/bin/chmod 
664 /dev/bus/usb/*/*; /bin/chown root:dialout /dev/bus/usb/*/*'"
 
 # PowerCOM
 #  PowerCOM IMP - IMPERIAL Series  - usbhid-ups
--- nut-2.4.3/drivers/tripplite-hid.c.0 2010-03-24 10:34:10.238494000 -0400
+++ nut-2.4.3/drivers/tripplite-hid.c   2010-03-24 10:39:26.166498000 -0400
@@ -81,6 +81,9 @@
        { USB_DEVICE(TRIPPLITE_VENDORID, 0x4002), battery_scale_1dot0 },
        /* e.g. TrippLite SmartOnline SU1500RTXL2ua */
        { USB_DEVICE(TRIPPLITE_VENDORID, 0x4003), battery_scale_1dot0 },
+       /* e.g. TrippLite SmartOnline SU2200XLA */
+       { USB_DEVICE(TRIPPLITE_VENDORID, 0x4004), battery_scale_1dot0 },
+
 
        /* HP R/T 2200 INTL (like SMART2200RMXL2U) */
        { USB_DEVICE(HP_VENDORID, 0x1f0a), battery_scale_1dot0 },

Is it possible that tripplite_usb.c needs to be updated to work with this
model's particular quirks, or is the hardware simply too flakey to be used with
NUT?

Syslog and related output is below:

Apr 26 02:59:51 kernel: hub 2-0:1.0: port 3 disabled by hub (EMI?), 
re-enabling...
Apr 26 02:59:51 kernel: usb 2-3: USB disconnect, address 3
Apr 26 02:59:51 kernel: usb 2-3: new low speed USB device using ohci_hcd and 
address 5
Apr 26 02:59:51 kernel: usb 2-3: configuration #1 chosen from 1 choice
Apr 26 02:59:51 kernel: hiddev96: USB HID v1.11 Device [Tripp Lite       TRIPP 
LITE UPS  ] on usb-0000:00:02.0-3
Apr 26 02:59:53 usbhid-ups[15075]: Got disconnected by another driver: Device 
or resource busy
Apr 26 02:59:55 usbhid-ups[15075]: Got disconnected by another driver: Device 
or resource busy
Apr 26 02:59:57 usbhid-ups[15075]: Got disconnected by another driver: Device 
or resource busy
...
Apr 26 03:33:39 usbhid-ups[15075]: Got disconnected by another driver: Device 
or resource busy
Apr 26 03:33:41 usbhid-ups[15075]: Got disconnected by another driver: Device 
or resource busy
Apr 26 03:33:43 usbhid-ups[15075]: Got disconnected by another driver: Device 
or resource busy
Apr 26 03:33:45 upsd[15088]: Data for UPS [upsserv6] is stale - check driver
Apr 26 03:33:47 upsmon[15093]: Poll UPS [upsse...@localhost] failed - Data stale
Apr 26 03:33:47 upsmon[15093]: INFO UPS upsse...@localhost communications lost
Apr 26 03:33:52 upsmon[15093]: Poll UPS [upsse...@localhost] failed - Data stale
Apr 26 03:33:57 upsmon[15093]: Poll UPS [upsse...@localhost] failed - Data stale
Apr 26 03:34:02 upsmon[15093]: Poll UPS [upsse...@localhost] failed - Data stale
...
Apr 26 08:14:47 upsmon[15093]: Poll UPS [upsse...@localhost] failed - Data stale
Apr 26 08:14:52 upsmon[15093]: Poll UPS [upsse...@localhost] failed - Data stale
Apr 26 08:14:57 upsmon[15093]: Poll UPS [upsse...@localhost] failed - Data stale
Apr 26 08:14:59 upsmon[15093]: Signal 15: exiting
Apr 26 08:14:59 upsd[15088]: User [email protected] logged out from UPS 
[upsserv6]
Apr 26 08:14:59 upsd[15088]: User [email protected] logged out from UPS 
[upsserv5]
Apr 26 08:14:59 upsd[15088]: mainloop: Interrupted system call
Apr 26 08:14:59 upsd[15088]: Signal 15: exiting

$ sudo cat /etc/ups/ups.conf
maxstartdelay = 120

[upsserv6]
        driver = usbhid-ups
        port = auto
        serial = 9824ALCPS720000081

[upsserv5]
        driver = usbhid-ups
        port = auto
        serial = 9833DLCPS720000101

$ sudo usbhid-ups -DD -a upsserv6
Network UPS Tools - Generic HID driver 0.34 (2.4.3)
USB communication driver 0.31
   0.000000     debug level is '2'
   0.000682     upsdrv_initups...
   0.001085     Checking device (09AE/4004) (002/005)
   0.021881     - VendorID: 09ae
   0.021984     - ProductID: 4004
   0.022121     - Manufacturer: Tripp Lite      
   0.022259     - Product: TRIPP LITE UPS  
   0.022399     - Serial Number: 9824ALCPS720000081  
   0.022528     - Bus: 002
   0.022599     Trying to match device
   0.022944     Device matches
   0.030887     HID descriptor length 1082
   0.067878     Report Descriptor size = 1082
   0.068412     Using subdriver: TrippLite HID 0.4
   0.070877     libusb_get_report: No error
   0.070967     Can't retrieve Report 28: Inappropriate ioctl for device
   0.071123     Path: UPS.PowerSummary.iProduct, Type: Feature, ReportID: 0x28, 
Offset: 0, Size: 8
   0.073874     libusb_get_report: No error
   0.073901     Can't retrieve Report 29: Inappropriate ioctl for device
   0.074034     Path: UPS.PowerSummary.iSerialNumber, Type: Feature, ReportID: 
0x29, Offset: 0, Size: 8
   0.076875     libusb_get_report: No error
   0.076958     Can't retrieve Report 2b: Inappropriate ioctl for device
   0.077099     Path: UPS.PowerSummary.iManufacturer, Type: Feature, ReportID: 
0x2b, Offset: 0, Size: 8
   0.079875     libusb_get_report: No error
   0.079902     Can't retrieve Report 30: Inappropriate ioctl for device
   0.080104     Path: UPS.PowerSummary.Input.ConfigVoltage, Type: Feature, 
ReportID: 0x30, Offset: 0, Size: 8
   0.082875     libusb_get_report: No error
   0.082901     Can't retrieve Report 31: Inappropriate ioctl for device
   0.083036     Path: UPS.PowerSummary.Input.Voltage, Type: Feature, ReportID: 
0x31, Offset: 0, Size: 16
   0.085875     libusb_get_report: No error
   0.085969     Can't retrieve Report 11: Inappropriate ioctl for device
   0.086110     Path: UPS.PowerSummary.AudibleAlarmControl, Type: Feature, 
ReportID: 0x11, Offset: 0, Size: 8
   0.088874     libusb_get_report: No error
   0.088900     Can't retrieve Report 2a: Inappropriate ioctl for device
   0.089033     Path: UPS.PowerSummary.iDeviceChemistry, Type: Feature, 
ReportID: 0x2a, Offset: 0, Size: 8
   0.091874     libusb_get_report: No error
   0.091900     Can't retrieve Report 62: Inappropriate ioctl for device
   0.092031     Path: UPS.PowerSummary.iOEMInformation, Type: Feature, 
ReportID: 0x62, Offset: 0, Size: 8
   0.094874     libusb_get_report: No error
   0.094958     Can't retrieve Report 33: Inappropriate ioctl for device
   0.095099     Path: UPS.PowerSummary.CapacityMode, Type: Feature, ReportID: 
0x33, Offset: 0, Size: 8
   0.097874     libusb_get_report: No error
   0.097901     Can't retrieve Report 34: Inappropriate ioctl for device
   0.098034     Path: UPS.PowerSummary.RemainingCapacity, Type: Input, 
ReportID: 0x34, Offset: 0, Size: 8
   0.100874     libusb_get_report: No error
   0.100955     Can't retrieve Report 34: Inappropriate ioctl for device
   0.101098     Path: UPS.PowerSummary.RemainingCapacity, Type: Feature, 
ReportID: 0x34, Offset: 0, Size: 8
   0.103874     libusb_get_report: No error
   0.103900     Can't retrieve Report 3a: Inappropriate ioctl for device
   0.104032     Path: UPS.PowerSummary.RemainingCapacityLimit, Type: Feature, 
ReportID: 0x3a, Offset: 0, Size: 8
   0.106874     libusb_get_report: No error
   0.106900     Can't retrieve Report 37: Inappropriate ioctl for device
   0.107034     Path: UPS.PowerSummary.FullChargeCapacity, Type: Feature, 
ReportID: 0x37, Offset: 0, Size: 8
   0.109873     libusb_get_report: No error
   0.109899     Can't retrieve Report 36: Inappropriate ioctl for device
   0.110032     Path: UPS.PowerSummary.DesignCapacity, Type: Feature, ReportID: 
0x36, Offset: 0, Size: 8
   0.112874     libusb_get_report: No error
   0.112954     Can't retrieve Report 38: Inappropriate ioctl for device
   0.113096     Path: UPS.PowerSummary.WarningCapacityLimit, Type: Feature, 
ReportID: 0x38, Offset: 0, Size: 8
   0.115873     libusb_get_report: No error
   0.115899     Can't retrieve Report 3b: Inappropriate ioctl for device
   0.116031     Path: UPS.PowerSummary.CapacityGranularity1, Type: Feature, 
ReportID: 0x3b, Offset: 0, Size: 8
   0.118873     libusb_get_report: No error
   0.118899     Can't retrieve Report 39: Inappropriate ioctl for device
   0.119031     Path: UPS.PowerSummary.CapacityGranularity2, Type: Feature, 
ReportID: 0x39, Offset: 0, Size: 8
   0.121874     libusb_get_report: No error
   0.121900     Can't retrieve Report 2c: Inappropriate ioctl for device
   0.122032     Path: UPS.PowerSummary.Rechargeable, Type: Feature, ReportID: 
0x2c, Offset: 0, Size: 8
   0.124874     libusb_get_report: No error
   0.124957     Can't retrieve Report 35: Inappropriate ioctl for device
   0.125098     Path: UPS.PowerSummary.RunTimeToEmpty, Type: Input, ReportID: 
0x35, Offset: 0, Size: 16
   0.127873     libusb_get_report: No error
   0.127899     Can't retrieve Report 35: Inappropriate ioctl for device
   0.128031     Path: UPS.PowerSummary.RunTimeToEmpty, Type: Feature, ReportID: 
0x35, Offset: 0, Size: 16
   0.130873     libusb_get_report: No error
   0.130954     Can't retrieve Report 32: Inappropriate ioctl for device
   0.131095     Path: UPS.PowerSummary.PresentStatus.InternalFailure, Type: 
Input, ReportID: 0x32, Offset: 7, Size: 1
   0.133874     libusb_get_report: No error
   0.133900     Can't retrieve Report 32: Inappropriate ioctl for device
   0.134035     Path: UPS.PowerSummary.PresentStatus.ShutdownImminent, Type: 
Input, ReportID: 0x32, Offset: 9, Size: 1
   0.136874     libusb_get_report: No error
   0.136974     Can't retrieve Report 32: Inappropriate ioctl for device
   0.137126     Path: UPS.PowerSummary.PresentStatus.ACPresent, Type: Input, 
ReportID: 0x32, Offset: 16, Size: 1
   0.139874     libusb_get_report: No error
   0.139900     Can't retrieve Report 32: Inappropriate ioctl for device
   0.140033     Path: 
UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit, Type: Input, 
ReportID: 0x32, Offset: 18, Size: 1
   0.142873     libusb_get_report: No error
   0.142899     Can't retrieve Report 32: Inappropriate ioctl for device
   0.143032     Path: UPS.PowerSummary.PresentStatus.FullyCharged, Type: Input, 
ReportID: 0x32, Offset: 19, Size: 1
   0.145873     libusb_get_report: No error
   0.145955     Can't retrieve Report 32: Inappropriate ioctl for device
   0.146097     Path: UPS.PowerSummary.PresentStatus.Charging, Type: Input, 
ReportID: 0x32, Offset: 20, Size: 1
   0.148873     libusb_get_report: No error
   0.148899     Can't retrieve Report 32: Inappropriate ioctl for device
   0.149032     Path: UPS.PowerSummary.PresentStatus.Discharging, Type: Input, 
ReportID: 0x32, Offset: 21, Size: 1
   0.151874     libusb_get_report: No error
   0.151900     Can't retrieve Report 32: Inappropriate ioctl for device
   0.152034     Path: UPS.PowerSummary.PresentStatus.FullyDischarged, Type: 
Input, ReportID: 0x32, Offset: 22, Size: 1
   0.154874     libusb_get_report: No error
   0.154900     Can't retrieve Report 32: Inappropriate ioctl for device
   0.155035     Path: UPS.PowerSummary.PresentStatus.NeedReplacement, Type: 
Input, ReportID: 0x32, Offset: 23, Size: 1
   0.157873     libusb_get_report: No error
   0.157955     Can't retrieve Report 32: Inappropriate ioctl for device
   0.158098     Path: UPS.PowerSummary.PresentStatus.InternalFailure, Type: 
Feature, ReportID: 0x32, Offset: 7, Size: 1
   0.160874     libusb_get_report: No error
   0.160956     Can't retrieve Report 32: Inappropriate ioctl for device
   0.161098     Path: UPS.PowerSummary.PresentStatus.ShutdownImminent, Type: 
Feature, ReportID: 0x32, Offset: 9, Size: 1
   0.163873     libusb_get_report: No error
   0.163900     Can't retrieve Report 32: Inappropriate ioctl for device
   0.164036     Path: UPS.PowerSummary.PresentStatus.ACPresent, Type: Feature, 
ReportID: 0x32, Offset: 16, Size: 1
   0.166874     libusb_get_report: No error
   0.166899     Can't retrieve Report 32: Inappropriate ioctl for device
   0.167032     Path: 
UPS.PowerSummary.PresentStatus.BelowRemainingCapacityLimit, Type: Feature, 
ReportID: 0x32, Offset: 18, Size: 1
   0.169874     libusb_get_report: No error
   0.169956     Can't retrieve Report 32: Inappropriate ioctl for device
   0.170099     Path: UPS.PowerSummary.PresentStatus.FullyCharged, Type: 
Feature, ReportID: 0x32, Offset: 19, Size: 1
   0.172873     libusb_get_report: No error
   0.172899     Can't retrieve Report 32: Inappropriate ioctl for device
   0.173065     Path: UPS.PowerSummary.PresentStatus.Charging, Type: Feature, 
ReportID: 0x32, Offset: 20, Size: 1
   0.175874     libusb_get_report: No error
   0.175900     Can't retrieve Report 32: Inappropriate ioctl for device
   0.176035     Path: UPS.PowerSummary.PresentStatus.Discharging, Type: 
Feature, ReportID: 0x32, Offset: 21, Size: 1
   0.178874     libusb_get_report: No error
   0.178956     Can't retrieve Report 32: Inappropriate ioctl for device
   0.179098     Path: UPS.PowerSummary.PresentStatus.FullyDischarged, Type: 
Feature, ReportID: 0x32, Offset: 22, Size: 1
   0.181874     libusb_get_report: No error
   0.181900     Can't retrieve Report 32: Inappropriate ioctl for device
   0.182036     Path: UPS.PowerSummary.PresentStatus.NeedReplacement, Type: 
Feature, ReportID: 0x32, Offset: 23, Size: 1
   0.184873     libusb_get_report: No error
   0.184899     Can't retrieve Report 04: Inappropriate ioctl for device
   0.185033     Path: UPS.BatterySystem.Battery.ConfigVoltage, Type: Feature, 
ReportID: 0x04, Offset: 0, Size: 16
   0.187873     libusb_get_report: No error
   0.187898     Can't retrieve Report 20: Inappropriate ioctl for device
   0.188031     Path: UPS.BatterySystem.Battery.Voltage, Type: Feature, 
ReportID: 0x20, Offset: 0, Size: 16
   0.190872     libusb_get_report: No error
   0.190898     Can't retrieve Report 23: Inappropriate ioctl for device
   0.191031     Path: 
UPS.BatterySystem.Battery.PresentStatus.BelowRemainingCapacityLimit, Type: 
Feature, ReportID: 0x23, Offset: 2, Size: 1
   0.193872     libusb_get_report: No error
   0.193898     Can't retrieve Report 23: Inappropriate ioctl for device
   0.194032     Path: UPS.BatterySystem.Battery.PresentStatus.FullyCharged, 
Type: Feature, ReportID: 0x23, Offset: 3, Size: 1
   0.196873     libusb_get_report: No error
   0.196898     Can't retrieve Report 23: Inappropriate ioctl for device
   0.197032     Path: UPS.BatterySystem.Battery.PresentStatus.Charging, Type: 
Feature, ReportID: 0x23, Offset: 4, Size: 1
   0.199873     libusb_get_report: No error
   0.199955     Can't retrieve Report 23: Inappropriate ioctl for device
   0.200098     Path: UPS.BatterySystem.Battery.PresentStatus.Discharging, 
Type: Feature, ReportID: 0x23, Offset: 5, Size: 1
   0.202873     libusb_get_report: No error
   0.202899     Can't retrieve Report 23: Inappropriate ioctl for device
   0.203033     Path: UPS.BatterySystem.Battery.PresentStatus.FullyDischarged, 
Type: Feature, ReportID: 0x23, Offset: 6, Size: 1
   0.205882     libusb_get_report: No error
   0.205908     Can't retrieve Report 23: Inappropriate ioctl for device
   0.206065     Path: UPS.BatterySystem.Battery.PresentStatus.NeedReplacement, 
Type: Feature, ReportID: 0x23, Offset: 7, Size: 1
   0.208872     libusb_get_report: No error
   0.208897     Can't retrieve Report 21: Inappropriate ioctl for device
   0.209031     Path: UPS.BatterySystem.Battery.RemainingCapacity, Type: 
Feature, ReportID: 0x21, Offset: 0, Size: 8
   0.211872     libusb_get_report: No error
   0.211898     Can't retrieve Report 10: Inappropriate ioctl for device
   0.212031     Path: UPS.BatterySystem.Test, Type: Feature, ReportID: 0x10, 
Offset: 0, Size: 8
   0.214872     libusb_get_report: No error
   0.214898     Can't retrieve Report 1a: Inappropriate ioctl for device
   0.215030     Path: UPS.BatterySystem.Temperature, Type: Feature, ReportID: 
0x1a, Offset: 0, Size: 16
   0.217873     libusb_get_report: No error
   0.217955     Can't retrieve Report 01: Inappropriate ioctl for device
   0.218095     Path: UPS.Flow.ConfigVoltage, Type: Feature, ReportID: 0x01, 
Offset: 0, Size: 8
   0.220873     libusb_get_report: No error
   0.220900     Can't retrieve Report 02: Inappropriate ioctl for device
   0.221049     Path: UPS.Flow.ConfigFrequency, Type: Feature, ReportID: 0x02, 
Offset: 0, Size: 8
   0.223881     Can't retrieve Report 55: Broken pipe
   0.223967     Path: UPS.Flow.ffff0097, Type: Feature, ReportID: 0x55, Offset: 
0, Size: 8
   0.226873     libusb_get_report: error sending control message: Broken pipe
   0.226955     Can't retrieve Report 03: Broken pipe
...

- Kelvin

_______________________________________________
Nut-upsdev mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/nut-upsdev

Reply via email to