"port = auto" does not work with bcmxcp_usb (powerware 5115)

Bug #850672 reported by Tuomas Heino
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nut (Ubuntu)
Expired
Medium
Unassigned

Bug Description

With the following ups.conf (using the only documented (bcmxcp_usb(8)) value of "auto" for port) nut fails to connect to the ups:

[powerware]
driver = bcmxcp_usb
port = auto

Sep 14 08:59:37 ub3 upsd[31413]: listening on 127.0.0.1 port 3493
Sep 14 08:59:37 ub3 upsd[31413]: listening on ::1 port 3493
Sep 14 08:59:37 ub3 upsd[31413]: Can't connect to UPS [powerware] (bcmxcp_usb-powerware): No such file or directory
Sep 14 08:59:37 ub3 upsd[31414]: Startup successful
Sep 14 08:59:37 ub3 upsmon[31416]: Startup successful
Sep 14 08:59:37 ub3 upsd[31414]: User admin@127.0.0.1 logged into UPS [powerware]
Sep 14 08:59:37 ub3 upsmon[31418]: Poll UPS [powerware@localhost] failed - Driver not connected
Sep 14 08:59:37 ub3 upsmon[31418]: Communications with UPS powerware@localhost lost

Changing port to an undocumented (and unstable) value below it does connect to the ups & seems to work properly.
port = /dev/bus/usb/006/003

Bus 006 Device 003: ID 06da:0002 Phoenixtec Power Co., Ltd UPS
Device Descriptor:
  bLength 18
  bDescriptorType 1
  bcdUSB 1.10
  bDeviceClass 0 (Defined at Interface level)
  bDeviceSubClass 0
  bDeviceProtocol 0
  bMaxPacketSize0 8
  idVendor 0x06da Phoenixtec Power Co., Ltd
  idProduct 0x0002 UPS
  bcdDevice 1.00
  iManufacturer 4
  iProduct 24
  iSerial 0
  bNumConfigurations 1
  Configuration Descriptor:
    bLength 9
    bDescriptorType 2
    wTotalLength 34
    bNumInterfaces 1
    bConfigurationValue 1
    iConfiguration 0
    bmAttributes 0x80
      (Bus Powered)
    MaxPower 60mA
    Interface Descriptor:
      bLength 9
      bDescriptorType 4
      bInterfaceNumber 0
      bAlternateSetting 0
      bNumEndpoints 1
      bInterfaceClass 255 Vendor Specific Class
      bInterfaceSubClass 0
      bInterfaceProtocol 0
      iInterface 0
      ** UNRECOGNIZED: 09 21 00 01 00 01 22 00 00
      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 20

$ upsc powerware
ambient.temperature: 36
ambient.temperature.high: 75
battery.charge: 100
battery.runtime: 1693
battery.voltage: 27.30
device.mfr: Eaton
device.model: PW5115 750i
device.serial: UA456A0477
device.type: ups
driver.name: bcmxcp_usb
driver.parameter.pollinterval: 2
driver.parameter.port: /dev/bus/usb/006/003
driver.version: 2.6.0
driver.version.internal: 0.23
input.frequency: 50.34
input.frequency.high: 55
input.frequency.low: 45
input.frequency.nominal: 50
input.transfer.boost.high: 207
input.transfer.high: 266
input.transfer.low: 194
input.transfer.trim.low: 243
input.voltage: 232
input.voltage.nominal: 230
output.current: 0.8
output.current.nominal: 3.4
output.frequency: 50.34
output.phases: 1
output.voltage: 232
output.voltage.nominal: 230
ups.beeper.status: enabled
ups.firmware: Cont:01.00 Inve:10.05
ups.load: 26.7
ups.mfr: Eaton
ups.model: PW5115 750i
ups.power: 200
ups.power.nominal: 750
ups.serial: UA456A0477
ups.status: OL

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: nut 2.6.0-1ubuntu3
ProcVersionSignature: Ubuntu 2.6.38-10.46-generic 2.6.38.7
Uname: Linux 2.6.38-10-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Thu Sep 15 10:12:26 2011
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427)
KernelVersion: Linux ub3 2.6.38-10-generic #46-Ubuntu SMP Tue Jun 28 15:07:17 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux
ProcEnviron:
 LANGUAGE=en_IE:en
 LANG=en_IE.UTF-8
 SHELL=/bin/bash
