[Nut-upsdev] libusb_get_string: invalid argument

Greg Hersch hersch.greg at gmail.com
Sun Jun 7 21:02:18 UTC 2015


Hi - I just installed NUT from source, using the usbhid-ups driver for
a tripplite UPS (i compiled with the appropriate flag for the USB
device).
NUT version is 2.7.3. I
UPS is AVR900U

System is archlinux - fully up to date, running on an ARM device.
Linux <Systemnameomitted > 3.1.10-35-ARCH #1 PREEMPT Fri Jan 23
19:14:18 MST 2015 armv5tel GNU/Linux

I can communicate with my UPS - no problems

But in my system log i constantly get: "usbhid-ups[27732]:
libusb_get_string: Invalid argument"


command to launch: /usr/local/ups/sbin/upsdrvctl start

-------------------------- ups.conf:

[tripplite]
        driver = usbhid-ups
        port = auto
        vendorid = 09ae
        maxreport   # This was added as per the manual, as a
workaround for some bug. It didnt have any effect here

--------------- upsd.conf is fully commented out right now

------------Driver debug log

Here is the driver debug log. If I just let it run, it pops up with
libusb_get_string_invalid argument over and over again, mixed in the
debug output. seems to be several issues reported in the log, but they
arent easily interpreted.

>> sudo /usr/local/ups/bin/usbhid-ups -DD -a tripplite
Network UPS Tools - Generic HID driver 0.39 (2.7.3)
USB communication driver 0.32
   0.000000     debug level is '2'
   0.003213     upsdrv_initups...
   0.014812     Checking device (09AE/1007) (001/006)
   0.191402     - VendorID: 09ae
   0.192330     - ProductID: 1007
   0.193200     - Manufacturer: Tripp Lite
   0.194039     - Product: TRIPP LITE UPS
   0.194147     - Serial Number: FW-2263 E
   0.194467     - Bus: 001
   0.194560     Trying to match device
   0.196030     Device matches
   0.216552     HID descriptor length 447
   0.694440     Report Descriptor size = 447
   0.695419     Using subdriver: TrippLite HID 0.81
   0.711360     Path: UPS.PowerSummary.iProduct, Type: Feature,
ReportID: 0x28, Offset: 0, Size: 8, Value: 1
   0.728179     Path: UPS.PowerSummary.iSerialNumber, Type: Feature,
ReportID: 0x29, Offset: 0, Size: 8, Value: 2
   0.745042     Path: UPS.PowerSummary.iManufacturer, Type: Feature,
ReportID: 0x2b, Offset: 0, Size: 8, Value: 3
   0.761738     Path: UPS.PowerSummary.Input.ConfigVoltage, Type:
Feature, ReportID: 0x30, Offset: 0, Size: 8, Value: 120
   0.778460     Path: UPS.PowerSummary.AudibleAlarmControl, Type:
Feature, ReportID: 0x11, Offset: 0, Size: 8, Value: 2
   0.795076     Path: UPS.PowerSummary.iDeviceChemistry, Type:
Feature, ReportID: 0x2a, Offset: 0, Size: 8, Value: 24
   0.811944     Path: UPS.PowerSummary.CapacityMode, Type: Feature,
ReportID: 0x33, Offset: 0, Size: 8, Value: 2
   0.828701     Path: UPS.PowerSummary.RunTimeToEmpty, Type: Input,
ReportID: 0x35, Offset: 0, Size: 16, Value: 1440
   0.828799     Path: UPS.PowerSummary.RunTimeToEmpty, Type: Feature,
ReportID: 0x35, Offset: 0, Size: 16, Value: 1440
   0.845443     Path: UPS.PowerSummary.RemainingCapacity, Type: Input,
ReportID: 0x34, Offset: 0, Size: 8, Value: 100
   0.845542     Path: UPS.PowerSummary.RemainingCapacity, Type:
Feature, ReportID: 0x34, Offset: 0, Size: 8, Value: 100
   0.862205     Path: UPS.PowerSummary.FullChargeCapacity, Type:
Feature, ReportID: 0x37, Offset: 0, Size: 8, Value: 100
   0.878943     Path: UPS.PowerSummary.PresentStatus.ShutdownImminent,
Type: Input, ReportID: 0x32, Offset: 0, Size: 1, Value: 0
   0.879293     Path: UPS.PowerSummary.PresentStatus.TLACPresent,
Type: Input, ReportID: 0x32, Offset: 1, Size: 1, Value: 1
   0.879629     Path: UPS.PowerSummary.PresentStatus.TLCharging, Type:
Input, ReportID: 0x32, Offset: 2, Size: 1, Value: 1
   0.879757     Path: UPS.PowerSummary.PresentStatus.TLDischarging,
