nut icon indicating copy to clipboard operation
nut copied to clipboard

Liebert GXT4 on Proxmox won't shutdown

Open EmnaX opened this issue 2 years ago • 18 comments

Hello, I am having some issues with an Emerson Liebert GXT4 connected to a Supermicro server running Proxmox VE 7.1-11. NUT was installed using apt. NUT is able to report UPS status properly and safely shutdown Proxmox; however, the UPS never kills power to the outlets so the batteries slowly drain during a power outage. It seems the upsdrvctl shutdown command fails for some reason. I have copied as much info below as I can think of. Any idea what might be causing the issue?

When I first installed NUT, the driver couldn't take over /dev/bus/usb/005/004 so I had to create a udev rule which fixed the issue. I found an example online that I copied. Before adding the udev rule, /dev/bus/usb/005/004 was owned by root:root.

# My udev rule
# cat /etc/udev/rules.d/90-nut-ups.rules

ACTION=="add", \
SUBSYSTEM=="usb", \
ATTR{idVendor}=="10af", ATTR{idProduct}=="0000", \
MODE="0660", GROUP="nut"
# uname -a

Linux host02 5.13.19-6-pve #1 SMP PVE 5.13.19-14 (Thu, 10 Mar 2022 16:24:52 +0100) x86_64 GNU/Linux
# cat /etc/nut/ups.conf

[ups1]
    driver = usbhid-ups
    port = auto
    desc = "Liebert GXT4-1500RT120"
    productid = 0000
    ignorelb
    override.battery.charge.warning = 60
    override.battery.charge.low = 50
# upsc ups1

Init SSL without certificate database
battery.charge: 100
battery.charge.low: 50
battery.charge.warning: 60
battery.type: PbAc
battery.voltage: 0.0
battery.voltage.nominal: 0.0
device.mfr: Vertiv Co.
device.model: Liebert GXT4
device.serial: 1823901037AFBA3
device.type: ups
driver.flag.ignorelb: enabled
driver.name: usbhid-ups
driver.parameter.offdelay: 60
driver.parameter.ondelay: 35
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.parameter.productid: 0000
driver.parameter.synchronous: no
driver.version: 2.7.4
driver.version.data: Belkin/Liebert HID 0.17
driver.version.internal: 0.41
ups.mfr: Vertiv Co.
ups.model: Liebert GXT4
ups.productid: 0000
ups.serial: 1823901037AFBA3
ups.status: OL CHRG
ups.vendorid: 10af
# Output from nut-ddl-dump.sh
Vertiv_Co.__Liebert_GXT4__usbhid-ups__2.7.4__01.dev

# Device dump generated by ./nut-ddl-dump.sh on Wed, 30 Mar 2022 15:48:35 -0400
# upsrw output:
#
# upscmd output:
# Instant commands supported on UPS [ups1]:

# upsc output:
battery.charge: 100
battery.charge.low: 88
battery.charge.warning: 95
battery.type: PbAc
battery.voltage: 0.0
battery.voltage.nominal: 0.0
device.mfr: Vertiv Co.
device.model: Liebert GXT4
device.serial: 1823901037AFBA3
device.type: ups
driver.flag.ignorelb: enabled
driver.name: usbhid-ups
driver.parameter.offdelay: 60
driver.parameter.ondelay: 35
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.parameter.productid: 0000
driver.parameter.synchronous: no
driver.version: 2.7.4
driver.version.data: Belkin/Liebert HID 0.17
driver.version.internal: 0.41
ups.mfr: Vertiv Co.
ups.model: Liebert GXT4
ups.productid: 0000
ups.serial: 1823901037AFBA3
ups.status: OL CHRG
ups.vendorid: 10af
# lsusb -d 10af:0000 -v

can't get debug descriptor: Resource temporarily unavailable
cannot read device status, Resource temporarily unavailable (11)

Bus 005 Device 004: ID 10af:0000 Liebert Corp. UPS
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x10af Liebert Corp.
  idProduct          0x0000 UPS
  bcdDevice            0.00
  iManufacturer           1 Vertiv Co.
  iProduct                2 Liebert GXT4
  iSerial                 3 1823901037AFBA3
  bNumConfigurations      1
OTG Descriptor:
  bLength                 3
  bDescriptorType         9
  bmAttributes         0x00
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0025
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          4 Vertiv-GXT4G
    bmAttributes         0x40
      (Missing must-be-set bit!)
      Self Powered
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              5 HID-LEDs
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.00
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     505
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval              32
# upsdrvctl start

Network UPS Tools - UPS driver controller 2.7.4
Network UPS Tools - Generic HID driver 0.41 (2.7.4)
USB communication driver 0.33
Using subdriver: Belkin/Liebert HID 0.17
using 'battery.charge' to set battery low state

Broadcast message from nut@host02 (somewhere) (Wed Mar 30 20:04:39 2022):

Communications with UPS [email protected] established
# upsdrvctl shutdown

Network UPS Tools - UPS driver controller 2.7.4
Network UPS Tools - Generic HID driver 0.41 (2.7.4)
USB communication driver 0.33
Using subdriver: Belkin/Liebert HID 0.17
Initiating UPS shutdown
Shutdown failed!
Driver failed to start (exit status=1)
# /lib/nut/usbhid-ups -DDDDD -a ups1 -k &> nut_debug.txt

   0.000000	send_to_all: SETINFO driver.parameter.port "auto"
   0.000045	send_to_all: SETINFO driver.parameter.productid "0000"
   0.000054	send_to_all: SETINFO driver.flag.ignorelb "enabled"
   0.000063	send_to_all: SETINFO battery.charge.warning "60"
   0.000074	send_to_all: SETFLAGS battery.charge.warning
   0.000082	send_to_all: SETINFO battery.charge.low "50"
   0.000089	send_to_all: SETFLAGS battery.charge.low
   0.000098	debug level is '5'
   0.000667	upsdrv_initups...
   0.001712	Checking device (1D6B/0003) (006/001)
   0.015166	- VendorID: 1d6b
   0.015194	- ProductID: 0003
   0.015206	- Manufacturer: unknown
   0.015218	- Product: unknown
   0.015231	- Serial Number: unknown
   0.015245	- Bus: 006
   0.015258	- Device release number: 0513
   0.015271	Trying to match device
   0.015288	Device does not match - skipping
   0.015308	Checking device (0658/0200) (005/006)
   0.015340	- VendorID: 0658
   0.015355	- ProductID: 0200
   0.015371	- Manufacturer: unknown
   0.015385	- Product: unknown
   0.015399	- Serial Number: unknown
   0.015412	- Bus: 005
   0.015427	- Device release number: 0000
   0.015441	Trying to match device
   0.015456	Device does not match - skipping
   0.015470	Checking device (10C4/EA60) (005/005)
   0.015494	- VendorID: 10c4
   0.015507	- ProductID: ea60
   0.015520	- Manufacturer: unknown
   0.015532	- Product: unknown
   0.015544	- Serial Number: unknown
   0.015557	- Bus: 005
   0.015569	- Device release number: 0100
   0.015581	Trying to match device
   0.015594	Device does not match - skipping
   0.015609	Checking device (10AF/0000) (005/004)
   0.027380	- VendorID: 10af
   0.027411	- ProductID: 0000
   0.027424	- Manufacturer: Vertiv Co.
   0.027437	- Product: Liebert GXT4
   0.027450	- Serial Number: 1823901037AFBA3
   0.027462	- Bus: 005
   0.027474	- Device release number: 0000
   0.027487	Trying to match device
   0.027511	Device matches

### Is this my problem on the following line??? I'm not sure what other process would be using the UPS.###
   0.027529	failed to claim USB device: could not claim interface 0: Device or resource busy
   0.027581	detached kernel driver from USB device...
   0.027603	nut_usb_set_altinterface: skipped usb_set_altinterface(udev, 0)
   0.029383	HID descriptor, method 1: (9 bytes) => 09 21 00 01 00 01 22 f9 01
   0.029415	HID descriptor length (method 1) 505
   0.029429	i=0, extra[i]=09, extra[i+1]=21
   0.029444	HID descriptor, method 2: (9 bytes) => 09 21 00 01 00 01 22 f9 01
   0.029457	HID descriptor length (method 2) 505
   0.029469	HID descriptor length 505
   0.033379	Report Descriptor size = 505
   0.033397	Report Descriptor: (505 bytes) => 05 84 09 04 a1 01 09 24 a1 02 85 01 09 00
   0.033406	 95 04 75 08 b1 03 85 02 09 ff 09 fd 95 02 75 04 15 00 25 0f b1 03 05 85 09
   0.033415	 8f 09 89 95 02 75 04 b1 03 09 83 75 08 95 01 15 00 26 fa 00 b1 03 85 03 09
   0.033424	 2a 75 18 95 01 b1 02 09 2c 75 02 95 01 15 00 25 03 b1 03 09 8b 75 01 95 01
   0.033433	 15 00 25 01 b1 03 09 00 15 01 25 1f 75 05 95 01 b1 03 85 13 95 01 75 08 15
   0.033441	 00 25 64 09 29 b1 03 75 08 09 66 85 06 95 01 b1 83 09 66 81 83 85 0c 09 44
   0.033450	 09 45 09 d0 09 42 09 d1 25 01 15 00 75 01 95 05 b1 83 09 00 95 01 75 03 b1
   0.033459	 83 09 44 09 45 09 d0 09 42 09 d1 25 01 15 00 95 05 75 01 81 83 09 00 95 01
   0.033467	 75 03 81 83 85 04 09 67 09 8c 09 8d 09 8e 75 08 95 04 b1 02 85 05 05 84 09
   0.033476	 30 09 40 95 02 75 10 b1 03 85 08 09 58 95 01 75 08 b1 03 85 09 09 00 95 04
   0.033485	 75 08 b1 03 85 32 09 00 95 04 75 08 b1 03 85 33 09 00 95 04 75 08 b1 03 85
   0.033493	 07 09 fe 75 08 95 01 b1 03 85 3c 09 00 95 04 75 08 b1 03 85 3d 09 00 95 04
   0.033502	 75 08 b1 03 85 3e 09 00 95 04 75 08 b1 03 85 3f 09 00 95 04 75 08 b1 03 85
   0.033511	 40 09 00 95 04 75 08 b1 03 85 41 09 00 95 04 75 08 b1 03 85 42 09 00 95 04
   0.033519	 75 08 b1 03 85 43 09 00 95 04 75 08 b1 03 85 44 09 00 95 04 75 08 b1 03 85
   0.033528	 50 09 00 95 04 75 08 b1 03 85 51 09 00 95 04 75 08 b1 03 85 52 09 00 95 04
   0.033536	 75 08 b1 03 85 53 09 00 95 04 75 08 b1 03 85 54 09 00 95 04 75 08 b1 03 85
   0.033545	 55 09 00 95 04 75 08 b1 03 85 56 09 00 95 04 75 08 b1 03 85 57 09 00 95 04
   0.033554	 75 08 b1 03 85 58 09 00 95 04 75 08 b1 03 85 59 09 00 95 04 75 08 b1 03 85
   0.033562	 5a 09 00 95 04 75 08 b1 03 85 5b 09 00 95 04 75 08 b1 03 85 5c 09 00 95 04
   0.033570	 75 08 b1 03 85 5d 09 00 95 04 75 08 b1 03 c0 c0
   0.033614	Using subdriver: Belkin/Liebert HID 0.17
   0.033621	59 HID objects found
   0.033628	Entering libusb_get_report
   0.034357	Report[get]: (5 bytes) => 01 07 0a aa d2
   0.034365	PhyMax = 0, PhyMin = 0, LogMax = 0, LogMin = 0
   0.034372	Unit = 00000000, UnitExp = 0
   0.034379	Exponent = 0
   0.034386	hid_lookup_path: 00840004 -> UPS
   0.034393	hid_lookup_path: 00840024 -> PowerSummary
   0.034400	hid_lookup_path: 00840000 -> Undefined
   0.034407	Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x01, Offset: 0, Size: 8, Value: 0
   0.034413	Entering libusb_get_report
   0.036386	Report[get]: (4 bytes) => 02 13 61 64
   0.036403	PhyMax = 0, PhyMin = 0, LogMax = 15, LogMin = 0
   0.036410	Unit = 00000000, UnitExp = 0
   0.036417	Exponent = 0
   0.036423	hid_lookup_path: 00840004 -> UPS
   0.036430	hid_lookup_path: 00840024 -> PowerSummary
   0.036437	hid_lookup_path: 008400ff -> iSerialNumber
   0.036444	Path: UPS.PowerSummary.iSerialNumber, Type: Feature, ReportID: 0x02, Offset: 0, Size: 4, Value: 3
   0.036451	Report[buf]: (4 bytes) => 02 13 61 64
   0.036458	PhyMax = 0, PhyMin = 0, LogMax = 15, LogMin = 0
   0.036464	Unit = 00000000, UnitExp = 0
   0.036470	Exponent = 0
   0.036477	hid_lookup_path: 00840004 -> UPS
   0.036483	hid_lookup_path: 00840024 -> PowerSummary
   0.036490	hid_lookup_path: 008400fd -> iManufacturer
   0.036497	Path: UPS.PowerSummary.iManufacturer, Type: Feature, ReportID: 0x02, Offset: 4, Size: 4, Value: 1
   0.036504	Report[buf]: (4 bytes) => 02 13 61 64
   0.036510	PhyMax = 0, PhyMin = 0, LogMax = 15, LogMin = 0
   0.036517	Unit = 00000000, UnitExp = 0
   0.036523	Exponent = 0
   0.036529	hid_lookup_path: 00840004 -> UPS
   0.036536	hid_lookup_path: 00840024 -> PowerSummary
   0.036542	hid_lookup_path: 0085008f -> iOEMInformation
   0.036549	Path: UPS.PowerSummary.iOEMInformation, Type: Feature, ReportID: 0x02, Offset: 8, Size: 4, Value: 1
   0.036556	Report[buf]: (4 bytes) => 02 13 61 64
   0.036562	PhyMax = 0, PhyMin = 0, LogMax = 15, LogMin = 0
   0.036569	Unit = 00000000, UnitExp = 0
   0.036575	Exponent = 0
   0.036581	hid_lookup_path: 00840004 -> UPS
   0.036588	hid_lookup_path: 00840024 -> PowerSummary
   0.036594	hid_lookup_path: 00850089 -> iDeviceChemistry
   0.036601	Path: UPS.PowerSummary.iDeviceChemistry, Type: Feature, ReportID: 0x02, Offset: 12, Size: 4, Value: 6
   0.036608	Report[buf]: (4 bytes) => 02 13 61 64
   0.036615	PhyMax = 0, PhyMin = 0, LogMax = 250, LogMin = 0
   0.036621	Unit = 00000000, UnitExp = 0
   0.036627	Exponent = 0
   0.036634	hid_lookup_path: 00840004 -> UPS
   0.036640	hid_lookup_path: 00840024 -> PowerSummary
   0.036647	hid_lookup_path: 00850083 -> DesignCapacity
   0.036655	Path: UPS.PowerSummary.DesignCapacity, Type: Feature, ReportID: 0x02, Offset: 16, Size: 8, Value: 100
   0.036661	Entering libusb_get_report
   0.038369	Report[get]: (5 bytes) => 03 ff ff ff 06
   0.038379	PhyMax = 0, PhyMin = 0, LogMax = 250, LogMin = 0
   0.038385	Unit = 00000000, UnitExp = 0
   0.038392	Exponent = 0
   0.038398	hid_lookup_path: 00840004 -> UPS
   0.038405	hid_lookup_path: 00840024 -> PowerSummary
   0.038412	hid_lookup_path: 0085002a -> RemainingTimeLimit
   0.038419	Path: UPS.PowerSummary.RemainingTimeLimit, Type: Feature, ReportID: 0x03, Offset: 0, Size: 24, Value: 250
   0.038426	Report[buf]: (5 bytes) => 03 ff ff ff 06
   0.038433	PhyMax = 0, PhyMin = 0, LogMax = 3, LogMin = 0
   0.038439	Unit = 00000000, UnitExp = 0
   0.038446	Exponent = 0
   0.038452	hid_lookup_path: 00840004 -> UPS
   0.038459	hid_lookup_path: 00840024 -> PowerSummary
   0.038465	hid_lookup_path: 0085002c -> CapacityMode
   0.038472	Path: UPS.PowerSummary.CapacityMode, Type: Feature, ReportID: 0x03, Offset: 24, Size: 2, Value: 2
   0.038479	Report[buf]: (5 bytes) => 03 ff ff ff 06
   0.038485	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.038492	Unit = 00000000, UnitExp = 0
   0.038498	Exponent = 0
   0.038504	hid_lookup_path: 00840004 -> UPS
   0.038511	hid_lookup_path: 00840024 -> PowerSummary
   0.038517	hid_lookup_path: 0085008b -> Rechargeable
   0.038524	Path: UPS.PowerSummary.Rechargeable, Type: Feature, ReportID: 0x03, Offset: 26, Size: 1, Value: 1
   0.038531	Report[buf]: (5 bytes) => 03 ff ff ff 06
   0.038537	PhyMax = 0, PhyMin = 0, LogMax = 31, LogMin = 1
   0.038544	Unit = 00000000, UnitExp = 0
   0.038550	Exponent = 0
   0.038556	hid_lookup_path: 00840004 -> UPS
   0.038562	hid_lookup_path: 00840024 -> PowerSummary
   0.038569	hid_lookup_path: 00850000 -> Undefined
   0.038576	Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x03, Offset: 27, Size: 5, Value: 1
   0.038582	Entering libusb_get_report
   0.040371	Report[get]: (2 bytes) => 13 14
   0.040388	PhyMax = 0, PhyMin = 0, LogMax = 100, LogMin = 0
   0.040395	Unit = 00000000, UnitExp = 0
   0.040402	Exponent = 0
   0.040408	hid_lookup_path: 00840004 -> UPS
   0.040415	hid_lookup_path: 00840024 -> PowerSummary
   0.040422	hid_lookup_path: 00850029 -> RemainingCapacityLimit
   0.040429	Path: UPS.PowerSummary.RemainingCapacityLimit, Type: Feature, ReportID: 0x13, Offset: 0, Size: 8, Value: 20
   0.040436	Entering libusb_get_report
   0.042597	Report[get]: (2 bytes) => 06 64
   0.042627	PhyMax = 0, PhyMin = 0, LogMax = 100, LogMin = 0
   0.042639	Unit = 00000000, UnitExp = 0
   0.042650	Exponent = 0
   0.042662	hid_lookup_path: 00840004 -> UPS
   0.042674	hid_lookup_path: 00840024 -> PowerSummary
   0.042686	hid_lookup_path: 00850066 -> RemainingCapacity
   0.042700	Path: UPS.PowerSummary.RemainingCapacity, Type: Feature, ReportID: 0x06, Offset: 0, Size: 8, Value: 100
   0.042712	Report[buf]: (2 bytes) => 06 64
   0.042724	PhyMax = 0, PhyMin = 0, LogMax = 100, LogMin = 0
   0.042743	Unit = 00000000, UnitExp = 0
   0.042755	Exponent = 0
   0.042767	hid_lookup_path: 00840004 -> UPS
   0.042778	hid_lookup_path: 00840024 -> PowerSummary
   0.042790	hid_lookup_path: 00850066 -> RemainingCapacity
   0.042803	Path: UPS.PowerSummary.RemainingCapacity, Type: Input, ReportID: 0x06, Offset: 0, Size: 8, Value: 100
   0.042814	Entering libusb_get_report
   0.044371	Report[get]: (2 bytes) => 0c 15
   0.044388	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.044395	Unit = 00000000, UnitExp = 0
   0.044401	Exponent = 0
   0.044408	hid_lookup_path: 00840004 -> UPS
   0.044414	hid_lookup_path: 00840024 -> PowerSummary
   0.044421	hid_lookup_path: 00850044 -> Charging
   0.044428	Path: UPS.PowerSummary.Charging, Type: Feature, ReportID: 0x0c, Offset: 0, Size: 1, Value: 1
   0.044435	Report[buf]: (2 bytes) => 0c 15
   0.044442	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.044448	Unit = 00000000, UnitExp = 0
   0.044454	Exponent = 0
   0.044461	hid_lookup_path: 00840004 -> UPS
   0.044467	hid_lookup_path: 00840024 -> PowerSummary
   0.044474	hid_lookup_path: 00850045 -> Discharging
   0.044481	Path: UPS.PowerSummary.Discharging, Type: Feature, ReportID: 0x0c, Offset: 1, Size: 1, Value: 0
   0.044488	Report[buf]: (2 bytes) => 0c 15
   0.044494	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.044500	Unit = 00000000, UnitExp = 0
   0.044507	Exponent = 0
   0.044513	hid_lookup_path: 00840004 -> UPS
   0.044520	hid_lookup_path: 00840024 -> PowerSummary
   0.044526	hid_lookup_path: 008500d0 -> ACPresent
   0.044533	Path: UPS.PowerSummary.ACPresent, Type: Feature, ReportID: 0x0c, Offset: 2, Size: 1, Value: 1
   0.044539	Report[buf]: (2 bytes) => 0c 15
   0.044546	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.044552	Unit = 00000000, UnitExp = 0
   0.044558	Exponent = 0
   0.044565	hid_lookup_path: 00840004 -> UPS
   0.044571	hid_lookup_path: 00840024 -> PowerSummary
   0.044582	hid_lookup_path: 00850042 -> BelowRemainingCapacityLimit
   0.044588	Path: UPS.PowerSummary.BelowRemainingCapacityLimit, Type: Feature, ReportID: 0x0c, Offset: 3, Size: 1, Value: 0
   0.044595	Report[buf]: (2 bytes) => 0c 15
   0.044601	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.044607	Unit = 00000000, UnitExp = 0
   0.044613	Exponent = 0
   0.044620	hid_lookup_path: 00840004 -> UPS
   0.044626	hid_lookup_path: 00840024 -> PowerSummary
   0.044633	hid_lookup_path: 008500d1 -> BatteryPresent
   0.044639	Path: UPS.PowerSummary.BatteryPresent, Type: Feature, ReportID: 0x0c, Offset: 4, Size: 1, Value: 1
   0.044646	Report[buf]: (2 bytes) => 0c 15
   0.044652	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.044658	Unit = 00000000, UnitExp = 0
   0.044664	Exponent = 0
   0.044670	hid_lookup_path: 00840004 -> UPS
   0.044677	hid_lookup_path: 00840024 -> PowerSummary
   0.044685	hid_lookup_path: 00850000 -> Undefined
   0.044692	Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x0c, Offset: 5, Size: 3, Value: 0
   0.044699	Report[buf]: (2 bytes) => 0c 15
   0.044705	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.044711	Unit = 00000000, UnitExp = 0
   0.044717	Exponent = 0
   0.044723	hid_lookup_path: 00840004 -> UPS
   0.044730	hid_lookup_path: 00840024 -> PowerSummary
   0.044736	hid_lookup_path: 00850044 -> Charging
   0.044743	Path: UPS.PowerSummary.Charging, Type: Input, ReportID: 0x0c, Offset: 0, Size: 1, Value: 1
   0.044749	Report[buf]: (2 bytes) => 0c 15
   0.044755	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.044762	Unit = 00000000, UnitExp = 0
   0.044768	Exponent = 0
   0.044774	hid_lookup_path: 00840004 -> UPS
   0.044780	hid_lookup_path: 00840024 -> PowerSummary
   0.044788	hid_lookup_path: 00850045 -> Discharging
   0.044795	Path: UPS.PowerSummary.Discharging, Type: Input, ReportID: 0x0c, Offset: 1, Size: 1, Value: 0
   0.044801	Report[buf]: (2 bytes) => 0c 15
   0.044808	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.044814	Unit = 00000000, UnitExp = 0
   0.044820	Exponent = 0
   0.044826	hid_lookup_path: 00840004 -> UPS
   0.044832	hid_lookup_path: 00840024 -> PowerSummary
   0.044839	hid_lookup_path: 008500d0 -> ACPresent
   0.044845	Path: UPS.PowerSummary.ACPresent, Type: Input, ReportID: 0x0c, Offset: 2, Size: 1, Value: 1
   0.044852	Report[buf]: (2 bytes) => 0c 15
   0.044858	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.044864	Unit = 00000000, UnitExp = 0
   0.044870	Exponent = 0
   0.044877	hid_lookup_path: 00840004 -> UPS
   0.044883	hid_lookup_path: 00840024 -> PowerSummary
   0.044891	hid_lookup_path: 00850042 -> BelowRemainingCapacityLimit
   0.044898	Path: UPS.PowerSummary.BelowRemainingCapacityLimit, Type: Input, ReportID: 0x0c, Offset: 3, Size: 1, Value: 0
   0.044904	Report[buf]: (2 bytes) => 0c 15
   0.044910	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.044917	Unit = 00000000, UnitExp = 0
   0.044923	Exponent = 0
   0.044929	hid_lookup_path: 00840004 -> UPS
   0.044935	hid_lookup_path: 00840024 -> PowerSummary
   0.044942	hid_lookup_path: 008500d1 -> BatteryPresent
   0.044948	Path: UPS.PowerSummary.BatteryPresent, Type: Input, ReportID: 0x0c, Offset: 4, Size: 1, Value: 1
   0.044955	Report[buf]: (2 bytes) => 0c 15
   0.044961	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.044967	Unit = 00000000, UnitExp = 0
   0.044973	Exponent = 0
   0.044980	hid_lookup_path: 00840004 -> UPS
   0.044986	hid_lookup_path: 00840024 -> PowerSummary
   0.044994	hid_lookup_path: 00850000 -> Undefined
   0.045000	Path: UPS.PowerSummary.Undefined, Type: Input, ReportID: 0x0c, Offset: 5, Size: 3, Value: 0
   0.045007	Entering libusb_get_report
   0.046373	Report[get]: (5 bytes) => 04 64 14 01 01
   0.046389	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.046396	Unit = 00000000, UnitExp = 0
   0.046402	Exponent = 0
   0.046409	hid_lookup_path: 00840004 -> UPS
   0.046416	hid_lookup_path: 00840024 -> PowerSummary
   0.046422	hid_lookup_path: 00850067 -> FullChargeCapacity
   0.046429	Path: UPS.PowerSummary.FullChargeCapacity, Type: Feature, ReportID: 0x04, Offset: 0, Size: 8, Value: 0
   0.046436	Report[buf]: (5 bytes) => 04 64 14 01 01
   0.046443	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.046449	Unit = 00000000, UnitExp = 0
   0.046455	Exponent = 0
   0.046461	hid_lookup_path: 00840004 -> UPS
   0.046471	hid_lookup_path: 00840024 -> PowerSummary
   0.046477	hid_lookup_path: 0085008c -> WarningCapacityLimit
   0.046484	Path: UPS.PowerSummary.WarningCapacityLimit, Type: Feature, ReportID: 0x04, Offset: 8, Size: 8, Value: 0
   0.046491	Report[buf]: (5 bytes) => 04 64 14 01 01
   0.046497	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.046503	Unit = 00000000, UnitExp = 0
   0.046509	Exponent = 0
   0.046516	hid_lookup_path: 00840004 -> UPS
   0.046522	hid_lookup_path: 00840024 -> PowerSummary
   0.046528	hid_lookup_path: 0085008d -> CapacityGranularity1
   0.046535	Path: UPS.PowerSummary.CapacityGranularity1, Type: Feature, ReportID: 0x04, Offset: 16, Size: 8, Value: 1
   0.046542	Report[buf]: (5 bytes) => 04 64 14 01 01
   0.046548	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.046554	Unit = 00000000, UnitExp = 0
   0.046561	Exponent = 0
   0.046567	hid_lookup_path: 00840004 -> UPS
   0.046575	hid_lookup_path: 00840024 -> PowerSummary
   0.046582	hid_lookup_path: 0085008e -> CapacityGranularity2
   0.046588	Path: UPS.PowerSummary.CapacityGranularity2, Type: Feature, ReportID: 0x04, Offset: 24, Size: 8, Value: 1
   0.046594	Entering libusb_get_report
   0.048373	Report[get]: (5 bytes) => 05 36 00 30 00
   0.048389	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.048396	Unit = 00000000, UnitExp = 0
   0.048402	Exponent = 0
   0.048409	hid_lookup_path: 00840004 -> UPS
   0.048416	hid_lookup_path: 00840024 -> PowerSummary
   0.048422	hid_lookup_path: 00840030 -> Voltage
   0.048429	Path: UPS.PowerSummary.Voltage, Type: Feature, ReportID: 0x05, Offset: 0, Size: 16, Value: 0
   0.048437	Report[buf]: (5 bytes) => 05 36 00 30 00
   0.048443	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.048449	Unit = 00000000, UnitExp = 0
   0.048455	Exponent = 0
   0.048465	hid_lookup_path: 00840004 -> UPS
   0.048471	hid_lookup_path: 00840024 -> PowerSummary
   0.048478	hid_lookup_path: 00840040 -> ConfigVoltage
   0.048485	Path: UPS.PowerSummary.ConfigVoltage, Type: Feature, ReportID: 0x05, Offset: 16, Size: 16, Value: 0
   0.048491	Entering libusb_get_report
   0.050382	Report[get]: (2 bytes) => 08 06
   0.050411	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.050423	Unit = 00000000, UnitExp = 0
   0.050434	Exponent = 0
   0.050446	hid_lookup_path: 00840004 -> UPS
   0.050458	hid_lookup_path: 00840024 -> PowerSummary
   0.050470	hid_lookup_path: 00840058 -> Test
   0.050482	Path: UPS.PowerSummary.Test, Type: Feature, ReportID: 0x08, Offset: 0, Size: 8, Value: 0
   0.050493	Entering libusb_get_report
   0.052375	Report[get]: (5 bytes) => 09 cc 50 06 00
   0.052392	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.052401	Unit = 00000000, UnitExp = 0
   0.052408	Exponent = 0
   0.052414	hid_lookup_path: 00840004 -> UPS
   0.052421	hid_lookup_path: 00840024 -> PowerSummary
   0.052427	hid_lookup_path: 00840000 -> Undefined
   0.052434	Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x09, Offset: 0, Size: 8, Value: 0
   0.052441	Entering libusb_get_report
   0.054372	Report[get]: (5 bytes) => 32 03 17 00 01
   0.054388	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.054395	Unit = 00000000, UnitExp = 0
   0.054401	Exponent = 0
   0.054408	hid_lookup_path: 00840004 -> UPS
   0.054415	hid_lookup_path: 00840024 -> PowerSummary
   0.054421	hid_lookup_path: 00840000 -> Undefined
   0.054428	Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x32, Offset: 0, Size: 8, Value: 1
   0.054435	Entering libusb_get_report
   0.056406	refresh_report_buffer: expected 5 bytes, but got 2 instead
   0.056437	Report[err]: (2 bytes) => 33 07
   0.056452	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.056465	Unit = 00000000, UnitExp = 0
   0.056477	Exponent = 0
   0.056490	hid_lookup_path: 00840004 -> UPS
   0.056504	hid_lookup_path: 00840024 -> PowerSummary
   0.056517	hid_lookup_path: 00840000 -> Undefined
   0.056531	Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x33, Offset: 0, Size: 8, Value: 1
   0.056543	Entering libusb_get_report
   0.058382	Report[get]: (2 bytes) => 07 02
   0.058413	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.058427	Unit = 00000000, UnitExp = 0
   0.058439	Exponent = 0
   0.058452	hid_lookup_path: 00840004 -> UPS
   0.058466	hid_lookup_path: 00840024 -> PowerSummary
   0.058483	hid_lookup_path: 008400fe -> iProduct
   0.058498	Path: UPS.PowerSummary.iProduct, Type: Feature, ReportID: 0x07, Offset: 0, Size: 8, Value: 0
   0.058510	Entering libusb_get_report
   0.060374	Report[get]: (5 bytes) => 3c 00 00 00 00
   0.060390	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.060397	Unit = 00000000, UnitExp = 0
   0.060403	Exponent = 0
   0.060410	hid_lookup_path: 00840004 -> UPS
   0.060417	hid_lookup_path: 00840024 -> PowerSummary
   0.060423	hid_lookup_path: 00840000 -> Undefined
   0.060430	Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x3c, Offset: 0, Size: 8, Value: 0
   0.060436	Entering libusb_get_report
   0.062384	Report[get]: (5 bytes) => 3d 00 00 00 00
   0.062415	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.062429	Unit = 00000000, UnitExp = 0
   0.062442	Exponent = 0
   0.062460	hid_lookup_path: 00840004 -> UPS
   0.062473	hid_lookup_path: 00840024 -> PowerSummary
   0.062486	hid_lookup_path: 00840000 -> Undefined
   0.062500	Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x3d, Offset: 0, Size: 8, Value: 0
   0.062512	Entering libusb_get_report
   0.064374	Report[get]: (5 bytes) => 3e 01 2c 00 04
   0.064390	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.064397	Unit = 00000000, UnitExp = 0
   0.064403	Exponent = 0
   0.064410	hid_lookup_path: 00840004 -> UPS
   0.064416	hid_lookup_path: 00840024 -> PowerSummary
   0.064423	hid_lookup_path: 00840000 -> Undefined
   0.064430	Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x3e, Offset: 0, Size: 8, Value: 1
   0.064436	Entering libusb_get_report
   0.066395	Report[get]: (5 bytes) => 3f 14 14 00 b4
   0.066427	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.066445	Unit = 00000000, UnitExp = 0
   0.066458	Exponent = 0
   0.066471	hid_lookup_path: 00840004 -> UPS
   0.066484	hid_lookup_path: 00840024 -> PowerSummary
   0.066497	hid_lookup_path: 00840000 -> Undefined
   0.066511	Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x3f, Offset: 0, Size: 8, Value: 0
   0.066524	Entering libusb_get_report
   0.068374	Report[get]: (5 bytes) => 40 00 00 00 00
   0.068390	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.068397	Unit = 00000000, UnitExp = 0
   0.068403	Exponent = 0
   0.068410	hid_lookup_path: 00840004 -> UPS
   0.068417	hid_lookup_path: 00840024 -> PowerSummary
   0.068423	hid_lookup_path: 00840000 -> Undefined
   0.068430	Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x40, Offset: 0, Size: 8, Value: 0
   0.068437	Entering libusb_get_report
   0.070386	Report[get]: (5 bytes) => 41 00 00 00 00
   0.070417	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.070431	Unit = 00000000, UnitExp = 0
   0.070443	Exponent = 0
   0.070457	hid_lookup_path: 00840004 -> UPS
   0.070470	hid_lookup_path: 00840024 -> PowerSummary
   0.070483	hid_lookup_path: 00840000 -> Undefined
   0.070497	Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x41, Offset: 0, Size: 8, Value: 0
   0.070510	Entering libusb_get_report
   0.072374	Report[get]: (5 bytes) => 42 01 2c 00 04
   0.072390	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.072397	Unit = 00000000, UnitExp = 0
   0.072403	Exponent = 0
   0.072410	hid_lookup_path: 00840004 -> UPS
   0.072416	hid_lookup_path: 00840024 -> PowerSummary
   0.072423	hid_lookup_path: 00840000 -> Undefined
   0.072432	Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x42, Offset: 0, Size: 8, Value: 1
   0.072439	Entering libusb_get_report
   0.074386	Report[get]: (5 bytes) => 43 21 00 00 b4
   0.074417	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.074430	Unit = 00000000, UnitExp = 0
   0.074443	Exponent = 0
   0.074456	hid_lookup_path: 00840004 -> UPS
   0.074469	hid_lookup_path: 00840024 -> PowerSummary
   0.074482	hid_lookup_path: 00840000 -> Undefined
   0.074496	Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x43, Offset: 0, Size: 8, Value: 1
   0.074509	Entering libusb_get_report
   0.076374	Report[get]: (5 bytes) => 44 77 00 00 00
   0.076390	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.076397	Unit = 00000000, UnitExp = 0
   0.076403	Exponent = 0
   0.076410	hid_lookup_path: 00840004 -> UPS
   0.076420	hid_lookup_path: 00840024 -> PowerSummary
   0.076427	hid_lookup_path: 00840000 -> Undefined
   0.076434	Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x44, Offset: 0, Size: 8, Value: 1
   0.076440	Entering libusb_get_report
   0.078386	Report[get]: (5 bytes) => 50 78 0c 3c 3c
   0.078417	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.078431	Unit = 00000000, UnitExp = 0
   0.078443	Exponent = 0
   0.078457	hid_lookup_path: 00840004 -> UPS
   0.078470	hid_lookup_path: 00840024 -> PowerSummary
   0.078483	hid_lookup_path: 00840000 -> Undefined
   0.078497	Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x50, Offset: 0, Size: 8, Value: 0
   0.078510	Entering libusb_get_report
   0.080374	Report[get]: (5 bytes) => 51 79 00 01 00
   0.080390	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.080397	Unit = 00000000, UnitExp = 0
   0.080406	Exponent = 0
   0.080412	hid_lookup_path: 00840004 -> UPS
   0.080419	hid_lookup_path: 00840024 -> PowerSummary
   0.080426	hid_lookup_path: 00840000 -> Undefined
   0.080433	Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x51, Offset: 0, Size: 8, Value: 1
   0.080439	Entering libusb_get_report
   0.082385	Report[get]: (5 bytes) => 00 00 00 00 00
   0.082416	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.082430	Unit = 00000000, UnitExp = 0
   0.082443	Exponent = 0
   0.082456	hid_lookup_path: 00840004 -> UPS
   0.082469	hid_lookup_path: 00840024 -> PowerSummary
   0.082482	hid_lookup_path: 00840000 -> Undefined
   0.082496	Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x52, Offset: 0, Size: 8, Value: 0
   0.082509	Entering libusb_get_report
   0.084386	Report[get]: (5 bytes) => 53 78 3c dc 05
   0.084421	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.084435	Unit = 00000000, UnitExp = 0
   0.084447	Exponent = 0
   0.084461	hid_lookup_path: 00840004 -> UPS
   0.084474	hid_lookup_path: 00840024 -> PowerSummary
   0.084487	hid_lookup_path: 00840000 -> Undefined
   0.084501	Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x53, Offset: 0, Size: 8, Value: 0
   0.084513	Entering libusb_get_report
   0.086386	Report[get]: (5 bytes) => 54 78 00 00 00
   0.086417	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.086430	Unit = 00000000, UnitExp = 0
   0.086443	Exponent = 0
   0.086456	hid_lookup_path: 00840004 -> UPS
   0.086469	hid_lookup_path: 00840024 -> PowerSummary
   0.086482	hid_lookup_path: 00840000 -> Undefined
   0.086496	Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x54, Offset: 0, Size: 8, Value: 0
   0.086513	Entering libusb_get_report
   0.088374	Report[get]: (5 bytes) => 00 00 00 00 00
   0.088390	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.088397	Unit = 00000000, UnitExp = 0
   0.088403	Exponent = 0
   0.088410	hid_lookup_path: 00840004 -> UPS
   0.088416	hid_lookup_path: 00840024 -> PowerSummary
   0.088423	hid_lookup_path: 00840000 -> Undefined
   0.088430	Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x55, Offset: 0, Size: 8, Value: 0
   0.088436	Entering libusb_get_report
   0.090386	Report[get]: (5 bytes) => 56 00 00 00 00
   0.090417	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.090430	Unit = 00000000, UnitExp = 0
   0.090443	Exponent = 0
   0.090456	hid_lookup_path: 00840004 -> UPS
   0.090469	hid_lookup_path: 00840024 -> PowerSummary
   0.090487	hid_lookup_path: 00840000 -> Undefined
   0.090501	Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x56, Offset: 0, Size: 8, Value: 0
   0.090514	Entering libusb_get_report
   0.092373	Report[get]: (5 bytes) => 57 3c 64 6b 00
   0.092389	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.092396	Unit = 00000000, UnitExp = 0
   0.092402	Exponent = 0
   0.092409	hid_lookup_path: 00840004 -> UPS
   0.092416	hid_lookup_path: 00840024 -> PowerSummary
   0.092422	hid_lookup_path: 00840000 -> Undefined
   0.092429	Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x57, Offset: 0, Size: 8, Value: 0
   0.092435	Entering libusb_get_report
   0.094386	Report[get]: (5 bytes) => 58 0b 00 00 00
   0.094417	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.094431	Unit = 00000000, UnitExp = 0
   0.094443	Exponent = 0
   0.094461	hid_lookup_path: 00840004 -> UPS
   0.094474	hid_lookup_path: 00840024 -> PowerSummary
   0.094487	hid_lookup_path: 00840000 -> Undefined
   0.094501	Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x58, Offset: 0, Size: 8, Value: 1
   0.094514	Entering libusb_get_report
   0.096373	Report[get]: (5 bytes) => 00 00 00 00 00
   0.096389	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.096396	Unit = 00000000, UnitExp = 0
   0.096402	Exponent = 0
   0.096409	hid_lookup_path: 00840004 -> UPS
   0.096416	hid_lookup_path: 00840024 -> PowerSummary
   0.096422	hid_lookup_path: 00840000 -> Undefined
   0.096429	Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x59, Offset: 0, Size: 8, Value: 0
   0.096436	Entering libusb_get_report
   0.098586	Report[get]: (5 bytes) => 5a 66 66 a6 3f
   0.098617	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.098635	Unit = 00000000, UnitExp = 0
   0.098648	Exponent = 0
   0.098661	hid_lookup_path: 00840004 -> UPS
   0.098674	hid_lookup_path: 00840024 -> PowerSummary
   0.098687	hid_lookup_path: 00840000 -> Undefined
   0.098701	Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x5a, Offset: 0, Size: 8, Value: 0
   0.098714	Entering libusb_get_report
   0.100372	Report[get]: (5 bytes) => 5b 66 66 a6 3f
   0.100389	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.100395	Unit = 00000000, UnitExp = 0
   0.100402	Exponent = 0
   0.100408	hid_lookup_path: 00840004 -> UPS
   0.100415	hid_lookup_path: 00840024 -> PowerSummary
   0.100421	hid_lookup_path: 00840000 -> Undefined
   0.100428	Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x5b, Offset: 0, Size: 8, Value: 0
   0.100435	Entering libusb_get_report
   0.102582	Report[get]: (5 bytes) => 5c 00 00 00 00
   0.102621	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.102634	Unit = 00000000, UnitExp = 0
   0.102647	Exponent = 0
   0.102660	hid_lookup_path: 00840004 -> UPS
   0.102673	hid_lookup_path: 00840024 -> PowerSummary
   0.102686	hid_lookup_path: 00840000 -> Undefined
   0.102700	Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x5c, Offset: 0, Size: 8, Value: 0
   0.102713	Entering libusb_get_report
   0.104374	Report[get]: (5 bytes) => 5d 00 00 00 00
   0.104390	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.104397	Unit = 00000000, UnitExp = 0
   0.104403	Exponent = 0
   0.104410	hid_lookup_path: 00840004 -> UPS
   0.104416	hid_lookup_path: 00840024 -> PowerSummary
   0.104423	hid_lookup_path: 00840000 -> Undefined
   0.104433	Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x5d, Offset: 0, Size: 8, Value: 0