SourcePackage: nut
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Tuomas Heino (iheino+ub) wrote :
Revision history for this message
Tuomas Heino (iheino+ub) wrote :

After changing port back to auto it seems to work. System has not been rebooted since installing nut.
Could this be some form of a race condition as speculated in other bug reports?

Revision history for this message
Arnaud Quette (aquette) wrote : Re: [Bug 850672] Re: "port = auto" does not work with bcmxcp_usb (powerware 5115)

2011/9/15 Tuomas Heino <email address hidden>

> After changing port back to auto it seems to work. System has not been
> rebooted since installing nut.
> Could this be some form of a race condition as speculated in other bug
> reports?
>

not at all.
the value of "port", as for other NUT USB drivers, is not used.
the "auto" keyword is simply a standard value, but you could put whatever
you want, such as a physical path.

I don't see any particular reason to the original failure, but having more
info on the context would help.
it could simply be that udevadm trigger has been run somehow, by you or
another package installation...

as for the race condition, I have to check other bug reports.

cheers,
Arnaud
--
Linux / Unix Expert R&D - Eaton - http://powerquality.eaton.com
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.free.fr/

Revision history for this message
Ben Howard (darkmuggle-deactivatedaccount) wrote :

Setting as incomplete per aquette@'s comment.

Changed in nut (Ubuntu):
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for nut (Ubuntu) because there has been no activity for 60 days.]

Changed in nut (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Tuomas Heino (iheino+ub) wrote :

Reinstalled nut on 14.04.1 with identical changes in config files, got same issue again.

udevadm trigger does not seem to get activated, not even by replugging ups.
(command used to start it right after install + editing config files: sudo service nut-server restart)

Bus 003 Device 003: ID 06da:0002 Phoenixtec Power Co., Ltd UPS
Device Descriptor:
  bLength 18
  bDescriptorType 1
  bcdUSB 1.10
  bDeviceClass 0 (Defined at Interface level)
  bDeviceSubClass 0
  bDeviceProtocol 0
  bMaxPacketSize0 8
  idVendor 0x06da Phoenixtec Power Co., Ltd
  idProduct 0x0002 UPS
  bcdDevice 1.00
  iManufacturer 4
  iProduct 24
  iSerial 0
  bNumConfigurations 1
  Configuration Descriptor:
    bLength 9
    bDescriptorType 2
    wTotalLength 34
    bNumInterfaces 1
    bConfigurationValue 1
    iConfiguration 0
    bmAttributes 0x80
      (Bus Powered)
    MaxPower 60mA
    Interface Descriptor:
      bLength 9
      bDescriptorType 4
      bInterfaceNumber 0
      bAlternateSetting 0
      bNumEndpoints 1
      bInterfaceClass 255 Vendor Specific Class
      bInterfaceSubClass 0
      bInterfaceProtocol 0
      iInterface 0
      ** UNRECOGNIZED: 09 21 00 01 00 01 22 00 00
      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 20

Changed in nut (Ubuntu):
status: Expired → New
tags: added: trusty
Revision history for this message
Tuomas Heino (iheino+ub) wrote :

Correction to above: Udevadm-trigger does seem to get fired. Symptoms looked indentical but might be a different issue this time.

crw-rw-r-- 1 root nut 189, 258 Dec 26 02:00 /dev/bus/usb/003/003

Revision history for this message
Tuomas Heino (iheino+ub) wrote :

Trusty issue seems to be different from original one, to actually get the error message printed I had to use:

$ sudo -g nut -u nut upsdrvctl start

... which revealed an unrelated documentation bug in newer ups.conf. Might file another bug for that unless one is already filed.

tags: removed: trusty
Thomas Ward (teward)
Changed in nut (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for nut (Ubuntu) because there has been no activity for 60 days.]

Changed in nut (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.