Type: Input, ReportID: 0x32, Offset: 3, Size: 1, Value: 0
   0.880149     Path:
UPS.PowerSummary.PresentStatus.TLNeedReplacement, Type: Input,
ReportID: 0x32, Offset: 4, Size: 1, Value: 0
   0.880278     Path: UPS.PowerSummary.PresentStatus.ShutdownImminent,
Type: Feature, ReportID: 0x32, Offset: 0, Size: 1, Value: 0
   0.880635     Path: UPS.PowerSummary.PresentStatus.ACPresent, Type:
Feature, ReportID: 0x32, Offset: 1, Size: 1, Value: 1
   0.880810     Path: UPS.PowerSummary.PresentStatus.Charging, Type:
Feature, ReportID: 0x32, Offset: 2, Size: 1, Value: 1
   0.881166     Path: UPS.PowerSummary.PresentStatus.Discharging,
Type: Feature, ReportID: 0x32, Offset: 3, Size: 1, Value: 0
   0.881508     Path: UPS.PowerSummary.PresentStatus.NeedReplacement,
Type: Feature, ReportID: 0x32, Offset: 4, Size: 1, Value: 0
   0.895843     Path: UPS.BatterySystem.Battery.ConfigVoltage, Type:
Feature, ReportID: 0x04, Offset: 0, Size: 16, Value: 12
   0.912455     Path:
UPS.BatterySystem.Battery.PresentStatus.Charging, Type: Feature,
ReportID: 0x23, Offset: 0, Size: 1, Value: 1
   0.912619     Path:
UPS.BatterySystem.Battery.PresentStatus.Discharging, Type: Feature,
ReportID: 0x23, Offset: 1, Size: 1, Value: 0
   0.913005     Path:
UPS.BatterySystem.Battery.PresentStatus.NeedReplacement, Type:
Feature, ReportID: 0x23, Offset: 2, Size: 1, Value: 0
   0.929335     Path: UPS.BatterySystem.Test, Type: Feature, ReportID:
0x10, Offset: 0, Size: 8, Value: 0
   0.946206     Path: UPS.Flow.ConfigVoltage, Type: Feature, ReportID:
0x01, Offset: 0, Size: 8, Value: 120
   0.962957     Path: UPS.Flow.ConfigFrequency, Type: Feature,
ReportID: 0x02, Offset: 0, Size: 8, Value: 60
   0.979721     Path: UPS.Flow.ConfigApparentPower, Type: Feature,
ReportID: 0x03, Offset: 0, Size: 16, Value: 900
   0.996456     Path: UPS.OutletSystem.Outlet.DelayBeforeShutdown,
Type: Feature, ReportID: 0x15, Offset: 0, Size: 16, Value: 65535
   1.013330     Path: UPS.OutletSystem.Outlet.ffff0091, Type: Feature,
ReportID: 0x51, Offset: 0, Size: 8, Value: 0
   1.030076     Path: UPS.OutletSystem.Outlet.TLWatchdog, Type:
Feature, ReportID: 0x52, Offset: 0, Size: 8, Value: 0
   1.046862     Path: UPS.OutletSystem.Outlet.ffff00c7, Type: Feature,
ReportID: 0xb6, Offset: 0, Size: 8, Value: 1
   1.063599     Path: UPS.TLCustom.[1].CommunicationProtocolVersion,
Type: Feature, ReportID: 0x6c, Offset: 0, Size: 16, Value: 4103
   1.080216     Path: UPS.ffff0015.[1].ffff00c0, Type: Feature,
ReportID: 0x96, Offset: 0, Size: 8, Value: 255
   1.097025     refresh_report_buffer: expected 5 bytes, but got 2 instead
   1.097394     Path: UPS.ffff0015.[1].ffff00d2, Type: Feature,
ReportID: 0xb4, Offset: 0, Size: 32, Value: 255
   1.113716     Path: UPS.ffff0015.[1].ffff00c1, Type: Feature,
ReportID: 0x97, Offset: 0, Size: 16, Value: 255
   1.130459     Path: UPS.ffff0015.[1].ffff00c2, Type: Feature,
ReportID: 0x98, Offset: 0, Size: 8, Value: 255
   1.147339     Path: UPS.ffff0015.[1].ffff00c3, Type: Feature,
ReportID: 0x99, Offset: 0, Size: 16, Value: 255
   1.164089     Path: UPS.ffff0015.[1].ffff00c5, Type: Feature,
ReportID: 0x9b, Offset: 0, Size: 16, Value: 3
   1.172696     libusb_get_report: Value too large for defined data type
   1.172928     Can't retrieve Report c2: Value too large for defined data type
   1.173268     Path: UPS.ffff0015.[1].ffff00d6, Type: Feature,