Network UPS Tools - Generic HID driver 0.41 (2.7.4)
USB communication driver 0.33
   0.104447	send_to_all: SETINFO ups.mfr "Vertiv Co."
   0.104454	send_to_all: SETINFO ups.model "Liebert GXT4"
   0.104461	send_to_all: SETINFO ups.serial "1823901037AFBA3"
   0.104468	send_to_all: SETINFO ups.vendorid "10af"
   0.104475	send_to_all: SETINFO ups.productid "0000"
   0.104482	Report descriptor retrieved (Reportlen = 505)
   0.104488	Found HID device
   0.104495	Detected a UPS: Vertiv Co./Liebert GXT4
   0.104504	hid_lookup_usage: UPS -> 00840004
   0.104511	hid_lookup_usage: BELKINBatterySystem -> 00860010
   0.104518	hid_lookup_usage: BELKINCharge -> 00860039
   0.104525	string_to_path: depth = 3
   0.104533	hid_lookup_usage: UPS -> 00840004
   0.104540	hid_lookup_usage: PowerSummary -> 00840024
   0.104551	hid_lookup_usage: RemainingCapacityLimit -> 00850029
   0.104558	string_to_path: depth = 3
   0.104566	hid_lookup_usage: UPS -> 00840004
   0.104573	hid_lookup_usage: PowerSummary -> 00840024
   0.104581	hid_lookup_usage: WarningCapacityLimit -> 0085008c
   0.104588	string_to_path: depth = 3
   0.104595	hid_lookup_usage: UPS -> 00840004
   0.104602	hid_lookup_usage: PowerSummary -> 00840024
   0.104610	hid_lookup_usage: RunTimeToEmpty -> 00850068
   0.104616	string_to_path: depth = 3
   0.104623	hid_lookup_usage: UPS -> 00840004
   0.104630	hid_lookup_usage: PowerSummary -> 00840024
   0.104638	hid_lookup_usage: iDeviceChemistry -> 00850089
   0.104644	string_to_path: depth = 3
   0.104651	Report[buf]: (4 bytes) => 02 13 61 64
   0.104658	PhyMax = 0, PhyMin = 0, LogMax = 15, LogMin = 0
   0.104666	Unit = 00000000, UnitExp = 0
   0.104672	Exponent = 0
   0.104679	Path: UPS.PowerSummary.iDeviceChemistry, Type: Feature, ReportID: 0x02, Offset: 12, Size: 4, Value: 6
   0.109373	send_to_all: SETINFO battery.type "PbAc"
   0.109407	hid_lookup_usage: UPS -> 00840004
   0.109422	hid_lookup_usage: BELKINBatterySystem -> 00860010
   0.109436	hid_lookup_usage: BELKINVoltage -> 00860030
   0.109449	string_to_path: depth = 3
   0.109464	hid_lookup_usage: UPS -> 00840004
   0.109477	hid_lookup_usage: BELKINConfig -> 00860026
   0.109490	hid_lookup_usage: BELKINConfigBatteryVoltage -> 00860044
   0.109502	string_to_path: depth = 3
   0.109516	hid_lookup_usage: UPS -> 00840004
   0.109529	hid_lookup_usage: BELKINPowerState -> 0086002a
   0.109544	hid_lookup_usage: BELKINInput -> 0086001a
   0.109557	hid_lookup_usage: BELKINFrequency -> 00860032
   0.109574	string_to_path: depth = 4
   0.109588	hid_lookup_usage: UPS -> 00840004
   0.109601	hid_lookup_usage: BELKINConfig -> 00860026
   0.109613	hid_lookup_usage: BELKINConfigFrequency -> 00860042
   0.109626	string_to_path: depth = 3
   0.109639	hid_lookup_usage: UPS -> 00840004
   0.109652	hid_lookup_usage: BELKINDevice -> 00860029
   0.109666	hid_lookup_usage: BELKINVoltageSensitivity -> 00860074
   0.109679	string_to_path: depth = 3
   0.109693	hid_lookup_usage: UPS -> 00840004
   0.109705	hid_lookup_usage: BELKINConfig -> 00860026
   0.109718	hid_lookup_usage: BELKINHighVoltageTransfer -> 00860054
   0.109730	string_to_path: depth = 3
   0.109744	hid_lookup_usage: UPS -> 00840004
   0.109757	hid_lookup_usage: BELKINConfig -> 00860026
   0.109770	hid_lookup_usage: BELKINHighVoltageTransferMax -> 0086005d
   0.109784	string_to_path: depth = 3
   0.109799	hid_lookup_usage: UPS -> 00840004
   0.109811	hid_lookup_usage: BELKINConfig -> 00860026
   0.109824	hid_lookup_usage: BELKINHighVoltageTransferMin -> 0086005e
   0.109836	string_to_path: depth = 3
   0.109850	hid_lookup_usage: UPS -> 00840004
   0.109863	hid_lookup_usage: BELKINConfig -> 00860026
   0.109875	hid_lookup_usage: BELKINLowVoltageTransfer -> 00860053
   0.109887	string_to_path: depth = 3
   0.109901	hid_lookup_usage: UPS -> 00840004
   0.109914	hid_lookup_usage: BELKINConfig -> 00860026
   0.109926	hid_lookup_usage: BELKINLowVoltageTransferMax -> 0086005b
   0.109939	string_to_path: depth = 3
   0.109952	hid_lookup_usage: UPS -> 00840004
   0.109965	hid_lookup_usage: BELKINConfig -> 00860026
   0.109978	hid_lookup_usage: BELKINLowVoltageTransferMin -> 0086005c
   0.109992	string_to_path: depth = 3
   0.110006	hid_lookup_usage: UPS -> 00840004
   0.110013	hid_lookup_usage: BELKINPowerState -> 0086002a
   0.110020	hid_lookup_usage: BELKINInput -> 0086001a
   0.110029	hid_lookup_usage: BELKINVoltage -> 00860030
   0.110035	string_to_path: depth = 4
   0.110043	hid_lookup_usage: UPS -> 00840004
   0.110051	hid_lookup_usage: BELKINConfig -> 00860026
   0.110057	hid_lookup_usage: BELKINConfigVoltage -> 00860040
   0.110063	string_to_path: depth = 3
   0.110070	hid_lookup_usage: UPS -> 00840004
   0.110077	hid_lookup_usage: BELKINPowerState -> 0086002a
   0.110083	hid_lookup_usage: BELKINOutput -> 0086001c
   0.110090	hid_lookup_usage: BELKINFrequency -> 00860032
   0.110096	string_to_path: depth = 4
   0.110103	hid_lookup_usage: UPS -> 00840004
   0.110111	hid_lookup_usage: BELKINPowerState -> 0086002a
   0.110118	hid_lookup_usage: BELKINOutput -> 0086001c
   0.110124	hid_lookup_usage: BELKINVoltage -> 00860030
   0.110130	string_to_path: depth = 4
   0.110137	hid_lookup_usage: UPS -> 00840004
   0.110144	hid_lookup_usage: BELKINControls -> 00860027
   0.110150	hid_lookup_usage: BELKINAudibleAlarmControl -> 0086005a
   0.110157	string_to_path: depth = 3
   0.110163	hid_lookup_usage: UPS -> 00840004
   0.110170	hid_lookup_usage: BELKINControls -> 00860027
   0.110176	hid_lookup_usage: BELKINDelayBeforeStartup -> 00860056
   0.110182	string_to_path: depth = 3
   0.110189	hid_lookup_usage: UPS -> 00840004
   0.110196	hid_lookup_usage: BELKINControls -> 00860027
   0.110202	hid_lookup_usage: BELKINDelayBeforeShutdown -> 00860057
   0.110208	string_to_path: depth = 3
   0.110217	hid_lookup_usage: UPS -> 00840004
   0.110223	hid_lookup_usage: BELKINControls -> 00860027
   0.110230	hid_lookup_usage: BELKINDelayBeforeStartup -> 00860056
   0.110236	string_to_path: depth = 3
   0.110242	hid_lookup_usage: UPS -> 00840004
   0.110249	hid_lookup_usage: BELKINControls -> 00860027
   0.110255	hid_lookup_usage: BELKINDelayBeforeShutdown -> 00860057
   0.110261	string_to_path: depth = 3
   0.110268	hid_lookup_usage: UPS -> 00840004
   0.110275	hid_lookup_usage: BELKINControls -> 00860027
   0.110281	hid_lookup_usage: BELKINDelayBeforeReboot -> 00860055
   0.110287	string_to_path: depth = 3
   0.110294	hid_lookup_usage: UPS -> 00840004
   0.110301	hid_lookup_usage: BELKINDevice -> 00860029
   0.110307	hid_lookup_usage: BELKINUPSType -> 0086007c
   0.110314	string_to_path: depth = 3
   0.110324	hid_lookup_usage: UPS -> 00840004
   0.110331	hid_lookup_usage: BELKINPowerState -> 0086002a
   0.110338	hid_lookup_usage: BELKINOutput -> 0086001c
   0.110344	hid_lookup_usage: BELKINPercentLoad -> 00860035
   0.110350	string_to_path: depth = 4
   0.110357	hid_lookup_usage: UPS -> 00840004
   0.110363	hid_lookup_usage: BELKINConfig -> 00860026
   0.110370	hid_lookup_usage: BELKINConfigOverloadTransfer -> 00860045
   0.110376	string_to_path: depth = 3
   0.110383	hid_lookup_usage: UPS -> 00840004
   0.110390	hid_lookup_usage: PowerSummary -> 00840024
   0.110399	hid_lookup_usage: ManufacturerDate -> 00850085
   0.110406	string_to_path: depth = 3
   0.110413	hid_lookup_usage: UPS -> 00840004
   0.110419	hid_lookup_usage: BELKINConfig -> 00860026
   0.110425	hid_lookup_usage: BELKINConfigApparentPower -> 00860043
   0.110433	string_to_path: depth = 3
   0.110440	hid_lookup_usage: UPS -> 00840004
   0.110447	hid_lookup_usage: PowerSummary -> 00840024
   0.110455	hid_lookup_usage: iSerialNumber -> 008400ff
   0.110461	string_to_path: depth = 3
   0.110468	hid_lookup_usage: UPS -> 00840004
   0.110475	hid_lookup_usage: BELKINControls -> 00860027
   0.110481	hid_lookup_usage: BELKINTest -> 00860058
   0.110487	string_to_path: depth = 3
   0.110494	hid_lookup_usage: UPS -> 00840004
   0.110501	hid_lookup_usage: BELKINDevice -> 00860029
   0.110507	hid_lookup_usage: BELKINUPSType -> 0086007c
   0.110513	string_to_path: depth = 3
   0.110520	hid_lookup_usage: UPS -> 00840004
   0.110527	hid_lookup_usage: PowerSummary -> 00840024
   0.110535	hid_lookup_usage: RemainingCapacity -> 00850066
   0.110543	string_to_path: depth = 3
   0.110550	Report[buf]: (2 bytes) => 06 64
   0.110557	PhyMax = 0, PhyMin = 0, LogMax = 100, LogMin = 0
   0.110563	Unit = 00000000, UnitExp = 0
   0.110570	Exponent = 0
   0.110577	Path: UPS.PowerSummary.RemainingCapacity, Type: Feature, ReportID: 0x06, Offset: 0, Size: 8, Value: 100
   0.110585	send_to_all: SETINFO battery.charge "100"
   0.110592	hid_lookup_usage: UPS -> 00840004
   0.110599	hid_lookup_usage: Input -> 0084001a
   0.110606	hid_lookup_usage: Frequency -> 00840032
   0.110612	string_to_path: depth = 3
   0.110619	hid_lookup_usage: UPS -> 00840004
   0.110626	hid_lookup_usage: Input -> 0084001a
   0.110633	hid_lookup_usage: Voltage -> 00840030
   0.110639	string_to_path: depth = 3
   0.110646	hid_lookup_usage: UPS -> 00840004
   0.110654	hid_lookup_usage: Output -> 0084001c
   0.110661	hid_lookup_usage: Voltage -> 00840030
   0.110667	string_to_path: depth = 3
   0.110674	hid_lookup_usage: UPS -> 00840004
   0.110681	hid_lookup_usage: PowerSummary -> 00840024
   0.110688	hid_lookup_usage: Voltage -> 00840030
   0.110694	string_to_path: depth = 3
   0.110702	Report[buf]: (5 bytes) => 05 36 00 30 00
   0.110708	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.110714	Unit = 00000000, UnitExp = 0
   0.110720	Exponent = 0
   0.110727	Path: UPS.PowerSummary.Voltage, Type: Feature, ReportID: 0x05, Offset: 0, Size: 16, Value: 0
   0.110739	Input/OutputVoltage = 0 -> assuming correction factor = 1e+07
   0.110748	send_to_all: SETINFO battery.voltage "0.0"
   0.110756	hid_lookup_usage: UPS -> 00840004
   0.110762	hid_lookup_usage: PowerSummary -> 00840024
   0.110771	hid_lookup_usage: ConfigVoltage -> 00840040
   0.110778	string_to_path: depth = 3
   0.110785	Report[buf]: (5 bytes) => 05 36 00 30 00
   0.110791	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.110797	Unit = 00000000, UnitExp = 0
   0.110803	Exponent = 0
   0.110810	Path: UPS.PowerSummary.ConfigVoltage, Type: Feature, ReportID: 0x05, Offset: 16, Size: 16, Value: 0
   0.110817	ConfigVoltage = 0 -> assuming correction factor = 1e+08
   0.110824	send_to_all: SETINFO battery.voltage.nominal "0.0"
   0.110831	hid_lookup_usage: UPS -> 00840004
   0.110838	hid_lookup_usage: Output -> 0084001c
   0.110845	hid_lookup_usage: PercentLoad -> 00840035
   0.110851	string_to_path: depth = 3
   0.110858	hid_lookup_usage: UPS -> 00840004
   0.110864	hid_lookup_usage: PowerSummary -> 00840024
   0.110872	hid_lookup_usage: Discharging -> 00850045
   0.110880	string_to_path: depth = 3
   0.110887	Report[buf]: (2 bytes) => 0c 15
   0.110893	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.110899	Unit = 00000000, UnitExp = 0
   0.110905	Exponent = 0
   0.110912	Path: UPS.PowerSummary.Discharging, Type: Feature, ReportID: 0x0c, Offset: 1, Size: 1, Value: 0
   0.110918	process_boolean_info: !dischrg
   0.110925	hid_lookup_usage: UPS -> 00840004
   0.110932	hid_lookup_usage: PowerSummary -> 00840024
   0.110940	hid_lookup_usage: Charging -> 00850044
   0.110946	string_to_path: depth = 3
   0.110953	Report[buf]: (2 bytes) => 0c 15
   0.110959	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.110966	Unit = 00000000, UnitExp = 0
   0.110972	Exponent = 0
   0.110978	Path: UPS.PowerSummary.Charging, Type: Feature, ReportID: 0x0c, Offset: 0, Size: 1, Value: 1
   0.110987	process_boolean_info: chrg
   0.110994	hid_lookup_usage: UPS -> 00840004
   0.111000	hid_lookup_usage: PowerSummary -> 00840024
   0.111008	hid_lookup_usage: ShutdownImminent -> 00840069
   0.111014	string_to_path: depth = 3
   0.111021	hid_lookup_usage: UPS -> 00840004
   0.111028	hid_lookup_usage: PowerSummary -> 00840024
   0.111036	hid_lookup_usage: ACPresent -> 008500d0
   0.111042	string_to_path: depth = 3
   0.111049	Report[buf]: (2 bytes) => 0c 15
   0.111055	PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.111061	Unit = 00000000, UnitExp = 0
   0.111067	Exponent = 0
   0.111074	Path: UPS.PowerSummary.ACPresent, Type: Feature, ReportID: 0x0c, Offset: 2, Size: 1, Value: 1
   0.111080	process_boolean_info: online
   0.111087	hid_lookup_usage: UPS -> 00840004
   0.111096	hid_lookup_usage: PowerSummary -> 00840024
   0.111103	hid_lookup_usage: PresentStatus -> 00840002
   0.111112	hid_lookup_usage: Discharging -> 00850045
   0.111118	string_to_path: depth = 4
   0.111125	hid_lookup_usage: UPS -> 00840004
   0.111132	hid_lookup_usage: PowerSummary -> 00840024
   0.111138	hid_lookup_usage: PresentStatus -> 00840002
   0.111147	hid_lookup_usage: Charging -> 00850044
   0.111153	string_to_path: depth = 4
   0.111160	hid_lookup_usage: UPS -> 00840004
   0.111167	hid_lookup_usage: PowerSummary -> 00840024
   0.111174	hid_lookup_usage: PresentStatus -> 00840002
   0.111181	hid_lookup_usage: ShutdownImminent -> 00840069
   0.111188	string_to_path: depth = 4
   0.111194	hid_lookup_usage: UPS -> 00840004
   0.111201	hid_lookup_usage: PowerSummary -> 00840024
   0.111210	hid_lookup_usage: PresentStatus -> 00840002
   0.111219	hid_lookup_usage: ACPresent -> 008500d0
   0.111225	string_to_path: depth = 4
   0.111232	hid_lookup_usage: UPS -> 00840004
   0.111239	hid_lookup_usage: PowerSummary -> 00840024
   0.111245	hid_lookup_usage: PresentStatus -> 00840002
   0.111254	hid_lookup_usage: NeedReplacement -> 0085004b
   0.111260	string_to_path: depth = 4
   0.111267	hid_lookup_usage: UPS -> 00840004
   0.111274	hid_lookup_usage: PowerSummary -> 00840024
   0.111280	hid_lookup_usage: PresentStatus -> 00840002
   0.111289	hid_lookup_usage: BelowRemainingCapacityLimit -> 00850042
   0.111295	string_to_path: depth = 4
   0.111302	hid_lookup_usage: UPS -> 00840004
   0.111309	hid_lookup_usage: BELKINStatus -> 00860028
   0.111316	hid_lookup_usage: BELKINPowerStatus -> 00860021
   0.111324	string_to_path: depth = 3
   0.111331	hid_lookup_usage: UPS -> 00840004
   0.111337	hid_lookup_usage: BELKINStatus -> 00860028
   0.111344	hid_lookup_usage: BELKINPowerStatus -> 00860021
   0.111350	string_to_path: depth = 3
   0.111357	hid_lookup_usage: UPS -> 00840004
   0.111363	hid_lookup_usage: BELKINStatus -> 00860028
   0.111370	hid_lookup_usage: BELKINPowerStatus -> 00860021
   0.111376	string_to_path: depth = 3
   0.111383	hid_lookup_usage: UPS -> 00840004
   0.111390	hid_lookup_usage: BELKINStatus -> 00860028
   0.111396	hid_lookup_usage: BELKINPowerStatus -> 00860021
   0.111402	string_to_path: depth = 3
   0.111409	hid_lookup_usage: UPS -> 00840004
   0.111416	hid_lookup_usage: BELKINStatus -> 00860028
   0.111422	hid_lookup_usage: BELKINPowerStatus -> 00860021
   0.111430	string_to_path: depth = 3
   0.111437	hid_lookup_usage: UPS -> 00840004
   0.111444	hid_lookup_usage: BELKINStatus -> 00860028
   0.111451	hid_lookup_usage: BELKINBatteryStatus -> 00860022
   0.111457	string_to_path: depth = 3
   0.111464	hid_lookup_usage: UPS -> 00840004
   0.111470	hid_lookup_usage: BELKINStatus -> 00860028
   0.111477	hid_lookup_usage: BELKINBatteryStatus -> 00860022
   0.111483	string_to_path: depth = 3
   0.111490	hid_lookup_usage: UPS -> 00840004
   0.111496	hid_lookup_usage: BELKINStatus -> 00860028
   0.111503	hid_lookup_usage: BELKINBatteryStatus -> 00860022
   0.111509	string_to_path: depth = 3
   0.111516	hid_lookup_usage: UPS -> 00840004
   0.111522	hid_lookup_usage: BELKINControls -> 00860027
   0.111529	hid_lookup_usage: BELKINTest -> 00860058
   0.111536	string_to_path: depth = 3
   0.111543	hid_lookup_usage: UPS -> 00840004
   0.111550	hid_lookup_usage: BELKINControls -> 00860027
   0.111556	hid_lookup_usage: BELKINTest -> 00860058
   0.111562	string_to_path: depth = 3
   0.111569	hid_lookup_usage: UPS -> 00840004
   0.111575	hid_lookup_usage: BELKINControls -> 00860027
   0.111582	hid_lookup_usage: BELKINTest -> 00860058
   0.111588	string_to_path: depth = 3
   0.111595	hid_lookup_usage: UPS -> 00840004
   0.111601	hid_lookup_usage: BELKINControls -> 00860027
   0.111608	hid_lookup_usage: BELKINAudibleAlarmControl -> 0086005a
   0.111614	string_to_path: depth = 3
   0.111621	hid_lookup_usage: UPS -> 00840004
   0.111627	hid_lookup_usage: BELKINControls -> 00860027
   0.111633	hid_lookup_usage: BELKINAudibleAlarmControl -> 0086005a
   0.111642	string_to_path: depth = 3
   0.111649	hid_lookup_usage: UPS -> 00840004
   0.111655	hid_lookup_usage: BELKINControls -> 00860027
   0.111662	hid_lookup_usage: BELKINAudibleAlarmControl -> 0086005a
   0.111668	string_to_path: depth = 3
   0.111675	hid_lookup_usage: UPS -> 00840004
   0.111681	hid_lookup_usage: BELKINControls -> 00860027
   0.111687	hid_lookup_usage: BELKINAudibleAlarmControl -> 0086005a
   0.111694	string_to_path: depth = 3
   0.111700	hid_lookup_usage: UPS -> 00840004
   0.111707	hid_lookup_usage: BELKINControls -> 00860027
   0.111713	hid_lookup_usage: BELKINAudibleAlarmControl -> 0086005a
   0.111719	string_to_path: depth = 3
   0.111726	hid_lookup_usage: UPS -> 00840004
   0.111732	hid_lookup_usage: BELKINControls -> 00860027
   0.111739	hid_lookup_usage: BELKINDelayBeforeShutdown -> 00860057
   0.111746	string_to_path: depth = 3
   0.111753	hid_lookup_usage: UPS -> 00840004
   0.111760	hid_lookup_usage: BELKINControls -> 00860027
   0.111766	hid_lookup_usage: BELKINDelayBeforeStartup -> 00860056
   0.111772	string_to_path: depth = 3
   0.111779	hid_lookup_usage: UPS -> 00840004
   0.111786	hid_lookup_usage: BELKINControls -> 00860027
   0.111792	hid_lookup_usage: BELKINDelayBeforeShutdown -> 00860057
   0.111798	string_to_path: depth = 3
   0.111805	hid_lookup_usage: UPS -> 00840004
   0.111811	hid_lookup_usage: BELKINControls -> 00860027
   0.111818	hid_lookup_usage: BELKINDelayBeforeStartup -> 00860056
   0.111824	string_to_path: depth = 3
   0.111831	hid_lookup_usage: UPS -> 00840004
   0.111837	hid_lookup_usage: BELKINControls -> 00860027
   0.111843	hid_lookup_usage: BELKINDelayBeforeShutdown -> 00860057
   0.111851	string_to_path: depth = 3
   0.111858	hid_lookup_usage: UPS -> 00840004
   0.111865	hid_lookup_usage: BELKINControls -> 00860027
   0.111871	hid_lookup_usage: BELKINDelayBeforeReboot -> 00860055
   0.111877	string_to_path: depth = 3
   0.111885	find_nut_info: unknown info type: load.off.delay
   0.111892	find_nut_info: unknown info type: load.on.delay
   0.111899	find_nut_info: unknown info type: load.off.delay
   0.111906	Initiating UPS shutdown
   0.111913	upsdrv_shutdown...
   0.111919	instcmd(shutdown.return, [NULL])
   0.111926	find_nut_info: unknown info type: shutdown.return
   0.111933	instcmd(load.on.delay, [NULL])
   0.111939	find_nut_info: unknown info type: load.on.delay
   0.111946	instcmd: info element unavailable load.on.delay

   0.111952	instcmd(shutdown.reboot, [NULL])
   0.111960	find_nut_info: unknown info type: shutdown.reboot
   0.111966	instcmd: info element unavailable shutdown.reboot

   0.111973	instcmd(load.off.delay, [NULL])
   0.111979	find_nut_info: unknown info type: load.off.delay
   0.111986	instcmd: info element unavailable load.off.delay

   0.111992	Shutdown failed!
   0.111998	upsdrv_cleanup...
