[Nut-upsuser] Issues with USB connectivity

Simon Attwell Simon.Attwell at consultingone.com.au
Wed Nov 28 22:24:03 UTC 2012


Thank you Charles and Arnaud for replying.

Here’s the additional detail requested.

joavma01:/usr/local/ups/bin # lsusb -v -d 051d:0003

Bus 002 Device 002: ID 051d:0003 American Power Conversion UPS
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x051d American Power Conversion
  idProduct          0x0003 UPS
  bcdDevice            1.06
  iManufacturer           1 American Power Conversion
  iProduct                2 Smart-UPS 1000 FW:UPS 08.3 / ID=18
  iSerial                 3 AS1235120308
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           41
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xe0
      Self Powered
      Remote Wakeup
    MaxPower                2mA
    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.00
          bCountryCode           33 US
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     515
          Warning: incomplete report descriptor
          Report Descriptor: (length is 9)
            Item(Main  ): (null), data=none
            Item(Main  ): (null), data=none
            Item(Main  ): (null), data=none
            Item(Main  ): (null), data=none
            Item(Main  ): (null), data=none
            Item(Main  ): (null), data=none
            Item(Main  ): (null), data=none
            Item(Main  ): (null), data=none
            Item(Main  ): (null), data=none
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval              20
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval              10
Device Status:     0x0002
  (Bus Powered)
  Remote Wakeup Enabled

joavma01:/usr/local/ups/bin # ./usbhid-ups -DDDDD -u root -a apc1000
Network UPS Tools - Generic HID driver 0.37 (2.6.5)
USB communication driver 0.31
   0.000000     send_to_all: SETINFO driver.parameter.port "auto"
   0.000028     send_to_all: SETINFO driver.parameter.vendorid "051d"
   0.000047     debug level is '5'
   0.000414     upsdrv_initups...
   1.022258     Checking device (1D6B/0002) (001/001)
   1.022346     - VendorID: 1d6b
   1.022351     - ProductID: 0002
   1.022355     - Manufacturer: Linux 2.6.37.1-1.2-default ehci_hcd
   1.022358     - Product: EHCI Host Controller
   1.022361     - Serial Number: 0000:02:03.0
   1.022364     - Bus: 001
   1.022367     Trying to match device
   1.022382     Device does not match - skipping
   1.022393     Checking device (1D6B/0001) (002/001)
   1.022431     - VendorID: 1d6b
   1.022435     - ProductID: 0001
   1.022438     - Manufacturer: Linux 2.6.37.1-1.2-default uhci_hcd
   1.022442     - Product: UHCI Host Controller
   1.022445     - Serial Number: 0000:02:02.0
   1.022448     - Bus: 002
   1.022451     Trying to match device
   1.022455     Device does not match - skipping
   1.022462     Checking device (051D/0003) (002/002)
   1.059268     - VendorID: 051d
   1.059277     - ProductID: 0003
   1.059281     - Manufacturer: American Power Conversion
   1.059284     - Product: Smart-UPS 1000 FW:UPS 08.3 / ID=18
   1.059287     - Serial Number: AS1235120308
   1.059290     - Bus: 002
   1.059293     Trying to match device
   1.059305     interrupt pipe disabled (add 'pollonly' flag to 'ups.conf' to get rid of this message)
   1.059333     Device matches
   1.065694     HID descriptor, method 1: (9 bytes) => 09 21 00 01 21 01 22 03 02
   1.065704     i=0, extra[i]=09, extra[i+1]=21
   1.065709     HID descriptor, method 2: (9 bytes) => 09 21 00 01 21 01 22 03 02
   1.065712     HID descriptor length 515
   1.068713     Unable to get Report descriptor: Broken pipe
   1.068735     Checking device (0E0F/0002) (002/003)
   1.079553     - VendorID: 0e0f
   1.079562     - ProductID: 0002
   1.079565     - Manufacturer: unknown
   1.079568     - Product: VMware Virtual USB Hub
   1.079571     - Serial Number: unknown
   1.079574     - Bus: 002
   1.079577     Trying to match device
   1.079582     Device does not match - skipping
   1.079592     No appropriate HID device found
   1.079599     No matching HID UPS found

Regards

	- Simon

From: Arnaud Quette [mailto:aquette.dev at gmail.com] 
Sent: Thursday, 29 November 2012 4:10 AM
To: Simon Attwell
Cc: nut-upsuser at lists.alioth.debian.org
Subject: Re: [Nut-upsuser] Issues with USB connectivity


2012/11/28 Charles Lepple <clepple at gmail.com>
On Nov 27, 2012, at 9:43 PM, Simon Attwell wrote:

>    0.026636     Checking device (051D/0003) (002/002)
>    1.037912     - VendorID: 051d
>    1.037931     - ProductID: 0003
Unfortunately, this looks like an APC 5G model. NUT v2.6.5 already has one hack to work around their broken HID implementation (the 'interrupt pipe disabled' message), but I am not sure that we have uncovered all of the quirks yet.

What does 'lsusb -v -d 051d:0003' return?

my guess is that it's a local source install (hint: /usr/local/ups/...) and udev helper file (52-nut-usbups.rules) is not installed.

a validation of this would be to use "-u root" to test for device privileges issues:
# ./usbhid-ups -DDDDD -u root -a apc1000

if it works, then it's actually a udev issue.
otherwise, you indeed uncovered a new potential issue with APC 5G...

cheers,
Arnaud
-- 
NUT (Network UPS Tools) Project Leader - http://www.networkupstools.org
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.fr


More information about the Nut-upsuser mailing list