ReportID: 0xc2, Offset: 0, Size: 32
   1.181090     libusb_get_report: Value too large for defined data type
   1.181220     Can't retrieve Report 9a: Value too large for defined data type
   1.181376     Path: UPS.ffff0015.[1].ffff00c4, Type: Feature,
ReportID: 0x9a, Offset: 0, Size: 32
   1.181781     Report descriptor retrieved (Reportlen = 447)
   1.182095     Found HID device
   1.182200     Detected a UPS: Tripp Lite /TRIPP LITE UPS
   1.182476     Path: UPS.PowerSummary.RemainingCapacity, Type:
Feature, ReportID: 0x34, Offset: 0, Size: 8, Value: 100
   1.183043     Path: UPS.PowerSummary.RunTimeToEmpty, Type: Feature,
ReportID: 0x35, Offset: 0, Size: 16, Value: 1440
   1.183603     Path: UPS.BatterySystem.Battery.ConfigVoltage, Type:
Feature, ReportID: 0x04, Offset: 0, Size: 16, Value: 12
   1.184075     Path: UPS.PowerSummary.iDeviceChemistry, Type:
Feature, ReportID: 0x2a, Offset: 0, Size: 8, Value: 24
   1.223230     Path: UPS.OutletSystem.Outlet.DelayBeforeShutdown,
Type: Feature, ReportID: 0x15, Offset: 0, Size: 16, Value: 65535
   1.224098     Path: UPS.BatterySystem.Test, Type: Feature, ReportID:
0x10, Offset: 0, Size: 8, Value: 0
   1.224444     Path: UPS.PowerSummary.AudibleAlarmControl, Type:
Feature, ReportID: 0x11, Offset: 0, Size: 8, Value: 2
   1.224876     Path: UPS.Flow.ConfigApparentPower, Type: Feature,
ReportID: 0x03, Offset: 0, Size: 16, Value: 900
   1.225199     Path: UPS.OutletSystem.Outlet.TLWatchdog, Type:
Feature, ReportID: 0x52, Offset: 0, Size: 8, Value: 0
   1.225798     Path: UPS.PowerSummary.PresentStatus.ShutdownImminent,
Type: Feature, ReportID: 0x32, Offset: 0, Size: 1, Value: 0
   1.226171     Path: UPS.PowerSummary.PresentStatus.ACPresent, Type:
Feature, ReportID: 0x32, Offset: 1, Size: 1, Value: 1
   1.226636     Path: UPS.PowerSummary.PresentStatus.Charging, Type:
Feature, ReportID: 0x32, Offset: 2, Size: 1, Value: 1
   1.227016     Path: UPS.PowerSummary.PresentStatus.Discharging,
Type: Feature, ReportID: 0x32, Offset: 3, Size: 1, Value: 0
   1.227465     Path: UPS.PowerSummary.PresentStatus.NeedReplacement,
Type: Feature, ReportID: 0x32, Offset: 4, Size: 1, Value: 0
   1.228162     Path: UPS.PowerSummary.Input.ConfigVoltage, Type:
Feature, ReportID: 0x30, Offset: 0, Size: 8, Value: 120
   1.228888     Path: UPS.Flow.ConfigVoltage, Type: Feature, ReportID:
0x01, Offset: 0, Size: 8, Value: 120
   1.229558     Path: UPS.Flow.ConfigFrequency, Type: Feature,
ReportID: 0x02, Offset: 0, Size: 8, Value: 60
   1.229937     Path: UPS.BatterySystem.Test, Type: Feature, ReportID:
0x10, Offset: 0, Size: 8, Value: 0
   1.230333     Path: UPS.BatterySystem.Test, Type: Feature, ReportID:
0x10, Offset: 0, Size: 8, Value: 0
   1.230698     Path: UPS.BatterySystem.Test, Type: Feature, ReportID:
0x10, Offset: 0, Size: 8, Value: 0
   1.231104     Path: UPS.OutletSystem.Outlet.DelayBeforeShutdown,
Type: Feature, ReportID: 0x15, Offset: 0, Size: 16, Value: 65535
   1.231548     Path: UPS.OutletSystem.Outlet.DelayBeforeShutdown,
Type: Feature, ReportID: 0x15, Offset: 0, Size: 16, Value: 65535
   1.231918     Path: UPS.OutletSystem.Outlet.TLWatchdog, Type:
Feature, ReportID: 0x52, Offset: 0, Size: 8, Value: 0
   1.232324     Path: UPS.OutletSystem.Outlet.TLWatchdog, Type:
Feature, ReportID: 0x52, Offset: 0, Size: 8, Value: 0
   1.232683     Path: UPS.PowerSummary.AudibleAlarmControl, Type:
Feature, ReportID: 0x11, Offset: 0, Size: 8, Value: 2
   1.233093     Path: UPS.PowerSummary.AudibleAlarmControl, Type:
Feature, ReportID: 0x11, Offset: 0, Size: 8, Value: 2
   1.233555     Path: UPS.PowerSummary.AudibleAlarmControl, Type:
Feature, ReportID: 0x11, Offset: 0, Size: 8, Value: 2
   1.233958     Path: UPS.PowerSummary.AudibleAlarmControl, Type:
Feature, ReportID: 0x11, Offset: 0, Size: 8, Value: 2
   1.234319     Path: UPS.PowerSummary.AudibleAlarmControl, Type:
Feature, ReportID: 0x11, Offset: 0, Size: 8, Value: 2
   1.234465     find_nut_info: unknown info type: load.on.delay
   1.234825     find_nut_info: unknown info type: load.on.delay
   1.235153     upsdrv_initinfo...
   1.235474     upsdrv_updateinfo...
   1.259352     Got 1 HID objects...
   1.259785     Path: UPS.PowerSummary.RemainingCapacity, Type: Input,
ReportID: 0x34, Offset: 0, Size: 8, Value: 100
   1.260110     Quick update...
   1.260235     Path: UPS.OutletSystem.Outlet.DelayBeforeShutdown,
Type: Feature, ReportID: 0x15, Offset: 0, Size: 16, Value: 65535
   1.260586     Path: UPS.PowerSummary.PresentStatus.ACPresent, Type:
Feature, ReportID: 0x32, Offset: 1, Size: 1, Value: 1
   1.260769     Path: UPS.PowerSummary.PresentStatus.Charging, Type:
Feature, ReportID: 0x32, Offset: 2, Size: 1, Value: 1
   1.261128     Path: UPS.PowerSummary.PresentStatus.Discharging,
Type: Feature, ReportID: 0x32, Offset: 3, Size: 1, Value: 0
   1.262119     dstate_init: sock /var/state/ups/usbhid-ups-tripplite
open on fd 13
   1.262723     upsdrv_updateinfo...
   1.291322     Got 1 HID objects...
   1.291689     Path: UPS.PowerSummary.RunTimeToEmpty, Type: Input,
ReportID: 0x35, Offset: 0, Size: 16, Value: 1440
   1.292005     Quick update...
   1.292137     Path: UPS.OutletSystem.Outlet.DelayBeforeShutdown,
Type: Feature, ReportID: 0x15, Offset: 0, Size: 16, Value: 65535
   1.292478     Path: UPS.PowerSummary.PresentStatus.ACPresent, Type:
Feature, ReportID: 0x32, Offset: 1, Size: 1, Value: 1
   1.292600     Path: UPS.PowerSummary.PresentStatus.Charging, Type:
Feature, ReportID: 0x32, Offset: 2, Size: 1, Value: 1
   1.292970     Path: UPS.PowerSummary.PresentStatus.Discharging,
Type: Feature, ReportID: 0x32, Offset: 3, Size: 1, Value: 0
   3.264744     upsdrv_updateinfo...
   3.275409     Got 5 HID objects...
   3.275516     Path: UPS.PowerSummary.PresentStatus.ShutdownImminent,
Type: Input, ReportID: 0x32, Offset: 0, Size: 1, Value: 0
   3.275602     Path: UPS.PowerSummary.PresentStatus.TLACPresent,
Type: Input, ReportID: 0x32, Offset: 1, Size: 1, Value: 1
   3.335173     Path: UPS.PowerSummary.PresentStatus.TLCharging, Type:
Input, ReportID: 0x32, Offset: 2, Size: 1, Value: 1
   3.402289     Path: UPS.PowerSummary.PresentStatus.TLDischarging,
Type: Input, ReportID: 0x32, Offset: 3, Size: 1, Value: 0
   3.402389     libusb_get_string: Invalid argument
   3.402477     Path:
UPS.PowerSummary.PresentStatus.TLNeedReplacement, Type: Input,
ReportID: 0x32, Offset: 4, Size: 1, Value: 0
   3.402535     libusb_get_string: Invalid argument
   3.402585     Quick update...
   3.419036     Path: UPS.OutletSystem.Outlet.DelayBeforeShutdown,
Type: Feature, ReportID: 0x15, Offset: 0, Size: 16, Value: 65535
   3.419149     Path: UPS.PowerSummary.PresentStatus.ACPresent, Type:
Feature, ReportID: 0x32, Offset: 1, Size: 1, Value: 1
   3.419214     Path: UPS.PowerSummary.PresentStatus.Charging, Type:
Feature, ReportID: 0x32, Offset: 2, Size: 1, Value: 1
   3.419275     Path: UPS.PowerSummary.PresentStatus.Discharging,
Type: Feature, ReportID: 0x32, Offset: 3, Size: 1, Value: 0



More information about the Nut-upsdev mailing list