Hello everyone, Charles suggested (about a week ago) that I repost to 
this list. I took a moment to run some additional tests ...
The basics:
-- UPS: Liebert PowerSure PSA 500 (from the 230 VAC / 50 Hz line)
-- Kernel: 2.6.11.5 (from sources), USB support (down to and including
    CONFIG_USB_HIDDEV) compiled in statically (not as a module)
-- Rest of OS: Basically still from the original SuSE 9.1 install :-/
-- Connection: USB cable (as supplied by Liebert)
-- NUT: Tried both 2.0.2 and 2.1.0
The situation:
1. INITIAL STATE (e.g., after reboot):
-- /proc/bus/usb/devices (excerpt below) lists kernel (usbhid) as the
    driver in use.
-- lsusb -v claims it "cannot get report descriptor".
-- newhidups driver doesn't recognize the UPS:
	# bin/newhidups -DD -a PowerSure
	Network UPS Tools: New USB/HID UPS driver 0.27 (2.1.0)
	debug level is '2'
	Opening new device (0000/0000)
	Opening new device (0000/0000)
	Opening new device (0000/0000)
	Opening new device (10AF/0001)
	Opening new device (0000/0000)
	Opening new device (0000/0000)
	found 0 (-1)
	No USB/HID UPS found
    (Changes to /etc/hotplug/ have been made as instructed. Note that
    the UPS *does* get probed (the non-zero device ID).)
-- hidups driver can connect to the UPS, but *dies* whenever it changes
    state:
	# bin/hidups -DD -a PowerSure
	[...]
	Detected Liebert Liebert PSA 500 FW:09
	on port /dev/usb/hiddev0
	addhidvalue(850066, battery.charge): obtained 0
	addhidvalue(850068, battery.runtime): obtained 0
	[... pulling mains cable]
	read: Input/output error
    (I'm still trying to obtain info from Liebert whether those two
    values plus ups.status are actually *all* the data the UPS offers.)
-- UPS has changed bus ID from 2:2 to 2:6 after the experiment. (Note
    that I pulled the cable *twice* to verify some detail ...)
2. RECLAIMED STATE
-- entered by running "get_descriptor 002 006 0 0 0 128 0x22 0" (code
at
    lists.alioth.debian.org/pipermail/nut-upsdev/2005-August/000088.html,
    output below)