# lsof /dev/bus/usb/005/004

COMMAND       PID USER   FD   TYPE  DEVICE SIZE/OFF NODE NAME
usbhid-up 1477775  nut    4u   CHR 189,515      0t0  575 /dev/bus/usb/005/004

EmnaX avatar Mar 31 '22 00:03 EmnaX

I'm just a passerby but from my understanding

    override.battery.charge.warning = 60
    override.battery.charge.low = 50

despite the assertive name, these override things don't actually override the behaviour at the UPS, they just fake the numbers you give so they are what is read back by nut. This is what you want for, eg, wrong info coming back from the ups for number of batteries or whatever.

To change the variables inside the UPS itself, you're supposed to use upsrw. But I am also struggling with what I am setting that way not being told to the UPS itself.

lws-team avatar Mar 31 '22 13:03 lws-team

Thanks for stopping by Andy!

I have had good luck with those two variables actually working on this Liebert GXT4 as well as a couple Cyber Power UPS models that I have. I believe you also need to add the ignorelb line for those two overrides to work. When I was doing my testing to ensure the UPS would shut everything down properly, I had the following overrides set:

    ignorelb
    override.battery.charge.warning = 98
    override.battery.charge.low = 95

As soon as the UPS display showed the battery charge drop to 94%, Proxmox initiated the shutdown procedure.

Now, I can't seem to figure out how to turn off the UPS after everything shuts down but hopefully someone smarter then I can spot my issue.

EmnaX avatar Mar 31 '22 15:03 EmnaX

Just in case, could you try with a recent NUT github master build? There were some Liebert related PRs since 2.7.4 release, I think, maybe some impacted your use-case.

Proxmox is based on Debian and is capable of building NUT "natively" (got one hosting parts of NUT CI in fact).

jimklimov avatar Apr 04 '22 08:04 jimklimov

Thanks for the suggestion Jim. I have not built anything from source before so I'll have to figure that out. It looks like there is some great documentation over here: https://networkupstools.org/docs/user-manual.chunked/ar01s05.html#Installing_source

I'll give that a shot and report back.

EmnaX avatar Apr 06 '22 20:04 EmnaX

Ok, here is the follow up. I wasn't sure exactly what I was doing so I made a Debian VM so I didn't mess something up in Proxmox. I passed through the UPS for testing. I get a seg fault now when running the usbhid-ups -DDDDD -a ups1 -k command.

# uname -a

Linux vps09 4.19.0-19-amd64 #1 SMP Debian 4.19.232-1 (2022-03-07) x86_64 GNU/Linux
# ./upsc ups1

battery.charge: 100
battery.charge.low: 55
battery.charge.warning: 65
battery.type: PbAc
battery.voltage: 0.0
battery.voltage.nominal: 0.0
device.mfr: Vertiv Co.
device.model: Liebert GXT4
device.serial: 1823901037AFBA3
device.type: ups
driver.flag.ignorelb: enabled
driver.name: usbhid-ups
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.parameter.productid: 0000
driver.parameter.synchronous: auto
driver.version: 2.8.0-rc1
driver.version.data: Belkin/Liebert HID 0.18
driver.version.internal: 0.46
driver.version.usb: libusb-0.1 (or compat)
ups.mfr: Vertiv Co.
ups.model: Liebert GXT4
ups.productid: 0000
ups.serial: 1823901037AFBA3
ups.status: CHRG
ups.vendorid: 10af
# lsusb

Bus 003 Device 002: ID 0627:0001 Adomax Technology Co., Ltd
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 10af:0000 Liebert Corp. UPS
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
# ll /dev/bus/usb/002

total 0
crw-rw-r-- 1 root root 189, 128 Apr  6 21:08 001
crw-rw---- 1 root nut  189, 129 Apr  6 22:10 002
# lsusb -d 10af:0000 -v

Bus 002 Device 002: ID 10af:0000 Liebert Corp. UPS
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         8
  idVendor           0x10af Liebert Corp.
  idProduct          0x0000 UPS
  bcdDevice            0.00
  iManufacturer           1 Vertiv Co.
  iProduct                2 Liebert GXT4
  iSerial                 3 1823901037AFBA3
  bNumConfigurations      1
OTG Descriptor:
  bLength                 3
  bDescriptorType         9
  bmAttributes         0x00
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0025
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          4 Vertiv-GXT4G
    bmAttributes         0x40
      (Missing must-be-set bit!)
      Self Powered
    MaxPower                0mA
    bDescriptorType         2
    wTotalLength       0x0025
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          4 Vertiv-GXT4G
    bmAttributes         0x40
      (Missing must-be-set bit!)
      Self Powered
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              5 HID-LEDs
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.00
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     505
         Report Descriptors:
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval              32
can't get debug descriptor: Resource temporarily unavailable
cannot read device status, Resource temporarily unavailable (11)
# ./upsdrvctl shutdown ups1

Network UPS Tools - UPS driver controller 2.8.0-rc1
Network UPS Tools - Generic HID driver 0.46 (2.8.0-rc1)
USB communication driver (libusb 0.1) 0.43
Using subdriver: Belkin/Liebert HID 0.18
LineVoltage exponent looks wrong, but not correcting.
ConfigVoltage exponent looks wrong, but not correcting.
Initiating UPS shutdown
Shutdown failed!
Driver failed to start (exit status=1)
# ./usbhid-ups -DDDDD -a ups1 -k

Network UPS Tools - Generic HID driver 0.46 (2.8.0-rc1)
USB communication driver (libusb 0.1) 0.43
   0.000000     [D3] do_global_args: var='maxretry' val='3'
   0.000043     [D3] main_arg: var='driver' val='usbhid-ups'
   0.000051     [D3] main_arg: var='port' val='auto'
   0.000056     [D5] send_to_all: SETINFO driver.parameter.port "auto"
   0.000059     [D3] main_arg: var='desc' val='Liebert GXT4-1500RT120'
   0.000069     [D3] main_arg: var='productid' val='0000'
   0.000076     [D5] send_to_all: SETINFO driver.parameter.productid "0000"
   0.000079     [D3] main_arg: var='ignorelb' val='<null>'
   0.000081     [D5] send_to_all: SETINFO driver.flag.ignorelb "enabled"
   0.000085     [D3] main_arg: var='override.battery.charge.warning' val='65'
   0.000088     [D5] send_to_all: SETINFO battery.charge.warning "65"
   0.000090     [D5] send_to_all: SETFLAGS battery.charge.warning
   0.000093     [D3] main_arg: var='override.battery.charge.low' val='55'
   0.000103     [D5] send_to_all: SETINFO battery.charge.low "55"
   0.000105     [D5] send_to_all: SETFLAGS battery.charge.low
   0.000113     [D1] debug level is '5'
   0.000240     [D5] send_to_all: SETINFO device.type "ups"
   0.000253     [D2] Initializing an USB-connected UPS with library libusb-0.1 (or compat) (NUT subdriver name='USB communication driver (libusb 0.1)' ver='0.43')
   0.000255     [D1] upsdrv_initups (non-SHUT)...
   0.351001     [D3] usb_busses=0x557789c10560
   0.351043     [D2] Checking device (1D6B/0001) (008/001)
   0.378841     [D1] libusb_open get iManufacturer failed, retrying...
   0.378862     [D1] libusb_open get iManufacturer failed, retrying...
   0.378865     [D1] libusb_open get iManufacturer failed, retrying...
   0.378867     [D1] libusb_open get iProduct failed, retrying...
   0.378870     [D1] libusb_open get iProduct failed, retrying...
   0.378872     [D1] libusb_open get iProduct failed, retrying...
   0.378875     [D1] libusb_open get iSerialNumber failed, retrying...
   0.378877     [D1] libusb_open get iSerialNumber failed, retrying...
   0.378880     [D1] libusb_open get iSerialNumber failed, retrying...
   0.378882     [D2] - VendorID: 1d6b
   0.378884     [D2] - ProductID: 0001
   0.378886     [D2] - Manufacturer: unknown
   0.378888     [D2] - Product: unknown
   0.378890     [D2] - Serial Number: unknown
   0.378892     [D2] - Bus: 008
   0.378894     [D2] - Device: 001
   0.378896     [D2] - Device release number: 0419
   0.378898     [D2] Trying to match device
   0.378901     [D2] match_function_subdriver (non-SHUT mode): matching a device...
   0.378911     [D2] match_function_subdriver (non-SHUT mode): failed to match a subdriver to vendor and/or product ID
   0.378920     [D2] Device does not match - skipping
   0.378967     [D2] Checking device (1D6B/0001) (007/001)
   0.406860     [D1] libusb_open get iManufacturer failed, retrying...
   0.406884     [D1] libusb_open get iManufacturer failed, retrying...
   0.406887     [D1] libusb_open get iManufacturer failed, retrying...
   0.406889     [D1] libusb_open get iProduct failed, retrying...
   0.406892     [D1] libusb_open get iProduct failed, retrying...
   0.406894     [D1] libusb_open get iProduct failed, retrying...
   0.406896     [D1] libusb_open get iSerialNumber failed, retrying...
   0.406899     [D1] libusb_open get iSerialNumber failed, retrying...
   0.406901     [D1] libusb_open get iSerialNumber failed, retrying...
   0.406904     [D2] - VendorID: 1d6b
   0.406906     [D2] - ProductID: 0001
   0.406908     [D2] - Manufacturer: unknown
   0.406910     [D2] - Product: unknown
   0.406912     [D2] - Serial Number: unknown
   0.406914     [D2] - Bus: 007
   0.406916     [D2] - Device: 001
   0.406918     [D2] - Device release number: 0419
   0.406920     [D2] Trying to match device
   0.406922     [D2] match_function_subdriver (non-SHUT mode): matching a device...
   0.406929     [D2] match_function_subdriver (non-SHUT mode): failed to match a subdriver to vendor and/or product ID
   0.406938     [D2] Device does not match - skipping
   0.406983     [D2] Checking device (1D6B/0001) (006/001)
   0.434858     [D1] libusb_open get iManufacturer failed, retrying...
   0.434881     [D1] libusb_open get iManufacturer failed, retrying...
   0.434884     [D1] libusb_open get iManufacturer failed, retrying...
   0.608098     [D4] string_to_path: depth = 3
   0.608107     [D5] hid_lookup_usage: UPS -> 00840004
   0.608116     [D5] hid_lookup_usage: BELKINControls -> 00860027
   0.608125     [D5] hid_lookup_usage: BELKINAudibleAlarmControl -> 0086005a
   0.608134     [D4] string_to_path: depth = 3
   0.608144     [D5] hid_lookup_usage: UPS -> 00840004
   0.608153     [D5] hid_lookup_usage: BELKINControls -> 00860027
   0.608162     [D5] hid_lookup_usage: BELKINAudibleAlarmControl -> 0086005a
   0.608171     [D4] string_to_path: depth = 3
   0.608181     [D5] hid_lookup_usage: UPS -> 00840004
   0.608190     [D5] hid_lookup_usage: BELKINControls -> 00860027
   0.608199     [D5] hid_lookup_usage: BELKINDelayBeforeShutdown -> 00860057
   0.608208     [D4] string_to_path: depth = 3
   0.608217     [D5] hid_lookup_usage: UPS -> 00840004
   0.608226     [D5] hid_lookup_usage: BELKINControls -> 00860027
   0.608235     [D5] hid_lookup_usage: BELKINDelayBeforeStartup -> 00860056
   0.608244     [D4] string_to_path: depth = 3
   0.608254     [D5] hid_lookup_usage: UPS -> 00840004
   0.608263     [D5] hid_lookup_usage: BELKINControls -> 00860027
   0.608272     [D5] hid_lookup_usage: BELKINDelayBeforeShutdown -> 00860057
   0.608281     [D4] string_to_path: depth = 3
   0.608290     [D5] hid_lookup_usage: UPS -> 00840004
   0.608300     [D5] hid_lookup_usage: BELKINControls -> 00860027
   0.608308     [D5] hid_lookup_usage: BELKINDelayBeforeStartup -> 00860056
   0.608327     [D4] string_to_path: depth = 3
   0.608337     [D5] hid_lookup_usage: UPS -> 00840004
   0.608346     [D5] hid_lookup_usage: BELKINControls -> 00860027
   0.608355     [D5] hid_lookup_usage: BELKINDelayBeforeShutdown -> 00860057
   0.608364     [D4] string_to_path: depth = 3
   0.608373     [D5] hid_lookup_usage: UPS -> 00840004
   0.608382     [D5] hid_lookup_usage: BELKINControls -> 00860027
   0.608391     [D5] hid_lookup_usage: BELKINDelayBeforeReboot -> 00860055
   0.608400     [D4] string_to_path: depth = 3
   0.608411     [D2] find_nut_info: unknown info type: load.off.delay
   0.608421     [D2] find_nut_info: unknown info type: load.on.delay
   0.608431     [D2] find_nut_info: unknown info type: load.off.delay
   0.608441     Initiating UPS shutdown
   0.608450     [D1] upsdrv_shutdown...
   0.608459     [D1] instcmd(shutdown.return, [NULL])
   0.608468     [D2] find_nut_info: unknown info type: shutdown.return
