[Nut-upsuser] Issues with USB connectivity

Simon Attwell Simon.Attwell at consultingone.com.au
Wed Nov 28 02:43:20 UTC 2012


Howdy nut-users :)

Got a problem with nut detecting my UPS.
Here's my scenario.

Base platform is a HP ML350 G6.
UPS is an APC Smart-UPS 1000.
Base OS is VMware ESXi 5.0 with all current patches.
I've created a virtual machine using the VMWare supplied VMA.
USB passthrough is configured to pass the UPS through to the VMA.

So I essentially have a SLES 11 (x86_64) server with a USB connected APC Smart-UPS 1000.
I've tested nut installed from package and from source (2.6.5).

Here's the diagnostic detail:

joavma01:/usr/local/ups/bin # uname -a
Linux joavma01 2.6.32.54-0.3-default #1 SMP 2012-01-27 17:38:56 +0100 x86_64 x86_64 x86_64 GNU/Linux
joavma01:/usr/local/ups/bin # lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 051d:0003 American Power Conversion UPS
Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
joavma01:/usr/local/ups/bin # usb-devices

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480 MxCh= 6
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev=02.06
S:  Manufacturer=Linux 2.6.32.54-0.3-default ehci_hcd
S:  Product=EHCI Host Controller
S:  SerialNumber=0000:02:03.0
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0001 Rev=02.06
S:  Manufacturer=Linux 2.6.32.54-0.3-default uhci_hcd
S:  Product=UHCI Host Controller
S:  SerialNumber=0000:02:02.0
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

T:  Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=051d ProdID=0003 Rev=01.06
S:  Manufacturer=American Power Conversion
S:  Product=Smart-UPS 1000 FW:UPS 08.3 / ID=18
S:  SerialNumber=AS1235120308
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=2mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=03(HID  ) Sub=00 Prot=00 Driver=(none)

T:  Bus=02 Lev=01 Prnt=01 Port=01 Cnt=02 Dev#=  3 Spd=12  MxCh= 7
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0e0f ProdID=0002 Rev=01.00
S:  Product=VMware Virtual USB Hub
C:  #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub

So we can clearly see the ups on the USB bus
/usr/local/ups/etc/ups.conf contains

[apc1000]
        driver = usbhid-ups
        port = auto
        vendorid = 051d
        desc = "Local APC SmartUPS 1000"

joavma01:/usr/local/ups/bin # ./usbhid-ups -DDDDD -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.000032     send_to_all: SETINFO driver.parameter.vendorid "051d"
   0.000050     debug level is '5'
   0.000593     upsdrv_initups...
   0.026312     Checking device (1D6B/0002) (001/001)
libusb couldn't open USB device /dev/bus/usb/001/001: Permission denied.
libusb requires write access to USB device nodes.
   0.026492     Failed to open device, skipping. (Permission denied)
   0.026499     Checking device (1D6B/0001) (002/001)
libusb couldn't open USB device /dev/bus/usb/002/001: Permission denied.
libusb requires write access to USB device nodes.
   0.026629     Failed to open device, skipping. (Permission denied)
   0.026636     Checking device (051D/0003) (002/002)
   1.037912     - VendorID: 051d
   1.037931     - ProductID: 0003
   1.037935     - Manufacturer: American Power Conversion
   1.037939     - Product: Smart-UPS 1000 FW:UPS 08.3 / ID=18
  1.037942     - Serial Number: AS1235120308
   1.037946     - Bus: 002
   1.037949     Trying to match device
   1.037970     interrupt pipe disabled (add 'pollonly' flag to 'ups.conf' to get rid of this message)
   1.038108     Device matches
   1.042263     HID descriptor, method 1: (9 bytes) => 09 21 00 01 21 01 22 03 02
   1.042272     i=0, extra[i]=09, extra[i+1]=21
   1.042278     HID descriptor, method 2: (9 bytes) => 09 21 00 01 21 01 22 03 02
   1.042281     HID descriptor length 515
   1.044215     Unable to get Report descriptor: Broken pipe
   1.044252     Checking device (0E0F/0002) (002/003)
libusb couldn't open USB device /dev/bus/usb/002/003: Permission denied.
libusb requires write access to USB device nodes.
   1.044481     Failed to open device, skipping. (Permission denied)
   1.044487     No appropriate HID device found
   1.044493     No matching HID UPS found


So ignoring all device except (002/002) since the ups user doesn't have access to them the problem appears to be:
   1.044215     Unable to get Report descriptor: Broken pipe

Any ideas?


-          Simon

________________________________

[Description: Description: Vendor Logos]

Simon Attwell

Project Manager / Senior Systems Consultant

[Description: Description: Phone]

(07) 4924 8000

[Description: Description: Fax]

(07) 4924 8010

[Description: Description: Email]

simon at consultingone.com.au

[Description: Description: Web]

www.consultingone.com.au


[Description: Description: Facebook and Twitter]

[Description: Description: Facebook Logo]<http://fb.com/ConsultingOneAU>      [Description: Description: Twitter Logo] <http://twitter.com/ConsultingOne>


P    Please consider the environment before printing this email



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20121128/9bcfd2f1/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 4901 bytes
Desc: image001.png
URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20121128/9bcfd2f1/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.gif
Type: image/gif
Size: 1026 bytes
Desc: image002.gif
URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20121128/9bcfd2f1/attachment-0004.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.gif
Type: image/gif
Size: 1066 bytes
Desc: image003.gif
URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20121128/9bcfd2f1/attachment-0005.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.gif
Type: image/gif
Size: 1081 bytes
Desc: image004.gif
URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20121128/9bcfd2f1/attachment-0006.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image005.gif
Type: image/gif
Size: 1107 bytes
Desc: image005.gif
URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20121128/9bcfd2f1/attachment-0007.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image006.png
Type: image/png
Size: 4897 bytes
Desc: image006.png
URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20121128/9bcfd2f1/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image007.png
Type: image/png
Size: 6148 bytes
Desc: image007.png
URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20121128/9bcfd2f1/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image008.png
Type: image/png
Size: 6453 bytes
Desc: image008.png
URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20121128/9bcfd2f1/attachment-0007.png>


More information about the Nut-upsuser mailing list