-- /proc/bus/usb/devices (excerpt below) now lists "(none)" as driver
-- lsusb -v now lists the entire spiel (output below)
-- no change for newhidups driver (still doesn't recognize the UPS)
-- hidups driver can't connect to the UPS anymore:
	# bin/hidups -DD -a PowerSure
	Network UPS Tools: HID UPS driver 0.13 (2.1.0)
	Warning: This is an experimental driver.
	Some features may not function correctly.
	debug level is '2'
	hiddev path open /dev/usb/hiddev0: No such device
3. FUBARED STATE
-- Entered by once more pulling&reinserting mains cable, which again
    changes the device ID (to 2:8). (Will have to do more testing to see
    whether it can cause a direct Initial->FUBARed state change, too.)
-- /proc/bus/usb/devices (excerpt below) is back to "usbhid"
-- a simple "lsusb -v" lists the UPS (again with "cannot get
report
    descriptor"), while "lsusb -v -s 2:8" gives no output at all
:-?
-- still no change with the newhidups driver
-- hidups driver is back to initial state behavior, including the I/O
    error as soon as I pull the mains (which takes the device ID to 2:10,
    with no further change of state)
I could probably have the hidups driver started from inittab with a 
"respawn" label to get NUT running reliably (sorta), but that's as
ugly
as a kludge can get. ;-) Does anyone have an idea for an alternative?
Kind regards,
								J. Bern
=======================================================================
[initial state] # grep -A 4 -B 3 Liebert /proc/bus/usb/devices
T:  Bus=02 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  2 Spd=1.5 MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=10af ProdID=0001 Rev= 5.00
S:  Manufacturer=Liebert
S:  Product=Liebert PSA 500 FW:09
S:  SerialNumber=0507600440BA069
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr= 20mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbhid
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=248ms
=======================================================================
[initial state] # ./get_descriptor 002 006 0 0 0 128 0x22 0
Bus 002 device 006 configuration 0 interface 0 altsetting 0 endpoint 128 
descriptor 0x22 index 0:
  05 84 09 04 a1 01 05 86 09 26 a1 02 85 01 75 08 95 01 15 00 26 ff 00 09
  40 b1 02 85 02 09 42 b1 02 85 03 75 10 15 00 27 ff ff 00 00 09 43 b1 02
  85 04 09 44 b1 02 c0 05 86 09 29 a1 02 75 08 95 01 15 00 26 ff 00 85 0d
  09 75 b1 02 85 0e 09 76 b1 02 85 0f 09 7c b1 02 c0 05 86 09 27 a1 02 85
  10 75 08 95 01 15 00 26 ff 00 09 58 b1 02 85 11 09 5a b1 02 85 15 75 10
  95 01 15 00 27 ff ff 00 00 09 57 b1 02 85 16 09 56 b1 02 85 40 75 08 95
  01 15 00 26 ff 00 09 80 b1 02 85 41 09 81 b1 02 85 42 09 82 b1 02 85 43
  09 83 b1 02 85 44 09 84 b1 02 c0 05 86 09 2a a1 02 09 1a a1 02 85 18 75
  10 95 01 65 00 55 00 15 00 27 ff ff 00 00 09 30 b1 02 85 19 09 32 b1 02
  85 1a 75 08 15 00 26 ff 00 09 36 b1 02 c0 09 1c a1 02 85 1b 75 10 95 01
  15 00 27 ff ff 00 00 09 30 b1 02 85 1c 09 32 b1 02 85 1e 75 08 95 01 15
  00 26 ff 00 09 35 b1 02 c0 c0 05 86 09 10 a1 02 05 86 85 20 75 10 95 01
  15 00 27 ff ff 00 00 09 30 b1 02 85 21 75 08 95 01 15 00 26 ff 00 09 39
  b1 02 c0 05 86 09 28 a1 02 85 22 75 10 95 01 15 00 27 ff ff 00 00 09 21
  b1 02 85 23 75 08 95 01 15 00 26 ff 00 09 22 b1 02 c0 05 84 09 24 a1 00
  85 28 09 fe 79 14 75 08 95 01 15 00 26 ff 00 b1 02 85 29 09 ff 79 16 b1
  02 05 85 85 2a 09 89 79 1a b1 02 85 2b 09 8f 79 04 b1 02 85 2c 09 8b b1
  02 85 2d 09 44 75 08 95 01 81 82 09 44 b1 82 85 2e 09 45 81 82 09 45 b1
  82 05 84 85 30 09 40 75 10 95 01 27 fe ff 00 00 b1 02 85 31 09 30 b1 02
  85 32 09 31 75 08 95 01 26 ff 00 b1 02 05 85 85 33 09 2c b1 02 85 34 09
  66 81 82 09 66 b1 82 85 35 09 68 75 10 95 01 27 fe ff 00 00 81 82 09 68
  b1 82 85 36 75 08 95 01 26 ff 00 09 83 b1 02 85 37 09 67 b1 02 85 38 09
  8c b1 02 85 39 09 8e b1 02 85 3a 09 29 b1 82 85 3b 09 8d b1 02 85 3c 09
  d0 b1 82 09 d0 81 82 85 3d 09 42 81 82 09 42 b1 82 85 3e 05 84 09 69 81
  82 09 69 b1 82 05 85 85 3f 09 6c 75 10 95 01 27 fe ff 00 00 15 00 b1 82
  c0 c0
.........&....u.....&...@.....B....u...'.....C.....D......)..u.....&....
.u.....v.....|......'....u.....&...X.....Z....u.....'.....W.....V...@u..
...&.......A.....B.....C.....D........*........u...e.U...'.....0.....2..
..u...&...6.........u.....'.....0.....2....u.....&...5.............
u...
..'.....0...!u.....&...9......(..."u.....'.....!...#u.....&..."......$..
.(..y.u.....&.....)..y......*..y....+..y....,.....-.Du......D.....E...E.
....0.@u...'.......1.0...2.1u...&.......3.,...4.f...f...5.hu...'.......h
...6u...&.......7.g...8.....9.....:.)...;.....<.........=.B...B...>...i.
..i.....?.lu...'..........
=======================================================================
[reclaimed state] # grep -A 4 -B 3 Liebert /proc/bus/usb/devices
T:  Bus=02 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  6 Spd=1.5 MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=10af ProdID=0001 Rev= 5.00
S:  Manufacturer=Liebert
S:  Product=Liebert PSA 500 FW:09
S:  SerialNumber=0507600440BA069
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr= 20mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=(none)
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=248ms
=======================================================================
[reclaimed state] # lsusb -v -s 2:6
Bus 002 Device 006: ID 10af:0001
Device Descriptor:
   bLength                18
   bDescriptorType         1
   bcdUSB               1.10
   bDeviceClass            0 Interface
   bDeviceSubClass         0
   bDeviceProtocol         0
   bMaxPacketSize0         8
   idVendor           0x10af
   idProduct          0x0001
   bcdDevice            5.00
   iManufacturer           4 Liebert
   iProduct               20 Liebert PSA 500 FW:09
   iSerial                22 0507600440BA069
   bNumConfigurations      1
   Configuration Descriptor:
     bLength                 9
     bDescriptorType         2
     wTotalLength           34
     bNumInterfaces          1
     bConfigurationValue     1
     iConfiguration          0
     bmAttributes         0xc0
       Self Powered
     MaxPower               20mA
     Interface Descriptor:
       bLength                 9
       bDescriptorType         4
       bInterfaceNumber        0
       bAlternateSetting       0
       bNumEndpoints           1
       bInterfaceClass         3 Human Interface Devices
       bInterfaceSubClass      0 No Subclass
       bInterfaceProtocol      0 None
       iInterface              0
         HID Device Descriptor:
           bLength                 9
           bDescriptorType        33
           bcdHID               1.11
           bCountryCode           33
           bNumDescriptors         1
           bDescriptorType        34 Report
           wDescriptorLength     602
           Report Descriptor: (length is 602)
             Item(Global): Usage Page, data= [ 0x84 ] 132
                             Power Device Page
             Item(Local ): Usage, data= [ 0x04 ] 4
                             UPS
             Item(Main  ): Collection, data= [ 0x01 ] 1
                             Application
             Item(Global): Usage Page, data= [ 0x86 ] 134
                             Power Pages
             Item(Local ): Usage, data= [ 0x26 ] 38
                             (null)
             Item(Main  ): Collection, data= [ 0x02 ] 2
                             Logical
             Item(Global): Report ID, data= [ 0x01 ] 1
             Item(Global): Report Size, data= [ 0x08 ] 8
             Item(Global): Report Count, data= [ 0x01 ] 1
             Item(Global): Logical Minimum, data= [ 0x00 ] 0
             Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
             Item(Local ): Usage, data= [ 0x40 ] 64
                             (null)
             Item(Main  ): Feature, data= [ 0x02 ] 2
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position 
Non_Volatile Bitfield
             Item(Global): Report ID, data= [ 0x02 ] 2
             Item(Local ): Usage, data= [ 0x42 ] 66
                             (null)
             Item(Main  ): Feature, data= [ 0x02 ] 2
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position 
Non_Volatile Bitfield
             Item(Global): Report ID, data= [ 0x03 ] 3
             Item(Global): Report Size, data= [ 0x10 ] 16
             Item(Global): Logical Minimum, data= [ 0x00 ] 0
             Item(Global): Logical Maximum, data= [ 0xff 0xff 0x00 0x00 
] 65535
             Item(Local ): Usage, data= [ 0x43 ] 67
                             (null)
             Item(Main  ): Feature, data= [ 0x02 ] 2
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position 
Non_Volatile Bitfield
             Item(Global): Report ID, data= [ 0x04 ] 4
             Item(Local ): Usage, data= [ 0x44 ] 68
                             (null)
             Item(Main  ): Feature, data= [ 0x02 ] 2
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position 
Non_Volatile Bitfield
             Item(Main  ): End Collection, data=none
             Item(Global): Usage Page, data= [ 0x86 ] 134
                             Power Pages
             Item(Local ): Usage, data= [ 0x29 ] 41
                             (null)
             Item(Main  ): Collection, data= [ 0x02 ] 2
                             Logical
             Item(Global): Report Size, data= [ 0x08 ] 8
             Item(Global): Report Count, data= [ 0x01 ] 1
             Item(Global): Logical Minimum, data= [ 0x00 ] 0
             Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
             Item(Global): Report ID, data= [ 0x0d ] 13
             Item(Local ): Usage, data= [ 0x75 ] 117
                             (null)
             Item(Main  ): Feature, data= [ 0x02 ] 2
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position 
Non_Volatile Bitfield
             Item(Global): Report ID, data= [ 0x0e ] 14
             Item(Local ): Usage, data= [ 0x76 ] 118
                             (null)
             Item(Main  ): Feature, data= [ 0x02 ] 2
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position 
Non_Volatile Bitfield
             Item(Global): Report ID, data= [ 0x0f ] 15
             Item(Local ): Usage, data= [ 0x7c ] 124
                             (null)
             Item(Main  ): Feature, data= [ 0x02 ] 2
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position 
Non_Volatile Bitfield
             Item(Main  ): End Collection, data=none
             Item(Global): Usage Page, data= [ 0x86 ] 134
                             Power Pages
             Item(Local ): Usage, data= [ 0x27 ] 39
                             (null)
             Item(Main  ): Collection, data= [ 0x02 ] 2
                             Logical
             Item(Global): Report ID, data= [ 0x10 ] 16
             Item(Global): Report Size, data= [ 0x08 ] 8
             Item(Global): Report Count, data= [ 0x01 ] 1
             Item(Global): Logical Minimum, data= [ 0x00 ] 0
             Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
             Item(Local ): Usage, data= [ 0x58 ] 88
                             (null)
             Item(Main  ): Feature, data= [ 0x02 ] 2
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position 
Non_Volatile Bitfield
             Item(Global): Report ID, data= [ 0x11 ] 17
             Item(Local ): Usage, data= [ 0x5a ] 90
                             (null)
             Item(Main  ): Feature, data= [ 0x02 ] 2
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position 
Non_Volatile Bitfield
             Item(Global): Report ID, data= [ 0x15 ] 21
             Item(Global): Report Size, data= [ 0x10 ] 16
             Item(Global): Report Count, data= [ 0x01 ] 1
             Item(Global): Logical Minimum, data= [ 0x00 ] 0
             Item(Global): Logical Maximum, data= [ 0xff 0xff 0x00 0x00 
] 65535
             Item(Local ): Usage, data= [ 0x57 ] 87
                             (null)
             Item(Main  ): Feature, data= [ 0x02 ] 2
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position 
Non_Volatile Bitfield
             Item(Global): Report ID, data= [ 0x16 ] 22
             Item(Local ): Usage, data= [ 0x56 ] 86
                             (null)
             Item(Main  ): Feature, data= [ 0x02 ] 2
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position 
Non_Volatile Bitfield
             Item(Global): Report ID, data= [ 0x40 ] 64
             Item(Global): Report Size, data= [ 0x08 ] 8
             Item(Global): Report Count, data= [ 0x01 ] 1
             Item(Global): Logical Minimum, data= [ 0x00 ] 0
             Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
             Item(Local ): Usage, data= [ 0x80 ] 128
                             (null)
             Item(Main  ): Feature, data= [ 0x02 ] 2
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position 
Non_Volatile Bitfield
             Item(Global): Report ID, data= [ 0x41 ] 65
             Item(Local ): Usage, data= [ 0x81 ] 129
                             (null)
             Item(Main  ): Feature, data= [ 0x02 ] 2
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position 
Non_Volatile Bitfield
             Item(Global): Report ID, data= [ 0x42 ] 66
             Item(Local ): Usage, data= [ 0x82 ] 130
                             (null)
             Item(Main  ): Feature, data= [ 0x02 ] 2
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position 
Non_Volatile Bitfield
             Item(Global): Report ID, data= [ 0x43 ] 67
             Item(Local ): Usage, data= [ 0x83 ] 131
                             (null)
             Item(Main  ): Feature, data= [ 0x02 ] 2
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position 
Non_Volatile Bitfield
             Item(Global): Report ID, data= [ 0x44 ] 68
             Item(Local ): Usage, data= [ 0x84 ] 132
                             (null)
             Item(Main  ): Feature, data= [ 0x02 ] 2
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position 
Non_Volatile Bitfield
             Item(Main  ): End Collection, data=none
             Item(Global): Usage Page, data= [ 0x86 ] 134
                             Power Pages
             Item(Local ): Usage, data= [ 0x2a ] 42
                             (null)
             Item(Main  ): Collection, data= [ 0x02 ] 2
                             Logical
             Item(Local ): Usage, data= [ 0x1a ] 26
                             (null)
             Item(Main  ): Collection, data= [ 0x02 ] 2
                             Logical
             Item(Global): Report ID, data= [ 0x18 ] 24
             Item(Global): Report Size, data= [ 0x10 ] 16
             Item(Global): Report Count, data= [ 0x01 ] 1
             Item(Global): Unit, data= [ 0x00 ] 0
             Item(Global): Unit Exponent, data= [ 0x00 ] 0
             Item(Global): Logical Minimum, data= [ 0x00 ] 0
             Item(Global): Logical Maximum, data= [ 0xff 0xff 0x00 0x00 
] 65535
             Item(Local ): Usage, data= [ 0x30 ] 48
                             (null)
             Item(Main  ): Feature, data= [ 0x02 ] 2
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position 
Non_Volatile Bitfield
             Item(Global): Report ID, data= [ 0x19 ] 25
             Item(Local ): Usage, data= [ 0x32 ] 50
                             (null)
             Item(Main  ): Feature, data= [ 0x02 ] 2
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position 
Non_Volatile Bitfield
             Item(Global): Report ID, data= [ 0x1a ] 26
             Item(Global): Report Size, data= [ 0x08 ] 8
             Item(Global): Logical Minimum, data= [ 0x00 ] 0
             Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
             Item(Local ): Usage, data= [ 0x36 ] 54
                             (null)
             Item(Main  ): Feature, data= [ 0x02 ] 2
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position 
Non_Volatile Bitfield
             Item(Main  ): End Collection, data=none
             Item(Local ): Usage, data= [ 0x1c ] 28
                             (null)
             Item(Main  ): Collection, data= [ 0x02 ] 2
                             Logical
             Item(Global): Report ID, data= [ 0x1b ] 27
             Item(Global): Report Size, data= [ 0x10 ] 16
             Item(Global): Report Count, data= [ 0x01 ] 1
             Item(Global): Logical Minimum, data= [ 0x00 ] 0
             Item(Global): Logical Maximum, data= [ 0xff 0xff 0x00 0x00 
] 65535
             Item(Local ): Usage, data= [ 0x30 ] 48
                             (null)
             Item(Main  ): Feature, data= [ 0x02 ] 2
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position 
Non_Volatile Bitfield
             Item(Global): Report ID, data= [ 0x1c ] 28
             Item(Local ): Usage, data= [ 0x32 ] 50
                             (null)
             Item(Main  ): Feature, data= [ 0x02 ] 2
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position 
Non_Volatile Bitfield
             Item(Global): Report ID, data= [ 0x1e ] 30
             Item(Global): Report Size, data= [ 0x08 ] 8
             Item(Global): Report Count, data= [ 0x01 ] 1
             Item(Global): Logical Minimum, data= [ 0x00 ] 0
             Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
             Item(Local ): Usage, data= [ 0x35 ] 53
                             (null)
             Item(Main  ): Feature, data= [ 0x02 ] 2
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position 
Non_Volatile Bitfield
             Item(Main  ): End Collection, data=none
             Item(Main  ): End Collection, data=none
             Item(Global): Usage Page, data= [ 0x86 ] 134
                             Power Pages
             Item(Local ): Usage, data= [ 0x10 ] 16
                             (null)
             Item(Main  ): Collection, data= [ 0x02 ] 2
                             Logical
             Item(Global): Usage Page, data= [ 0x86 ] 134
                             Power Pages
             Item(Global): Report ID, data= [ 0x20 ] 32
             Item(Global): Report Size, data= [ 0x10 ] 16
             Item(Global): Report Count, data= [ 0x01 ] 1
             Item(Global): Logical Minimum, data= [ 0x00 ] 0
             Item(Global): Logical Maximum, data= [ 0xff 0xff 0x00 0x00 
] 65535
             Item(Local ): Usage, data= [ 0x30 ] 48
                             (null)
             Item(Main  ): Feature, data= [ 0x02 ] 2
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position 
Non_Volatile Bitfield
             Item(Global): Report ID, data= [ 0x21 ] 33
             Item(Global): Report Size, data= [ 0x08 ] 8
             Item(Global): Report Count, data= [ 0x01 ] 1
             Item(Global): Logical Minimum, data= [ 0x00 ] 0
             Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
             Item(Local ): Usage, data= [ 0x39 ] 57
                             (null)
             Item(Main  ): Feature, data= [ 0x02 ] 2
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position 
Non_Volatile Bitfield
             Item(Main  ): End Collection, data=none
             Item(Global): Usage Page, data= [ 0x86 ] 134
                             Power Pages
             Item(Local ): Usage, data= [ 0x28 ] 40
                             (null)
             Item(Main  ): Collection, data= [ 0x02 ] 2
                             Logical
             Item(Global): Report ID, data= [ 0x22 ] 34
             Item(Global): Report Size, data= [ 0x10 ] 16
             Item(Global): Report Count, data= [ 0x01 ] 1
             Item(Global): Logical Minimum, data= [ 0x00 ] 0
             Item(Global): Logical Maximum, data= [ 0xff 0xff 0x00 0x00 
] 65535
             Item(Local ): Usage, data= [ 0x21 ] 33
                             (null)
             Item(Main  ): Feature, data= [ 0x02 ] 2
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position 
Non_Volatile Bitfield
             Item(Global): Report ID, data= [ 0x23 ] 35
             Item(Global): Report Size, data= [ 0x08 ] 8
             Item(Global): Report Count, data= [ 0x01 ] 1
             Item(Global): Logical Minimum, data= [ 0x00 ] 0
             Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
             Item(Local ): Usage, data= [ 0x22 ] 34
                             (null)
             Item(Main  ): Feature, data= [ 0x02 ] 2
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position 
Non_Volatile Bitfield
             Item(Main  ): End Collection, data=none
             Item(Global): Usage Page, data= [ 0x84 ] 132
                             Power Device Page
             Item(Local ): Usage, data= [ 0x24 ] 36
                             Power Summary
             Item(Main  ): Collection, data= [ 0x00 ] 0
                             Physical
             Item(Global): Report ID, data= [ 0x28 ] 40
             Item(Local ): Usage, data= [ 0xfe ] 254
                             iProduct
             Item(Local ): String Index, data= [ 0x14 ] 20
             Item(Global): Report Size, data= [ 0x08 ] 8
             Item(Global): Report Count, data= [ 0x01 ] 1
             Item(Global): Logical Minimum, data= [ 0x00 ] 0
             Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
             Item(Main  ): Feature, data= [ 0x02 ] 2
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position 
Non_Volatile Bitfield
             Item(Global): Report ID, data= [ 0x29 ] 41
             Item(Local ): Usage, data= [ 0xff ] 255
                             iSerialNumber
             Item(Local ): String Index, data= [ 0x16 ] 22
             Item(Main  ): Feature, data= [ 0x02 ] 2
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position 
Non_Volatile Bitfield
             Item(Global): Usage Page, data= [ 0x85 ] 133
                             Battery System Page
             Item(Global): Report ID, data= [ 0x2a ] 42
             Item(Local ): Usage, data= [ 0x89 ] 137
                             iDeviceChemistry
             Item(Local ): String Index, data= [ 0x1a ] 26
             Item(Main  ): Feature, data= [ 0x02 ] 2
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position 
Non_Volatile Bitfield
             Item(Global): Report ID, data= [ 0x2b ] 43
             Item(Local ): Usage, data= [ 0x8f ] 143
                             iOEMInformation
             Item(Local ): String Index, data= [ 0x04 ] 4
             Item(Main  ): Feature, data= [ 0x02 ] 2
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position 
Non_Volatile Bitfield
             Item(Global): Report ID, data= [ 0x2c ] 44
             Item(Local ): Usage, data= [ 0x8b ] 139
                             Rechargeable
             Item(Main  ): Feature, data= [ 0x02 ] 2
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position 
Non_Volatile Bitfield
             Item(Global): Report ID, data= [ 0x2d ] 45
             Item(Local ): Usage, data= [ 0x44 ] 68
                             Charging
             Item(Global): Report Size, data= [ 0x08 ] 8
             Item(Global): Report Count, data= [ 0x01 ] 1
             Item(Main  ): Input, data= [ 0x82 ] 130
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position Volatile 
Bitfield
             Item(Local ): Usage, data= [ 0x44 ] 68
                             Charging
             Item(Main  ): Feature, data= [ 0x82 ] 130
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position Volatile 
Bitfield
             Item(Global): Report ID, data= [ 0x2e ] 46
             Item(Local ): Usage, data= [ 0x45 ] 69
                             Discharging
             Item(Main  ): Input, data= [ 0x82 ] 130
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position Volatile 
Bitfield
             Item(Local ): Usage, data= [ 0x45 ] 69
                             Discharging
             Item(Main  ): Feature, data= [ 0x82 ] 130
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position Volatile 
Bitfield
             Item(Global): Usage Page, data= [ 0x84 ] 132
                             Power Device Page
             Item(Global): Report ID, data= [ 0x30 ] 48
             Item(Local ): Usage, data= [ 0x40 ] 64
                             Config Voltage
             Item(Global): Report Size, data= [ 0x10 ] 16
             Item(Global): Report Count, data= [ 0x01 ] 1
             Item(Global): Logical Maximum, data= [ 0xfe 0xff 0x00 0x00 
] 65534
             Item(Main  ): Feature, data= [ 0x02 ] 2
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position 
Non_Volatile Bitfield
             Item(Global): Report ID, data= [ 0x31 ] 49
             Item(Local ): Usage, data= [ 0x30 ] 48
                             Voltage
             Item(Main  ): Feature, data= [ 0x02 ] 2
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position 
Non_Volatile Bitfield
             Item(Global): Report ID, data= [ 0x32 ] 50
             Item(Local ): Usage, data= [ 0x31 ] 49
                             Current
             Item(Global): Report Size, data= [ 0x08 ] 8
             Item(Global): Report Count, data= [ 0x01 ] 1
             Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
             Item(Main  ): Feature, data= [ 0x02 ] 2
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position 
Non_Volatile Bitfield
             Item(Global): Usage Page, data= [ 0x85 ] 133
                             Battery System Page
             Item(Global): Report ID, data= [ 0x33 ] 51
             Item(Local ): Usage, data= [ 0x2c ] 44
                             Capacity Mode
             Item(Main  ): Feature, data= [ 0x02 ] 2
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position 
Non_Volatile Bitfield
             Item(Global): Report ID, data= [ 0x34 ] 52
             Item(Local ): Usage, data= [ 0x66 ] 102
                             Remaining Capacity
             Item(Main  ): Input, data= [ 0x82 ] 130
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position Volatile 
Bitfield
             Item(Local ): Usage, data= [ 0x66 ] 102
                             Remaining Capacity
             Item(Main  ): Feature, data= [ 0x82 ] 130
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position Volatile 
Bitfield
             Item(Global): Report ID, data= [ 0x35 ] 53
             Item(Local ): Usage, data= [ 0x68 ] 104
                             Run Time To Empty
             Item(Global): Report Size, data= [ 0x10 ] 16
             Item(Global): Report Count, data= [ 0x01 ] 1
             Item(Global): Logical Maximum, data= [ 0xfe 0xff 0x00 0x00 
] 65534
             Item(Main  ): Input, data= [ 0x82 ] 130
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position Volatile 
Bitfield
             Item(Local ): Usage, data= [ 0x68 ] 104
                             Run Time To Empty
             Item(Main  ): Feature, data= [ 0x82 ] 130
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position Volatile 
Bitfield
             Item(Global): Report ID, data= [ 0x36 ] 54
             Item(Global): Report Size, data= [ 0x08 ] 8
             Item(Global): Report Count, data= [ 0x01 ] 1
             Item(Global): Logical Maximum, data= [ 0xff 0x00 ] 255
             Item(Local ): Usage, data= [ 0x83 ] 131
                             Design Capacity
             Item(Main  ): Feature, data= [ 0x02 ] 2
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position 
Non_Volatile Bitfield
             Item(Global): Report ID, data= [ 0x37 ] 55
             Item(Local ): Usage, data= [ 0x67 ] 103
                             Full Charge Capacity
             Item(Main  ): Feature, data= [ 0x02 ] 2
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position 
Non_Volatile Bitfield
             Item(Global): Report ID, data= [ 0x38 ] 56
             Item(Local ): Usage, data= [ 0x8c ] 140
                             Warning Capacity Limit
             Item(Main  ): Feature, data= [ 0x02 ] 2
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position 
Non_Volatile Bitfield
             Item(Global): Report ID, data= [ 0x39 ] 57
             Item(Local ): Usage, data= [ 0x8e ] 142
                             Capacity Granularity 2
             Item(Main  ): Feature, data= [ 0x02 ] 2
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position 
Non_Volatile Bitfield
             Item(Global): Report ID, data= [ 0x3a ] 58
             Item(Local ): Usage, data= [ 0x29 ] 41
                             Remaining Capacity Limit
             Item(Main  ): Feature, data= [ 0x82 ] 130
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position Volatile 
Bitfield
             Item(Global): Report ID, data= [ 0x3b ] 59
             Item(Local ): Usage, data= [ 0x8d ] 141
                             Capacity Granularity 1
             Item(Main  ): Feature, data= [ 0x02 ] 2
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position 
Non_Volatile Bitfield
             Item(Global): Report ID, data= [ 0x3c ] 60
             Item(Local ): Usage, data= [ 0xd0 ] 208
                             AC Present
             Item(Main  ): Feature, data= [ 0x82 ] 130
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position Volatile 
Bitfield
             Item(Local ): Usage, data= [ 0xd0 ] 208
                             AC Present
             Item(Main  ): Input, data= [ 0x82 ] 130
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position Volatile 
Bitfield
             Item(Global): Report ID, data= [ 0x3d ] 61
             Item(Local ): Usage, data= [ 0x42 ] 66
                             Below Remaining Capacity Limit
             Item(Main  ): Input, data= [ 0x82 ] 130
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position Volatile 
Bitfield
             Item(Local ): Usage, data= [ 0x42 ] 66
                             Below Remaining Capacity Limit
             Item(Main  ): Feature, data= [ 0x82 ] 130
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position Volatile 
Bitfield
             Item(Global): Report ID, data= [ 0x3e ] 62
             Item(Global): Usage Page, data= [ 0x84 ] 132
                             Power Device Page
             Item(Local ): Usage, data= [ 0x69 ] 105
                             Shutdown  Imminent
             Item(Main  ): Input, data= [ 0x82 ] 130
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position Volatile 
Bitfield
             Item(Local ): Usage, data= [ 0x69 ] 105
                             Shutdown  Imminent
             Item(Main  ): Feature, data= [ 0x82 ] 130
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position Volatile 
Bitfield
             Item(Global): Usage Page, data= [ 0x85 ] 133
                             Battery System Page
             Item(Global): Report ID, data= [ 0x3f ] 63
             Item(Local ): Usage, data= [ 0x6c ] 108
                             (null)
             Item(Global): Report Size, data= [ 0x10 ] 16
             Item(Global): Report Count, data= [ 0x01 ] 1
             Item(Global): Logical Maximum, data= [ 0xfe 0xff 0x00 0x00 
] 65534
             Item(Global): Logical Minimum, data= [ 0x00 ] 0
             Item(Main  ): Feature, data= [ 0x82 ] 130
                             Data Variable Absolute No_Wrap Linear
                             Preferred_State No_Null_Position Volatile 
