[Nut-upsuser] usbhid-ups not finding CyberPower PP1100 on Fedora 16
Don Lewis
dl-nut at catspoiler.org
Wed Jul 25 05:22:27 UTC 2012
On 24 Jul, Charles Lepple wrote:
> On Jul 20, 2012, at 5:57 PM, Don Lewis wrote:
>
>> I'm trying to get a CyberPower PP1100 working with NUT on a Fedora 16
>> system and not having much luck.
>>
>> Kernel:
>> 3.4.4-4.fc16.x86_64 #1 SMP Thu Jul 5 20:01:38 UTC 2012 x86_64
>> x86_64 x86_64 GNU/Linux
> [...]
>
>> Jul 20 13:41:23 myth2 kernel: [ 9611.897362] generic-usb 0003:0764:0005.0006: usb_submit_urb(ctrl) failed: -1
>> Jul 20 13:41:23 myth2 kernel: [ 9611.897698] generic-usb 0003:0764:0005.0006: timeout initializing reports
> [...]
>> This is what lsusb says:
>> Bus 001 Device 009: ID 0764:0005 Cyber Power System, Inc. Cyber Power UPS
> [...]
>> wDescriptorLength 90
>> Warning: incomplete report descriptor
>> Report Descriptor: (length is 7)
>
> The fact that the kernel is printing a timeout error means that something
> wrong is going on well before NUT tries to attach to the device.
>
> What I would do is try to find an older Fedora live CD (or even a Knoppix
> one, if the kernel versions are close) and try to find the latest kernel
> which doesn't trigger that timeout error in dmesg. Or maybe it has been
> fixed in a later Fedora kernel - but I saw a 3.4 kernel mentioned in a
> Debian bug report with the same error message, so it's hard to say.
>
> Hopefully lsusb will be able to retrieve the descriptors if the kernel
> doesn't trip over them, and if that works, NUT also stands a fair chance
> of reading the descriptors as well.
It may be a while before I can take the system down to experiment with
different kernel versions.
Most reports of the kernel timeout problem that I ran across in my
searches seemed to relate to a missing HID_QUIRK_NO_INIT_REPORTS quirk
for the device.
I did try replacing the USB cable, and bypassing the USB hub that I was
using by connecting the UPS directly to one of the USB ports on the
motherboard. This didn't seem to make any difference.
Just for grins, I downloaded Cyberpower's PowerPanel for Linux and it is
able to find the UPS.
# pwrstat -status
The UPS information shows as following:
Properties:
Model Name................... PP1100
Firmware Number.............. 1.610
Rating Voltage............... 120 V
Rating Power................. 700 Watt(1100 VA)
Current UPS status:
State........................ Normal
Power Supply by.............. Utility Power
Utility Voltage.............. 121 V
Output Voltage............... 121 V
Utility Frequency............ 60.0 Hz
Battery Capacity............. 100 %
Remaining Runtime............ 35 min.
Load......................... 231 Watt(33 %)
Line Interaction............. None
Test Result.................. Unknown
Last Power Event............. None
What is even more interesting is that after I kill pwrstatd, usbhid-ups
is able to detect the UPS and nut seems to function correctly.
#usbhid-ups -a mythups -DDDD
0.000000 debug level is '4'
0.001396 upsdrv_initups...
0.233894 Checking device (05E3/0608) (001/002)
0.234000 Failed to open device, skipping. (Permission denied)
0.234011 Checking device (2040/4903) (001/003)
0.234029 Failed to open device, skipping. (Permission denied)
0.234038 Checking device (1D6B/0002) (001/001)
0.234052 Failed to open device, skipping. (Permission denied)
0.234060 Checking device (046D/C501) (001/004)
0.234075 Failed to open device, skipping. (Permission denied)
0.234083 Checking device (0471/0815) (001/005)
0.234097 Failed to open device, skipping. (Permission denied)
0.234105 Checking device (0472/0065) (005/002)
0.234120 Failed to open device, skipping. (Permission denied)
0.234128 Checking device (1D6B/0001) (005/001)
0.234143 Failed to open device, skipping. (Permission denied)
0.234152 Checking device (0472/0065) (005/003)
0.234168 Failed to open device, skipping. (Permission denied)
0.234177 Checking device (0764/0005) (006/002)
0.244283 - VendorID: 0764
0.244319 - ProductID: 0005
0.244326 - Manufacturer: Cyber Power System
0.244333 - Product: CPS RS232 USB BRIDGE for UPS
0.244339 - Serial Number: unknown
0.244345 - Bus: 006
0.244350 Trying to match device
0.244390 Device matches
0.252293 HID descriptor, method 1: (9 bytes) => 09 21 10 01 21 01 22 5a 00
0.252314 i=0, extra[i]=09, extra[i+1]=21
0.252328 HID descriptor, method 2: (9 bytes) => 09 21 10 01 21 01 22 5a 00
0.252334 HID descriptor length 90
0.257285 Report Descriptor size = 90
0.257314 Report Descriptor: (90 bytes) => 06 01 ff 09 1d a1 01 15 00 25 04 75 08 95
0.257337 01 09 02 b1 82 15 00 25 01 75 01 95 08 09 0d 09 0b 09 0a 09 0c 09 08 09 09
0.257357 09 01 09 07 b1 82 15 01 25 07 75 08 95 01 09 16 81 82 ff ff ff ff ff ff ff
0.257378 09 18 81 82 15 01 25 07 95 01 09 15 91 82 15 00 26 ff 00 95 07 09 17 91 82
0.257384 c0
0.257534 Using subdriver: CyberPower HID 0.3
0.257551 Entering libusb_get_report
0.259299 Report[get]: (2 bytes) => 01 0f
0.259338 Path: ff01001d.ff010002, Type: Feature, ReportID: 0x00, Offset: 0, Size: 8, Value: 4
0.259348 Report[buf]: (2 bytes) => 01 0f
0.259361 Path: ff01001d.ff01000d, Type: Feature, ReportID: 0x00, Offset: 0, Size: 1, Value: 1
0.259369 Report[buf]: (2 bytes) => 01 0f
0.259381 Path: ff01001d.ff01000b, Type: Feature, ReportID: 0x00, Offset: 0, Size: 1, Value: 1
0.259389 Report[buf]: (2 bytes) => 01 0f
0.259401 Path: ff01001d.ff01000a, Type: Feature, ReportID: 0x00, Offset: 0, Size: 1, Value: 1
0.259408 Report[buf]: (2 bytes) => 01 0f
0.259420 Path: ff01001d.ff01000c, Type: Feature, ReportID: 0x00, Offset: 0, Size: 1, Value: 1
0.259428 Report[buf]: (2 bytes) => 01 0f
0.259439 Path: ff01001d.ff010008, Type: Feature, ReportID: 0x00, Offset: 0, Size: 1, Value: 1
0.259446 Report[buf]: (2 bytes) => 01 0f
0.259458 Path: ff01001d.ff010009, Type: Feature, ReportID: 0x00, Offset: 0, Size: 1, Value: 1
0.259466 Report[buf]: (2 bytes) => 01 0f
0.259477 Path: ff01001d.ff010001, Type: Feature, ReportID: 0x00, Offset: 0, Size: 1, Value: 1
0.259484 Report[buf]: (2 bytes) => 01 0f
0.259496 Path: ff01001d.ff010007, Type: Feature, ReportID: 0x00, Offset: 0, Size: 1, Value: 1
0.259503 Report[buf]: (2 bytes) => 01 0f
0.259515 Path: ff01001d.ff010016, Type: Input, ReportID: 0x00, Offset: 0, Size: 8, Value: 7
Network UPS Tools - Generic HID driver 0.37 (2.6.4)
USB communication driver 0.31
0.259552 Report descriptor retrieved (Reportlen = 90)
0.259559 Found HID device
0.259565 Detected a UPS: Cyber Power System/CPS RS232 USB BRIDGE for UPS
0.259600 string_to_path: depth = 3
0.259640 string_to_path: depth = 3
0.259664 string_to_path: depth = 3
0.259682 string_to_path: depth = 3
0.259703 string_to_path: depth = 3
0.259731 string_to_path: depth = 3
0.259751 string_to_path: depth = 3
0.259763 string_to_path: depth = 3
0.259775 string_to_path: depth = 3
0.259787 string_to_path: depth = 3
0.259801 string_to_path: depth = 3
0.259815 string_to_path: depth = 3
0.259827 string_to_path: depth = 3
0.259841 string_to_path: depth = 3
0.259854 string_to_path: depth = 3
0.259868 string_to_path: depth = 3
0.259881 string_to_path: depth = 3
0.259894 string_to_path: depth = 3
0.259917 string_to_path: depth = 4
0.259938 string_to_path: depth = 4
0.259958 string_to_path: depth = 4
0.259978 string_to_path: depth = 4
0.259998 string_to_path: depth = 4
0.260017 string_to_path: depth = 4
0.260032 string_to_path: depth = 3
0.260046 string_to_path: depth = 3
0.260059 string_to_path: depth = 3
0.260069 string_to_path: depth = 3
0.260082 string_to_path: depth = 3
0.260095 string_to_path: depth = 3
0.260154 string_to_path: depth = 3
0.260169 string_to_path: depth = 3
0.260182 string_to_path: depth = 3
0.260195 string_to_path: depth = 3
0.260208 string_to_path: depth = 3
0.260221 string_to_path: depth = 3
0.260234 string_to_path: depth = 3
0.260247 string_to_path: depth = 3
0.260260 string_to_path: depth = 3
0.260275 string_to_path: depth = 3
0.260289 string_to_path: depth = 3
0.260302 string_to_path: depth = 3
0.260316 string_to_path: depth = 3
0.260330 string_to_path: depth = 3
0.260342 find_nut_info: unknown info type: load.off.delay
0.260353 find_nut_info: unknown info type: load.on.delay
0.260363 find_nut_info: unknown info type: load.off.delay
0.260385 upsdrv_initinfo...
0.260401 upsdrv_updateinfo...
0.513333 libusb_get_interrupt: Connection timed out
0.513372 Got 0 HID objects...
0.513382 Quick update...
0.513782 dstate_init: sock /var/run/nut/usbhid-ups-mythups open on fd 8
0.513820 upsdrv_updateinfo...
0.766302 libusb_get_interrupt: Connection timed out
0.766337 Got 0 HID objects...
0.766347 Quick update...
2.517778 upsdrv_updateinfo...
2.770224 libusb_get_interrupt: Connection timed out
2.770255 Got 0 HID objects...
2.770265 Quick update...
4.521723 upsdrv_updateinfo...
4.773137 libusb_get_interrupt: Connection timed out
4.773165 Got 0 HID objects...
4.773175 Quick update...
6.525667 upsdrv_updateinfo...
6.777085 libusb_get_interrupt: Connection timed out
6.777119 Got 0 HID objects...
6.777129 Quick update...
8.529590 upsdrv_updateinfo...
8.781020 libusb_get_interrupt: Connection timed out
8.781056 Got 0 HID objects...
8.781067 Quick update...
10.533552 upsdrv_updateinfo...
10.785837 libusb_get_interrupt: Connection timed out
10.785877 Got 0 HID objects...
10.785889 Quick update...
12.536493 upsdrv_updateinfo...
12.788880 libusb_get_interrupt: Connection timed out
12.788921 Got 0 HID objects...
12.788932 Quick update...
14.540418 upsdrv_updateinfo...
14.792812 libusb_get_interrupt: Connection timed out
14.792856 Got 0 HID objects...
14.792867 Quick update...
16.544363 upsdrv_updateinfo...
16.796734 libusb_get_interrupt: Connection timed out
16.796778 Got 0 HID objects...
16.796789 Quick update...
18.548306 upsdrv_updateinfo...
18.800672 libusb_get_interrupt: Connection timed out
18.800712 Got 0 HID objects...
18.800723 Quick update...
# /sbin/upsdrvctl start
Network UPS Tools - UPS driver controller 2.6.4
Network UPS Tools - Generic HID driver 0.37 (2.6.4)
USB communication driver 0.31
Using subdriver: CyberPower HID 0.3
# upsc mythups at localhost
device.mfr: Cyber Power System
device.model: CPS RS232 USB BRIDGE for UPS
device.type: ups
driver.name: usbhid-ups
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.version: 2.6.4
driver.version.data: CyberPower HID 0.3
driver.version.internal: 0.37
ups.mfr: Cyber Power System
ups.model: CPS RS232 USB BRIDGE for UPS
ups.productid: 0005
ups.status: OB
ups.vendorid: 0764
# lsusb -v
[snip]
Bus 006 Device 003: ID 0764:0005 Cyber Power System, Inc. Cyber Power UPS
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x0764 Cyber Power System, Inc.
idProduct 0x0005 Cyber Power UPS
bcdDevice 4.00
iManufacturer 3 Cyber Power System
iProduct 1 CPS RS232 USB BRIDGE for UPS
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 41
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 20mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0 No Subclass
bInterfaceProtocol 0 None
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.10
bCountryCode 33 US
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 90
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 10
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 10
Device Status: 0x0000
(Bus Powered)
If I unplug the USB cable and plug it back in, usbhid-ups stops working
until I start and stop pwrstatd.
More information about the Nut-upsuser
mailing list