Segmentation fault

EmnaX avatar Apr 07 '22 02:04 EmnaX

I just noticed the output of dmesg shows:

[ 3571.972650] usbhid-ups[2216]: segfault at 10 ip 00005577888b2510 sp 00007fff0a670ba0 error 4 in usbhid-ups[5577888b0000+13000]
[ 3571.972658] Code: 00 bf 04 00 00 00 31 ed e8 fd ec 00 00 48 8d 1d e4 0b 01 00 e9 79 fe ff ff 90 4c 89 ed 48 8d 1d c6 0b 01 00 e9 69 fe ff ff 90 <48> 8b 48 10 48 8d 15 b5 1d 01 00 31 c0 48 8d 35 f4 0b 01 00 bf 03
[ 3572.687322] usb 2-1: usbfs: process 1348 (usbhid-ups) did not claim interface 0 before use

Not sure what that means but maybe this is causing the issue?

EmnaX avatar Apr 07 '22 02:04 EmnaX

Thanks for the report, the segmentation fault is not good, and I found where it was, posting a fix. If you are not comfortable with git, in drivers/usbhid-ups.c file there is an instcmd() method. It logs "using Path" just before checking if (hidups_item == NULL) to try other commands - and it is this logging that can crash; removing the line should help for this bit of the issue.

jimklimov avatar Apr 07 '22 13:04 jimklimov

I am not really sure about the "interface 0" part, except that in recent year's work there were PRs to allow use of "not only 0" interface for composite USB devices, and some context from discussions about that.

jimklimov avatar Apr 07 '22 13:04 jimklimov

Note: Sources indicate at https://github.com/networkupstools/nut/blob/master/drivers/belkin-hid.c#L524 that for this subdriver the shutdown.return support was not detected/completed during development (might be missing in hardware), so they suggested a power-drain as the way to turn off the UPS and have it return when wall power returns, as documented in belkinunv manpage.

I guess it would need some forensics from you with the scripts/subdriver/gen-usbhid-subdriver.sh (refer to docs for details) to walk the UPS and see if it reports any mappings not present in the big table in drivers/belkin-hid.c :\

jimklimov avatar Apr 07 '22 13:04 jimklimov

Thanks for the report, the segmentation fault is not good, and I found where it was, posting a fix. If you are not comfortable with git, in drivers/usbhid-ups.c file there is an instcmd() method. It logs "using Path" just before checking if (hidups_item == NULL) to try other commands - and it is this logging that can crash; removing the line should help for this bit of the issue.

Hi Jim,

Thanks so much for taking the time to look at this stuff!