Bitfield
             Item(Main  ): End Collection, data=none
             Item(Main  ): End Collection, data=none
       Endpoint Descriptor:
         bLength                 7
         bDescriptorType         5
         bEndpointAddress     0x81  EP 1 IN
         bmAttributes            3
           Transfer Type            Interrupt
           Synch Type               none
         wMaxPacketSize          8
         bInterval             248
   Language IDs: (length=4)
      0409 English(US)
=======================================================================
[FUBARed state] # grep -A 4 -B 3 Liebert /proc/bus/usb/devices
T:  Bus=02 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  8 Spd=1.5 MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=10af ProdID=0001 Rev= 5.00
S:  Manufacturer=Liebert
S:  Product=Liebert PSA 500 FW:09
S:  SerialNumber=0507600440BA069
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr= 20mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbhid
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=248ms
Jochen Bern wrote:> > Hello everyone, Charles suggested (about a week ago) that I repost to > this list. I took a moment to run some additional tests ... > > The basics: > -- UPS: Liebert PowerSure PSA 500 (from the 230 VAC / 50 Hz line) > -- Kernel: 2.6.11.5 (from sources), USB support (down to and including > CONFIG_USB_HIDDEV) compiled in statically (not as a module) > -- Rest of OS: Basically still from the original SuSE 9.1 install :-/ > -- Connection: USB cable (as supplied by Liebert) > -- NUT: Tried both 2.0.2 and 2.1.0 > > The situation: > > 1. INITIAL STATE (e.g., after reboot): > > -- /proc/bus/usb/devices (excerpt below) lists kernel (usbhid) as the > driver in use.This means that the kernel has attached a driver to your USB. At any time, at most one driver can be attached to a USB device, which is either a kernel driver or a user-space driver (such as NUT).> -- lsusb -v claims it "cannot get report descriptor".This is because the kernel driver is attached, and lsusb can't attach itself to this device.> -- newhidups driver doesn't recognize the UPS: > # bin/newhidups -DD -a PowerSure > Network UPS Tools: New USB/HID UPS driver 0.27 (2.1.0) > > debug level is '2' > Opening new device (0000/0000) > Opening new device (0000/0000) > Opening new device (0000/0000) > Opening new device (10AF/0001) > Opening new device (0000/0000) > Opening new device (0000/0000) > found 0 (-1) > No USB/HID UPS found > (Changes to /etc/hotplug/ have been made as instructed. Note that > the UPS *does* get probed (the non-zero device ID).)This is to be expected. The newhidups / libusb code is fairly ugly in that it is not modular - when you add support for a new device, you need to edit a million files. You should first look at the file driver/libusb.c. In line 116 or thereabouts, you will see a statement such as: if ((dev->descriptor.idVendor == MGE_UPS_SYSTEMS) || (dev->descriptor.idVendor == APC)) This means that in nut-2.0.2, *only* MGE and APC devices will be opened. Maybe in nut-2.1.0 there could be additional vendors listed there. The first thing you should do is change this to if ((dev->descriptor.idVendor == MGE_UPS_SYSTEMS) || (dev->descriptor.idVendor == APC) || (dev->descriptor.idVendor == LIEBERT) ) and then you should also add a line under "Supported Nanufacturers IDs" in drivers/newhidups.h: #define LIEBERT 0x10af /* All models */ At this point, at least your device should be opened, although not much useful will happen yet. If you run your "bin/newhidups -DD -a PowerSure", at least you should get a listing of the UPS's Usage Tree. Next, look at line 391 (or thereabouts) of drivers/newhidups.c. You will see a case distinction: switch (hd->VendorID) { case MGE_UPS_SYSTEMS: ... break; case APC: ... break; case MUSTEK: case TRIPPLITE: case UNITEK: default: ... fatalx("Aborting"); break; } You should add your vendor here as well. Then you also need to add a new file drivers/liebert-hid.h, modeled on drivers/apc-hid.h, changing APC to LIEBERT everywhere, and making sure this new file is also #include'd in drivers/newhidups.c. Then you have to customize that file.> -- hidups driver can connect to the UPS, but *dies* whenever it changes > state: > # bin/hidups -DD -a PowerSure > [...] > Detected Liebert Liebert PSA 500 FW:09 > on port /dev/usb/hiddev0 > addhidvalue(850066, battery.charge): obtained 0 > addhidvalue(850068, battery.runtime): obtained 0 > [... pulling mains cable] > read: Input/output error > (I'm still trying to obtain info from Liebert whether those two > values plus ups.status are actually *all* the data the UPS offers.) > -- UPS has changed bus ID from 2:2 to 2:6 after the experiment. (Note > that I pulled the cable *twice* to verify some detail ...)That is normal. When you unplug and re-plug the UPS, it gets assigned a new bus ID. This can also sometimes be caused by software that "resets" the device.> 2. RECLAIMED STATE > > -- entered by running "get_descriptor 002 006 0 0 0 128 0x22 0" (code at > lists.alioth.debian.org/pipermail/nut-upsdev/2005-August/000088.html, > output below)The get_descriptor program detaches the kernel driver (see above) before it opens the device. This is the reason that *after* running get_descriptor, you suddenly get a lot more useful output from lsusb and other such programs.> -- /proc/bus/usb/devices (excerpt below) now lists "(none)" as driverYes, because the kernel driver has been detached by get_descriptor.> -- lsusb -v now lists the entire spiel (output below) > -- no change for newhidups driver (still doesn't recognize the UPS) > -- hidups driver can't connect to the UPS anymore: > # bin/hidups -DD -a PowerSure > Network UPS Tools: HID UPS driver 0.13 (2.1.0) > > Warning: This is an experimental driver. > Some features may not function correctly. > > debug level is '2' > hiddev path open /dev/usb/hiddev0: No such deviceI suspect that unlike newhidups, the old hidups actually relies on the kernel driver, as it is probably the kernel driver that provides the /dev/usb/hiddev0 interface.> 3. FUBARED STATE > > -- Entered by once more pulling&reinserting mains cable, which again > changes the device ID (to 2:8). (Will have to do more testing to see > whether it can cause a direct Initial->FUBARed state change, too.) > -- /proc/bus/usb/devices (excerpt below) is back to "usbhid" > -- a simple "lsusb -v" lists the UPS (again with "cannot get report > descriptor"), while "lsusb -v -s 2:8" gives no output at all :-? > -- still no change with the newhidups driver > -- hidups driver is back to initial state behavior, including the I/O > error as soon as I pull the mains (which takes the device ID to 2:10, > with no further change of state) > > I could probably have the hidups driver started from inittab with a > "respawn" label to get NUT running reliably (sorta), but that's as ugly > as a kludge can get. ;-) Does anyone have an idea for an alternative? > > Kind regards, > J. Bern > > =======================================================================> > [initial state] # grep -A 4 -B 3 Liebert /proc/bus/usb/devices > T: Bus=02 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 2 Spd=1.5 MxCh= 0 > D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 > P: Vendor=10af ProdID=0001 Rev= 5.00 > S: Manufacturer=Liebert > S: Product=Liebert PSA 500 FW:09 > S: SerialNumber=0507600440BA069 > C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr= 20mA > I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=usbhid > E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=248ms > > =======================================================================> > [initial state] # ./get_descriptor 002 006 0 0 0 128 0x22 0 > Bus 002 device 006 configuration 0 interface 0 altsetting 0 endpoint 128 > descriptor 0x22 index 0: > > 05 84 09 04 a1 01 05 86 09 26 a1 02 85 01 75 08 95 01 15 00 26 ff 00 09 > 40 b1 02 85 02 09 42 b1 02 85 03 75 10 15 00 27 ff ff 00 00 09 43 b1 02 > 85 04 09 44 b1 02 c0 05 86 09 29 a1 02 75 08 95 01 15 00 26 ff 00 85 0d > 09 75 b1 02 85 0e 09 76 b1 02 85 0f 09 7c b1 02 c0 05 86 09 27 a1 02 85 > 10 75 08 95 01 15 00 26 ff 00 09 58 b1 02 85 11 09 5a b1 02 85 15 75 10 > 95 01 15 00 27 ff ff 00 00 09 57 b1 02 85 16 09 56 b1 02 85 40 75 08 95 > 01 15 00 26 ff 00 09 80 b1 02 85 41 09 81 b1 02 85 42 09 82 b1 02 85 43 > 09 83 b1 02 85 44 09 84 b1 02 c0 05 86 09 2a a1 02 09 1a a1 02 85 18 75 > 10 95 01 65 00 55 00 15 00 27 ff ff 00 00 09 30 b1 02 85 19 09 32 b1 02 > 85 1a 75 08 15 00 26 ff 00 09 36 b1 02 c0 09 1c a1 02 85 1b 75 10 95 01 > 15 00 27 ff ff 00 00 09 30 b1 02 85 1c 09 32 b1 02 85 1e 75 08 95 01 15 > 00 26 ff 00 09 35 b1 02 c0 c0 05 86 09 10 a1 02 05 86 85 20 75 10 95 01 > 15 00 27 ff ff 00 00 09 30 b1 02 85 21 75 08 95 01 15 00 26 ff 00 09 39 > b1 02 c0 05 86 09 28 a1 02 85 22 75 10 95 01 15 00 27 ff ff 00 00 09 21 > b1 02 85 23 75 08 95 01 15 00 26 ff 00 09 22 b1 02 c0 05 84 09 24 a1 00 > 85 28 09 fe 79 14 75 08 95 01 15 00 26 ff 00 b1 02 85 29 09 ff 79 16 b1 > 02 05 85 85 2a 09 89 79 1a b1 02 85 2b 09 8f 79 04 b1 02 85 2c 09 8b b1 > 02 85 2d 09 44 75 08 95 01 81 82 09 44 b1 82 85 2e 09 45 81 82 09 45 b1 > 82 05 84 85 30 09 40 75 10 95 01 27 fe ff 00 00 b1 02 85 31 09 30 b1 02 > 85 32 09 31 75 08 95 01 26 ff 00 b1 02 05 85 85 33 09 2c b1 02 85 34 09 > 66 81 82 09 66 b1 82 85 35 09 68 75 10 95 01 27 fe ff 00 00 81 82 09 68 > b1 82 85 36 75 08 95 01 26 ff 00 09 83 b1 02 85 37 09 67 b1 02 85 38 09 > 8c b1 02 85 39 09 8e b1 02 85 3a 09 29 b1 82 85 3b 09 8d b1 02 85 3c 09 > d0 b1 82 09 d0 81 82 85 3d 09 42 81 82 09 42 b1 82 85 3e 05 84 09 69 81 > 82 09 69 b1 82 05 85 85 3f 09 6c 75 10 95 01 27 fe ff 00 00 15 00 b1 82 > c0 c0This is a good report descriptor. You should be able to get a useable Usage Tree if you run newhidups with debug level 2 as above, after making the above modifications. Comment to newhidups developers: -------------------------------- The usage tree that he will generate will contain a lot of Usages such as 00860044, which are (1) wrongly encoded (the manufacturer should have used ff86XXXX), and (2) already taken (probably with different meanings) by Belkin. Perhaps it is time to modularize the newhidups.c code, so that all manufacturer specific code goes in a single file (say XXX-hid.c), rather than being spread out over several case distrinctions sprinkled throughout the code (newhidups.h, newhidups.c, libusb.c, libhid.c, ...). In particular, the manufacturer specific Usage tags most definitely do not belong in libhid.c; soon these tags will start to overlap between different manufacturers. Re-organizing the code along these lines would not be too difficult, but it would make adding new devices much easier. Also, the structure of *.c and *.h files should probably be cleaned up so that *.h files contain only headers (rather than code and data, as is currently the case). I guess any decision on that will have to wait until Arnaud gets back from vacation. -- Peter
Update from Liebert: They referred me to an external service company where I talked to someone who actually writes purpose built monitoring software for (the more expensive) Liebert UPSes. He commented that a) even in Liebert's own MultiLink software, communication via USBHID is not quite polished, nor currently a top priority of their developers, to say it politely; and b) the communication option bound to offer the most data is neither USB nor SNMP (where supported), but RS232. (Unfortunately, when I try the RS232 cable and the liebert driver, it never even gets aware of the (simulated) power outages, much less nets loads of information ...) Peter Selinger wrote:> Jochen Bern wrote: > > -- lsusb -v claims it "cannot get report descriptor". > This is because the kernel driver is attached, and lsusb can't attach > itself to this device.Sorry, I should've included a larger part of the output; it's *only* the report descriptor that lsusb cannot access/read, as in: | # lsusb -v -s 2:21 | grep -A 1 -B 2 -i ' descriptor' | Bus 002 Device 021: ID 10af:0001 | Device Descriptor: | bLength 18 | bDescriptorType 1 | -- | bNumConfigurations 1 | Configuration Descriptor: | bLength 9 | bDescriptorType 2 | -- | MaxPower 20mA | Interface Descriptor: | bLength 9 | bDescriptorType 4 | -- | iInterface 0 | HID Device Descriptor: | bLength 9 | bDescriptorType 33 | -- | wDescriptorLength 602 | cannot get report descriptor | Endpoint Descriptor: | bLength 7 | bDescriptorType 5> and then you should also add a line under "Supported Nanufacturers > IDs" in drivers/newhidups.h: > #define LIEBERT 0x10af /* All models */(There's a separate set of "#define"s in drivers/libusb.c that needed a similar update.)> At this point, at least your device should be opened, although not > much useful will happen yet. If you run your "bin/newhidups -DD -a > PowerSure", at least you should get a listing of the UPS's Usage Tree.Output at the end of this email.> Then you also need to add a > new file drivers/liebert-hid.h, modeled on drivers/apc-hid.h, changing > APC to LIEBERT everywhere, and making sure this new file is also > #include'd in drivers/newhidups.c. Then you have to customize that file.Umh ... I suppose that's the part where I'm supposed to pull a Liebert internal tech manual, listing their vendor-specific encodings, out of some pocket ... ? :-}> > [... pulling mains cable] > > -- UPS has changed bus ID from 2:2 to 2:6 after the experiment. (Note > > that I pulled the cable *twice* to verify some detail ...) > That is normal. When you unplug and re-plug the UPS, it gets assigned > a new bus ID. This can also sometimes be caused by software that > "resets" the device.I'm sorta stumped. If it's normal that the USB communication gets reset when I yank the *POWER* cable (to simulate an outage), and also (I assume) normal that the driver cannot keep talking to the hiddev device it has open()ed because of the reset, how will the USBHID drivers *ever* be able to detect online <--> on battery switchovers without throwing an I/O error message? Charles Lepple wrote:> For the record, the problem with the kernel HID interface is that it > does not allow access to nested HID elements as seen in many high-end > HID UPSes. (I think this has been fixed in later 2.6.x kernels, but > don't quote me on that.)(Will try a newer kernel version as soon as time permits.) Regards, J. Bern # bin/newhidups -DD -a PowerSure debug level is '2' Opening new device (0000/0000) Opening new device (0000/0000) Opening new device (0000/0000) Opening new device (10AF/0001) Found 0x10af failed to claim USB device, trying 2 more time(s)... detaching kernel driver from USB device... trying again to claim USB device... - Manufacturer : Liebert - Product : Liebert PSA 500 FW:09 - Serial Number: 0507600440BA069 HID descriptor retrieved (Reportlen = 602) Report descriptor retrieved (Reportlen = 602) found 1 (602) Network UPS Tools: New USB/HID UPS driver 0.27 (2.1.0) Report Descriptor size = 602 Detected an UPS: Liebert/Liebert PSA 500 FW:09 Manufacturer not supported! Contact the driver author <arnaud.quette@free.fr / @mgeups.com> with the below information Path: UPS.00860026.00860042, Type: Feature Path: UPS.00860026.00860043, Type: Feature Path: UPS.00860026.00860044, Type: Feature Path: UPS.00860029.00860075, Type: Feature Path: UPS.00860029.BUPDelayBeforeStartup, Type: Feature Path: UPS.00860029.0086007c, Type: Feature Path: UPS.00860027.00860058, Type: Feature Path: UPS.00860027.0086005a, Type: Feature Path: UPS.00860027.00860057, Type: Feature Path: UPS.00860027.00860056, Type: Feature Path: UPS.00860027.00860080, Type: Feature Path: UPS.00860027.00860081, Type: Feature Path: UPS.00860027.00860082, Type: Feature Path: UPS.00860027.00860083, Type: Feature Path: UPS.00860027.00860084, Type: Feature Path: UPS.0086002a.0086001a.00860030, Type: Feature Path: UPS.0086002a.0086001a.00860032, Type: Feature Path: UPS.0086002a.0086001a.00860036, Type: Feature Path: UPS.0086002a.0086001c.00860030, Type: Feature Path: UPS.0086002a.0086001c.00860032, Type: Feature Path: UPS.0086002a.0086001c.00860035, Type: Feature Path: UPS.BUPSelfTest.00860030, Type: Feature Path: UPS.BUPSelfTest.00860039, Type: Feature Path: UPS.00860028.00860021, Type: Feature Path: UPS.00860028.00860022, Type: Feature Can't retrieve Report 40 (-75/75) Path: UPS.PowerSummary.iProduct, Type: Feature Can't retrieve Report 41 (-71/71) Path: UPS.PowerSummary.iSerialNumber, Type: Feature Can't retrieve Report 42 (-71/71) Path: UPS.PowerSummary.iDeviceChemistry, Type: Feature Can't retrieve Report 43 (-71/71) Path: UPS.PowerSummary.iOEMInformation, Type: Feature Can't retrieve Report 44 (-71/71) Path: UPS.PowerSummary.Rechargeable, Type: Feature Can't retrieve Report 45 (-71/71) Path: UPS.PowerSummary.Charging, Type: Input Can't retrieve Report 45 (-71/71) Path: UPS.PowerSummary.Charging, Type: Feature Can't retrieve Report 46 (-71/71) Path: UPS.PowerSummary.Discharging, Type: Input Can't retrieve Report 46 (-71/71) Path: UPS.PowerSummary.Discharging, Type: Feature Can't retrieve Report 48 (-71/71) Path: UPS.PowerSummary.ConfigVoltage, Type: Feature Can't retrieve Report 49 (-71/71) Path: UPS.PowerSummary.Voltage, Type: Feature Can't retrieve Report 50 (-71/71) Path: UPS.PowerSummary.Current, Type: Feature Can't retrieve Report 51 (-71/71) Path: UPS.PowerSummary.CapacityMode, Type: Feature Can't retrieve Report 52 (-71/71) Path: UPS.PowerSummary.RemainingCapacity, Type: Input Can't retrieve Report 52 (-71/71) Path: UPS.PowerSummary.RemainingCapacity, Type: Feature Can't retrieve Report 53 (-71/71) Path: UPS.PowerSummary.RunTimeToEmpty, Type: Input Can't retrieve Report 53 (-71/71) Path: UPS.PowerSummary.RunTimeToEmpty, Type: Feature Can't retrieve Report 54 (-71/71) Path: UPS.PowerSummary.DesignCapacity, Type: Feature Can't retrieve Report 55 (-71/71) Path: UPS.PowerSummary.FullChargeCapacity, Type: Feature Can't retrieve Report 56 (-71/71) Path: UPS.PowerSummary.WarningCapacityLimit, Type: Feature Can't retrieve Report 57 (-71/71) Path: UPS.PowerSummary.CapacityGranularity2, Type: Feature Can't retrieve Report 58 (-71/71) Path: UPS.PowerSummary.RemainingCapacityLimit, Type: Feature Can't retrieve Report 59 (-71/71) Path: UPS.PowerSummary.CapacityGranularity1, Type: Feature Can't retrieve Report 60 (-71/71) Path: UPS.PowerSummary.ACPresent, Type: Feature Can't retrieve Report 60 (-71/71) Path: UPS.PowerSummary.ACPresent, Type: Input Can't retrieve Report 61 (-108/108) Path: UPS.PowerSummary.BelowRemainingCapacityLimit, Type: Input Can't retrieve Report 61 (-19/19) Path: UPS.PowerSummary.BelowRemainingCapacityLimit, Type: Feature Can't retrieve Report 62 (-19/19) Path: UPS.PowerSummary.ShutdownImminent, Type: Input Can't retrieve Report 62 (-19/19) Path: UPS.PowerSummary.ShutdownImminent, Type: Feature Path: UPS.PowerSummary.0085006c, Type: Feature Aborting
Jochen, Having been in contact with Liebert and a Liebert UPS developer, can you get a copy of the ESP-II protocol used for Liebert RS-232 communications? I have a Liebert UPS, and am able to monitor with their MultiLink software, which is not that great. I actually have not tried the NUT USB interface yet, but it seems that RS-232 might be a better choice than USB, if you have the right cable and a serial port. Thanks, Joe Krahn