I found, on line 596, the line you are referring to:

	/* Retrieve and check netvar & item_path */
	hidups_item = find_nut_info(cmdname);
	upsdebugx(3, "%s: using Path '%s'", __func__, hidups_item->hidpath);

	/* Check for fallback if not found */
	if (hidups_item == NULL) {

And I have commented it out to look like this:

	/* Retrieve and check netvar & item_path */
	hidups_item = find_nut_info(cmdname);
	// upsdebugx(3, "%s: using Path '%s'", __func__, hidups_item->hidpath);

	/* Check for fallback if not found */
	if (hidups_item == NULL) {

Recompiling and running provides the following output:

# ./usbhid-ups -DDDDD -a ups1 -k

Network UPS Tools - Generic HID driver 0.46 (2.8.0-rc1)
USB communication driver (libusb 0.1) 0.43
   0.000000     [D3] do_global_args: var='maxretry' val='3'
   0.000046     [D3] main_arg: var='driver' val='usbhid-ups'
   0.000055     [D3] main_arg: var='port' val='auto'
   0.000068     [D5] send_to_all: SETINFO driver.parameter.port "auto"
   0.000076     [D3] main_arg: var='desc' val='Liebert GXT4-1500RT120'
   0.000084     [D3] main_arg: var='productid' val='0000'
   0.000096     [D5] send_to_all: SETINFO driver.parameter.productid "0000"
   0.000114     [D1] debug level is '5'
   0.000251     [D5] send_to_all: SETINFO device.type "ups"
   0.000270     [D2] Initializing an USB-connected UPS with library libusb-0.1 (or compat) (NUT subdriver name='USB communication driver (libusb 0.1)' ver='0.43')
   0.000278     [D1] upsdrv_initups (non-SHUT)...
   0.352078     [D3] usb_busses=0x558b27141340
   0.352108     [D2] Checking device (1D6B/0001) (008/001)
   0.379930     [D1] libusb_open get iManufacturer failed, retrying...
   0.379943     [D1] libusb_open get iManufacturer failed, retrying...
   0.379950     [D1] libusb_open get iManufacturer failed, retrying...
   0.379955     [D1] libusb_open get iProduct failed, retrying...
   0.379973     [D1] libusb_open get iProduct failed, retrying...
   0.379979     [D1] libusb_open get iProduct failed, retrying...
   0.379986     [D1] libusb_open get iSerialNumber failed, retrying...
   0.379992     [D1] libusb_open get iSerialNumber failed, retrying...
   0.380000     [D1] libusb_open get iSerialNumber failed, retrying...
   0.380003     [D2] - VendorID: 1d6b
   0.380006     [D2] - ProductID: 0001
   0.380011     [D2] - Manufacturer: unknown
   0.380014     [D2] - Product: unknown
   0.380017     [D2] - Serial Number: unknown
   0.380021     [D2] - Bus: 008
   0.380025     [D2] - Device: 001
   0.380028     [D2] - Device release number: 0419
   0.380031     [D2] Trying to match device
   0.380036     [D2] match_function_subdriver (non-SHUT mode): matching a device...
   0.380047     [D2] match_function_subdriver (non-SHUT mode): failed to match a subdriver to vendor and/or product ID
   0.380055     [D2] Device does not match - skipping
   0.380112     [D2] Checking device (1D6B/0001) (007/001)
   0.407918     [D1] libusb_open get iManufacturer failed, retrying...
   0.407929     [D1] libusb_open get iManufacturer failed, retrying...
   0.407931     [D1] libusb_open get iManufacturer failed, retrying...
   0.491960     [D1] libusb_open get iProduct failed, retrying...
   0.491963     [D1] libusb_open get iProduct failed, retrying...
   0.491965     [D1] libusb_open get iProduct failed, retrying...
   0.491967     [D1] libusb_open get iSerialNumber failed, retrying...
   0.491970     [D1] libusb_open get iSerialNumber failed, retrying...
   0.491972     [D1] libusb_open get iSerialNumber failed, retrying...
   0.491974     [D2] - VendorID: 1d6b
   0.491976     [D2] - ProductID: 0001
   0.491978     [D2] - Manufacturer: unknown
   0.491980     [D2] - Product: unknown
   0.491982     [D2] - Serial Number: unknown
   0.491984     [D2] - Bus: 003
   0.491986     [D2] - Device: 001
   0.491988     [D2] - Device release number: 0419
   0.491990     [D2] Trying to match device
   0.491992     [D2] match_function_subdriver (non-SHUT mode): matching a device...
   0.491996     [D2] match_function_subdriver (non-SHUT mode): failed to match a subdriver to vendor and/or product ID
   0.491998     [D2] Device does not match - skipping
   0.492042     [D2] Checking device (1D6B/0002) (002/001)
   0.520035     [D1] libusb_open get iManufacturer failed, retrying...
   0.520058     [D1] libusb_open get iManufacturer failed, retrying...
   0.520064     [D1] libusb_open get iManufacturer failed, retrying...
   0.520068     [D1] libusb_open get iProduct failed, retrying...
   0.520073     [D1] libusb_open get iProduct failed, retrying...
   0.520078     [D1] libusb_open get iProduct failed, retrying...
   0.633241     [D5] hid_lookup_usage: UPS -> 00840004
   0.633243     [D5] hid_lookup_usage: BELKINControls -> 00860027
   0.633246     [D5] hid_lookup_usage: BELKINDelayBeforeShutdown -> 00860057
   0.633248     [D4] string_to_path: depth = 3
   0.633251     [D5] hid_lookup_usage: UPS -> 00840004
   0.633254     [D5] hid_lookup_usage: BELKINControls -> 00860027
   0.633256     [D5] hid_lookup_usage: BELKINDelayBeforeStartup -> 00860056
   0.633259     [D4] string_to_path: depth = 3
   0.633262     [D5] hid_lookup_usage: UPS -> 00840004
   0.633264     [D5] hid_lookup_usage: BELKINControls -> 00860027
   0.633267     [D5] hid_lookup_usage: BELKINDelayBeforeShutdown -> 00860057
   0.633269     [D4] string_to_path: depth = 3
   0.633272     [D5] hid_lookup_usage: UPS -> 00840004
   0.633275     [D5] hid_lookup_usage: BELKINControls -> 00860027
   0.633277     [D5] hid_lookup_usage: BELKINDelayBeforeReboot -> 00860055
   0.633280     [D4] string_to_path: depth = 3
   0.633284     [D2] find_nut_info: unknown info type: load.off.delay
   0.633288     [D2] find_nut_info: unknown info type: load.on.delay
   0.633290     [D2] find_nut_info: unknown info type: load.off.delay
   0.633294     Initiating UPS shutdown
   0.633297     [D1] upsdrv_shutdown...
   0.633300     [D1] instcmd(shutdown.return, [NULL])
   0.633302     [D2] find_nut_info: unknown info type: shutdown.return
   0.633306     [D3] instcmd: cmdname 'shutdown.return' not found; checking for alternatives
   0.633309     [D1] instcmd(load.on.delay, [NULL])
   0.633312     [D2] find_nut_info: unknown info type: load.on.delay
   0.633316     [D3] instcmd: cmdname 'load.on.delay' not found; checking for alternatives
   0.633319     [D2] instcmd: info element unavailable load.on.delay

   0.633321     [D1] instcmd(shutdown.reboot, [NULL])
   0.633325     [D2] find_nut_info: unknown info type: shutdown.reboot
   0.633327     [D3] instcmd: cmdname 'shutdown.reboot' not found; checking for alternatives
   0.633331     [D2] instcmd: info element unavailable shutdown.reboot

   0.633333     [D1] instcmd(load.off.delay, [NULL])
   0.633363     [D2] find_nut_info: unknown info type: load.off.delay
   0.633365     [D3] instcmd: cmdname 'load.off.delay' not found; checking for alternatives
   0.633367     [D2] instcmd: info element unavailable load.off.delay

   0.633369     Shutdown failed!
   0.633374     [D1] upsdrv_cleanup...

Good news is that the segfault seems to have dissapeared!

But I still can't shutdown the UPS. :( I also see the following line in /var/log/messages after every shutdown attempt:

Apr  7 11:40:56 vps09 kernel: [ 6611.477061] usb 1-1: usbfs: process 1228 (usbhid-ups) did not claim interface 0 before use

Looking at the output from usbhid-ups though seems to suggest (as you mentioned already) that the instcmd shutdown.return is missing (among others).

A couple more command outputs:

# ./upsrw ups1
-- blank --
# ./upscmd -l ups1
Instant commands supported on UPS [ups1]:
-- blank --

I'll try to dig into the gen-usbhid-subdriver.sh and see if I can figure out how to perfrom some of these forensics you mentioned.

I have a number of Liebert GXT3 UPSs that I'll try testing out at some point as well :S

Thanks again! I'll report back with further results as I figure things out.

EmnaX avatar Apr 07 '22 16:04 EmnaX

In all the stuff above, the NUT was built with libusb-0.1 but I thought I would try building with libusb-1.0 just for fun. I didn't expect it to fix the issue of the missing shutdown command but I thought I would check it out.

I get an error about Entity not found. I figured I would post it here but I'm just going to go back to compiling with libusb-0.1 so I can focus on the original issue.

# /usr/local/ups/sbin/upsdrvctl shutdown

Network UPS Tools - UPS driver controller 2.8.0-rc1
Network UPS Tools - Generic HID driver 0.46 (2.8.0-rc1)
USB communication driver (libusb 1.0) 0.43
Can't claim USB device [10af:0000]@0/0: Entity not found
Driver failed to start (exit status=1)
# lsusb

Bus 006 Device 002: ID 0627:0001 Adomax Technology Co., Ltd
Bus 006 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 10af:0000 Liebert Corp. UPS
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
# ls -l /dev/bus/usb/001

total 0
crw-rw-r-- 1 root root 189, 0 Apr  7 15:56 001
crw-rw---- 1 root nut  189, 1 Apr  7 16:18 002
# /usr/local/ups/bin/usbhid-ups -DDDDD -a ups1 -k

Network UPS Tools - Generic HID driver 0.46 (2.8.0-rc1)
USB communication driver (libusb 1.0) 0.43
   0.000000     [D3] do_global_args: var='maxretry' val='3'
   0.000051     [D3] main_arg: var='driver' val='usbhid-ups'
   0.000065     [D3] main_arg: var='port' val='auto'
   0.000077     [D5] send_to_all: SETINFO driver.parameter.port "auto"
   0.000087     [D3] main_arg: var='desc' val='Liebert GXT4-1500RT120'
   0.000098     [D3] main_arg: var='productid' val='0000'
   0.000109     [D5] send_to_all: SETINFO driver.parameter.productid "0000"
   0.000125     [D1] debug level is '5'
   0.000258     [D5] send_to_all: SETINFO device.type "ups"
   0.000277     [D2] Initializing an USB-connected UPS with library libusb-1.0.22 (API: 0x1000106) (NUT subdriver name='USB communication driver (libusb 1.0)' ver='0.43')
   0.000287     [D1] upsdrv_initups (non-SHUT)...
   0.002747     [D2] Checking device 1 of 10 (0627/0001)
   0.002779     [D1] Failed to open device (0627/0001), skipping: Access denied (insufficient permissions)
   0.002790     [D2] Checking device 2 of 10 (1D6B/0002)
   0.002802     [D1] Failed to open device (1D6B/0002), skipping: Access denied (insufficient permissions)
   0.002812     [D2] Checking device 3 of 10 (1D6B/0001)
   0.002824     [D1] Failed to open device (1D6B/0001), skipping: Access denied (insufficient permissions)
   0.002834     [D2] Checking device 4 of 10 (1D6B/0001)
   0.002846     [D1] Failed to open device (1D6B/0001), skipping: Access denied (insufficient permissions)
   0.002855     [D2] Checking device 5 of 10 (1D6B/0001)
   0.002867     [D1] Failed to open device (1D6B/0001), skipping: Access denied (insufficient permissions)
   0.002877     [D2] Checking device 6 of 10 (1D6B/0002)
   0.002889     [D1] Failed to open device (1D6B/0002), skipping: Access denied (insufficient permissions)
   0.002898     [D2] Checking device 7 of 10 (1D6B/0001)
   0.002910     [D1] Failed to open device (1D6B/0001), skipping: Access denied (insufficient permissions)
   0.002920     [D2] Checking device 8 of 10 (1D6B/0001)
   0.002931     [D1] Failed to open device (1D6B/0001), skipping: Access denied (insufficient permissions)
   0.002941     [D2] Checking device 9 of 10 (10AF/0000)
   0.023595     [D2] - VendorID: 10af
   0.023617     [D2] - ProductID: 0000
   0.023619     [D2] - Manufacturer: Vertiv Co.
   0.023622     [D2] - Product: Liebert GXT4
   0.023623     [D2] - Serial Number: 1823901037AFBA3
   0.023626     [D2] - Bus: 001
   0.023628     [D2] - Device: unknown
   0.023630     [D2] - Device release number: 0000
   0.023632     [D2] Trying to match device
   0.023635     [D2] match_function_subdriver (non-SHUT mode): matching a device...
   0.023642     [D3] match_function_regex: matching a device...
   0.023685     [D2] Device matches
   0.023692     [D2] Reading first configuration descriptor
   0.023701     [D3] libusb_kernel_driver_active() returned 0
   0.023706     [D2] failed to claim USB device: Resource busy
   0.023713     [D2] Kernel driver already detached
   0.023715     [D2] failed to claim USB device: Resource busy
   0.023718     [D2] Kernel driver already detached
   0.023723     [D2] failed to claim USB device: Resource busy
   0.023725     [D2] Kernel driver already detached
   0.023728     [D2] failed to claim USB device: Resource busy
   0.023738     [D2] Kernel driver already detached
   0.023742     Can't claim USB device [10af:0000]@0/0: Entity not found

EmnaX avatar Apr 07 '22 20:04 EmnaX

OTOH the @.***` in logged device report may mean the interface number. When you tried these driver builds, did usbfs complain about not-claim of interface 0?

The rest of issues seem systemic, like something else grabbed the device (and/or set access rights to device filesystem node) so won't let the NUT driver running as your user account have it.

As a workaround (for testing at least), you can try starting the driver as root with -u root CLI option to avoid dropping privileges, to rule out permissions-related issues.

On Thu, Apr 7, 2022, 22:24 EmnaX @.***> wrote:

In all the stuff above, the NUT was built with libusb-0.1 but I thought I would try building with libusb-1.0 just for fun. I didn't expect it to fix the issue of the missing shutdown command but I thought I would check it out.

I get an error about Entity not found. I figured I would post it here but I'm just going to go back to compiling with libusb-0.1 so I can focus on the original issue.

/usr/local/ups/sbin/upsdrvctl shutdown

Network UPS Tools - UPS driver controller 2.8.0-rc1 Network UPS Tools - Generic HID driver 0.46 (2.8.0-rc1) USB communication driver (libusb 1.0) 0.43 Can't claim USB device @.***/0: Entity not found Driver failed to start (exit status=1)

lsusb

Bus 006 Device 002: ID 0627:0001 Adomax Technology Co., Ltd Bus 006 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 001 Device 002: ID 10af:0000 Liebert Corp. UPS Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

ls -l /dev/bus/usb/001

total 0 crw-rw-r-- 1 root root 189, 0 Apr 7 15:56 001 crw-rw---- 1 root nut 189, 1 Apr 7 16:18 002

/usr/local/ups/bin/usbhid-ups -DDDDD -a ups1 -k

Network UPS Tools - Generic HID driver 0.46 (2.8.0-rc1) USB communication driver (libusb 1.0) 0.43 0.000000 [D3] do_global_args: var='maxretry' val='3' 0.000051 [D3] main_arg: var='driver' val='usbhid-ups' 0.000065 [D3] main_arg: var='port' val='auto' 0.000077 [D5] send_to_all: SETINFO driver.parameter.port "auto" 0.000087 [D3] main_arg: var='desc' val='Liebert GXT4-1500RT120' 0.000098 [D3] main_arg: var='productid' val='0000' 0.000109 [D5] send_to_all: SETINFO driver.parameter.productid "0000" 0.000125 [D1] debug level is '5' 0.000258 [D5] send_to_all: SETINFO device.type "ups" 0.000277 [D2] Initializing an USB-connected UPS with library libusb-1.0.22 (API: 0x1000106) (NUT subdriver name='USB communication driver (libusb 1.0)' ver='0.43') 0.000287 [D1] upsdrv_initups (non-SHUT)... 0.002747 [D2] Checking device 1 of 10 (0627/0001) 0.002779 [D1] Failed to open device (0627/0001), skipping: Access denied (insufficient permissions) 0.002790 [D2] Checking device 2 of 10 (1D6B/0002) 0.002802 [D1] Failed to open device (1D6B/0002), skipping: Access denied (insufficient permissions) 0.002812 [D2] Checking device 3 of 10 (1D6B/0001) 0.002824 [D1] Failed to open device (1D6B/0001), skipping: Access denied (insufficient permissions) 0.002834 [D2] Checking device 4 of 10 (1D6B/0001) 0.002846 [D1] Failed to open device (1D6B/0001), skipping: Access denied (insufficient permissions) 0.002855 [D2] Checking device 5 of 10 (1D6B/0001) 0.002867 [D1] Failed to open device (1D6B/0001), skipping: Access denied (insufficient permissions) 0.002877 [D2] Checking device 6 of 10 (1D6B/0002) 0.002889 [D1] Failed to open device (1D6B/0002), skipping: Access denied (insufficient permissions) 0.002898 [D2] Checking device 7 of 10 (1D6B/0001) 0.002910 [D1] Failed to open device (1D6B/0001), skipping: Access denied (insufficient permissions) 0.002920 [D2] Checking device 8 of 10 (1D6B/0001) 0.002931 [D1] Failed to open device (1D6B/0001), skipping: Access denied (insufficient permissions) 0.002941 [D2] Checking device 9 of 10 (10AF/0000) 0.023595 [D2] - VendorID: 10af 0.023617 [D2] - ProductID: 0000 0.023619 [D2] - Manufacturer: Vertiv Co. 0.023622 [D2] - Product: Liebert GXT4 0.023623 [D2] - Serial Number: 1823901037AFBA3 0.023626 [D2] - Bus: 001 0.023628 [D2] - Device: unknown 0.023630 [D2] - Device release number: 0000 0.023632 [D2] Trying to match device 0.023635 [D2] match_function_subdriver (non-SHUT mode): matching a device... 0.023642 [D3] match_function_regex: matching a device... 0.023685 [D2] Device matches 0.023692 [D2] Reading first configuration descriptor 0.023701 [D3] libusb_kernel_driver_active() returned 0 0.023706 [D2] failed to claim USB device: Resource busy 0.023713 [D2] Kernel driver already detached 0.023715 [D2] failed to claim USB device: Resource busy 0.023718 [D2] Kernel driver already detached 0.023723 [D2] failed to claim USB device: Resource busy 0.023725 [D2] Kernel driver already detached 0.023728 [D2] failed to claim USB device: Resource busy 0.023738 [D2] Kernel driver already detached 0.023742 Can't claim USB device @.***/0: Entity not found

— Reply to this email directly, view it on GitHub https://github.com/networkupstools/nut/issues/1346#issuecomment-1092168031, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMPTFC4CPW3EXOOM6E4Y73VD477VANCNFSM5SDTXRXA . You are receiving this because you commented.Message ID: @.***>

jimklimov avatar Apr 08 '22 14:04 jimklimov

Hi Jim!

I gave libusb-1.0 another shot to explore your questions. I was monitoring /var/log/messages for any entries and usbfs didn't post anything... nothing created any new entries.

# sudo /usr/local/ups/sbin/upsdrvctl -u root shutdown

Network UPS Tools - UPS driver controller 2.8.0-rc1
Network UPS Tools - Generic HID driver 0.46 (2.8.0-rc1)
USB communication driver (libusb 1.0) 0.43
Can't claim USB device [10af:0000]@0/0: Entity not found
Driver failed to start (exit status=1)
# lsusb

Bus 004 Device 002: ID 0627:0001 Adomax Technology Co., Ltd
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 003: ID 10af:0000 Liebert Corp. UPS
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
# ls -l /dev/bus/usb/001

total 0
crw-rw-r-- 1 root root 189, 0 Apr 19 15:58 001
crw-rw-r-- 1 root nut  189, 2 Apr 19 16:58 003
# sudo /usr/local/ups/bin/usbhid-ups -DDDDD -a ups1 -k -u root

Network UPS Tools - Generic HID driver 0.46 (2.8.0-rc1)
USB communication driver (libusb 1.0) 0.43
   0.000000     [D3] do_global_args: var='maxretry' val='3'
   0.000039     [D3] main_arg: var='driver' val='usbhid-ups'
   0.000042     [D3] main_arg: var='port' val='auto'
   0.000047     [D5] send_to_all: SETINFO driver.parameter.port "auto"
   0.000050     [D3] main_arg: var='desc' val='Liebert GXT4-1500RT120'
   0.000053     [D3] main_arg: var='productid' val='0000'
   0.000057     [D5] send_to_all: SETINFO driver.parameter.productid "0000"
   0.000063     [D1] Built-in default or configured user for drivers 'ups' was ignored due to 'root' specified on command line
   0.000066     [D1] debug level is '5'
   0.000612     [D5] send_to_all: SETINFO device.type "ups"
   0.000625     [D2] Initializing an USB-connected UPS with library libusb-1.0.22 (API: 0x1000106) (NUT subdriver name='USB communication driver (libusb 1.0)' ver='0.43')
   0.000628     [D1] upsdrv_initups (non-SHUT)...
   0.003021     [D2] Checking device 1 of 10 (0627/0001)
   0.004469     [D2] - VendorID: 0627
   0.004486     [D2] - ProductID: 0001
   0.004488     [D2] - Manufacturer: QEMU
   0.004490     [D2] - Product: QEMU USB Tablet
   0.004492     [D2] - Serial Number: 28754-0000:00:1d.7-1
   0.004495     [D2] - Bus: 004
   0.004497     [D2] - Device: unknown
   0.004499     [D2] - Device release number: 0000
   0.004501     [D2] Trying to match device
   0.004504     [D2] match_function_subdriver (non-SHUT mode): matching a device...
   0.004512     [D2] match_function_subdriver (non-SHUT mode): failed to match a subdriver to vendor and/or product ID
   0.004518     [D2] Device does not match - skipping
   0.004531     [D2] Checking device 2 of 10 (1D6B/0002)
   0.004589     [D2] - VendorID: 1d6b
   0.004592     [D2] - ProductID: 0002
   0.004601     [D2] - Manufacturer: Linux 4.19.0-19-amd64 ehci_hcd
   0.004607     [D2] - Product: EHCI Host Controller
   0.004609     [D2] - Serial Number: 0000:00:1d.7
   0.004611     [D2] - Bus: 004
   0.004613     [D2] - Device: unknown
   0.004615     [D2] - Device release number: 0419
   0.004617     [D2] Trying to match device
   0.004618     [D2] match_function_subdriver (non-SHUT mode): matching a device...
   0.004621     [D2] match_function_subdriver (non-SHUT mode): failed to match a subdriver to vendor and/or product ID
   0.004623     [D2] Device does not match - skipping
   0.004630     [D2] Checking device 3 of 10 (1D6B/0001)
   0.036045     [D2] - VendorID: 1d6b
   0.036057     [D2] - ProductID: 0001
   0.036059     [D2] - Manufacturer: Linux 4.19.0-19-amd64 uhci_hcd
   0.036061     [D2] - Product: UHCI Host Controller
   0.036063     [D2] - Serial Number: 0000:00:1d.2
   0.036065     [D2] - Bus: 008
   0.036067     [D2] - Device: unknown
   0.036069     [D2] - Device release number: 0419
   0.036071     [D2] Trying to match device
   0.036073     [D2] match_function_subdriver (non-SHUT mode): matching a device...
   0.036077     [D2] match_function_subdriver (non-SHUT mode): failed to match a subdriver to vendor and/or product ID
   0.036079     [D2] Device does not match - skipping
   0.036121     [D2] Checking device 4 of 10 (1D6B/0001)
   0.064143     [D2] - VendorID: 1d6b
   0.064164     [D2] - ProductID: 0001
   0.064168     [D2] - Manufacturer: Linux 4.19.0-19-amd64 uhci_hcd
   0.064172     [D2] - Product: UHCI Host Controller
   0.064176     [D2] - Serial Number: 0000:00:1d.1
   0.064180     [D2] - Bus: 007
   0.064184     [D2] - Device: unknown
   0.064188     [D2] - Device release number: 0419
   0.064192     [D2] Trying to match device
   0.064196     [D2] match_function_subdriver (non-SHUT mode): matching a device...
   0.064204     [D2] match_function_subdriver (non-SHUT mode): failed to match a subdriver to vendor and/or product ID
   0.064208     [D2] Device does not match - skipping
   0.064281     [D2] Checking device 5 of 10 (1D6B/0001)
   0.092144     [D2] - VendorID: 1d6b
   0.092165     [D2] - ProductID: 0001
   0.092169     [D2] - Manufacturer: Linux 4.19.0-19-amd64 uhci_hcd
   0.092173     [D2] - Product: UHCI Host Controller
   0.092177     [D2] - Serial Number: 0000:00:1d.0
   0.092181     [D2] - Bus: 006
   0.092185     [D2] - Device: unknown
   0.092189     [D2] - Device release number: 0419
   0.092193     [D2] Trying to match device
   0.092197     [D2] match_function_subdriver (non-SHUT mode): matching a device...
   0.092204     [D2] match_function_subdriver (non-SHUT mode): failed to match a subdriver to vendor and/or product ID
   0.092209     [D2] Device does not match - skipping
   0.092281     [D2] Checking device 6 of 10 (1D6B/0002)
   0.120051     [D2] - VendorID: 1d6b
   0.120063     [D2] - ProductID: 0002
   0.120066     [D2] - Manufacturer: Linux 4.19.0-19-amd64 ehci_hcd
   0.120068     [D2] - Product: EHCI Host Controller
   0.120070     [D2] - Serial Number: 0000:00:1a.7
   0.120072     [D2] - Bus: 002
   0.120074     [D2] - Device: unknown
   0.120076     [D2] - Device release number: 0419
   0.120078     [D2] Trying to match device
   0.120080     [D2] match_function_subdriver (non-SHUT mode): matching a device...
   0.120084     [D2] match_function_subdriver (non-SHUT mode): failed to match a subdriver to vendor and/or product ID
   0.120086     [D2] Device does not match - skipping
   0.120182     [D2] Checking device 7 of 10 (1D6B/0001)
   0.148143     [D2] - VendorID: 1d6b
   0.148163     [D2] - ProductID: 0001
   0.148168     [D2] - Manufacturer: Linux 4.19.0-19-amd64 uhci_hcd
   0.148172     [D2] - Product: UHCI Host Controller
   0.148176     [D2] - Serial Number: 0000:00:1a.2
   0.148180     [D2] - Bus: 005
   0.148183     [D2] - Device: unknown
   0.148187     [D2] - Device release number: 0419
   0.148191     [D2] Trying to match device
   0.148195     [D2] match_function_subdriver (non-SHUT mode): matching a device...
   0.148203     [D2] match_function_subdriver (non-SHUT mode): failed to match a subdriver to vendor and/or product ID
   0.148207     [D2] Device does not match - skipping
   0.148280     [D2] Checking device 8 of 10 (1D6B/0001)
   0.176156     [D2] - VendorID: 1d6b
   0.176177     [D2] - ProductID: 0001
   0.176181     [D2] - Manufacturer: Linux 4.19.0-19-amd64 uhci_hcd
   0.176185     [D2] - Product: UHCI Host Controller
   0.176189     [D2] - Serial Number: 0000:00:1a.1
   0.176193     [D2] - Bus: 003
   0.176197     [D2] - Device: unknown
   0.176201     [D2] - Device release number: 0419
   0.176204     [D2] Trying to match device
   0.176209     [D2] match_function_subdriver (non-SHUT mode): matching a device...
   0.176216     [D2] match_function_subdriver (non-SHUT mode): failed to match a subdriver to vendor and/or product ID
   0.176221     [D2] Device does not match - skipping
   0.176293     [D2] Checking device 9 of 10 (10AF/0000)
   0.200222     [D2] - VendorID: 10af
   0.200249     [D2] - ProductID: 0000
   0.200251     [D2] - Manufacturer: Vertiv Co.
   0.200253     [D2] - Product: Liebert GXT4
   0.200255     [D2] - Serial Number: 1823901037AFBA3
   0.200257     [D2] - Bus: 001
   0.200260     [D2] - Device: unknown
   0.200262     [D2] - Device release number: 0000
   0.200263     [D2] Trying to match device
   0.200266     [D2] match_function_subdriver (non-SHUT mode): matching a device...
   0.200273     [D3] match_function_regex: matching a device...
   0.200324     [D2] Device matches
   0.200330     [D2] Reading first configuration descriptor
   0.200340     [D3] libusb_kernel_driver_active() returned 0
   0.200348     [D2] failed to claim USB device: Resource busy
   0.200353     [D2] Kernel driver already detached
   0.200358     [D2] failed to claim USB device: Resource busy
   0.200363     [D2] Kernel driver already detached
   0.200367     [D2] failed to claim USB device: Resource busy
   0.200371     [D2] Kernel driver already detached
   0.200376     [D2] failed to claim USB device: Resource busy
   0.200381     [D2] Kernel driver already detached
   0.200389     Can't claim USB device [10af:0000]@0/0: Entity not found

EmnaX avatar Apr 19 '22 21:04 EmnaX

hmm, I think my issue compiling with libusb-0.1 vs libusb-1.0 was related to how I was passing the device through to my Debian VM. For all the work so far, I had added the Liebert USB device to the VM through the WebUI. Just now, I though I would try passing through the entire USB controller as a PCI device. So I removed the Liebert USB device and instead added a PCI device AMD Starship USB 3.0 Host Controller at 0000:42:00.3 (which is the USB controller the Liebert UPS is plugged into). Now when I run those same commands, I get some more promising results:

# sudo /usr/local/ups/sbin/upsdrvctl -u root shutdown

Network UPS Tools - UPS driver controller 2.8.0-rc1
Network UPS Tools - Generic HID driver 0.46 (2.8.0-rc1)
USB communication driver (libusb 1.0) 0.43
Using subdriver: Belkin/Liebert HID 0.18
LineVoltage exponent looks wrong, but not correcting.
ConfigVoltage exponent looks wrong, but not correcting.
Initiating UPS shutdown
Shutdown failed!
Driver failed to start (exit status=1)
# lsusb

Bus 007 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 004 Device 004: ID 10af:0000 Liebert Corp. UPS
Bus 004 Device 006: ID 0658:0200 Sigma Designs, Inc. Aeotec Z-Stick Gen5 (ZW090) - UZB
Bus 004 Device 005: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP2102/CP2109 UART Bridge Controller [CP210x family]
Bus 004 Device 003: ID 05e3:0608 Genesys Logic, Inc. Hub
Bus 004 Device 002: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 0627:0001 Adomax Technology Co., Ltd
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 010 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 009 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
# ls -l /dev/bus/usb/004

total 0
crw-rw-r-- 1 root root 189, 384 Apr 19 17:33 001
crw-rw-r-- 1 root root 189, 385 Apr 19 17:33 002
crw-rw-r-- 1 root root 189, 386 Apr 19 17:33 003
crw-rw---- 1 root nut  189, 387 Apr 19 17:43 004
crw-rw-r-- 1 root root 189, 388 Apr 19 17:34 005
crw-rw-r-- 1 root root 189, 389 Apr 19 17:33 006
# sudo /usr/local/ups/bin/usbhid-ups -DDDDD -a ups1 -k -u root

   0.000000     [D3] do_global_args: var='maxretry' val='3'
   0.000046     [D3] main_arg: var='driver' val='usbhid-ups'
   0.000050     [D3] main_arg: var='port' val='auto'
   0.000055     [D5] send_to_all: SETINFO driver.parameter.port "auto"
   0.000059     [D3] main_arg: var='desc' val='Liebert GXT4-1500RT120'
   0.000062     [D3] main_arg: var='productid' val='0000'
   0.000067     [D5] send_to_all: SETINFO driver.parameter.productid "0000"
   0.000074     [D1] Built-in default or configured user for drivers 'ups' was ignored due to 'root' specified on command line
   0.000077     [D1] debug level is '5'
   0.000598     [D5] send_to_all: SETINFO device.type "ups"
   0.000608     [D2] Initializing an USB-connected UPS with library libusb-1.0.22 (API: 0x1000106) (NUT subdriver name='USB communication driver (libusb 1.0)' ver='0.43')
   0.000611     [D1] upsdrv_initups (non-SHUT)...
   0.004304     [D2] Checking device 1 of 16 (1D6B/0003)
   0.028955     [D2] - VendorID: 1d6b
   0.028963     [D2] - ProductID: 0003
   0.028966     [D2] - Manufacturer: Linux 4.19.0-19-amd64 xhci-hcd
   0.028969     [D2] - Product: xHCI Host Controller
   0.028972     [D2] - Serial Number: 0000:06:10.3
   0.028974     [D2] - Bus: 007
   0.028977     [D2] - Device: unknown
   0.028980     [D2] - Device release number: 0419
   0.028983     [D2] Trying to match device
   0.028987     [D2] match_function_subdriver (non-SHUT mode): matching a device...
   0.028994     [D2] match_function_subdriver (non-SHUT mode): failed to match a subdriver to vendor and/or product ID
   0.028997     [D2] Device does not match - skipping
   0.029258     [D2] Checking device 2 of 16 (10AF/0000)
   0.045453     [D2] - VendorID: 10af
   0.045459     [D2] - ProductID: 0000
   0.045462     [D2] - Manufacturer: Vertiv Co.
   0.045465     [D2] - Product: Liebert GXT4
   0.045468     [D2] - Serial Number: 1823901037AFBA3
   0.045471     [D2] - Bus: 004
   0.045474     [D2] - Device: unknown
   0.045477     [D2] - Device release number: 0000
   0.045479     [D2] Trying to match device
   0.045482     [D2] match_function_subdriver (non-SHUT mode): matching a device...
   0.045487     [D3] match_function_regex: matching a device...
   0.045499     [D2] Device matches
   0.045502     [D2] Reading first configuration descriptor
   0.045509     [D3] libusb_kernel_driver_active() returned 0
   0.045522     [D2] Claimed interface 0 successfully
   0.045526     [D3] nut_usb_set_altinterface: skipped libusb_set_interface_alt_setting(udev, 0, 0)
   0.048465     [D3] HID descriptor, method 1: (9 bytes) => 09 21 00 01 00 01 22 f9 01
   0.048472     [D3] HID descriptor length (method 1) 505
   0.048475     [D4] i=0, extra[i]=09, extra[i+1]=21
   0.048479     [D3] HID descriptor, method 2: (9 bytes) => 09 21 00 01 00 01 22 f9 01
   0.048483     [D3] HID descriptor length (method 2) 505
   0.048486     [D2] HID descriptor length 505
   0.052626     [D2] Report Descriptor size = 505
   0.052645     [D3] Report Descriptor: (505 bytes) => 05 84 09 04 a1 01 09 24 a1 02 85 01 09 00
   0.052655     [D3]  95 04 75 08 b1 03 85 02 09 ff 09 fd 95 02 75 04 15 00 25 0f b1 03 05 85 09
   0.052664     [D3]  8f 09 89 95 02 75 04 b1 03 09 83 75 08 95 01 15 00 26 fa 00 b1 03 85 03 09
   0.052673     [D3]  2a 75 18 95 01 b1 02 09 2c 75 02 95 01 15 00 25 03 b1 03 09 8b 75 01 95 01
   0.052681     [D3]  15 00 25 01 b1 03 09 00 15 01 25 1f 75 05 95 01 b1 03 85 13 95 01 75 08 15
   0.052690     [D3]  00 25 64 09 29 b1 03 75 08 09 66 85 06 95 01 b1 83 09 66 81 83 85 0c 09 44
   0.052699     [D3]  09 45 09 d0 09 42 09 d1 25 01 15 00 75 01 95 05 b1 83 09 00 95 01 75 03 b1
   0.052708     [D3]  83 09 44 09 45 09 d0 09 42 09 d1 25 01 15 00 95 05 75 01 81 83 09 00 95 01
   0.052717     [D3]  75 03 81 83 85 04 09 67 09 8c 09 8d 09 8e 75 08 95 04 b1 02 85 05 05 84 09
   0.052725     [D3]  30 09 40 95 02 75 10 b1 03 85 08 09 58 95 01 75 08 b1 03 85 09 09 00 95 04
   0.052734     [D3]  75 08 b1 03 85 32 09 00 95 04 75 08 b1 03 85 33 09 00 95 04 75 08 b1 03 85
   0.052743     [D3]  07 09 fe 75 08 95 01 b1 03 85 3c 09 00 95 04 75 08 b1 03 85 3d 09 00 95 04
   0.052752     [D3]  75 08 b1 03 85 3e 09 00 95 04 75 08 b1 03 85 3f 09 00 95 04 75 08 b1 03 85
   0.052761     [D3]  40 09 00 95 04 75 08 b1 03 85 41 09 00 95 04 75 08 b1 03 85 42 09 00 95 04
   0.052769     [D3]  75 08 b1 03 85 43 09 00 95 04 75 08 b1 03 85 44 09 00 95 04 75 08 b1 03 85
   0.052788     [D3]  50 09 00 95 04 75 08 b1 03 85 51 09 00 95 04 75 08 b1 03 85 52 09 00 95 04
   0.052797     [D3]  75 08 b1 03 85 53 09 00 95 04 75 08 b1 03 85 54 09 00 95 04 75 08 b1 03 85
   0.052806     [D3]  55 09 00 95 04 75 08 b1 03 85 56 09 00 95 04 75 08 b1 03 85 57 09 00 95 04
   0.052817     [D3]  75 08 b1 03 85 58 09 00 95 04 75 08 b1 03 85 59 09 00 95 04 75 08 b1 03 85
   0.052828     [D3]  5a 09 00 95 04 75 08 b1 03 85 5b 09 00 95 04 75 08 b1 03 85 5c 09 00 95 04
   0.052836     [D3]  75 08 b1 03 85 5d 09 00 95 04 75 08 b1 03 c0 c0
   0.052922     Using subdriver: Belkin/Liebert HID 0.18
   0.052932     [D1] 59 HID objects found
   0.052941     [D4] Entering libusb_get_report
   0.055626     [D3] Report[get]: (5 bytes) => 01 07 0a aa d2
   0.055642     [D5] PhyMax = 0, PhyMin = 0, LogMax = 0, LogMin = 0
   0.055647     [D5] Unit = 00000000, UnitExp = 0
   0.055652     [D5] Exponent = 0
   0.055658     [D5] hid_lookup_path: 00840004 -> UPS
   0.055664     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.055670     [D5] hid_lookup_path: 00840000 -> Undefined
   0.055676     [D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x01, Offset: 0, Size: 8, Value: 0
   0.055681     [D4] Entering libusb_get_report
   0.058513     [D3] Report[get]: (4 bytes) => 02 13 61 64
   0.058529     [D5] PhyMax = 0, PhyMin = 0, LogMax = 15, LogMin = 0
   0.058535     [D5] Unit = 00000000, UnitExp = 0
   0.058540     [D5] Exponent = 0
   0.058546     [D5] hid_lookup_path: 00840004 -> UPS
   0.058552     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.058557     [D5] hid_lookup_path: 008400ff -> iSerialNumber
   0.058564     [D1] Path: UPS.PowerSummary.iSerialNumber, Type: Feature, ReportID: 0x02, Offset: 0, Size: 4, Value: 3
   0.058570     [D3] Report[buf]: (4 bytes) => 02 13 61 64
   0.058576     [D5] PhyMax = 0, PhyMin = 0, LogMax = 15, LogMin = 0
   0.058581     [D5] Unit = 00000000, UnitExp = 0
   0.058586     [D5] Exponent = 0
   0.058591     [D5] hid_lookup_path: 00840004 -> UPS
   0.058596     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.058601     [D5] hid_lookup_path: 008400fd -> iManufacturer
   0.058607     [D1] Path: UPS.PowerSummary.iManufacturer, Type: Feature, ReportID: 0x02, Offset: 4, Size: 4, Value: 1
   0.058613     [D3] Report[buf]: (4 bytes) => 02 13 61 64
   0.058618     [D5] PhyMax = 0, PhyMin = 0, LogMax = 15, LogMin = 0
   0.058623     [D5] Unit = 00000000, UnitExp = 0
   0.058628     [D5] Exponent = 0
   0.058633     [D5] hid_lookup_path: 00840004 -> UPS
   0.058639     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.058644     [D5] hid_lookup_path: 0085008f -> iOEMInformation
   0.058650     [D1] Path: UPS.PowerSummary.iOEMInformation, Type: Feature, ReportID: 0x02, Offset: 8, Size: 4, Value: 1
   0.058656     [D3] Report[buf]: (4 bytes) => 02 13 61 64
   0.058661     [D5] PhyMax = 0, PhyMin = 0, LogMax = 15, LogMin = 0
   0.058666     [D5] Unit = 00000000, UnitExp = 0
   0.058670     [D5] Exponent = 0
   0.058675     [D5] hid_lookup_path: 00840004 -> UPS
   0.058681     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.058686     [D5] hid_lookup_path: 00850089 -> iDeviceChemistry
   0.058692     [D1] Path: UPS.PowerSummary.iDeviceChemistry, Type: Feature, ReportID: 0x02, Offset: 12, Size: 4, Value: 6
   0.058697     [D3] Report[buf]: (4 bytes) => 02 13 61 64
   0.058703     [D5] PhyMax = 0, PhyMin = 0, LogMax = 250, LogMin = 0
   0.058708     [D5] Unit = 00000000, UnitExp = 0
   0.058712     [D5] Exponent = 0
   0.058718     [D5] hid_lookup_path: 00840004 -> UPS
   0.058723     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.058728     [D5] hid_lookup_path: 00850083 -> DesignCapacity
   0.058736     [D1] Path: UPS.PowerSummary.DesignCapacity, Type: Feature, ReportID: 0x02, Offset: 16, Size: 8, Value: 100
   0.058741     [D4] Entering libusb_get_report
   0.061626     [D3] Report[get]: (5 bytes) => 03 ff ff ff 06
   0.061651     [D5] PhyMax = 0, PhyMin = 0, LogMax = 250, LogMin = 0
   0.061657     [D5] Unit = 00000000, UnitExp = 0
   0.061662     [D5] Exponent = 0
   0.061667     [D5] hid_lookup_path: 00840004 -> UPS
   0.061673     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.061679     [D5] hid_lookup_path: 0085002a -> RemainingTimeLimit
   0.061686     [D1] Path: UPS.PowerSummary.RemainingTimeLimit, Type: Feature, ReportID: 0x03, Offset: 0, Size: 24, Value: 250
   0.061700     [D3] Report[buf]: (5 bytes) => 03 ff ff ff 06
   0.061706     [D5] PhyMax = 0, PhyMin = 0, LogMax = 3, LogMin = 0
   0.061711     [D5] Unit = 00000000, UnitExp = 0
   0.061715     [D5] Exponent = 0
   0.061721     [D5] hid_lookup_path: 00840004 -> UPS
   0.061726     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.061731     [D5] hid_lookup_path: 0085002c -> CapacityMode
   0.061738     [D1] Path: UPS.PowerSummary.CapacityMode, Type: Feature, ReportID: 0x03, Offset: 24, Size: 2, Value: 2
   0.061744     [D3] Report[buf]: (5 bytes) => 03 ff ff ff 06
   0.061749     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.061754     [D5] Unit = 00000000, UnitExp = 0
   0.061759     [D5] Exponent = 0
   0.061764     [D5] hid_lookup_path: 00840004 -> UPS
   0.061769     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.061775     [D5] hid_lookup_path: 0085008b -> Rechargeable
   0.061780     [D1] Path: UPS.PowerSummary.Rechargeable, Type: Feature, ReportID: 0x03, Offset: 26, Size: 1, Value: 1
   0.061786     [D3] Report[buf]: (5 bytes) => 03 ff ff ff 06
   0.061792     [D5] PhyMax = 0, PhyMin = 0, LogMax = 31, LogMin = 1
   0.061796     [D5] Unit = 00000000, UnitExp = 0
   0.061801     [D5] Exponent = 0
   0.061807     [D5] hid_lookup_path: 00840004 -> UPS
   0.061813     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.061819     [D5] hid_lookup_path: 00850000 -> Undefined
   0.061826     [D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x03, Offset: 27, Size: 5, Value: 1
   0.061831     [D4] Entering libusb_get_report
   0.064633     [D3] Report[get]: (2 bytes) => 13 14
   0.064650     [D5] PhyMax = 0, PhyMin = 0, LogMax = 100, LogMin = 0
   0.064656     [D5] Unit = 00000000, UnitExp = 0
   0.064662     [D5] Exponent = 0
   0.064668     [D5] hid_lookup_path: 00840004 -> UPS
   0.064674     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.064681     [D5] hid_lookup_path: 00850029 -> RemainingCapacityLimit
   0.064689     [D1] Path: UPS.PowerSummary.RemainingCapacityLimit, Type: Feature, ReportID: 0x13, Offset: 0, Size: 8, Value: 20
   0.064695     [D4] Entering libusb_get_report
   0.067591     [D3] Report[get]: (2 bytes) => 06 64
   0.067600     [D5] PhyMax = 0, PhyMin = 0, LogMax = 100, LogMin = 0
   0.067604     [D5] Unit = 00000000, UnitExp = 0
   0.067607     [D5] Exponent = 0
   0.067610     [D5] hid_lookup_path: 00840004 -> UPS
   0.067613     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.067616     [D5] hid_lookup_path: 00850066 -> RemainingCapacity
   0.067620     [D1] Path: UPS.PowerSummary.RemainingCapacity, Type: Feature, ReportID: 0x06, Offset: 0, Size: 8, Value: 100
   0.067624     [D3] Report[buf]: (2 bytes) => 06 64
   0.067627     [D5] PhyMax = 0, PhyMin = 0, LogMax = 100, LogMin = 0
   0.067630     [D5] Unit = 00000000, UnitExp = 0
   0.067633     [D5] Exponent = 0
   0.067635     [D5] hid_lookup_path: 00840004 -> UPS
   0.067638     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.067641     [D5] hid_lookup_path: 00850066 -> RemainingCapacity
   0.067645     [D1] Path: UPS.PowerSummary.RemainingCapacity, Type: Input, ReportID: 0x06, Offset: 0, Size: 8, Value: 100
   0.067648     [D4] Entering libusb_get_report
   0.070472     [D3] Report[get]: (2 bytes) => 0c 15
   0.070482     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.070485     [D5] Unit = 00000000, UnitExp = 0
   0.070488     [D5] Exponent = 0
   0.070491     [D5] hid_lookup_path: 00840004 -> UPS
   0.070494     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.070497     [D5] hid_lookup_path: 00850044 -> Charging
   0.070501     [D1] Path: UPS.PowerSummary.Charging, Type: Feature, ReportID: 0x0c, Offset: 0, Size: 1, Value: 1
   0.070504     [D3] Report[buf]: (2 bytes) => 0c 15
   0.070507     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.070510     [D5] Unit = 00000000, UnitExp = 0
   0.070513     [D5] Exponent = 0
   0.070516     [D5] hid_lookup_path: 00840004 -> UPS
   0.070519     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.070522     [D5] hid_lookup_path: 00850045 -> Discharging
   0.070525     [D1] Path: UPS.PowerSummary.Discharging, Type: Feature, ReportID: 0x0c, Offset: 1, Size: 1, Value: 0
   0.070528     [D3] Report[buf]: (2 bytes) => 0c 15
   0.070536     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.070539     [D5] Unit = 00000000, UnitExp = 0
   0.070542     [D5] Exponent = 0
   0.070544     [D5] hid_lookup_path: 00840004 -> UPS
   0.070547     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.070550     [D5] hid_lookup_path: 008500d0 -> ACPresent
   0.070554     [D1] Path: UPS.PowerSummary.ACPresent, Type: Feature, ReportID: 0x0c, Offset: 2, Size: 1, Value: 1
   0.070557     [D3] Report[buf]: (2 bytes) => 0c 15
   0.070559     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.070562     [D5] Unit = 00000000, UnitExp = 0
   0.070565     [D5] Exponent = 0
   0.070568     [D5] hid_lookup_path: 00840004 -> UPS
   0.070571     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.070574     [D5] hid_lookup_path: 00850042 -> BelowRemainingCapacityLimit
   0.070577     [D1] Path: UPS.PowerSummary.BelowRemainingCapacityLimit, Type: Feature, ReportID: 0x0c, Offset: 3, Size: 1, Value: 0
   0.070580     [D3] Report[buf]: (2 bytes) => 0c 15
   0.070583     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.070586     [D5] Unit = 00000000, UnitExp = 0
   0.070588     [D5] Exponent = 0
   0.070591     [D5] hid_lookup_path: 00840004 -> UPS
   0.070594     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.070597     [D5] hid_lookup_path: 008500d1 -> BatteryPresent
   0.070600     [D1] Path: UPS.PowerSummary.BatteryPresent, Type: Feature, ReportID: 0x0c, Offset: 4, Size: 1, Value: 1
   0.070603     [D3] Report[buf]: (2 bytes) => 0c 15
   0.070606     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.070609     [D5] Unit = 00000000, UnitExp = 0
   0.070612     [D5] Exponent = 0
   0.070614     [D5] hid_lookup_path: 00840004 -> UPS
   0.070617     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.070620     [D5] hid_lookup_path: 00850000 -> Undefined
   0.070624     [D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x0c, Offset: 5, Size: 3, Value: 0
   0.070627     [D3] Report[buf]: (2 bytes) => 0c 15
   0.070629     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.070632     [D5] Unit = 00000000, UnitExp = 0
   0.070635     [D5] Exponent = 0
   0.070638     [D5] hid_lookup_path: 00840004 -> UPS
   0.070641     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.070644     [D5] hid_lookup_path: 00850044 -> Charging
   0.070647     [D1] Path: UPS.PowerSummary.Charging, Type: Input, ReportID: 0x0c, Offset: 0, Size: 1, Value: 1
   0.070650     [D3] Report[buf]: (2 bytes) => 0c 15
   0.070653     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.070656     [D5] Unit = 00000000, UnitExp = 0
   0.070658     [D5] Exponent = 0
   0.070661     [D5] hid_lookup_path: 00840004 -> UPS
   0.070664     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.070667     [D5] hid_lookup_path: 00850045 -> Discharging
   0.070670     [D1] Path: UPS.PowerSummary.Discharging, Type: Input, ReportID: 0x0c, Offset: 1, Size: 1, Value: 0
   0.070673     [D3] Report[buf]: (2 bytes) => 0c 15
   0.070676     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.070679     [D5] Unit = 00000000, UnitExp = 0
   0.070682     [D5] Exponent = 0
   0.070684     [D5] hid_lookup_path: 00840004 -> UPS
   0.070687     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.070690     [D5] hid_lookup_path: 008500d0 -> ACPresent
   0.070694     [D1] Path: UPS.PowerSummary.ACPresent, Type: Input, ReportID: 0x0c, Offset: 2, Size: 1, Value: 1
   0.070696     [D3] Report[buf]: (2 bytes) => 0c 15
   0.070699     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.070702     [D5] Unit = 00000000, UnitExp = 0
   0.070705     [D5] Exponent = 0
   0.070708     [D5] hid_lookup_path: 00840004 -> UPS
   0.070711     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.070714     [D5] hid_lookup_path: 00850042 -> BelowRemainingCapacityLimit
   0.070717     [D1] Path: UPS.PowerSummary.BelowRemainingCapacityLimit, Type: Input, ReportID: 0x0c, Offset: 3, Size: 1, Value: 0
   0.070720     [D3] Report[buf]: (2 bytes) => 0c 15
   0.070723     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.070725     [D5] Unit = 00000000, UnitExp = 0
   0.070728     [D5] Exponent = 0
   0.070731     [D5] hid_lookup_path: 00840004 -> UPS
   0.070734     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.070737     [D5] hid_lookup_path: 008500d1 -> BatteryPresent
   0.070742     [D1] Path: UPS.PowerSummary.BatteryPresent, Type: Input, ReportID: 0x0c, Offset: 4, Size: 1, Value: 1
   0.070745     [D3] Report[buf]: (2 bytes) => 0c 15
   0.070748     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.070751     [D5] Unit = 00000000, UnitExp = 0
   0.070753     [D5] Exponent = 0
   0.070756     [D5] hid_lookup_path: 00840004 -> UPS
   0.070759     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.070762     [D5] hid_lookup_path: 00850000 -> Undefined
   0.070765     [D1] Path: UPS.PowerSummary.Undefined, Type: Input, ReportID: 0x0c, Offset: 5, Size: 3, Value: 0
   0.070768     [D4] Entering libusb_get_report
   0.073516     [D3] Report[get]: (5 bytes) => 04 64 14 01 01
   0.073531     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.073536     [D5] Unit = 00000000, UnitExp = 0
   0.073541     [D5] Exponent = 0
   0.073547     [D5] hid_lookup_path: 00840004 -> UPS
   0.073553     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.073558     [D5] hid_lookup_path: 00850067 -> FullChargeCapacity
   0.073565     [D1] Path: UPS.PowerSummary.FullChargeCapacity, Type: Feature, ReportID: 0x04, Offset: 0, Size: 8, Value: 0
   0.073572     [D3] Report[buf]: (5 bytes) => 04 64 14 01 01
   0.073577     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.073582     [D5] Unit = 00000000, UnitExp = 0
   0.073587     [D5] Exponent = 0
   0.073592     [D5] hid_lookup_path: 00840004 -> UPS
   0.073597     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.073603     [D5] hid_lookup_path: 0085008c -> WarningCapacityLimit
   0.073608     [D1] Path: UPS.PowerSummary.WarningCapacityLimit, Type: Feature, ReportID: 0x04, Offset: 8, Size: 8, Value: 0
   0.073614     [D3] Report[buf]: (5 bytes) => 04 64 14 01 01
   0.073620     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.073625     [D5] Unit = 00000000, UnitExp = 0
   0.073629     [D5] Exponent = 0
   0.073634     [D5] hid_lookup_path: 00840004 -> UPS
   0.073639     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.073654     [D5] hid_lookup_path: 0085008d -> CapacityGranularity1
   0.073660     [D1] Path: UPS.PowerSummary.CapacityGranularity1, Type: Feature, ReportID: 0x04, Offset: 16, Size: 8, Value: 1
   0.073666     [D3] Report[buf]: (5 bytes) => 04 64 14 01 01
   0.073671     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.073676     [D5] Unit = 00000000, UnitExp = 0
   0.073681     [D5] Exponent = 0
   0.073686     [D5] hid_lookup_path: 00840004 -> UPS
   0.073691     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.073697     [D5] hid_lookup_path: 0085008e -> CapacityGranularity2
   0.073702     [D1] Path: UPS.PowerSummary.CapacityGranularity2, Type: Feature, ReportID: 0x04, Offset: 24, Size: 8, Value: 1
   0.073707     [D4] Entering libusb_get_report
   0.076626     [D3] Report[get]: (5 bytes) => 05 36 00 30 00
   0.076641     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.076647     [D5] Unit = 00000000, UnitExp = 0
   0.076652     [D5] Exponent = 0
   0.076658     [D5] hid_lookup_path: 00840004 -> UPS
   0.076663     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.076669     [D5] hid_lookup_path: 00840030 -> Voltage
   0.076676     [D1] Path: UPS.PowerSummary.Voltage, Type: Feature, ReportID: 0x05, Offset: 0, Size: 16, Value: 0
   0.076682     [D3] Report[buf]: (5 bytes) => 05 36 00 30 00
   0.076688     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.076693     [D5] Unit = 00000000, UnitExp = 0
   0.076698     [D5] Exponent = 0
   0.076703     [D5] hid_lookup_path: 00840004 -> UPS
   0.076708     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.076714     [D5] hid_lookup_path: 00840040 -> ConfigVoltage
   0.076720     [D1] Path: UPS.PowerSummary.ConfigVoltage, Type: Feature, ReportID: 0x05, Offset: 16, Size: 16, Value: 0
   0.076725     [D4] Entering libusb_get_report
   0.079599     [D3] Report[get]: (2 bytes) => 08 06
   0.079608     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.079611     [D5] Unit = 00000000, UnitExp = 0
   0.079614     [D5] Exponent = 0
   0.079617     [D5] hid_lookup_path: 00840004 -> UPS
   0.079621     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.079624     [D5] hid_lookup_path: 00840058 -> Test
   0.079628     [D1] Path: UPS.PowerSummary.Test, Type: Feature, ReportID: 0x08, Offset: 0, Size: 8, Value: 0
   0.079635     [D4] Entering libusb_get_report
   0.082599     [D3] Report[get]: (5 bytes) => 09 e8 8c 20 00
   0.082609     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.082612     [D5] Unit = 00000000, UnitExp = 0
   0.082615     [D5] Exponent = 0
   0.082618     [D5] hid_lookup_path: 00840004 -> UPS
   0.082621     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.082624     [D5] hid_lookup_path: 00840000 -> Undefined
   0.082628     [D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x09, Offset: 0, Size: 8, Value: 0
   0.082631     [D4] Entering libusb_get_report
   0.085627     [D3] Report[get]: (5 bytes) => 32 03 17 00 01
   0.085652     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.085658     [D5] Unit = 00000000, UnitExp = 0
   0.085663     [D5] Exponent = 0
   0.085668     [D5] hid_lookup_path: 00840004 -> UPS
   0.085674     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.085680     [D5] hid_lookup_path: 00840000 -> Undefined
   0.085686     [D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x32, Offset: 0, Size: 8, Value: 1
   0.085691     [D4] Entering libusb_get_report
   0.088590     [D2] refresh_report_buffer: expected 5 bytes, but got 2 instead
   0.088599     [D3] Report[err]: (2 bytes) => 33 07
   0.088602     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.088605     [D5] Unit = 00000000, UnitExp = 0
   0.088608     [D5] Exponent = 0
   0.088611     [D5] hid_lookup_path: 00840004 -> UPS
   0.088615     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.088618     [D5] hid_lookup_path: 00840000 -> Undefined
   0.088621     [D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x33, Offset: 0, Size: 8, Value: 1
   0.088624     [D4] Entering libusb_get_report
   0.091628     [D3] Report[get]: (2 bytes) => 07 02
   0.091645     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.091651     [D5] Unit = 00000000, UnitExp = 0
   0.091655     [D5] Exponent = 0
   0.091661     [D5] hid_lookup_path: 00840004 -> UPS
   0.091667     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.091673     [D5] hid_lookup_path: 008400fe -> iProduct
   0.091679     [D1] Path: UPS.PowerSummary.iProduct, Type: Feature, ReportID: 0x07, Offset: 0, Size: 8, Value: 0
   0.091684     [D4] Entering libusb_get_report
   0.094627     [D3] Report[get]: (5 bytes) => 3c 00 00 00 00
   0.094643     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.094649     [D5] Unit = 00000000, UnitExp = 0
   0.094654     [D5] Exponent = 0
   0.094660     [D5] hid_lookup_path: 00840004 -> UPS
   0.094665     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.094671     [D5] hid_lookup_path: 00840000 -> Undefined
   0.094677     [D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x3c, Offset: 0, Size: 8, Value: 0
   0.094683     [D4] Entering libusb_get_report
   0.097631     [D3] Report[get]: (5 bytes) => 3d 00 00 00 00
   0.097658     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.097664     [D5] Unit = 00000000, UnitExp = 0
   0.097670     [D5] Exponent = 0
   0.097676     [D5] hid_lookup_path: 00840004 -> UPS
   0.097683     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.097689     [D5] hid_lookup_path: 00840000 -> Undefined
   0.097696     [D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x3d, Offset: 0, Size: 8, Value: 0
   0.097702     [D4] Entering libusb_get_report
   0.100514     [D3] Report[get]: (5 bytes) => 3e 01 2c 00 04
   0.100529     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.100535     [D5] Unit = 00000000, UnitExp = 0
   0.100540     [D5] Exponent = 0
   0.100546     [D5] hid_lookup_path: 00840004 -> UPS
   0.100552     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.100557     [D5] hid_lookup_path: 00840000 -> Undefined
   0.100563     [D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x3e, Offset: 0, Size: 8, Value: 1
   0.100569     [D4] Entering libusb_get_report
   0.103516     [D3] Report[get]: (5 bytes) => 3f 14 14 00 b4
   0.103534     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.103540     [D5] Unit = 00000000, UnitExp = 0
   0.103545     [D5] Exponent = 0
   0.103551     [D5] hid_lookup_path: 00840004 -> UPS
   0.103557     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.103562     [D5] hid_lookup_path: 00840000 -> Undefined
   0.103576     [D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x3f, Offset: 0, Size: 8, Value: 0
   0.103581     [D4] Entering libusb_get_report
   0.106628     [D3] Report[get]: (5 bytes) => 40 00 00 00 00
   0.106644     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.106650     [D5] Unit = 00000000, UnitExp = 0
   0.106655     [D5] Exponent = 0
   0.106660     [D5] hid_lookup_path: 00840004 -> UPS
   0.106666     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.106672     [D5] hid_lookup_path: 00840000 -> Undefined
   0.106678     [D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x40, Offset: 0, Size: 8, Value: 0
   0.106683     [D4] Entering libusb_get_report
   0.109630     [D3] Report[get]: (5 bytes) => 41 00 00 00 00
   0.109656     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.109663     [D5] Unit = 00000000, UnitExp = 0
   0.109669     [D5] Exponent = 0
   0.109675     [D5] hid_lookup_path: 00840004 -> UPS
   0.109682     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.109688     [D5] hid_lookup_path: 00840000 -> Undefined
   0.109695     [D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x41, Offset: 0, Size: 8, Value: 0
   0.109701     [D4] Entering libusb_get_report
   0.112626     [D3] Report[get]: (5 bytes) => 42 01 2c 00 04
   0.112641     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.112647     [D5] Unit = 00000000, UnitExp = 0
   0.112652     [D5] Exponent = 0
   0.112657     [D5] hid_lookup_path: 00840004 -> UPS
   0.112663     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.112669     [D5] hid_lookup_path: 00840000 -> Undefined
   0.112675     [D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x42, Offset: 0, Size: 8, Value: 1
   0.112680     [D4] Entering libusb_get_report
   0.115599     [D3] Report[get]: (5 bytes) => 43 21 00 00 b4
   0.115608     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.115611     [D5] Unit = 00000000, UnitExp = 0
   0.115614     [D5] Exponent = 0
   0.115617     [D5] hid_lookup_path: 00840004 -> UPS
   0.115621     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.115624     [D5] hid_lookup_path: 00840000 -> Undefined
   0.115627     [D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x43, Offset: 0, Size: 8, Value: 1
   0.115630     [D4] Entering libusb_get_report
   0.118598     [D3] Report[get]: (5 bytes) => 44 77 00 00 00
   0.118608     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.118611     [D5] Unit = 00000000, UnitExp = 0
   0.118614     [D5] Exponent = 0
   0.118617     [D5] hid_lookup_path: 00840004 -> UPS
   0.118620     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.118623     [D5] hid_lookup_path: 00840000 -> Undefined
   0.118627     [D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x44, Offset: 0, Size: 8, Value: 1
   0.118630     [D4] Entering libusb_get_report
   0.121626     [D3] Report[get]: (5 bytes) => 50 78 0c 3c 3c
   0.121650     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.121656     [D5] Unit = 00000000, UnitExp = 0
   0.121661     [D5] Exponent = 0
   0.121667     [D5] hid_lookup_path: 00840004 -> UPS
   0.121673     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.121678     [D5] hid_lookup_path: 00840000 -> Undefined
   0.121684     [D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x50, Offset: 0, Size: 8, Value: 0
   0.121690     [D4] Entering libusb_get_report
   0.124513     [D3] Report[get]: (5 bytes) => 51 79 00 01 00
   0.124528     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.124534     [D5] Unit = 00000000, UnitExp = 0
   0.124539     [D5] Exponent = 0
   0.124544     [D5] hid_lookup_path: 00840004 -> UPS
   0.124550     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.124556     [D5] hid_lookup_path: 00840000 -> Undefined
   0.124562     [D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x51, Offset: 0, Size: 8, Value: 1
   0.124567     [D4] Entering libusb_get_report
   0.127514     [D3] Report[get]: (5 bytes) => 00 00 00 00 00
   0.127530     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.127536     [D5] Unit = 00000000, UnitExp = 0
   0.127541     [D5] Exponent = 0
   0.127546     [D5] hid_lookup_path: 00840004 -> UPS
   0.127552     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.127565     [D5] hid_lookup_path: 00840000 -> Undefined
   0.127572     [D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x52, Offset: 0, Size: 8, Value: 0
   0.127577     [D4] Entering libusb_get_report
   0.130627     [D3] Report[get]: (5 bytes) => 53 78 3c dc 05
   0.130643     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.130649     [D5] Unit = 00000000, UnitExp = 0
   0.130654     [D5] Exponent = 0
   0.130659     [D5] hid_lookup_path: 00840004 -> UPS
   0.130665     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.130671     [D5] hid_lookup_path: 00840000 -> Undefined
   0.130677     [D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x53, Offset: 0, Size: 8, Value: 0
   0.130682     [D4] Entering libusb_get_report
   0.133511     [D3] Report[get]: (5 bytes) => 54 78 00 00 00
   0.133526     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.133531     [D5] Unit = 00000000, UnitExp = 0
   0.133536     [D5] Exponent = 0
   0.133542     [D5] hid_lookup_path: 00840004 -> UPS
   0.133548     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.133553     [D5] hid_lookup_path: 00840000 -> Undefined
   0.133560     [D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x54, Offset: 0, Size: 8, Value: 0
   0.133565     [D4] Entering libusb_get_report
   0.136515     [D3] Report[get]: (5 bytes) => 00 00 00 00 00
   0.136530     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.136536     [D5] Unit = 00000000, UnitExp = 0
   0.136541     [D5] Exponent = 0
   0.136546     [D5] hid_lookup_path: 00840004 -> UPS
   0.136552     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.136558     [D5] hid_lookup_path: 00840000 -> Undefined
   0.136564     [D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x55, Offset: 0, Size: 8, Value: 0
   0.136569     [D4] Entering libusb_get_report
   0.139628     [D3] Report[get]: (5 bytes) => 56 00 00 00 00
   0.139644     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.139650     [D5] Unit = 00000000, UnitExp = 0
   0.139655     [D5] Exponent = 0
   0.139661     [D5] hid_lookup_path: 00840004 -> UPS
   0.139666     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.139672     [D5] hid_lookup_path: 00840000 -> Undefined
   0.139678     [D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x56, Offset: 0, Size: 8, Value: 0
   0.139683     [D4] Entering libusb_get_report
   0.142627     [D3] Report[get]: (5 bytes) => 57 3c 64 75 00
   0.142643     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.142649     [D5] Unit = 00000000, UnitExp = 0
   0.142654     [D5] Exponent = 0
   0.142659     [D5] hid_lookup_path: 00840004 -> UPS
   0.142665     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.142671     [D5] hid_lookup_path: 00840000 -> Undefined
   0.142677     [D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x57, Offset: 0, Size: 8, Value: 0
   0.142682     [D4] Entering libusb_get_report
   0.145628     [D3] Report[get]: (5 bytes) => 58 0b 00 00 00
   0.145654     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.145660     [D5] Unit = 00000000, UnitExp = 0
   0.145666     [D5] Exponent = 0
   0.145673     [D5] hid_lookup_path: 00840004 -> UPS
   0.145679     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.145685     [D5] hid_lookup_path: 00840000 -> Undefined
   0.145692     [D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x58, Offset: 0, Size: 8, Value: 1
   0.145698     [D4] Entering libusb_get_report
   0.148625     [D3] Report[get]: (5 bytes) => 00 00 00 00 00
   0.148640     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.148645     [D5] Unit = 00000000, UnitExp = 0
   0.148650     [D5] Exponent = 0
   0.148656     [D5] hid_lookup_path: 00840004 -> UPS
   0.148662     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.148667     [D5] hid_lookup_path: 00840000 -> Undefined
   0.148674     [D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x59, Offset: 0, Size: 8, Value: 0
   0.148679     [D4] Entering libusb_get_report
   0.151598     [D3] Report[get]: (5 bytes) => 5a 66 66 a6 3f
   0.151607     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.151611     [D5] Unit = 00000000, UnitExp = 0
   0.151613     [D5] Exponent = 0
   0.151617     [D5] hid_lookup_path: 00840004 -> UPS
   0.151624     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.151627     [D5] hid_lookup_path: 00840000 -> Undefined
   0.151631     [D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x5a, Offset: 0, Size: 8, Value: 0
   0.151634     [D4] Entering libusb_get_report
   0.154598     [D3] Report[get]: (5 bytes) => 5b 66 66 a6 3f
   0.154607     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.154611     [D5] Unit = 00000000, UnitExp = 0
   0.154613     [D5] Exponent = 0
   0.154617     [D5] hid_lookup_path: 00840004 -> UPS
   0.154620     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.154623     [D5] hid_lookup_path: 00840000 -> Undefined
   0.154627     [D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x5b, Offset: 0, Size: 8, Value: 0
   0.154630     [D4] Entering libusb_get_report
   0.157512     [D3] Report[get]: (5 bytes) => 5c 00 00 00 00
   0.157527     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.157533     [D5] Unit = 00000000, UnitExp = 0
   0.157538     [D5] Exponent = 0
   0.157543     [D5] hid_lookup_path: 00840004 -> UPS
   0.157549     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.157555     [D5] hid_lookup_path: 00840000 -> Undefined
   0.157561     [D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x5c, Offset: 0, Size: 8, Value: 0
   0.157566     [D4] Entering libusb_get_report
   0.160624     [D3] Report[get]: (5 bytes) => 5d 00 00 00 00
   0.160639     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.160644     [D5] Unit = 00000000, UnitExp = 0
   0.160649     [D5] Exponent = 0
   0.160655     [D5] hid_lookup_path: 00840004 -> UPS
   0.160661     [D5] hid_lookup_path: 00840024 -> PowerSummary
   0.160666     [D5] hid_lookup_path: 00840000 -> Undefined
   0.160673     [D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x5d, Offset: 0, Size: 8, Value: 0
Network UPS Tools - Generic HID driver 0.46 (2.8.0-rc1)
USB communication driver (libusb 1.0) 0.43
   0.160686     [D5] send_to_all: SETINFO ups.mfr "Vertiv Co."
   0.160693     [D5] send_to_all: SETINFO ups.model "Liebert GXT4"
   0.160699     [D5] send_to_all: SETINFO ups.serial "1823901037AFBA3"
   0.160705     [D5] send_to_all: SETINFO ups.vendorid "10af"
   0.160712     [D5] send_to_all: SETINFO ups.productid "0000"
   0.160717     [D2] Report descriptor retrieved (Reportlen = 505)
   0.160722     [D2] Found HID device
   0.160729     [D1] Detected a UPS: Vertiv Co./Liebert GXT4
   0.160738     [D5] hid_lookup_usage: UPS -> 00840004
   0.160745     [D5] hid_lookup_usage: BELKINBatterySystem -> 00860010
   0.160751     [D5] hid_lookup_usage: BELKINCharge -> 00860039
   0.160756     [D4] string_to_path: depth = 3
   0.160763     [D5] hid_lookup_usage: UPS -> 00840004
   0.160770     [D5] hid_lookup_usage: PowerSummary -> 00840024
   0.160779     [D5] hid_lookup_usage: RemainingCapacityLimit -> 00850029
   0.160783     [D4] string_to_path: depth = 3
   0.160790     [D3] Report[buf]: (2 bytes) => 13 14
   0.160795     [D5] PhyMax = 0, PhyMin = 0, LogMax = 100, LogMin = 0
   0.160800     [D5] Unit = 00000000, UnitExp = 0
   0.160805     [D5] Exponent = 0
   0.160812     [D2] Path: UPS.PowerSummary.RemainingCapacityLimit, Type: Feature, ReportID: 0x13, Offset: 0, Size: 8, Value: 20
   0.160819     [D5] send_to_all: SETINFO battery.charge.low "20"
   0.160826     [D5] hid_lookup_usage: UPS -> 00840004
   0.160832     [D5] hid_lookup_usage: PowerSummary -> 00840024
   0.160840     [D5] hid_lookup_usage: WarningCapacityLimit -> 0085008c
   0.160845     [D4] string_to_path: depth = 3
   0.160851     [D3] Report[buf]: (5 bytes) => 04 64 14 01 01
   0.160857     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.160862     [D5] Unit = 00000000, UnitExp = 0
   0.160866     [D5] Exponent = 0
   0.160888     [D2] Path: UPS.PowerSummary.WarningCapacityLimit, Type: Feature, ReportID: 0x04, Offset: 8, Size: 8, Value: 0
   0.160896     [D5] send_to_all: SETINFO battery.charge.warning "0"
   0.160903     [D5] hid_lookup_usage: UPS -> 00840004
   0.160909     [D5] hid_lookup_usage: PowerSummary -> 00840024
   0.160916     [D5] hid_lookup_usage: RunTimeToEmpty -> 00850068
   0.160921     [D4] string_to_path: depth = 3
   0.160927     [D5] hid_lookup_usage: UPS -> 00840004
   0.160933     [D5] hid_lookup_usage: PowerSummary -> 00840024
   0.160948     [D5] hid_lookup_usage: iDeviceChemistry -> 00850089
   0.160953     [D4] string_to_path: depth = 3
   0.160960     [D3] Report[buf]: (4 bytes) => 02 13 61 64
   0.160965     [D5] PhyMax = 0, PhyMin = 0, LogMax = 15, LogMin = 0
   0.160970     [D5] Unit = 00000000, UnitExp = 0
   0.160975     [D5] Exponent = 0
   0.160980     [D2] Path: UPS.PowerSummary.iDeviceChemistry, Type: Feature, ReportID: 0x02, Offset: 12, Size: 4, Value: 6
   0.166494     [D5] send_to_all: SETINFO battery.type "PbAc"
   0.166513     [D5] hid_lookup_usage: UPS -> 00840004
   0.166519     [D5] hid_lookup_usage: BELKINBatterySystem -> 00860010
   0.166525     [D5] hid_lookup_usage: BELKINVoltage -> 00860030
   0.166530     [D4] string_to_path: depth = 3
   0.166537     [D5] hid_lookup_usage: UPS -> 00840004
   0.166542     [D5] hid_lookup_usage: BELKINConfig -> 00860026
   0.166548     [D5] hid_lookup_usage: BELKINConfigBatteryVoltage -> 00860044
   0.166552     [D4] string_to_path: depth = 3
   0.166559     [D5] hid_lookup_usage: UPS -> 00840004
   0.166564     [D5] hid_lookup_usage: BELKINPowerState -> 0086002a
   0.166570     [D5] hid_lookup_usage: BELKINInput -> 0086001a
   0.166576     [D5] hid_lookup_usage: BELKINFrequency -> 00860032
   0.166581     [D4] string_to_path: depth = 4
   0.166587     [D5] hid_lookup_usage: UPS -> 00840004
   0.166593     [D5] hid_lookup_usage: BELKINConfig -> 00860026
   0.166598     [D5] hid_lookup_usage: BELKINConfigFrequency -> 00860042
   0.166603     [D4] string_to_path: depth = 3
   0.166609     [D5] hid_lookup_usage: UPS -> 00840004
   0.166614     [D5] hid_lookup_usage: BELKINDevice -> 00860029
   0.166620     [D5] hid_lookup_usage: BELKINVoltageSensitivity -> 00860074
   0.166624     [D4] string_to_path: depth = 3
   0.166631     [D5] hid_lookup_usage: UPS -> 00840004
   0.166636     [D5] hid_lookup_usage: BELKINConfig -> 00860026
   0.166641     [D5] hid_lookup_usage: BELKINHighVoltageTransfer -> 00860054
   0.166646     [D4] string_to_path: depth = 3
   0.166652     [D5] hid_lookup_usage: UPS -> 00840004
   0.166657     [D5] hid_lookup_usage: BELKINConfig -> 00860026
   0.166662     [D5] hid_lookup_usage: BELKINHighVoltageTransferMax -> 0086005d
   0.166667     [D4] string_to_path: depth = 3
   0.166673     [D5] hid_lookup_usage: UPS -> 00840004
   0.166678     [D5] hid_lookup_usage: BELKINConfig -> 00860026
   0.166683     [D5] hid_lookup_usage: BELKINHighVoltageTransferMin -> 0086005e
   0.166688     [D4] string_to_path: depth = 3
   0.166694     [D5] hid_lookup_usage: UPS -> 00840004
   0.166700     [D5] hid_lookup_usage: BELKINConfig -> 00860026
   0.166705     [D5] hid_lookup_usage: BELKINLowVoltageTransfer -> 00860053
   0.166709     [D4] string_to_path: depth = 3
   0.166716     [D5] hid_lookup_usage: UPS -> 00840004
   0.166721     [D5] hid_lookup_usage: BELKINConfig -> 00860026
   0.166726     [D5] hid_lookup_usage: BELKINLowVoltageTransferMax -> 0086005b
   0.166731     [D4] string_to_path: depth = 3
   0.166737     [D5] hid_lookup_usage: UPS -> 00840004
   0.166742     [D5] hid_lookup_usage: BELKINConfig -> 00860026
   0.166747     [D5] hid_lookup_usage: BELKINLowVoltageTransferMin -> 0086005c
   0.166752     [D4] string_to_path: depth = 3
   0.166758     [D5] hid_lookup_usage: UPS -> 00840004
   0.166763     [D5] hid_lookup_usage: BELKINPowerState -> 0086002a
   0.166769     [D5] hid_lookup_usage: BELKINInput -> 0086001a
   0.166775     [D5] hid_lookup_usage: BELKINVoltage -> 00860030
   0.166780     [D4] string_to_path: depth = 4
   0.166786     [D5] hid_lookup_usage: UPS -> 00840004
   0.166791     [D5] hid_lookup_usage: BELKINConfig -> 00860026
   0.166796     [D5] hid_lookup_usage: BELKINConfigVoltage -> 00860040
   0.166802     [D4] string_to_path: depth = 3
   0.166809     [D5] hid_lookup_usage: UPS -> 00840004
   0.166815     [D5] hid_lookup_usage: BELKINPowerState -> 0086002a
   0.166822     [D5] hid_lookup_usage: BELKINOutput -> 0086001c
   0.166829     [D5] hid_lookup_usage: BELKINFrequency -> 00860032
   0.166835     [D4] string_to_path: depth = 4
   0.166843     [D5] hid_lookup_usage: UPS -> 00840004
   0.166849     [D5] hid_lookup_usage: BELKINPowerState -> 0086002a
   0.166856     [D5] hid_lookup_usage: BELKINOutput -> 0086001c
   0.166863     [D5] hid_lookup_usage: BELKINVoltage -> 00860030
   0.166869     [D4] string_to_path: depth = 4
   0.166885     [D5] hid_lookup_usage: UPS -> 00840004
   0.166892     [D5] hid_lookup_usage: BELKINControls -> 00860027
   0.166899     [D5] hid_lookup_usage: BELKINAudibleAlarmControl -> 0086005a
   0.166904     [D4] string_to_path: depth = 3
   0.166912     [D5] hid_lookup_usage: UPS -> 00840004
   0.166918     [D5] hid_lookup_usage: BELKINControls -> 00860027
   0.166925     [D5] hid_lookup_usage: BELKINDelayBeforeStartup -> 00860056
   0.166930     [D4] string_to_path: depth = 3
   0.166938     [D5] hid_lookup_usage: UPS -> 00840004
   0.166944     [D5] hid_lookup_usage: BELKINControls -> 00860027
   0.166950     [D5] hid_lookup_usage: BELKINDelayBeforeShutdown -> 00860057
   0.166956     [D4] string_to_path: depth = 3
   0.166963     [D5] hid_lookup_usage: UPS -> 00840004
   0.166968     [D5] hid_lookup_usage: BELKINControls -> 00860027
   0.166973     [D5] hid_lookup_usage: BELKINDelayBeforeStartup -> 00860056
   0.166976     [D4] string_to_path: depth = 3
   0.166981     [D5] hid_lookup_usage: UPS -> 00840004
   0.166984     [D5] hid_lookup_usage: BELKINControls -> 00860027
   0.166988     [D5] hid_lookup_usage: BELKINDelayBeforeShutdown -> 00860057
   0.166991     [D4] string_to_path: depth = 3
   0.166996     [D5] hid_lookup_usage: UPS -> 00840004
   0.166999     [D5] hid_lookup_usage: BELKINControls -> 00860027
   0.167003     [D5] hid_lookup_usage: BELKINDelayBeforeReboot -> 00860055
   0.167006     [D4] string_to_path: depth = 3
   0.167011     [D5] hid_lookup_usage: UPS -> 00840004
   0.167015     [D5] hid_lookup_usage: BELKINDevice -> 00860029
   0.167018     [D5] hid_lookup_usage: BELKINUPSType -> 0086007c
   0.167021     [D4] string_to_path: depth = 3
   0.167024     [D5] hid_lookup_usage: UPS -> 00840004
   0.167027     [D5] hid_lookup_usage: BELKINPowerState -> 0086002a
   0.167030     [D5] hid_lookup_usage: BELKINOutput -> 0086001c
   0.167033     [D5] hid_lookup_usage: BELKINPercentLoad -> 00860035
   0.167036     [D4] string_to_path: depth = 4
   0.167040     [D5] hid_lookup_usage: UPS -> 00840004
   0.167043     [D5] hid_lookup_usage: BELKINConfig -> 00860026
   0.167046     [D5] hid_lookup_usage: BELKINConfigOverloadTransfer -> 00860045
   0.167048     [D4] string_to_path: depth = 3
   0.167052     [D5] hid_lookup_usage: UPS -> 00840004
   0.167055     [D5] hid_lookup_usage: PowerSummary -> 00840024
   0.167060     [D5] hid_lookup_usage: ManufacturerDate -> 00850085
   0.167063     [D4] string_to_path: depth = 3
   0.167066     [D5] hid_lookup_usage: UPS -> 00840004
   0.167069     [D5] hid_lookup_usage: BELKINConfig -> 00860026
   0.167072     [D5] hid_lookup_usage: BELKINConfigApparentPower -> 00860043
   0.167075     [D4] string_to_path: depth = 3
   0.167078     [D5] hid_lookup_usage: UPS -> 00840004
   0.167082     [D5] hid_lookup_usage: PowerSummary -> 00840024
   0.167086     [D5] hid_lookup_usage: iSerialNumber -> 008400ff
   0.167088     [D4] string_to_path: depth = 3
   0.167092     [D5] hid_lookup_usage: UPS -> 00840004
   0.167095     [D5] hid_lookup_usage: BELKINControls -> 00860027
   0.167098     [D5] hid_lookup_usage: BELKINTest -> 00860058
   0.167100     [D4] string_to_path: depth = 3
   0.167104     [D5] hid_lookup_usage: UPS -> 00840004
   0.167107     [D5] hid_lookup_usage: BELKINDevice -> 00860029
   0.167110     [D5] hid_lookup_usage: BELKINUPSType -> 0086007c
   0.167113     [D4] string_to_path: depth = 3
   0.167116     [D5] hid_lookup_usage: UPS -> 00840004
   0.167120     [D5] hid_lookup_usage: PowerSummary -> 00840024
   0.167124     [D5] hid_lookup_usage: RemainingCapacity -> 00850066
   0.167126     [D4] string_to_path: depth = 3
   0.167130     [D3] Report[buf]: (2 bytes) => 06 64
   0.167134     [D5] PhyMax = 0, PhyMin = 0, LogMax = 100, LogMin = 0
   0.167136     [D5] Unit = 00000000, UnitExp = 0
   0.167139     [D5] Exponent = 0
   0.167143     [D2] Path: UPS.PowerSummary.RemainingCapacity, Type: Feature, ReportID: 0x06, Offset: 0, Size: 8, Value: 100
   0.167148     [D5] send_to_all: SETINFO battery.charge "100"
   0.167151     [D5] hid_lookup_usage: UPS -> 00840004
   0.167155     [D5] hid_lookup_usage: Input -> 0084001a
   0.167158     [D5] hid_lookup_usage: Frequency -> 00840032
   0.167161     [D4] string_to_path: depth = 3
   0.167165     [D5] hid_lookup_usage: UPS -> 00840004
   0.167168     [D5] hid_lookup_usage: Input -> 0084001a
   0.167175     [D5] hid_lookup_usage: Voltage -> 00840030
   0.167178     [D4] string_to_path: depth = 3
   0.167181     [D5] hid_lookup_usage: UPS -> 00840004
   0.167185     [D5] hid_lookup_usage: Output -> 0084001c
   0.167188     [D5] hid_lookup_usage: Voltage -> 00840030
   0.167191     [D4] string_to_path: depth = 3
   0.167194     [D5] hid_lookup_usage: UPS -> 00840004
   0.167198     [D5] hid_lookup_usage: PowerSummary -> 00840024
   0.167201     [D5] hid_lookup_usage: Voltage -> 00840030
   0.167204     [D4] string_to_path: depth = 3
   0.167208     [D3] Report[buf]: (5 bytes) => 05 36 00 30 00
   0.167211     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.167214     [D5] Unit = 00000000, UnitExp = 0
   0.167216     [D5] Exponent = 0
   0.167220     [D2] Path: UPS.PowerSummary.Voltage, Type: Feature, ReportID: 0x05, Offset: 0, Size: 16, Value: 0
   0.167223     LineVoltage exponent looks wrong, but not correcting.
   0.167227     [D5] send_to_all: SETINFO battery.voltage "0.0"
   0.167230     [D5] hid_lookup_usage: UPS -> 00840004
   0.167234     [D5] hid_lookup_usage: PowerSummary -> 00840024
   0.167237     [D5] hid_lookup_usage: ConfigVoltage -> 00840040
   0.167240     [D4] string_to_path: depth = 3
   0.167244     [D3] Report[buf]: (5 bytes) => 05 36 00 30 00
   0.167247     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.167249     [D5] Unit = 00000000, UnitExp = 0
   0.167252     [D5] Exponent = 0
   0.167255     [D2] Path: UPS.PowerSummary.ConfigVoltage, Type: Feature, ReportID: 0x05, Offset: 16, Size: 16, Value: 0
   0.167258     ConfigVoltage exponent looks wrong, but not correcting.
   0.167262     [D5] send_to_all: SETINFO battery.voltage.nominal "0.0"
   0.167265     [D5] hid_lookup_usage: UPS -> 00840004
   0.167268     [D5] hid_lookup_usage: Output -> 0084001c
   0.167272     [D5] hid_lookup_usage: PercentLoad -> 00840035
   0.167274     [D4] string_to_path: depth = 3
   0.167278     [D5] hid_lookup_usage: UPS -> 00840004
   0.167281     [D5] hid_lookup_usage: PowerSummary -> 00840024
   0.167285     [D5] hid_lookup_usage: Discharging -> 00850045
   0.167288     [D4] string_to_path: depth = 3
   0.167291     [D3] Report[buf]: (2 bytes) => 0c 15
   0.167294     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.167297     [D5] Unit = 00000000, UnitExp = 0
   0.167299     [D5] Exponent = 0
   0.167303     [D2] Path: UPS.PowerSummary.Discharging, Type: Feature, ReportID: 0x0c, Offset: 1, Size: 1, Value: 0
   0.167305     [D5] process_boolean_info: !dischrg
   0.167309     [D5] hid_lookup_usage: UPS -> 00840004
   0.167312     [D5] hid_lookup_usage: PowerSummary -> 00840024
   0.167316     [D5] hid_lookup_usage: Charging -> 00850044
   0.167319     [D4] string_to_path: depth = 3
   0.167322     [D3] Report[buf]: (2 bytes) => 0c 15
   0.167325     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.167328     [D5] Unit = 00000000, UnitExp = 0
   0.167330     [D5] Exponent = 0
   0.167333     [D2] Path: UPS.PowerSummary.Charging, Type: Feature, ReportID: 0x0c, Offset: 0, Size: 1, Value: 1
   0.167336     [D5] process_boolean_info: chrg
   0.167340     [D5] hid_lookup_usage: UPS -> 00840004
   0.167343     [D5] hid_lookup_usage: PowerSummary -> 00840024
   0.167346     [D5] hid_lookup_usage: ShutdownImminent -> 00840069
   0.167349     [D4] string_to_path: depth = 3
   0.167353     [D5] hid_lookup_usage: UPS -> 00840004
   0.167356     [D5] hid_lookup_usage: PowerSummary -> 00840024
   0.167360     [D5] hid_lookup_usage: ACPresent -> 008500d0
   0.167363     [D4] string_to_path: depth = 3
   0.167366     [D3] Report[buf]: (2 bytes) => 0c 15
   0.167369     [D5] PhyMax = 0, PhyMin = 0, LogMax = 1, LogMin = 0
   0.167372     [D5] Unit = 00000000, UnitExp = 0
   0.167374     [D5] Exponent = 0
   0.167377     [D2] Path: UPS.PowerSummary.ACPresent, Type: Feature, ReportID: 0x0c, Offset: 2, Size: 1, Value: 1
   0.167380     [D5] process_boolean_info: online
   0.167384     [D5] hid_lookup_usage: UPS -> 00840004
   0.167387     [D5] hid_lookup_usage: PowerSummary -> 00840024
   0.167390     [D5] hid_lookup_usage: PresentStatus -> 00840002
   0.167395     [D5] hid_lookup_usage: Discharging -> 00850045
   0.167397     [D4] string_to_path: depth = 4
   0.167401     [D5] hid_lookup_usage: UPS -> 00840004
   0.167404     [D5] hid_lookup_usage: PowerSummary -> 00840024
   0.167409     [D5] hid_lookup_usage: PresentStatus -> 00840002
   0.167413     [D5] hid_lookup_usage: Charging -> 00850044
   0.167416     [D4] string_to_path: depth = 4
   0.167420     [D5] hid_lookup_usage: UPS -> 00840004
   0.167423     [D5] hid_lookup_usage: PowerSummary -> 00840024
   0.167426     [D5] hid_lookup_usage: PresentStatus -> 00840002
   0.167430     [D5] hid_lookup_usage: ShutdownImminent -> 00840069
   0.167433     [D4] string_to_path: depth = 4
   0.167436     [D5] hid_lookup_usage: UPS -> 00840004
   0.167439     [D5] hid_lookup_usage: PowerSummary -> 00840024
   0.167443     [D5] hid_lookup_usage: PresentStatus -> 00840002
   0.167447     [D5] hid_lookup_usage: ACPresent -> 008500d0
   0.167450     [D4] string_to_path: depth = 4
   0.167453     [D5] hid_lookup_usage: UPS -> 00840004
   0.167456     [D5] hid_lookup_usage: PowerSummary -> 00840024
   0.167460     [D5] hid_lookup_usage: PresentStatus -> 00840002
   0.167464     [D5] hid_lookup_usage: NeedReplacement -> 0085004b
   0.167466     [D4] string_to_path: depth = 4
   0.167470     [D5] hid_lookup_usage: UPS -> 00840004
   0.167473     [D5] hid_lookup_usage: PowerSummary -> 00840024
   0.167476     [D5] hid_lookup_usage: PresentStatus -> 00840002
   0.167481     [D5] hid_lookup_usage: BelowRemainingCapacityLimit -> 00850042
   0.167483     [D4] string_to_path: depth = 4
   0.167487     [D5] hid_lookup_usage: UPS -> 00840004
   0.167490     [D5] hid_lookup_usage: BELKINStatus -> 00860028
   0.167493     [D5] hid_lookup_usage: BELKINPowerStatus -> 00860021
   0.167496     [D4] string_to_path: depth = 3
   0.167500     [D5] hid_lookup_usage: UPS -> 00840004
   0.167503     [D5] hid_lookup_usage: BELKINStatus -> 00860028
   0.167506     [D5] hid_lookup_usage: BELKINPowerStatus -> 00860021
   0.167509     [D4] string_to_path: depth = 3
   0.167512     [D5] hid_lookup_usage: UPS -> 00840004
   0.167515     [D5] hid_lookup_usage: BELKINStatus -> 00860028
   0.167518     [D5] hid_lookup_usage: BELKINPowerStatus -> 00860021
   0.167521     [D4] string_to_path: depth = 3
   0.167524     [D5] hid_lookup_usage: UPS -> 00840004
   0.167528     [D5] hid_lookup_usage: BELKINStatus -> 00860028
   0.167531     [D5] hid_lookup_usage: BELKINPowerStatus -> 00860021
   0.167533     [D4] string_to_path: depth = 3
   0.167537     [D5] hid_lookup_usage: UPS -> 00840004
   0.167540     [D5] hid_lookup_usage: BELKINStatus -> 00860028
   0.167543     [D5] hid_lookup_usage: BELKINPowerStatus -> 00860021
   0.167546     [D4] string_to_path: depth = 3
   0.167549     [D5] hid_lookup_usage: UPS -> 00840004
   0.167552     [D5] hid_lookup_usage: BELKINStatus -> 00860028
   0.167555     [D5] hid_lookup_usage: BELKINBatteryStatus -> 00860022
   0.167558     [D4] string_to_path: depth = 3
   0.167562     [D5] hid_lookup_usage: UPS -> 00840004
   0.167565     [D5] hid_lookup_usage: BELKINStatus -> 00860028
   0.167568     [D5] hid_lookup_usage: BELKINBatteryStatus -> 00860022
   0.167570     [D4] string_to_path: depth = 3
   0.167574     [D5] hid_lookup_usage: UPS -> 00840004
   0.167577     [D5] hid_lookup_usage: BELKINStatus -> 00860028
   0.167580     [D5] hid_lookup_usage: BELKINBatteryStatus -> 00860022
   0.167583     [D4] string_to_path: depth = 3
   0.167586     [D5] hid_lookup_usage: UPS -> 00840004
   0.167589     [D5] hid_lookup_usage: BELKINControls -> 00860027
   0.167592     [D5] hid_lookup_usage: BELKINTest -> 00860058
   0.167595     [D4] string_to_path: depth = 3
   0.167598     [D5] hid_lookup_usage: UPS -> 00840004
   0.167601     [D5] hid_lookup_usage: BELKINControls -> 00860027
   0.167604     [D5] hid_lookup_usage: BELKINTest -> 00860058
   0.167607     [D4] string_to_path: depth = 3
   0.167610     [D5] hid_lookup_usage: UPS -> 00840004
   0.167613     [D5] hid_lookup_usage: BELKINControls -> 00860027
   0.167616     [D5] hid_lookup_usage: BELKINTest -> 00860058
   0.167619     [D4] string_to_path: depth = 3
   0.167622     [D5] hid_lookup_usage: UPS -> 00840004
   0.167625     [D5] hid_lookup_usage: BELKINControls -> 00860027
   0.167628     [D5] hid_lookup_usage: BELKINAudibleAlarmControl -> 0086005a
   0.167631     [D4] string_to_path: depth = 3
   0.167635     [D5] hid_lookup_usage: UPS -> 00840004
   0.167638     [D5] hid_lookup_usage: BELKINControls -> 00860027
   0.167640     [D5] hid_lookup_usage: BELKINAudibleAlarmControl -> 0086005a
   0.167645     [D4] string_to_path: depth = 3
   0.167649     [D5] hid_lookup_usage: UPS -> 00840004
   0.167652     [D5] hid_lookup_usage: BELKINControls -> 00860027
   0.167655     [D5] hid_lookup_usage: BELKINAudibleAlarmControl -> 0086005a
   0.167657     [D4] string_to_path: depth = 3
   0.167661     [D5] hid_lookup_usage: UPS -> 00840004
   0.167664     [D5] hid_lookup_usage: BELKINControls -> 00860027
   0.167667     [D5] hid_lookup_usage: BELKINAudibleAlarmControl -> 0086005a
   0.167670     [D4] string_to_path: depth = 3
   0.167673     [D5] hid_lookup_usage: UPS -> 00840004
   0.167676     [D5] hid_lookup_usage: BELKINControls -> 00860027
   0.167679     [D5] hid_lookup_usage: BELKINAudibleAlarmControl -> 0086005a
   0.167682     [D4] string_to_path: depth = 3
   0.167685     [D5] hid_lookup_usage: UPS -> 00840004
   0.167688     [D5] hid_lookup_usage: BELKINControls -> 00860027
   0.167691     [D5] hid_lookup_usage: BELKINDelayBeforeShutdown -> 00860057
   0.167694     [D4] string_to_path: depth = 3
   0.167697     [D5] hid_lookup_usage: UPS -> 00840004
   0.167700     [D5] hid_lookup_usage: BELKINControls -> 00860027
   0.167703     [D5] hid_lookup_usage: BELKINDelayBeforeStartup -> 00860056
   0.167706     [D4] string_to_path: depth = 3
   0.167709     [D5] hid_lookup_usage: UPS -> 00840004
   0.167712     [D5] hid_lookup_usage: BELKINControls -> 00860027
   0.167715     [D5] hid_lookup_usage: BELKINDelayBeforeShutdown -> 00860057
   0.167717     [D4] string_to_path: depth = 3
   0.167721     [D5] hid_lookup_usage: UPS -> 00840004
   0.167724     [D5] hid_lookup_usage: BELKINControls -> 00860027
   0.167727     [D5] hid_lookup_usage: BELKINDelayBeforeStartup -> 00860056
   0.167729     [D4] string_to_path: depth = 3
   0.167733     [D5] hid_lookup_usage: UPS -> 00840004
   0.167736     [D5] hid_lookup_usage: BELKINControls -> 00860027
   0.167739     [D5] hid_lookup_usage: BELKINDelayBeforeShutdown -> 00860057
   0.167741     [D4] string_to_path: depth = 3
   0.167745     [D5] hid_lookup_usage: UPS -> 00840004
   0.167748     [D5] hid_lookup_usage: BELKINControls -> 00860027
   0.167751     [D5] hid_lookup_usage: BELKINDelayBeforeReboot -> 00860055
   0.167753     [D4] string_to_path: depth = 3
   0.167758     [D2] find_nut_info: unknown info type: load.off.delay
   0.167762     [D2] find_nut_info: unknown info type: load.on.delay
   0.167765     [D2] find_nut_info: unknown info type: load.off.delay
   0.167769     Initiating UPS shutdown
   0.167771     [D1] upsdrv_shutdown...
   0.167774     [D1] instcmd(shutdown.return, [NULL])
   0.167778     [D2] find_nut_info: unknown info type: shutdown.return
   0.167781     [D3] instcmd: cmdname 'shutdown.return' not found; checking for alternatives
   0.167784     [D1] instcmd(load.on.delay, [NULL])
   0.167787     [D2] find_nut_info: unknown info type: load.on.delay
   0.167790     [D3] instcmd: cmdname 'load.on.delay' not found; checking for alternatives
   0.167793     [D2] instcmd: info element unavailable load.on.delay

   0.167796     [D1] instcmd(shutdown.reboot, [NULL])
   0.167800     [D2] find_nut_info: unknown info type: shutdown.reboot
   0.167803     [D3] instcmd: cmdname 'shutdown.reboot' not found; checking for alternatives
   0.167806     [D2] instcmd: info element unavailable shutdown.reboot

   0.167808     [D1] instcmd(load.off.delay, [NULL])
   0.167812     [D2] find_nut_info: unknown info type: load.off.delay
   0.167815     [D3] instcmd: cmdname 'load.off.delay' not found; checking for alternatives
   0.167817     [D2] instcmd: info element unavailable load.off.delay

   0.167820     Shutdown failed!
   0.167824     [D1] upsdrv_cleanup...

EmnaX avatar Apr 19 '22 21:04 EmnaX

I also dug into scripts/subdriver/gen-usbhid-subdriver.sh a bit but that stuff is all way above my head. I'll dump the outputs here in the hope that it may help someone else in the future.

If anyone would like to see the outputs of some commands, let me know... happy to run 'em!

# sudo /usr/local/ups/bin/usbhid-ups -DD -u root -x explore -x vendorid=10af -x port=auto -s ups > /tmp/info 2>&1

   0.000000	[D1] Built-in default or configured user for drivers 'ups' was ignored due to 'root' specified on command line
   0.000028	[D1] debug level is '2'
   0.000681	[D2] Initializing an USB-connected UPS with library libusb-1.0.22 (API: 0x1000106) (NUT subdriver name='USB communication driver (libusb 1.0)' ver='0.43')
   0.000696	[D1] upsdrv_initups (non-SHUT)...
   0.004362	[D2] Checking device 1 of 16 (1D6B/0003)
   0.031950	[D2] - VendorID: 1d6b
   0.031969	[D2] - ProductID: 0003
   0.031974	[D2] - Manufacturer: Linux 4.19.0-19-amd64 xhci-hcd
   0.031980	[D2] - Product: xHCI Host Controller
   0.031986	[D2] - Serial Number: 0000:06:10.3
   0.031991	[D2] - Bus: 008
   0.031997	[D2] - Device: unknown
   0.032003	[D2] - Device release number: 0419
   0.032008	[D2] Trying to match device
   0.032015	[D2] match_function_subdriver (non-SHUT mode): matching a device...
   0.032075	[D2] match_function_regex: failed match of VendorID: 1d6b
   0.032081	[D2] Device does not match - skipping
   0.032362	[D2] Checking device 2 of 16 (10AF/0000)
   0.049105	[D2] - VendorID: 10af
   0.049129	[D2] - ProductID: 0000
   0.049132	[D2] - Manufacturer: Vertiv Co.
   0.049135	[D2] - Product: Liebert GXT4
   0.049138	[D2] - Serial Number: 1823901037AFBA3
   0.049140	[D2] - Bus: 004
   0.049143	[D2] - Device: unknown
   0.049146	[D2] - Device release number: 0000
   0.049149	[D2] Trying to match device
   0.049152	[D2] match_function_subdriver (non-SHUT mode): matching a device...
   0.049166	[D2] Device matches
   0.049169	[D2] Reading first configuration descriptor
   0.049198	[D2] Claimed interface 0 successfully
   0.052137	[D2] HID descriptor length 505
   0.056133	[D2] Report Descriptor size = 505
   0.056224	Using subdriver: EXPLORE HID 0.2
   0.056232	[D1] 59 HID objects found
   0.059136	[D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x01, Offset: 0, Size: 8, Value: 0
   0.062104	[D1] Path: UPS.PowerSummary.iSerialNumber, Type: Feature, ReportID: 0x02, Offset: 0, Size: 4, Value: 3
   0.062113	[D1] Path: UPS.PowerSummary.iManufacturer, Type: Feature, ReportID: 0x02, Offset: 4, Size: 4, Value: 1
   0.062117	[D1] Path: UPS.PowerSummary.iOEMInformation, Type: Feature, ReportID: 0x02, Offset: 8, Size: 4, Value: 1
   0.062121	[D1] Path: UPS.PowerSummary.iDeviceChemistry, Type: Feature, ReportID: 0x02, Offset: 12, Size: 4, Value: 6
   0.062125	[D1] Path: UPS.PowerSummary.DesignCapacity, Type: Feature, ReportID: 0x02, Offset: 16, Size: 8, Value: 100
   0.065136	[D1] Path: UPS.PowerSummary.RemainingTimeLimit, Type: Feature, ReportID: 0x03, Offset: 0, Size: 24, Value: 250
   0.065155	[D1] Path: UPS.PowerSummary.CapacityMode, Type: Feature, ReportID: 0x03, Offset: 24, Size: 2, Value: 2
   0.065162	[D1] Path: UPS.PowerSummary.Rechargeable, Type: Feature, ReportID: 0x03, Offset: 26, Size: 1, Value: 1
   0.065169	[D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x03, Offset: 27, Size: 5, Value: 1
   0.068136	[D1] Path: UPS.PowerSummary.RemainingCapacityLimit, Type: Feature, ReportID: 0x13, Offset: 0, Size: 8, Value: 20
   0.071136	[D1] Path: UPS.PowerSummary.RemainingCapacity, Type: Feature, ReportID: 0x06, Offset: 0, Size: 8, Value: 100
   0.071154	[D1] Path: UPS.PowerSummary.RemainingCapacity, Type: Input, ReportID: 0x06, Offset: 0, Size: 8, Value: 100
   0.074136	[D1] Path: UPS.PowerSummary.Charging, Type: Feature, ReportID: 0x0c, Offset: 0, Size: 1, Value: 1
   0.074155	[D1] Path: UPS.PowerSummary.Discharging, Type: Feature, ReportID: 0x0c, Offset: 1, Size: 1, Value: 0
   0.074162	[D1] Path: UPS.PowerSummary.ACPresent, Type: Feature, ReportID: 0x0c, Offset: 2, Size: 1, Value: 1
   0.074169	[D1] Path: UPS.PowerSummary.BelowRemainingCapacityLimit, Type: Feature, ReportID: 0x0c, Offset: 3, Size: 1, Value: 0
   0.074176	[D1] Path: UPS.PowerSummary.BatteryPresent, Type: Feature, ReportID: 0x0c, Offset: 4, Size: 1, Value: 1
   0.074183	[D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x0c, Offset: 5, Size: 3, Value: 0
   0.074190	[D1] Path: UPS.PowerSummary.Charging, Type: Input, ReportID: 0x0c, Offset: 0, Size: 1, Value: 1
   0.074211	[D1] Path: UPS.PowerSummary.Discharging, Type: Input, ReportID: 0x0c, Offset: 1, Size: 1, Value: 0
   0.074218	[D1] Path: UPS.PowerSummary.ACPresent, Type: Input, ReportID: 0x0c, Offset: 2, Size: 1, Value: 1
   0.074225	[D1] Path: UPS.PowerSummary.BelowRemainingCapacityLimit, Type: Input, ReportID: 0x0c, Offset: 3, Size: 1, Value: 0
   0.074232	[D1] Path: UPS.PowerSummary.BatteryPresent, Type: Input, ReportID: 0x0c, Offset: 4, Size: 1, Value: 1
   0.074239	[D1] Path: UPS.PowerSummary.Undefined, Type: Input, ReportID: 0x0c, Offset: 5, Size: 3, Value: 0
   0.077135	[D1] Path: UPS.PowerSummary.FullChargeCapacity, Type: Feature, ReportID: 0x04, Offset: 0, Size: 8, Value: 0
   0.077153	[D1] Path: UPS.PowerSummary.WarningCapacityLimit, Type: Feature, ReportID: 0x04, Offset: 8, Size: 8, Value: 0
   0.077161	[D1] Path: UPS.PowerSummary.CapacityGranularity1, Type: Feature, ReportID: 0x04, Offset: 16, Size: 8, Value: 1
   0.077168	[D1] Path: UPS.PowerSummary.CapacityGranularity2, Type: Feature, ReportID: 0x04, Offset: 24, Size: 8, Value: 1
   0.080103	[D1] Path: UPS.PowerSummary.Voltage, Type: Feature, ReportID: 0x05, Offset: 0, Size: 16, Value: 0
   0.080113	[D1] Path: UPS.PowerSummary.ConfigVoltage, Type: Feature, ReportID: 0x05, Offset: 16, Size: 16, Value: 0
   0.083114	[D1] Path: UPS.PowerSummary.Test, Type: Feature, ReportID: 0x08, Offset: 0, Size: 8, Value: 0
   0.086223	[D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x09, Offset: 0, Size: 8, Value: 0
   0.089134	[D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x32, Offset: 0, Size: 8, Value: 1
   0.092102	[D2] refresh_report_buffer: expected 5 bytes, but got 2 instead
   0.092116	[D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x33, Offset: 0, Size: 8, Value: 1
   0.095130	[D1] Path: UPS.PowerSummary.iProduct, Type: Feature, ReportID: 0x07, Offset: 0, Size: 8, Value: 0
   0.098202	[D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x3c, Offset: 0, Size: 8, Value: 0
   0.101134	[D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x3d, Offset: 0, Size: 8, Value: 0
   0.104093	[D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x3e, Offset: 0, Size: 8, Value: 1
   0.107133	[D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x3f, Offset: 0, Size: 8, Value: 0
   0.110122	[D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x40, Offset: 0, Size: 8, Value: 0
   0.113134	[D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x41, Offset: 0, Size: 8, Value: 0
   0.116101	[D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x42, Offset: 0, Size: 8, Value: 1
   0.119132	[D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x43, Offset: 0, Size: 8, Value: 1
   0.122147	[D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x44, Offset: 0, Size: 8, Value: 1
   0.125134	[D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x50, Offset: 0, Size: 8, Value: 0
   0.128134	[D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x51, Offset: 0, Size: 8, Value: 1
   0.131133	[D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x52, Offset: 0, Size: 8, Value: 0
   0.134135	[D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x53, Offset: 0, Size: 8, Value: 0
   0.137133	[D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x54, Offset: 0, Size: 8, Value: 0
   0.140133	[D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x55, Offset: 0, Size: 8, Value: 0
   0.143133	[D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x56, Offset: 0, Size: 8, Value: 0
   0.146117	[D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x57, Offset: 0, Size: 8, Value: 0
   0.149133	[D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x58, Offset: 0, Size: 8, Value: 1
   0.152098	[D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x59, Offset: 0, Size: 8, Value: 0
   0.155100	[D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x5a, Offset: 0, Size: 8, Value: 0
   0.158092	[D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x5b, Offset: 0, Size: 8, Value: 0
   0.161090	[D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x5c, Offset: 0, Size: 8, Value: 0
   0.164075	[D1] Path: UPS.PowerSummary.Undefined, Type: Feature, ReportID: 0x5d, Offset: 0, Size: 8, Value: 0
Network UPS Tools - Generic HID driver 0.46 (2.8.0-rc1)
USB communication driver (libusb 1.0) 0.43
   0.164095	[D2] Report descriptor retrieved (Reportlen = 505)
   0.164098	[D2] Found HID device
   0.164104	[D1] Detected a UPS: Vertiv Co./Liebert GXT4
   0.164110	[D2] find_nut_info: unknown info type: load.off.delay
   0.164113	[D2] find_nut_info: unknown info type: load.on.delay
   0.164116	[D2] find_nut_info: unknown info type: load.off.delay
   0.164122	[D1] upsdrv_initinfo...
   0.164127	[D1] upsdrv_updateinfo...
   0.185373	[D2] file_report_buffer: expected 2 bytes, but got 512 instead
   0.185393	[D1] Got 6 HID objects...
   0.185405	[D2] Path: UPS.PowerSummary.Charging, Type: Input, ReportID: 0x0c, Offset: 0, Size: 1, Value: 1
   0.185416	[D2] Path: UPS.PowerSummary.Discharging, Type: Input, ReportID: 0x0c, Offset: 1, Size: 1, Value: 0
   0.185425	[D2] Path: UPS.PowerSummary.ACPresent, Type: Input, ReportID: 0x0c, Offset: 2, Size: 1, Value: 1
   0.185436	[D2] Path: UPS.PowerSummary.BelowRemainingCapacityLimit, Type: Input, ReportID: 0x0c, Offset: 3, Size: 1, Value: 0
   0.185445	[D2] Path: UPS.PowerSummary.BatteryPresent, Type: Input, ReportID: 0x0c, Offset: 4, Size: 1, Value: 1
   0.185453	[D2] Path: UPS.PowerSummary.Undefined, Type: Input, ReportID: 0x0c, Offset: 5, Size: 3, Value: 0
   0.185460	[D1] Quick update...
   0.185576	[D2] dstate_init: sock /var/state/ups/usbhid-ups-ups open on fd 11
   0.185630	[D1] Group and/or user account for this driver was customized ('root:nut') compared to built-in defaults. Fixing socket '/var/state/ups/usbhid-ups-ups' ownership/access.
   0.185651	[D1] Group access for this driver successfully fixed
   0.185668	[D1] upsdrv_updateinfo...
   0.217368	[D2] file_report_buffer: expected 2 bytes, but got 512 instead
   0.217386	[D1] Got 1 HID objects...
   0.217398	[D2] Path: UPS.PowerSummary.RemainingCapacity, Type: Input, ReportID: 0x06, Offset: 0, Size: 8, Value: 100
   0.217405	[D1] Quick update...
   2.187667	[D1] upsdrv_updateinfo...
   2.201447	[D2] file_report_buffer: expected 2 bytes, but got 512 instead
   2.201464	[D1] Got 6 HID objects...
   2.201475	[D2] Path: UPS.PowerSummary.Charging, Type: Input, ReportID: 0x0c, Offset: 0, Size: 1, Value: 1
   2.201482	[D2] Path: UPS.PowerSummary.Discharging, Type: Input, ReportID: 0x0c, Offset: 1, Size: 1, Value: 0
   2.201489	[D2] Path: UPS.PowerSummary.ACPresent, Type: Input, ReportID: 0x0c, Offset: 2, Size: 1, Value: 1
   2.201496	[D2] Path: UPS.PowerSummary.BelowRemainingCapacityLimit, Type: Input, ReportID: 0x0c, Offset: 3, Size: 1, Value: 0
   2.201502	[D2] Path: UPS.PowerSummary.BatteryPresent, Type: Input, ReportID: 0x0c, Offset: 4, Size: 1, Value: 1
   2.201509	[D2] Path: UPS.PowerSummary.Undefined, Type: Input, ReportID: 0x0c, Offset: 5, Size: 3, Value: 0
   2.201517	[D1] Quick update...
   4.189721	[D1] upsdrv_updateinfo...
   4.217368	[D2] file_report_buffer: expected 2 bytes, but got 512 instead
   4.217379	[D1] Got 1 HID objects...
   4.217391	[D2] Path: UPS.PowerSummary.RemainingCapacity, Type: Input, ReportID: 0x06, Offset: 0, Size: 8, Value: 100
   4.217400	[D1] Quick update...
   6.191710	[D1] upsdrv_updateinfo...
   6.201351	[D2] file_report_buffer: expected 2 bytes, but got 512 instead
   6.201372	[D1] Got 6 HID objects...
   6.201385	[D2] Path: UPS.PowerSummary.Charging, Type: Input, ReportID: 0x0c, Offset: 0, Size: 1, Value: 1
   6.201396	[D2] Path: UPS.PowerSummary.Discharging, Type: Input, ReportID: 0x0c, Offset: 1, Size: 1, Value: 0
   6.201405	[D2] Path: UPS.PowerSummary.ACPresent, Type: Input, ReportID: 0x0c, Offset: 2, Size: 1, Value: 1
   6.201414	[D2] Path: UPS.PowerSummary.BelowRemainingCapacityLimit, Type: Input, ReportID: 0x0c, Offset: 3, Size: 1, Value: 0
   6.201444	[D2] Path: UPS.PowerSummary.BatteryPresent, Type: Input, ReportID: 0x0c, Offset: 4, Size: 1, Value: 1
   6.201453	[D2] Path: UPS.PowerSummary.Undefined, Type: Input, ReportID: 0x0c, Offset: 5, Size: 3, Value: 0
   6.201461	[D1] Quick update...
# sudo /home/emnax/nut/scripts/subdriver/gen-usbhid-subdriver.sh < /tmp/info
# Name of Subdriver: LiebertGXT4
Creating liebertgxt4-hid.h
Creating liebertgxt4-hid.c
Done.
// # cat drivers/liebertgxt4-hid.c

/* liebertgxt4-hid.c - subdriver to monitor LiebertGXT4 USB/HID devices with NUT
 *
 *  Copyright (C)
 *  2003 - 2012	Arnaud Quette <[email protected]>
 *  2005 - 2006	Peter Selinger <[email protected]>
 *  2008 - 2009	Arjen de Korte <[email protected]>
 *  2013 Charles Lepple <[email protected]>
 *
 *  TODO: Add year and name for new subdriver author (contributor)
 *  Mention in docs/acknowledgements.txt if this is a vendor contribution
 *
 *  Note: this subdriver was initially generated as a "stub" by the
 *  gen-usbhid-subdriver script. It must be customized.
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 */

#include "usbhid-ups.h"
#include "liebertgxt4-hid.h"
#include "main.h"	/* for getval() */
#include "usb-common.h"

#define LIEBERTGXT4_HID_VERSION	"LiebertGXT4 HID 0.1"
/* FIXME: experimental flag to be put in upsdrv_info */

/* LiebertGXT4 */
#define LIEBERTGXT4_VENDORID	0x10af

/* USB IDs device table */
static usb_device_id_t liebertgxt4_usb_device_table[] = {
	/* LiebertGXT4 */
	{ USB_DEVICE(LIEBERTGXT4_VENDORID, 0x0000), NULL },

	/* Terminating entry */
	{ 0, 0, NULL }
};


/* --------------------------------------------------------------- */
/*      Vendor-specific usage table */
/* --------------------------------------------------------------- */

/* LIEBERTGXT4 usage table */
static usage_lkp_t liebertgxt4_usage_lkp[] = {
	{ NULL, 0 }
};

static usage_tables_t liebertgxt4_utab[] = {
	liebertgxt4_usage_lkp,
	hid_usage_lkp,
	NULL,
};

/* --------------------------------------------------------------- */
/* HID2NUT lookup table                                            */
/* --------------------------------------------------------------- */

static hid_info_t liebertgxt4_hid2nut[] = {

	{ "unmapped.ups.powersummary.acpresent", 0, 0, "UPS.PowerSummary.ACPresent", NULL, "%.0f", 0, NULL },
	{ "unmapped.ups.powersummary.batterypresent", 0, 0, "UPS.PowerSummary.BatteryPresent", NULL, "%.0f", 0, NULL },
	{ "unmapped.ups.powersummary.belowremainingcapacitylimit", 0, 0, "UPS.PowerSummary.BelowRemainingCapacityLimit", NULL, "%.0f", 0, NULL },
	{ "unmapped.ups.powersummary.capacitygranularity1", 0, 0, "UPS.PowerSummary.CapacityGranularity1", NULL, "%.0f", 0, NULL },
	{ "unmapped.ups.powersummary.capacitygranularity2", 0, 0, "UPS.PowerSummary.CapacityGranularity2", NULL, "%.0f", 0, NULL },
	{ "unmapped.ups.powersummary.capacitymode", 0, 0, "UPS.PowerSummary.CapacityMode", NULL, "%.0f", 0, NULL },
	{ "unmapped.ups.powersummary.charging", 0, 0, "UPS.PowerSummary.Charging", NULL, "%.0f", 0, NULL },
	{ "unmapped.ups.powersummary.configvoltage", 0, 0, "UPS.PowerSummary.ConfigVoltage", NULL, "%.0f", 0, NULL },
	{ "unmapped.ups.powersummary.designcapacity", 0, 0, "UPS.PowerSummary.DesignCapacity", NULL, "%.0f", 0, NULL },
	{ "unmapped.ups.powersummary.discharging", 0, 0, "UPS.PowerSummary.Discharging", NULL, "%.0f", 0, NULL },
	{ "unmapped.ups.powersummary.fullchargecapacity", 0, 0, "UPS.PowerSummary.FullChargeCapacity", NULL, "%.0f", 0, NULL },
	{ "unmapped.ups.powersummary.idevicechemistry", 0, 0, "UPS.PowerSummary.iDeviceChemistry", NULL, "%.0f", 0, NULL },
	{ "unmapped.ups.powersummary.imanufacturer", 0, 0, "UPS.PowerSummary.iManufacturer", NULL, "%.0f", 0, NULL },
	{ "unmapped.ups.powersummary.ioeminformation", 0, 0, "UPS.PowerSummary.iOEMInformation", NULL, "%.0f", 0, NULL },
	{ "unmapped.ups.powersummary.iproduct", 0, 0, "UPS.PowerSummary.iProduct", NULL, "%.0f", 0, NULL },
	{ "unmapped.ups.powersummary.iserialnumber", 0, 0, "UPS.PowerSummary.iSerialNumber", NULL, "%.0f", 0, NULL },
	{ "unmapped.ups.powersummary.rechargeable", 0, 0, "UPS.PowerSummary.Rechargeable", NULL, "%.0f", 0, NULL },
	{ "unmapped.ups.powersummary.remainingcapacity", 0, 0, "UPS.PowerSummary.RemainingCapacity", NULL, "%.0f", 0, NULL },
	{ "unmapped.ups.powersummary.remainingcapacitylimit", 0, 0, "UPS.PowerSummary.RemainingCapacityLimit", NULL, "%.0f", 0, NULL },
	{ "unmapped.ups.powersummary.remainingtimelimit", 0, 0, "UPS.PowerSummary.RemainingTimeLimit", NULL, "%.0f", 0, NULL },
	{ "unmapped.ups.powersummary.test", 0, 0, "UPS.PowerSummary.Test", NULL, "%.0f", 0, NULL },
	{ "unmapped.ups.powersummary.undefined", 0, 0, "UPS.PowerSummary.Undefined", NULL, "%.0f", 0, NULL },
	{ "unmapped.ups.powersummary.voltage", 0, 0, "UPS.PowerSummary.Voltage", NULL, "%.0f", 0, NULL },
	{ "unmapped.ups.powersummary.warningcapacitylimit", 0, 0, "UPS.PowerSummary.WarningCapacityLimit", NULL, "%.0f", 0, NULL },

	/* end of structure. */
	{ NULL, 0, 0, NULL, NULL, NULL, 0, NULL }
};

static const char *liebertgxt4_format_model(HIDDevice_t *hd) {
	return hd->Product;
}

static const char *liebertgxt4_format_mfr(HIDDevice_t *hd) {
	return hd->Vendor ? hd->Vendor : "LiebertGXT4";
}

static const char *liebertgxt4_format_serial(HIDDevice_t *hd) {
	return hd->Serial;
}

/* this function allows the subdriver to "claim" a device: return 1 if
 * the device is supported by this subdriver, else 0. */
static int liebertgxt4_claim(HIDDevice_t *hd)
{
	int status = is_usb_device_supported(liebertgxt4_usb_device_table, hd);

	switch (status)
	{
	case POSSIBLY_SUPPORTED:
		/* by default, reject, unless the productid option is given */
		if (getval("productid")) {
			return 1;
		}
		possibly_supported("LiebertGXT4", hd);
		return 0;

	case SUPPORTED:
		return 1;

	case NOT_SUPPORTED:
	default:
		return 0;
	}
}

subdriver_t liebertgxt4_subdriver = {
	LIEBERTGXT4_HID_VERSION,
	liebertgxt4_claim,
	liebertgxt4_utab,
	liebertgxt4_hid2nut,
	liebertgxt4_format_model,
	liebertgxt4_format_mfr,
	liebertgxt4_format_serial,
	fix_report_desc,	/* may optionally be customized, see cps-hid.c for example */
};
// # cat drivers/liebertgxt4-hid.h

/* liebertgxt4-hid.h - subdriver to monitor LiebertGXT4 USB/HID devices with NUT
 *
 *  Copyright (C)
 *  2003 - 2009	Arnaud Quette <[email protected]>
 *  2005 - 2006	Peter Selinger <[email protected]>
 *  2008 - 2009	Arjen de Korte <[email protected]>
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 */

#ifndef LIEBERTGXT4_HID_H
#define LIEBERTGXT4_HID_H

#include "usbhid-ups.h"

extern subdriver_t liebertgxt4_subdriver;

#endif /* LIEBERTGXT4_HID_H */

EmnaX avatar Apr 19 '22 23:04 EmnaX

Thanks for the report, the segmentation fault is not good, and I found where it was, posting a fix. If you are not comfortable with git, in drivers/usbhid-ups.c file there is an instcmd() method. It logs "using Path" just before checking if (hidups_item == NULL) to try other commands - and it is this logging that can crash; removing the line should help for this bit of the issue.

On Thu, Apr 7, 2022, 04:51 EmnaX @.***> wrote:

I just noticed the output of dimes shows:

[ 3571.972650] usbhid-ups[2216]: segfault at 10 ip 00005577888b2510 sp 00007fff0a670ba0 error 4 in usbhid-ups[5577888b0000+13000] [ 3571.972658] Code: 00 bf 04 00 00 00 31 ed e8 fd ec 00 00 48 8d 1d e4 0b 01 00 e9 79 fe ff ff 90 4c 89 ed 48 8d 1d c6 0b 01 00 e9 69 fe ff ff 90 <48> 8b 48 10 48 8d 15 b5 1d 01 00 31 c0 48 8d 35 f4 0b 01 00 bf 03 [ 3572.687322] usb 2-1: usbfs: process 1348 (usbhid-ups) did not claim interface 0 before use

Not sure what that means but maybe this is causing the issue?

— Reply to this email directly, view it on GitHub https://github.com/networkupstools/nut/issues/1346#issuecomment-1091023634, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMPTFBOHMA55TFWIZKFSUTVDZES7ANCNFSM5SDTXRXA . You are receiving this because you commented.Message ID: @.***>

jimklimov avatar Oct 11 '22 07:10 jimklimov

Thanks for the report, the segmentation fault is not good, and I found where it was, posting a fix. If you are not comfortable with git, in drivers/usbhid-ups.c file there is an instcmd() method. It logs "using Path" just before checking if (hidups_item == NULL) to try other commands - and it is this logging that can crash; removing the line should help for this bit of the issue.

jimklimov avatar Oct 11 '22 07:10 jimklimov

Thanks for the report, the segmentation fault is not good, and I found where it was, posting a fix. If you are not comfortable with git, in drivers/usbhid-ups.c file there is an instcmd() method. It logs "using Path" just before checking if (hidups_item == NULL) to try other commands - and it is this logging that can crash; removing the line should help for this bit of the issue.

Thanks @jungeonkim, These comments look like copies of your original comment from Apr 7.

EmnaX avatar Oct 12 '22 15:10 EmnaX