Re: [Nut-upsuser] bcmxcp_usb can not communicate with Eaton Powerware 5110

2012-12-05 Thread Arnaud Quette
2012/12/3 Jevgeni Jurtsenko jevgeni...@gmail.com

 Hi Arnaud,


Hi Jevgeni,


 Unfortunately your patch didn't solved the problem for me.


it couldn't, since your issue is upstream to it (i.e, in kernel land)


 I googled about the issue once more while setting the OS second time to
 give logs you asked previously.  Out of the syslog you can see that it is
 being flooded with *usbfs *errors about claiming the device. One of the
 suggestions was the problem with *dwc_otg *driver. However
 my solution was a script, which resets usb and I'm able to get data from
 UPS again.. As I mentioned above that re-plugging the usb cable solved it.
 Problem is not stable ~3 fails out of 5 startups. At the moment I am using
 PW5115

 lsusb -v -d0x06da:0x0002

 Bus 001 Device 004: ID 06da:0002 Phoenixtec Power Co., Ltd UPS
 Device Descriptor:
   bLength18
   bDescriptorType 1
   bcdUSB   1.10
   bDeviceClass0 (Defined at Interface level)
   bDeviceSubClass 0
   bDeviceProtocol 0
   bMaxPacketSize0 8
   idVendor   0x06da Phoenixtec Power Co., Ltd
   idProduct  0x0002 UPS
   bcdDevice1.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
   bInterfaceNumber0
   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
 bmAttributes3
   Transfer TypeInterrupt
   Synch Type   None
   Usage Type   Data
 wMaxPacketSize 0x0008  1x 8 bytes
 bInterval  20
 Device Status: 0x5a08
   (Bus Powered)
 ¤¤¤
 *grep usb /var/log/syslog*
 Nov 25 11:41:51 raspberrypi kernel: [   95.021492] usb 1-1.2: usbfs:
 process 1862 (bcmxcp_usb) did not claim interface 0 before use
 Nov 25 11:41:51 raspberrypi kernel: [   95.021531] usb 1-1.2: usbfs:
 process 1862 (bcmxcp_usb) did not claim interface 0 before use
 Nov 25 11:41:51 raspberrypi kernel: [   95.021573] usb 1-1.2: usbfs:
 process 1862 (bcmxcp_usb) did not claim interface 0 before use
 Nov 25 11:41:51 raspberrypi kernel: [   95.021611] usb 1-1.2: usbfs:
 process 1862 (bcmxcp_usb) did not claim interface 0 before use
 Nov 25 11:41:51 raspberrypi kernel: [   95.021653] usb 1-1.2: usbfs:
 process 1862 (bcmxcp_usb) did not claim interface 0 before use
 Nov 25 11:41:51 raspberrypi kernel: [   95.021693] usb 1-1.2: usbfs:
 process 1862 (bcmxcp_usb) did not claim interface 0 before use
 Nov 25 11:41:51 raspberrypi kernel: [   95.021733] usb 1-1.2: usbfs:
 process 1862 (bcmxcp_usb) did not claim interface 0 before use
 Nov 25 11:41:51 raspberrypi kernel: [   95.021774] usb 1-1.2: usbfs:
 process 1862 (bcmxcp_usb) did not claim interface 0 before use
 Nov 25 11:41:51 raspberrypi kernel: [   95.021815] usb 1-1.2: usbfs:
 process 1862 (bcmxcp_usb) did not claim interface 0 before use
 Nov 25 11:41:51 raspberrypi kernel: [   95.021855] usb 1-1.2: usbfs:
 process 1862 (bcmxcp_usb) did not claim interface 0 before use
 Nov 25 11:41:51 raspberrypi kernel: [   95.021897] usb 1-1.2: usbfs:
 process 1862 (bcmxcp_usb) did not claim interface 0 before use
 Nov 25 11:41:51 raspberrypi kernel: [   95.021936] usb 1-1.2: usbfs:
 process 1862 (bcmxcp_usb) did not claim interface 0 before use
 Nov 25 11:41:51 raspberrypi kernel: [   95.021976] usb 1-1.2: usbfs:
 process 1862 (bcmxcp_usb) did not claim interface 0 before use
 Nov 25 11:41:51 raspberrypi kernel: [   95.022017] usb 1-1.2: usbfs:
 process 1862 (bcmxcp_usb) did not claim interface 0 before use
 ¤¤
 */lib/nut/bcmxcp_usb -D -u root -a ups*
 Network UPS Tools - BCMXCP UPS driver 0.26 (2.6.5)
 USB communication subdriver 0.22
0.00 send_to_all: SETINFO driver.parameter.port auto
0.002520 debug level is '5'
0.019435 entering nutusb_open()
0.037846 device 004 opened successfully
0.039967 Can't claim POWERWARE USB interface: could not claim
 interface 0: Device or resource busy
0.041162 Can't reset POWERWARE USB endpoint: could not clear/halt
 ep 129: Device or resource busy
0.041965 device 004 opened successfully
0.042690 

Re: [Nut-upsuser] bcmxcp_usb can not communicate with Eaton Powerware 5110

2012-11-30 Thread Arnaud Quette
2012/11/29 Jevgeni Jurtsenko jevgeni...@gmail.com

 Hello all,


Hi Jevgeni,


 While repeatedly setting up the system for tests figured out the problem
 in other OS subsystem driver. Problem solved with the script. Thanks again
 for your time


I'm not sure to understand: do you mean that the patch I've provided
(xcp-rcv-loop.diff) has fixed your issue or?

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
___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] bcmxcp_usb can not communicate with Eaton Powerware 5110

2012-11-29 Thread Jevgeni Jurtsenko
Hello all,

While repeatedly setting up the system for tests figured out the problem in
other OS subsystem driver. Problem solved with the script. Thanks again for
your time

On Fri, Nov 9, 2012 at 6:13 PM, Arnaud Quette aquette@gmail.com wrote:



 2012/11/1 Jevgeni Jurtsenko jevgeni...@gmail.com

 Hello all,

  Sorry for delay. I've been away for a while. Back to testing. I've tried
 regular version 2.6.5-1 and patched. Main thing is that both versions work
 until I reboot the OS, after that starting the nut fails with messages
 below. To make it run again I've to re-plug the usb cable. Hard-resetting
 the ups doesn't help either. Considering the fact to remotely monitor the
 devices it is quite inconvenient. Suppose there is I power fault and ups is
 drained out of power then the system won't come back online after power is
 restored. I've tried searching for a working way to model the usb cable
 re-plug on OS level with no luck.  Any help would be appreciated.

 Linux raspberrypi 3.2.27+ #160 PREEMPT Mon Sep 17 23:18:42 BST 2012
 armv6l GNU/Linux

 *Version 2.6.5-1*
 USB communication subdriver 0.21
0.00 debug level is '5'
0.008920 entering nutusb_open()
0.013091 device 004 opened successfully
0.015893 Can't claim POWERWARE USB interface: could not claim
 interface 0: Device or resource busy
0.018484 Can't reset POWERWARE USB endpoint: could not clear/halt
 ep 129: Device or resource busy
0.020807 device 004 opened successfully
0.021753 Can't claim POWERWARE USB interface: could not claim
 interface 0: Device or resource busy
0.022617 Can't reset POWERWARE USB endpoint: could not clear/halt
 ep 129: Device or resource busy
0.023750 device 004 opened successfully
0.024928 Can't claim POWERWARE USB interface: could not claim
 interface 0: Device or resource busy
0.026070 Can't reset POWERWARE USB endpoint: could not clear/halt
 ep 129: Device or resource busy
0.029099 device 004 opened successfully
0.029412 Can't claim POWERWARE USB interface: could not claim
 interface 0: Device or resource busy
0.029714 Can't reset POWERWARE USB endpoint: could not clear/halt
 ep 129: Device or resource busy
0.030193 send_to_all: SETINFO device.type ups
0.031387 send_to_all: SETINFO driver.version 2.6.4
0.031855 send_to_all: SETINFO driver.version.internal 0.26
0.032720 send_to_all: SETINFO driver.name bcmxcp_usb
0.033757 send_read_command: (4 bytes) = ab 01 31 23
0.034906 entering get_answer(31)
0.035409 get_answer: (0 bytes) =
0.036298 send_read_command: (4 bytes) = ab 01 31 23
0.039485 entering get_answer(31)
0.040038 get_answer: (0 bytes) =
0.040289 send_read_command: (4 bytes) = ab 01 31 23
0.041718 entering get_answer(31)
0.042514 get_answer: (0 bytes) =
0.043435 send_read_command: (4 bytes) = ab 01 31 23
0.045095 entering get_answer(31)
0.045885 get_answer: (0 bytes) =
0.046158 send_read_command: (4 bytes) = ab 01 31 23
0.050026 entering get_answer(31)
0.050552 get_answer: (0 bytes) =
0.050785 Communications with UPS lost: Error executing command
0.051043 Could not communicate with the ups: Device or resource
 busy
0.051271 CLOSING

 *Patched version*
 2.225863 = usb_interrupt_read -16
2.226680 = packet_loop (0, 0)
2.227534 = bytes_read (0)
2.227857 = usb_interrupt_read -16
2.228667 = packet_loop (0, 0)
2.229701 = bytes_read (0)
2.230028 = usb_interrupt_read -16
2.230809 = packet_loop (0, 0)
2.233160 = bytes_read (0)
2.234230 = usb_interrupt_read -16
2.234546 = packet_loop (0, 0)
2.234763 = bytes_read (0)
2.235573 = usb_interrupt_read -16
2.236373 = packet_loop (0, 0)
2.237285 = bytes_read (0)
2.237620 = usb_interrupt_read -16
2.238418 = packet_loop (0, 0)
2.239706 = bytes_read (0)


 strange that a reboot causes this kind of issues!
 is this stable (i.e, reproduced upon each reboot)?

 I would need the following, after a reboot (i.e, reproducing the above
 issue):
 - lsusb -v -d0x0592:0x0002
 - grep usb /var/log/syslog
 - full trace, debug level 5, of the patched driver
 - ps -efl | grep bcm

 @Greg  Massimo: do you have the same behavior?

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


___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] bcmxcp_usb can not communicate with Eaton Powerware 5110

2012-11-09 Thread Arnaud Quette
2012/11/1 Jevgeni Jurtsenko jevgeni...@gmail.com

 Hello all,

  Sorry for delay. I've been away for a while. Back to testing. I've tried
 regular version 2.6.5-1 and patched. Main thing is that both versions work
 until I reboot the OS, after that starting the nut fails with messages
 below. To make it run again I've to re-plug the usb cable. Hard-resetting
 the ups doesn't help either. Considering the fact to remotely monitor the
 devices it is quite inconvenient. Suppose there is I power fault and ups is
 drained out of power then the system won't come back online after power is
 restored. I've tried searching for a working way to model the usb cable
 re-plug on OS level with no luck.  Any help would be appreciated.

 Linux raspberrypi 3.2.27+ #160 PREEMPT Mon Sep 17 23:18:42 BST 2012 armv6l
 GNU/Linux

 *Version 2.6.5-1*
 USB communication subdriver 0.21
0.00 debug level is '5'
0.008920 entering nutusb_open()
0.013091 device 004 opened successfully
0.015893 Can't claim POWERWARE USB interface: could not claim
 interface 0: Device or resource busy
0.018484 Can't reset POWERWARE USB endpoint: could not clear/halt
 ep 129: Device or resource busy
0.020807 device 004 opened successfully
0.021753 Can't claim POWERWARE USB interface: could not claim
 interface 0: Device or resource busy
0.022617 Can't reset POWERWARE USB endpoint: could not clear/halt
 ep 129: Device or resource busy
0.023750 device 004 opened successfully
0.024928 Can't claim POWERWARE USB interface: could not claim
 interface 0: Device or resource busy
0.026070 Can't reset POWERWARE USB endpoint: could not clear/halt
 ep 129: Device or resource busy
0.029099 device 004 opened successfully
0.029412 Can't claim POWERWARE USB interface: could not claim
 interface 0: Device or resource busy
0.029714 Can't reset POWERWARE USB endpoint: could not clear/halt
 ep 129: Device or resource busy
0.030193 send_to_all: SETINFO device.type ups
0.031387 send_to_all: SETINFO driver.version 2.6.4
0.031855 send_to_all: SETINFO driver.version.internal 0.26
0.032720 send_to_all: SETINFO driver.name bcmxcp_usb
0.033757 send_read_command: (4 bytes) = ab 01 31 23
0.034906 entering get_answer(31)
0.035409 get_answer: (0 bytes) =
0.036298 send_read_command: (4 bytes) = ab 01 31 23
0.039485 entering get_answer(31)
0.040038 get_answer: (0 bytes) =
0.040289 send_read_command: (4 bytes) = ab 01 31 23
0.041718 entering get_answer(31)
0.042514 get_answer: (0 bytes) =
0.043435 send_read_command: (4 bytes) = ab 01 31 23
0.045095 entering get_answer(31)
0.045885 get_answer: (0 bytes) =
0.046158 send_read_command: (4 bytes) = ab 01 31 23
0.050026 entering get_answer(31)
0.050552 get_answer: (0 bytes) =
0.050785 Communications with UPS lost: Error executing command
0.051043 Could not communicate with the ups: Device or resource busy
0.051271 CLOSING

 *Patched version*
 2.225863 = usb_interrupt_read -16
2.226680 = packet_loop (0, 0)
2.227534 = bytes_read (0)
2.227857 = usb_interrupt_read -16
2.228667 = packet_loop (0, 0)
2.229701 = bytes_read (0)
2.230028 = usb_interrupt_read -16
2.230809 = packet_loop (0, 0)
2.233160 = bytes_read (0)
2.234230 = usb_interrupt_read -16
2.234546 = packet_loop (0, 0)
2.234763 = bytes_read (0)
2.235573 = usb_interrupt_read -16
2.236373 = packet_loop (0, 0)
2.237285 = bytes_read (0)
2.237620 = usb_interrupt_read -16
2.238418 = packet_loop (0, 0)
2.239706 = bytes_read (0)


strange that a reboot causes this kind of issues!
is this stable (i.e, reproduced upon each reboot)?

I would need the following, after a reboot (i.e, reproducing the above
issue):
- lsusb -v -d0x0592:0x0002
- grep usb /var/log/syslog
- full trace, debug level 5, of the patched driver
- ps -efl | grep bcm

@Greg  Massimo: do you have the same behavior?

cheers,
Arnaud
-- 
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.fr
___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] bcmxcp_usb can not communicate with Eaton Powerware 5110

2012-11-01 Thread Jevgeni Jurtsenko
Hello all,

 Sorry for delay. I've been away for a while. Back to testing. I've tried
regular version 2.6.5-1 and patched. Main thing is that both versions work
until I reboot the OS, after that starting the nut fails with messages
below. To make it run again I've to re-plug the usb cable. Hard-resetting
the ups doesn't help either. Considering the fact to remotely monitor the
devices it is quite inconvenient. Suppose there is I power fault and ups is
drained out of power then the system won't come back online after power is
restored. I've tried searching for a working way to model the usb cable
re-plug on OS level with no luck.  Any help would be appreciated.

Linux raspberrypi 3.2.27+ #160 PREEMPT Mon Sep 17 23:18:42 BST 2012 armv6l
GNU/Linux

*Version 2.6.5-1*
USB communication subdriver 0.21
   0.00 debug level is '5'
   0.008920 entering nutusb_open()
   0.013091 device 004 opened successfully
   0.015893 Can't claim POWERWARE USB interface: could not claim
interface 0: Device or resource busy
   0.018484 Can't reset POWERWARE USB endpoint: could not clear/halt ep
129: Device or resource busy
   0.020807 device 004 opened successfully
   0.021753 Can't claim POWERWARE USB interface: could not claim
interface 0: Device or resource busy
   0.022617 Can't reset POWERWARE USB endpoint: could not clear/halt ep
129: Device or resource busy
   0.023750 device 004 opened successfully
   0.024928 Can't claim POWERWARE USB interface: could not claim
interface 0: Device or resource busy
   0.026070 Can't reset POWERWARE USB endpoint: could not clear/halt ep
129: Device or resource busy
   0.029099 device 004 opened successfully
   0.029412 Can't claim POWERWARE USB interface: could not claim
interface 0: Device or resource busy
   0.029714 Can't reset POWERWARE USB endpoint: could not clear/halt ep
129: Device or resource busy
   0.030193 send_to_all: SETINFO device.type ups
   0.031387 send_to_all: SETINFO driver.version 2.6.4
   0.031855 send_to_all: SETINFO driver.version.internal 0.26
   0.032720 send_to_all: SETINFO driver.name bcmxcp_usb
   0.033757 send_read_command: (4 bytes) = ab 01 31 23
   0.034906 entering get_answer(31)
   0.035409 get_answer: (0 bytes) =
   0.036298 send_read_command: (4 bytes) = ab 01 31 23
   0.039485 entering get_answer(31)
   0.040038 get_answer: (0 bytes) =
   0.040289 send_read_command: (4 bytes) = ab 01 31 23
   0.041718 entering get_answer(31)
   0.042514 get_answer: (0 bytes) =
   0.043435 send_read_command: (4 bytes) = ab 01 31 23
   0.045095 entering get_answer(31)
   0.045885 get_answer: (0 bytes) =
   0.046158 send_read_command: (4 bytes) = ab 01 31 23
   0.050026 entering get_answer(31)
   0.050552 get_answer: (0 bytes) =
   0.050785 Communications with UPS lost: Error executing command
   0.051043 Could not communicate with the ups: Device or resource busy
   0.051271 CLOSING

*Patched version*
2.225863 = usb_interrupt_read -16
   2.226680 = packet_loop (0, 0)
   2.227534 = bytes_read (0)
   2.227857 = usb_interrupt_read -16
   2.228667 = packet_loop (0, 0)
   2.229701 = bytes_read (0)
   2.230028 = usb_interrupt_read -16
   2.230809 = packet_loop (0, 0)
   2.233160 = bytes_read (0)
   2.234230 = usb_interrupt_read -16
   2.234546 = packet_loop (0, 0)
   2.234763 = bytes_read (0)
   2.235573 = usb_interrupt_read -16
   2.236373 = packet_loop (0, 0)
   2.237285 = bytes_read (0)
   2.237620 = usb_interrupt_read -16
   2.238418 = packet_loop (0, 0)
   2.239706 = bytes_read (0)

On Fri, Sep 21, 2012 at 4:25 PM, Arnaud Quette aquette@gmail.comwrote:



 2012/9/21 Eugene Jurchenko jevgeni...@gmail.com

 Massimo Gais simosagi9 at gmail.com writes:

 
  On Sun, Aug 12, 2012 at 5:11 AM, Greg Vickers daehenoc at
 iinet.net.au
 wrote:
   On 11/08/12 06:58, Arnaud Quette wrote:
  
   Hi Massimo and Greg,
  
   @Greg: if you yet returned your unit, you now have a solution ;)
  
   I have not yet gotten rid of it, so thank you very much!  It's a case
 of
   download, extract, apply patch, and compile on my RPi, correct?
  
   thanks for the effort for the patch!
  
   welcome ;)
  
 
  Hello Greg,
  yes you can compile it directly on the RPI. See anyway that if you
  have the old deb package installed and you want to replace only the
  recompiled driver, you may have some mismatch with the
  pidpath/statepath directories (/var/state/ups vs /var/run/nut). I
  tried to do it in a clean way by making a debian package on the RPi,
  but it was requiring to install all the documentation tools, and I did
  not have enough SD disk space for that.
 
  Cheers,
  Massimo
 

 Greetings,


 Hi

 thanks for the heads up, I just realized that I've not committed this
 patch!

 Glad that I've found some info about the issue. I have same problem with
 the
 same UPS on RPi. 

Re: [Nut-upsuser] bcmxcp_usb can not communicate with Eaton Powerware 5110

2012-09-21 Thread Arnaud Quette
2012/9/21 Eugene Jurchenko jevgeni...@gmail.com

 Massimo Gais simosagi9 at gmail.com writes:

 
  On Sun, Aug 12, 2012 at 5:11 AM, Greg Vickers daehenoc at
 iinet.net.au
 wrote:
   On 11/08/12 06:58, Arnaud Quette wrote:
  
   Hi Massimo and Greg,
  
   @Greg: if you yet returned your unit, you now have a solution ;)
  
   I have not yet gotten rid of it, so thank you very much!  It's a case
 of
   download, extract, apply patch, and compile on my RPi, correct?
  
   thanks for the effort for the patch!
  
   welcome ;)
  
 
  Hello Greg,
  yes you can compile it directly on the RPI. See anyway that if you
  have the old deb package installed and you want to replace only the
  recompiled driver, you may have some mismatch with the
  pidpath/statepath directories (/var/state/ups vs /var/run/nut). I
  tried to do it in a clean way by making a debian package on the RPi,
  but it was requiring to install all the documentation tools, and I did
  not have enough SD disk space for that.
 
  Cheers,
  Massimo
 

 Greetings,


Hi

thanks for the heads up, I just realized that I've not committed this
patch!

Glad that I've found some info about the issue. I have same problem with the
 same UPS on RPi. Unfortunately link for the patch is no longer valid.
 Could you
 send it one more time or the compiled package for RPi would be more
 appreciable.
 Thank you


you can find the thread, with compilation instructions and the patch, here:
http://www.mail-archive.com/nut-upsuser@lists.alioth.debian.org/msg07278.html

I'm waiting for your feedback + 1 (namely Rich Wrenn) to commit this.

cheers,
Arno
___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] bcmxcp_usb can not communicate with Eaton Powerware 5110

2012-09-20 Thread Eugene Jurchenko
Massimo Gais simosagi9 at gmail.com writes:

 
 On Sun, Aug 12, 2012 at 5:11 AM, Greg Vickers daehenoc at iinet.net.au 
wrote:
  On 11/08/12 06:58, Arnaud Quette wrote:
 
  Hi Massimo and Greg,
 
  @Greg: if you yet returned your unit, you now have a solution ;)
 
  I have not yet gotten rid of it, so thank you very much!  It's a case of
  download, extract, apply patch, and compile on my RPi, correct?
 
  thanks for the effort for the patch!
 
  welcome ;)
 
 
 Hello Greg,
 yes you can compile it directly on the RPI. See anyway that if you
 have the old deb package installed and you want to replace only the
 recompiled driver, you may have some mismatch with the
 pidpath/statepath directories (/var/state/ups vs /var/run/nut). I
 tried to do it in a clean way by making a debian package on the RPi,
 but it was requiring to install all the documentation tools, and I did
 not have enough SD disk space for that.
 
 Cheers,
 Massimo
 

Greetings,

Glad that I've found some info about the issue. I have same problem with the 
same UPS on RPi. Unfortunately link for the patch is no longer valid. Could you 
send it one more time or the compiled package for RPi would be more 
appreciable. 
Thank you

With best regards,
Eugene



___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser


Re: [Nut-upsuser] bcmxcp_usb can not communicate with Eaton Powerware 5110

2012-09-05 Thread Arnaud Quette
2012/9/2 Greg Vickers daehe...@iinet.net.au

  Hi Arnaud,


Hi Greg,



 On 13/08/12 18:09, Arnaud Quette wrote:

 Hey Massimo and Greg,

 2012/8/12 Massimo Gais massimo.g...@iki.fi

 On Sun, Aug 12, 2012 at 5:11 AM, Greg Vickers daehe...@iinet.net.auwrote:

 I have not yet gotten rid of it, so thank you very much!  It's a case of
 download, extract, apply patch, and compile on my RPi, correct?


  Hello Greg,
 yes you can compile it directly on the RPI. See anyway that if you have
 the old deb package installed and you want to replace only the recompiled
 driver, you may have some mismatch with the pidpath/statepath directories
 (/var/state/ups vs /var/run/nut). I tried to make a debian package on the
 RPi, but it was requiring to install all the documentation tools, and I did
 not have enough SD disk space for that.

  I have finally gotten around to compiling nut with the patch!  It was on
 my list of things to do :)

 use the following configuration line to get back inline with deb
 directives:

 ./configure --prefix= --includedir=/usr/include --mandir=/usr/share/man
 --sysconfdir=/etc/nut --localstatedir=/var --without-ssl --with-cgi
 --with-dev --enable-static --with-statepath=/var/run/nut
 --with-altpidpath=/var/run/nut --with-drvpath=/lib/nut
 --with-cgipath=/usr/lib/cgi-bin/nut --with-htmlpath=/usr/share/nut/www
 --with-pidpath=/var/run/nut --datadir=/usr/share/nut
 --with-pkgconfig-dir=/usr/lib/pkgconfig --with-user=nut --with-group=nut
 --with-udev-dir=/lib/udev --without-doc

 I saw that 'compile usb drivers = no' was set, and added --with-usb to get
 bcmxcp_usb to compile.

  you may also want to disable a few more things, like CGI, by using
 --without-cgi for example...
 this will lower the dependencies barrier.

 The only packages I had to add were 'libgd2-xmp-dev' and 'libusb-dev'.

 I've just tested it and it work great!  Thanks very much :)


glad to hear it :)


   The only thing plugged into this UPS is the power supply for the
 RaspberryPi - nut reports the load as 0.0% :)  I'm going to also plug in
 the 5-port switch and ADSL modem/router, I expect to be online for some
 time when there is a local power failure :D


RPi is maybe too green (Ie not consuming enough power) to be visible.
I'm interesting in the result with more load...

cheers,
Arnaud
-- 
Linux / Unix / Opensource Engineering Expert - Eaton -
http://opensource.eaton.com
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.fr
___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] bcmxcp_usb can not communicate with Eaton Powerware 5110

2012-09-05 Thread Massimo Gais
On Wed, Sep 5, 2012 at 5:58 PM, Arnaud Quette aquette@gmail.com wrote:

   The only thing plugged into this UPS is the power supply for the
 RaspberryPi - nut reports the load as 0.0% :)  I'm going to also plug in the
 5-port switch and ADSL modem/router, I expect to be online for some time
 when there is a local power failure :D


 RPi is maybe too green (Ie not consuming enough power) to be visible.
 I'm interesting in the result with more load...


RPi normally is consuming about 2W (if it doesn't have to power
anything via USB), so way under 0.5% of an average UPS.
Couple of weeks ago when I was running my tests nut@RPi was reliably
reporting the about 33% of load I have on my UPS (for the time being I
have also a cheap kill-a-watt meter on the UPS input):
 ups.firmware: Cont:00.50 Inve:01.50
 ups.load:  33.3
 ups.mfr: Eaton
 ups.model: POWERWARE UPS700i
 ups.power.nominal: 700

Cheers,
Massimo

___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser


Re: [Nut-upsuser] bcmxcp_usb can not communicate with Eaton Powerware 5110

2012-09-02 Thread Greg Vickers

Hi Arnaud,

On 13/08/12 18:09, Arnaud Quette wrote:

Hey Massimo and Greg,

2012/8/12 Massimo Gais massimo.g...@iki.fi mailto:massimo.g...@iki.fi

On Sun, Aug 12, 2012 at 5:11 AM, Greg Vickers
daehe...@iinet.net.au mailto:daehe...@iinet.net.au wrote:

I have not yet gotten rid of it, so thank you very much!  It's
a case of download, extract, apply patch, and compile on my
RPi, correct?


Hello Greg,
yes you can compile it directly on the RPI. See anyway that if you
have the old deb package installed and you want to replace only
the recompiled driver, you may have some mismatch with the
pidpath/statepath directories (/var/state/ups vs /var/run/nut). I
tried to make a debian package on the RPi, but it was requiring to
install all the documentation tools, and I did not have enough SD
disk space for that.

I have finally gotten around to compiling nut with the patch!  It was on 
my list of things to do :)
use the following configuration line to get back inline with deb 
directives:


./configure --prefix= --includedir=/usr/include 
--mandir=/usr/share/man --sysconfdir=/etc/nut --localstatedir=/var 
--without-ssl --with-cgi --with-dev --enable-static 
--with-statepath=/var/run/nut --with-altpidpath=/var/run/nut 
--with-drvpath=/lib/nut --with-cgipath=/usr/lib/cgi-bin/nut 
--with-htmlpath=/usr/share/nut/www --with-pidpath=/var/run/nut 
--datadir=/usr/share/nut --with-pkgconfig-dir=/usr/lib/pkgconfig 
--with-user=nut --with-group=nut --with-udev-dir=/lib/udev --without-doc
I saw that 'compile usb drivers = no' was set, and added --with-usb to 
get bcmxcp_usb to compile.
you may also want to disable a few more things, like CGI, by using 
--without-cgi for example...

this will lower the dependencies barrier.

The only packages I had to add were 'libgd2-xmp-dev' and 'libusb-dev'.

I've just tested it and it work great!  Thanks very much :)  The only 
thing plugged into this UPS is the power supply for the RaspberryPi - 
nut reports the load as 0.0% :)  I'm going to also plug in the 5-port 
switch and ADSL modem/router, I expect to be online for some time when 
there is a local power failure :D


Cheers,
Greg
___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] bcmxcp_usb can not communicate with Eaton Powerware 5110

2012-08-13 Thread Arnaud Quette
Hey Massimo and Greg,

2012/8/12 Massimo Gais massimo.g...@iki.fi

 On Sun, Aug 12, 2012 at 5:11 AM, Greg Vickers daehe...@iinet.net.auwrote:

  On 11/08/12 06:58, Arnaud Quette wrote:

 Hi Massimo and Greg,

 @Greg: if you yet returned your unit, you now have a solution ;)

 I have not yet gotten rid of it, so thank you very much!  It's a case of
 download, extract, apply patch, and compile on my RPi, correct?


 Hello Greg,
 yes you can compile it directly on the RPI. See anyway that if you have
 the old deb package installed and you want to replace only the recompiled
 driver, you may have some mismatch with the pidpath/statepath directories
 (/var/state/ups vs /var/run/nut). I tried to make a debian package on the
 RPi, but it was requiring to install all the documentation tools, and I did
 not have enough SD disk space for that.


use the following configuration line to get back inline with deb directives:

./configure --prefix= --includedir=/usr/include --mandir=/usr/share/man
--sysconfdir=/etc/nut --localstatedir=/var --without-ssl --with-cgi
--with-dev --enable-static --with-statepath=/var/run/nut
--with-altpidpath=/var/run/nut --with-drvpath=/lib/nut
--with-cgipath=/usr/lib/cgi-bin/nut --with-htmlpath=/usr/share/nut/www
--with-pidpath=/var/run/nut --datadir=/usr/share/nut
--with-pkgconfig-dir=/usr/lib/pkgconfig --with-user=nut --with-group=nut
--with-udev-dir=/lib/udev --without-doc

you may also want to disable a few more things, like CGI, by using
--without-cgi for example...
this will lower the dependencies barrier.

cheers,
Arnaud
-- 
Linux / Unix / Opensource Engineering Expert - Eaton -
http://opensource.eaton.com
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.fr
___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] bcmxcp_usb can not communicate with Eaton Powerware 5110

2012-08-11 Thread Arnaud Quette
2012/8/11 Massimo Gais simosa...@gmail.com

 On Fri, Aug 10, 2012 at 11:58 PM, Arnaud Quette aquette@gmail.com
 wrote:
 
  the driver runs fine. you should get a good upsc output now.
  the Comm lost msg are part of code adjustments needed, but the code
  already handle this fine, and recovers (check entering get_answer(33)
 for
  example).
 
  could you please confirm this by sending the upsc output, and starting
  upsmon to monitor on the RPi?
 

 Hello Arnaud,


Hi Masssimo,


 the driver seems indeed to be working fine, except the 'Lost comm'
 message at beginning. I started the upsc and I can get the expected
 output:

 ambient.temperature.high: 1
 battery.charge.low: 11
 battery.voltage:  13.7
 device.mfr: Eaton
 device.model: POWERWARE UPS700i
 device.serial:
 device.type: ups
 driver.name: bcmxcp_usb
 driver.parameter.pollinterval: 2
 driver.parameter.port: auto
 driver.parameter.shutdown_delay: 60
 driver.version: 2.6.5
 driver.version.internal: 0.26
 input.frequency:  49.9
 input.frequency.high: 55
 input.frequency.low: 45
 input.frequency.nominal: 50
 input.transfer.boost.high: 207
 input.transfer.high: 275
 input.transfer.low: 178
 input.transfer.trim.low: 250
 input.voltage: 238
 input.voltage.nominal: 230
 output.current:   0.6
 output.current.nominal:   1.8
 output.frequency:  49.9
 output.phases: 1
 output.voltage: 238
 output.voltage.nominal: 230
 ups.beeper.status: enabled
 ups.firmware: Cont:00.50 Inve:01.50
 ups.load:  33.3
 ups.mfr: Eaton
 ups.model: POWERWARE UPS700i
 ups.power.nominal: 700
 ups.serial:
 ups.status: OL
 ups.test.result: Done and passed

 Before I'm ready to keep upsmon running and execute some tests with
 the UPS I have to do some cleanup but the basics seems to be in place.


great!
I'll probably bother you with some more testing, once the final code enter
the subversion repos.

cheers,
Arno
___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] bcmxcp_usb can not communicate with Eaton Powerware 5110

2012-08-10 Thread Arnaud Quette
Hi Massimo and Greg,

2012/8/9 Massimo Gais simosa...@gmail.com

 On Wed, Aug 8, 2012 at 1:32 PM, Greg Vickers daehe...@iinet.net.au
 wrote:
  Fantastic Massimo, thank you!  I have yet to replace my 5110, so if
 there is
  anything I can contribute, I will do.
 
  It looks like the only difference between our systems is the kernel
 version
  (I've put the latest rasbian image on, which has kernel 3.2.0-3-rpi).
 
 Maybe the problem is specific to the RPi USB.

 This is the debug from my UPS plugged to old faithful NSLU2, when I
 launch the command /lib/nut/bcmxcp_usb -DDD -a ups:
 (...)
0.812160 get_answer: block_number = 1
0.812220 get_answer: data length = 121
0.812281 get_answer: need to read 6 more data
0.814929 get_answer: (128 bytes) = ab 01 79 01 02 50 00 50 01 00
 0e 00 01 00 10 50
0.815110  4f 57 45 52 57 41 52 45 20 55 50 53 20 20 20 5c 00 00 00
 00 00 00 00 00 00
0.815237  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 51
 51 00 00 00 00 51
0.815357  00 00 00 00 00 00 00 f0 00 f0 00 00 00 f0 00 00 00 00 00
 00 00 00 f0 00 00
0.815475  00 00 00 00 00 00 51 00 00 51 00 00 00 00 00 00 00 00 00
 f0 00 00 00 00 00
0.815561  00 00 00 00 00 00 00 f0 18 3b ab 01
0.815611 get_answer: block_number = 1
0.815673 get_answer: data length = 121
0.815721 get_answer: sequence number (1) is ok
0.815777 get_answer: checksum is ok
0.815852 get_answer: block_number = 1
0.815915 get_answer: data length = 0
0.815975 Communications with UPS lost: get_answer: not the right
 sequence received 0!!!
 ...
 (then the driver tries a few more times to repeat the operation, but
 it fails the same way, and then about by timeout)

 It seems that for some reason the call to usb_interrupt_read()
 function is able only to 'nibble' 8 bytes at a time,


not an issue, since I've modified the loop to be able to receive as many
frames as needed.
but the condition to continue receiving is not suitable for your case.


 instead of
 receiving the whole 171 bytes transfer in one single gulp.


thus, the data of the 2nd sequence is missing (after 3b ab 01):
28 82 c0 01 00 02 00 00 80 0f 00 00 00
00 00 00 00 00 00 00 00 00 00 01 00 80 40 00 00 00 00 00 00 03 00 08 16 00
00 00 0b 00 6b


 Looking at dmesg, I see that on RPi the USB is handled by dwc_otg
 driver, instead of the usual ohci_hcd, and on RPi forums they noticed
 that there is some issue with it, like... that dwc_otg generates on
 idle 8000 interrupts per second!
 I'm not too expert on USB things, but I wonder if that may affect the
 communication with the UPS.


it will not help, but should not be a big issue for us.

would you be able to compile code for testing patches?
you will then just need to replace the driver on the RPi.

cheers,
Arnaud
-- 
Linux / Unix / Opensource Engineering Expert - Eaton -
http://opensource.eaton.com
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.fr
___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] bcmxcp_usb can not communicate with Eaton Powerware 5110

2012-08-10 Thread Massimo Gais
On Fri, Aug 10, 2012 at 12:22 PM, Arnaud Quette aquette@gmail.com wrote:
 Hi Massimo and Greg,

Hello Arnaud,


 instead of
 receiving the whole 171 bytes transfer in one single gulp.


 thus, the data of the 2nd sequence is missing (after 3b ab 01):

 28 82 c0 01 00 02 00 00 80 0f 00 00 00
 00 00 00 00 00 00 00 00 00 00 01 00 80 40 00 00 00 00 00 00 03 00 08 16 00
 00 00 0b 00 6b

Exactly.


 would you be able to compile code for testing patches?
 you will then just need to replace the driver on the RPi.

Yes I can do that.
Actually I was already able to compile on the RPi the just-released
2.6.5 (although I did notice there was no change in bcmxcp_usb code).
Obviously no improvement regarding this specific issue.

Cheers,
Massimo

___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser


Re: [Nut-upsuser] bcmxcp_usb can not communicate with Eaton Powerware 5110

2012-08-10 Thread Massimo Gais
Hello Arnaud,

thanks for the effort for the patch!

 I took most of this afternoon looking at this issue, and this should be
 fixed with the attached patch
 It applies fine on 2.6.5, using the following command:
 # cd nut-2.6.5
 # patch -p0  /path/to/xcp-rcv-loop.diff
 # make

 I've tested it on a 5110 only currently, so it's not applied to the
 development tree.
 for testing purpose, I've also used a byte frame size, to be in your
 condition (Ie, set the 4th param of usb_interrupt_read() to '8').

 please tell me back how it behave on RPi.
 note that I'll probably have to do some code adjustment, and obviously
 regression testing on other units, before committing the patch to the main
 source tree.


I applied your patch to the 2.6.5 code and run only the bcmxcp_usb
driver and... I'm not sure that everything is ok.

If I run the driver as ./bcmxcp_usb -u root -a ups it launches, but
after a second I get a Communications with UPS lost: get_answer: not
the right sequence received 0!!!. However the driver seems still to
keep running.

I also tried to start the driver under debug (-). In attachment
you can see the output (until I typed ctrl-c), that also include some
some of the 'communication lost' messages.

Cheers,
Massimo


bcmxcp_patched.txt.gz
Description: GNU Zip compressed data
___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] bcmxcp_usb can not communicate with Eaton Powerware 5110

2012-08-10 Thread Arnaud Quette
Hi Massimo and Greg,

@Greg: if you yet returned your unit, you now have a solution ;)

thanks for the effort for the patch!


welcome ;)

 I took most of this afternoon looking at this issue, and this should be
  fixed with the attached patch
  It applies fine on 2.6.5, using the following command:
  # cd nut-2.6.5
  # patch -p0  /path/to/xcp-rcv-loop.diff
  # make
 
  I've tested it on a 5110 only currently, so it's not applied to the
  development tree.
  for testing purpose, I've also used a byte frame size, to be in your
  condition (Ie, set the 4th param of usb_interrupt_read() to '8').
 
  please tell me back how it behave on RPi.
  note that I'll probably have to do some code adjustment, and obviously
  regression testing on other units, before committing the patch to the
 main
  source tree.
 

 I applied your patch to the 2.6.5 code and run only the bcmxcp_usb
 driver and... I'm not sure that everything is ok.


sorry, I forgot to explicitly request the trace (debug level 5) to validate
on my side...


 If I run the driver as ./bcmxcp_usb -u root -a ups it launches, but
 after a second I get a Communications with UPS lost: get_answer: not
 the right sequence received 0!!!. However the driver seems still to
 keep running.

 I also tried to start the driver under debug (-). In attachment
 you can see the output (until I typed ctrl-c), that also include some
 some of the 'communication lost' messages.


the driver runs fine. you should get a good upsc output now.
the Comm lost msg are part of code adjustments needed, but the code
already handle this fine, and recovers (check entering get_answer(33) for
example).

could you please confirm this by sending the upsc output, and starting
upsmon to monitor on the RPi?

cheers,
Arnaud
-- 
Linux / Unix / Opensource Engineering Expert - Eaton -
http://opensource.eaton.com
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.fr
___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

[Nut-upsuser] bcmxcp_usb can not communicate with Eaton Powerware 5110

2012-08-08 Thread Massimo Gais

 I'm going to go with the last option I have, and will replace this UPS
 with one that works with this combination of architecture and OS! :)


 yup, still an option ;)

Hello,

I have the same issue with Raspberry Pi (running 'raspbian') and
Powerware 5110, and I'd like to help to solve it, as I don't have the
priviledge to replace UPS :-). I'm moving my nut server from an old
NSLU2 with debian squeeze (where it was working properly) to RPi as I
need a miniserver with more memory to run also other tasks.

So, is there any debug information that I can provide to help ?

# uname -a
Linux raspi0 3.1.9+ #272 PREEMPT Tue Aug 7 22:51:44 BST 2012 armv6l GNU/Linux

# ldd bcmxcp_usb
/usr/lib/arm-linux-gnueabihf/libcofi_rpi.so (0x40148000)
libusb-0.1.so.4 = /lib/arm-linux-gnueabihf/libusb-0.1.so.4 (0x40151000)
libpthread.so.0 = /lib/arm-linux-gnueabihf/libpthread.so.0 (0x40024000)
libc.so.6 = /lib/arm-linux-gnueabihf/libc.so.6 (0x4016)
/lib/arm-linux-gnueabihf/ld-linux.so.3 = /lib/ld-linux-armhf.so.3 
(0x4005)

# dpkg --list | grep -E 'nut-server|libc6|raspi-copies-and-fills'
ii  libc6:armhf   2.13-33
Embedded GNU C Library: Shared libraries
ii  libc6-dev:armhf   2.13-33
Embedded GNU C Library: Development Libraries and Header Files
ii  nut-server2.6.4-1
network UPS tools - core system
ii  raspi-copies-and-fills0.1
Optimised memcpy/memset implementation for ARM11 used in Raspberry Pi


Cheers,
Massimo

___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser


Re: [Nut-upsuser] bcmxcp_usb can not communicate with Eaton Powerware 5110

2012-08-08 Thread Greg Vickers

On 08/08/12 20:19, Massimo Gais wrote:

I have the same issue with Raspberry Pi (running 'raspbian') and
Powerware 5110, and I'd like to help to solve it, as I don't have the
priviledge to replace UPS :-). I'm moving my nut server from an old
NSLU2 with debian squeeze (where it was working properly) to RPi as I
need a miniserver with more memory to run also other tasks.

So, is there any debug information that I can provide to help ?

# uname -a
Linux raspi0 3.1.9+ #272 PREEMPT Tue Aug 7 22:51:44 BST 2012 armv6l GNU/Linux

# ldd bcmxcp_usb
/usr/lib/arm-linux-gnueabihf/libcofi_rpi.so (0x40148000)
libusb-0.1.so.4 = /lib/arm-linux-gnueabihf/libusb-0.1.so.4 (0x40151000)
libpthread.so.0 = /lib/arm-linux-gnueabihf/libpthread.so.0 (0x40024000)
libc.so.6 = /lib/arm-linux-gnueabihf/libc.so.6 (0x4016)
/lib/arm-linux-gnueabihf/ld-linux.so.3 = /lib/ld-linux-armhf.so.3 
(0x4005)

# dpkg --list | grep -E 'nut-server|libc6|raspi-copies-and-fills'
ii  libc6:armhf   2.13-33
Embedded GNU C Library: Shared libraries
ii  libc6-dev:armhf   2.13-33
Embedded GNU C Library: Development Libraries and Header Files
ii  nut-server2.6.4-1
network UPS tools - core system
ii  raspi-copies-and-fills0.1
Optimised memcpy/memset implementation for ARM11 used in Raspberry Pi

Fantastic Massimo, thank you!  I have yet to replace my 5110, so if 
there is anything I can contribute, I will do.


It looks like the only difference between our systems is the kernel 
version (I've put the latest rasbian image on, which has kernel 
3.2.0-3-rpi).


Cheers,
Greg

___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser


Re: [Nut-upsuser] bcmxcp_usb can not communicate with Eaton Powerware 5110

2012-08-01 Thread Greg Vickers

Hi Arnaud,

On 31/07/12 01:02, Arnaud Quette wrote:

Hi Greg,

2012/7/29 Greg Vickers daehe...@iinet.net.au 
mailto:daehe...@iinet.net.au


On 22/07/12 20:14, Greg Vickers wrote:

Hi Arnaud,

On 18/07/12 20:59, Arnaud Quette wrote:

I've just made a quick test on an Opengear ACM 50004-2
(ARM supervision appliance).
For the record:
- uname -a: Linux acm5004-2 2.6.30.2-uc0 #1 Tue Feb 15
09:30:54 EST 2011 armv4tl unknown
- nut version: 2.4.3 (so bcmxcp_usb 0.23)
- tried with a PW5110 (ups.firmware: Cont:00.50 Inve:01.50)

and everything worked like a charm.
That said, Charles and Kjell comments are fully valid.
That is, try with the latest version (2.6.4). It has at
least more debug traces to help getting visibility.

I've tested with nut 2.6.4, with the same result, i.e. this
driver can't communicate with the UPS.

What switches should I use with the driver to provide you the
debug information?  More -D switches?

Could you perhaps test the 5110 on your Ubuntu system,
with a recent NUT?

OK, tested on the Ubuntu system and it works just fine!  My
PW5110 has the same firmware versions as yours, and the Ubuntu
system I tested on has kernel 3.2.0 on it and nut 2.6.3.  I'll
see if I can get kernel 3.2.0 on the RaspberryPi and report back.


I've got kernel 3.2.0 on the RaspberryPi and nut 2.6.4 and the
bcmxcp_usb driver reports the same problem :(


damn, this would lead me to also think about a kernel or libusb issue.

just to be sure, is bcmxcp_usb linked against libusb *0.1* and not 
1.0-compat?

$ ldd bcmxcp_usb
/usr/lib/arm-linux-gnueabihf/libcofi_rpi.so (0x401b4000)
libusb-0.1.so.4 = /lib/arm-linux-gnueabihf/libusb-0.1.so.4 
(0x4014f000)
libpthread.so.0 = /lib/arm-linux-gnueabihf/libpthread.so.0 
(0x40068000)

libc.so.6 = /lib/arm-linux-gnueabihf/libc.so.6 (0x401bd000)
/lib/arm-linux-gnueabihf/ld-linux.so.3 = /lib/ld-linux-armhf.so.3 
(0x40037000)


So yes, looks like it's linked to libusb 0.1.


I'm going to go with the last option I have, and will replace this
UPS with one that works with this combination of architecture and
OS! :)


yup, still an option ;)

Thanks for your help!

Cheers,
Greg
___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] bcmxcp_usb can not communicate with Eaton Powerware 5110

2012-08-01 Thread Arnaud Quette
2012/8/1 Greg Vickers daehe...@iinet.net.au

  Hi Arnaud,


Hi Greg,


 On 31/07/12 01:02, Arnaud Quette wrote:

 Hi Greg,

 2012/7/29 Greg Vickers daehe...@iinet.net.au

 On 22/07/12 20:14, Greg Vickers wrote:

 Hi Arnaud,

 On 18/07/12 20:59, Arnaud Quette wrote:

 I've just made a quick test on an Opengear ACM 50004-2 (ARM supervision
 appliance).
 For the record:
 - uname -a: Linux acm5004-2 2.6.30.2-uc0 #1 Tue Feb 15 09:30:54 EST
 2011 armv4tl unknown
 - nut version: 2.4.3 (so bcmxcp_usb 0.23)
 - tried with a PW5110 (ups.firmware: Cont:00.50 Inve:01.50)

 and everything worked like a charm.
 That said, Charles and Kjell comments are fully valid.
 That is, try with the latest version (2.6.4). It has at least more
 debug traces to help getting visibility.

 I've tested with nut 2.6.4, with the same result, i.e. this driver can't
 communicate with the UPS.

 What switches should I use with the driver to provide you the debug
 information?  More -D switches?

 Could you perhaps test the 5110 on your Ubuntu system, with a recent
 NUT?

 OK, tested on the Ubuntu system and it works just fine!  My PW5110 has
 the same firmware versions as yours, and the Ubuntu system I tested on has
 kernel 3.2.0 on it and nut 2.6.3.  I'll see if I can get kernel 3.2.0 on
 the RaspberryPi and report back.


  I've got kernel 3.2.0 on the RaspberryPi and nut 2.6.4 and the
 bcmxcp_usb driver reports the same problem :(


 damn, this would lead me to also think about a kernel or libusb issue.

 just to be sure, is bcmxcp_usb linked against libusb *0.1* and not
 1.0-compat?

 $ ldd bcmxcp_usb
 /usr/lib/arm-linux-gnueabihf/libcofi_rpi.so (0x401b4000)
 libusb-0.1.so.4 = /lib/arm-linux-gnueabihf/libusb-0.1.so.4
 (0x4014f000)
 libpthread.so.0 = /lib/arm-linux-gnueabihf/libpthread.so.0
 (0x40068000)
 libc.so.6 = /lib/arm-linux-gnueabihf/libc.so.6 (0x401bd000)
 /lib/arm-linux-gnueabihf/ld-linux.so.3 = /lib/ld-linux-armhf.so.3
 (0x40037000)

 So yes, looks like it's linked to libusb 0.1.


yes, I confirm it.

   I'm going to go with the last option I have, and will replace this UPS
 with one that works with this combination of architecture and OS! :)


 yup, still an option ;)

 Thanks for your help!


welcome!

cheers,
Arnaud
-- 
Linux / Unix / Opensource Engineering Expert - Eaton -
http://opensource.eaton.com
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.fr
___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] bcmxcp_usb can not communicate with Eaton Powerware 5110

2012-07-30 Thread Arnaud Quette
Hi Greg,

2012/7/29 Greg Vickers daehe...@iinet.net.au

 On 22/07/12 20:14, Greg Vickers wrote:

 Hi Arnaud,

 On 18/07/12 20:59, Arnaud Quette wrote:

 I've just made a quick test on an Opengear ACM 50004-2 (ARM supervision
 appliance).
 For the record:
 - uname -a: Linux acm5004-2 2.6.30.2-uc0 #1 Tue Feb 15 09:30:54 EST 2011
 armv4tl unknown
 - nut version: 2.4.3 (so bcmxcp_usb 0.23)
 - tried with a PW5110 (ups.firmware: Cont:00.50 Inve:01.50)

 and everything worked like a charm.
 That said, Charles and Kjell comments are fully valid.
 That is, try with the latest version (2.6.4). It has at least more debug
 traces to help getting visibility.

 I've tested with nut 2.6.4, with the same result, i.e. this driver can't
 communicate with the UPS.

 What switches should I use with the driver to provide you the debug
 information?  More -D switches?

 Could you perhaps test the 5110 on your Ubuntu system, with a recent NUT?

 OK, tested on the Ubuntu system and it works just fine!  My PW5110 has
 the same firmware versions as yours, and the Ubuntu system I tested on has
 kernel 3.2.0 on it and nut 2.6.3.  I'll see if I can get kernel 3.2.0 on
 the RaspberryPi and report back.


 I've got kernel 3.2.0 on the RaspberryPi and nut 2.6.4 and the bcmxcp_usb
 driver reports the same problem :(


damn, this would lead me to also think about a kernel or libusb issue.

just to be sure, is bcmxcp_usb linked against libusb *0.1* and not
1.0-compat?


 I'm going to go with the last option I have, and will replace this UPS
 with one that works with this combination of architecture and OS! :)


yup, still an option ;)

cheers,
Arnaud
-- 
Linux / Unix / Opensource Engineering Expert - Eaton -
http://opensource.eaton.com
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.fr
___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] bcmxcp_usb can not communicate with Eaton Powerware 5110

2012-07-28 Thread Greg Vickers

On 22/07/12 20:14, Greg Vickers wrote:

Hi Arnaud,

On 18/07/12 20:59, Arnaud Quette wrote:
I've just made a quick test on an Opengear ACM 50004-2 (ARM 
supervision appliance).

For the record:
- uname -a: Linux acm5004-2 2.6.30.2-uc0 #1 Tue Feb 15 09:30:54 EST 
2011 armv4tl unknown

- nut version: 2.4.3 (so bcmxcp_usb 0.23)
- tried with a PW5110 (ups.firmware: Cont:00.50 Inve:01.50)

and everything worked like a charm.
That said, Charles and Kjell comments are fully valid.
That is, try with the latest version (2.6.4). It has at least more 
debug traces to help getting visibility.
I've tested with nut 2.6.4, with the same result, i.e. this driver 
can't communicate with the UPS.


What switches should I use with the driver to provide you the debug 
information?  More -D switches?
Could you perhaps test the 5110 on your Ubuntu system, with a recent 
NUT?
OK, tested on the Ubuntu system and it works just fine!  My PW5110 has 
the same firmware versions as yours, and the Ubuntu system I tested on 
has kernel 3.2.0 on it and nut 2.6.3.  I'll see if I can get kernel 
3.2.0 on the RaspberryPi and report back.


I've got kernel 3.2.0 on the RaspberryPi and nut 2.6.4 and the 
bcmxcp_usb driver reports the same problem :(


I'm going to go with the last option I have, and will replace this UPS 
with one that works with this combination of architecture and OS! :)



As a side note, I still hope to rewrite this driver, part of 2.8.0.
It will however depend on my available time, and the progress on the 
main 2.8.0 items...



Thanks,
Greg

___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser


Re: [Nut-upsuser] bcmxcp_usb can not communicate with Eaton Powerware 5110

2012-07-22 Thread Greg Vickers

Hi Arnaud,

On 18/07/12 20:59, Arnaud Quette wrote:
I've just made a quick test on an Opengear ACM 50004-2 (ARM 
supervision appliance).

For the record:
- uname -a: Linux acm5004-2 2.6.30.2-uc0 #1 Tue Feb 15 09:30:54 EST 
2011 armv4tl unknown

- nut version: 2.4.3 (so bcmxcp_usb 0.23)
- tried with a PW5110 (ups.firmware: Cont:00.50 Inve:01.50)

and everything worked like a charm.
That said, Charles and Kjell comments are fully valid.
That is, try with the latest version (2.6.4). It has at least more 
debug traces to help getting visibility.
I've tested with nut 2.6.4, with the same result, i.e. this driver can't 
communicate with the UPS.


What switches should I use with the driver to provide you the debug 
information?  More -D switches?

Could you perhaps test the 5110 on your Ubuntu system, with a recent NUT?
OK, tested on the Ubuntu system and it works just fine!  My PW5110 has 
the same firmware versions as yours, and the Ubuntu system I tested on 
has kernel 3.2.0 on it and nut 2.6.3.  I'll see if I can get kernel 
3.2.0 on the RaspberryPi and report back.

As a side note, I still hope to rewrite this driver, part of 2.8.0.
It will however depend on my available time, and the progress on the 
main 2.8.0 items...

Thanks,
Greg

___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser


Re: [Nut-upsuser] bcmxcp_usb can not communicate with Eaton Powerware 5110

2012-07-18 Thread Arnaud Quette
2012/7/13 Greg Vickers daehe...@iinet.net.au

 Hi,


Hi Greg,

I have set up a RaspberryPi computer to do monitoring of two UPSs. One is
 an MGE evolution 800, one is an Eaton Powerware 5110.  The MGE was being
 monitored by another Linux (Ubuntu 12.04) computer, and I just copied and
 pasted in the relevant nut config and it works just fine with nut.

 I've tried to set up the Powerware 5110 with nut, and the bcmxcp_usb
 driver can't communicate with the 5110.

 Here are the details of the RaspberryPi (I'm running the pre-built Debian
 distribution):
 $ uname -a
 Linux monitor 3.1.9+ #90 Wed Apr 18 18:23:05 BST 2012 armv6l GNU/Linux

 Here is details of the nut package:
 $ dpkg -l nut
 ||/ Name   VersionDescription
 +++-==-===**===-==**
 ==**
 ii  nut2.4.3-1.1squeeze1  network UPS tools - core system

 Here is the ups.conf file:
 $ sudo cat /etc/nut/ups.conf
 [pw5110]
 driver = bcmxcp_usb
 port = auto

 Here's what happens when I try to get the driver to talk to the UPS:
 $ sudo /lib/nut/bcmxcp_usb -DD -a pw5110
 Network UPS Tools - BCMXCP UPS driver 0.23 (2.4.3)
 USB communication subdriver 0.18
0.00debug level is '2'
0.008810device 004 opened successfully
0.011517entering get_answer(31)
0.013401get_answer: (8 bytes) = ab 01 79 01 02 50 00 50
0.014623get_answer: block_number = 1
0.015972get_answer: need to read 118 more data
0.017549get_answer: (16 bytes) = ab 01 79 01 02 50 00 50 01 00 0e
 00 01 00 10 50
0.018769get_answer: block_number = 1
0.019927get_answer: need to read 110 more data
0.030671get_answer: (24 bytes) = ab 01 79 01 02 50 00 50 01 00 0e
 00 01 00 10 50
0.031399 4f 57 45 52 57 41 52 45
0.031564get_answer: block_number = 1
0.032179get_answer: need to read 102 more data
0.046680get_answer: (32 bytes) = ab 01 79 01 02 50 00 50 01 00 0e
 00 01 00 10 50
0.047836 4f 57 45 52 57 41 52 45 20 55 50 53 20 20 20 5c
0.048017get_answer: block_number = 1
0.048165get_answer: need to read 94 more data
0.062676get_answer: (40 bytes) = ab 01 79 01 02 50 00 50 01 00 0e
 00 01 00 10 50
0.063836 4f 57 45 52 57 41 52 45 20 55 50 53 20 20 20 5c 00 00 00
 00 00 00 00 00
0.064508get_answer: block_number = 1
0.064703get_answer: need to read 86 more data
0.078676get_answer: (48 bytes) = ab 01 79 01 02 50 00 50 01 00 0e
 00 01 00 10 50
0.079436 4f 57 45 52 57 41 52 45 20 55 50 53 20 20 20 5c 00 00 00
 00 00 00 00 00 00
0.080076 00 00 00 00 00 00 00
0.080230get_answer: block_number = 1
0.080842get_answer: need to read 78 more data
0.094677get_answer: (56 bytes) = ab 01 79 01 02 50 00 50 01 00 0e
 00 01 00 10 50
0.095441 4f 57 45 52 57 41 52 45 20 55 50 53 20 20 20 5c 00 00 00
 00 00 00 00 00 00
0.096094 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0.096245get_answer: block_number = 1
0.097018get_answer: need to read 70 more data
0.110676get_answer: (64 bytes) = ab 01 79 01 02 50 00 50 01 00 0e
 00 01 00 10 50
0.111436 4f 57 45 52 57 41 52 45 20 55 50 53 20 20 20 5c 00 00 00
 00 00 00 00 00 00
0.111642 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 51
 51 00 00 00
0.112272get_answer: block_number = 1
0.112436get_answer: need to read 62 more data
0.126675get_answer: (72 bytes) = ab 01 79 01 02 50 00 50 01 00 0e
 00 01 00 10 50
0.127825 4f 57 45 52 57 41 52 45 20 55 50 53 20 20 20 5c 00 00 00
 00 00 00 00 00 00
0.128075 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 51
 51 00 00 00 00 51
0.128694 00 00 00 00 00 00
0.128843get_answer: block_number = 1
0.128980get_answer: need to read 54 more data
0.142678get_answer: (80 bytes) = ab 01 79 01 02 50 00 50 01 00 0e
 00 01 00 10 50
0.143436 4f 57 45 52 57 41 52 45 20 55 50 53 20 20 20 5c 00 00 00
 00 00 00 00 00 00
0.144122 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 51
 51 00 00 00 00 51
0.144361 00 00 00 00 00 00 00 f0 00 f0 00 00 00 f0
0.145140get_answer: block_number = 1
0.145314get_answer: need to read 46 more data
0.158684get_answer: (88 bytes) = ab 01 79 01 02 50 00 50 01 00 0e
 00 01 00 10 50
0.159443 4f 57 45 52 57 41 52 45 20 55 50 53 20 20 20 5c 00 00 00
 00 00 00 00 00 00
0.160119 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 51
 51 00 00 00 00 51
0.160332 00 00 00 00 00 00 00 f0 00 f0 00 00 00 f0 00 00 00 00 00
 00 00 00
0.160956get_answer: block_number = 1
0.161109get_answer: need to read 38 more data
0.174685get_answer: (96 bytes) = ab 01 79 01 02 50 00 50 01 00 0e
 00 01 00 10 50
0.175448 4f 57 45 52 57 41 52 45 20 55 50 53 20 20 20 5c 00 00 00
 00 00 00 00 00 00

Re: [Nut-upsuser] bcmxcp_usb can not communicate with Eaton Powerware 5110

2012-07-15 Thread Greg Vickers

On 13/07/12 22:24, Charles Lepple wrote:

On Jul 13, 2012, at 12:41 AM, Greg Vickers wrote:


   0.238682get_answer: (128 bytes) = ab 01 79 01 02 50 00 50 01 00 0e 00 
01 00 10 50
   0.239445 4f 57 45 52 57 41 52 45 20 55 50 53 20 20 20 5c 00 00 00 00 00 
00 00 00 00
   0.240107 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 51 51 00 
00 00 00 51
   0.240351 00 00 00 00 00 00 00 f0 00 f0 00 00 00 f0 00 00 00 00 00 00 00 
00 f0 00 00
   0.240558 00 00 00 00 00 00 51 00 00 51 00 00 00 00 00 00 00 00 00 f0 00 
00 00 00 00
   0.241334 00 00 00 00 00 00 00 f0 18 3b ab 01
   0.241969get_answer: block_number = 1
   0.242121get_answer: sequence number (1) is ok
   0.242254get_answer: checksum is ok
   0.242891get_answer: block_number = 1
   0.243072Communications with UPS lost: get_answer: not the right sequence 
received 0!!!

Well, that's odd.

I'm not an expert on this driver, but a quick read of that portion of the code 
implies that this shouldn't happen.

The last line says the received sequence number is 0. I think the sequence 
number is the 4th byte (my_buf[3]), which is 1 in the hex dump you posted:

http://trac.networkupstools.org/projects/nut/browser/trunk/drivers/bcmxcp_usb.c#L236

I was going to take a look at the source package to see if any extra patches 
were included, but it looks like there's a newer version of Debian for the 
Raspberry Pi (based on wheezy instead of squeeze), and it includes a newer 
build of NUT.

It doesn't look like much has changed in the NUT source tree between 2.4.3 and 
2.6.4, but there's a significant chance that Debian wheezy was built with a 
newer compiler. Can you give that a try? If not, I'd recommend rebuilding NUT 
from source, so that we can patch in a few more debug statements.

Ah, thanks!  I've installed nut from wheezy:
$ dpkg -l nut*
+++-=-=-==
ii  nut   2.6.4-1   network UPS 
tools - metapackage
ii  nut-cgi   2.4.3-1.1squeeze1 network UPS 
tools - web interface
ii  nut-client2.6.4-1   network UPS 
tools - clients
ii  nut-server2.6.4-1   network UPS 
tools - core system


But when calling the driver to communicate with the UPS, the result is 
the same.  What is the next step for debugging this driver?


Thanks,
Greg

___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser


Re: [Nut-upsuser] bcmxcp_usb can not communicate with Eaton Powerware 5110

2012-07-15 Thread Kjell Claesson
söndagen den 15 juli 2012 16.59.56 skrev  Greg Vickers:

Hi Greg,

 On 13/07/12 22:24, Charles Lepple wrote:
  On Jul 13, 2012, at 12:41 AM, Greg Vickers wrote:
 0.238682get_answer: (128 bytes) = ab 01 79 01 02 50 00 50 01 00
 0e 00 01 00 10 50 0.239445 4f 57 45 52 57 41 52 45 20 55 50 53 20
 20 20 5c 00 00 00 00 00 00 00 00 00 0.240107 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 51 51 00 00 00 00 51 0.240351 00
 00 00 00 00 00 00 f0 00 f0 00 00 00 f0 00 00 00 00 00 00 00 00 f0 00
 00 0.240558 00 00 00 00 00 00 51 00 00 51 00 00 00 00 00 00 00 00
 00 f0 00 00 00 00 00 0.241334 00 00 00 00 00 00 00 f0 18 3b ab 01
 0.241969get_answer: block_number = 1
 0.242121get_answer: sequence number (1) is ok
 0.242254get_answer: checksum is ok
 0.242891get_answer: block_number = 1
 0.243072Communications with UPS lost: get_answer: not the right
 sequence received 0!!! 
  Well, that's odd.

Yep that's odd. If it would be the last sequence the sequence-number should
read 82.
 The sequence is numbered in ascending order and on the last sequence the msb
is set to 1. (1010 = 82 Hex) 

  
  I'm not an expert on this driver, but a quick read of that portion of the
  code implies that this shouldn't happen.
  
  The last line says the received sequence number is 0. I think the sequence
  number is the 4th byte (my_buf[3]), which is 1 in the hex dump you
  posted:
8-snip

Yep Charles is right. The problem with the 5110 is that it was one of the 
first that was equipped with usb. This implementation is not following the
usb criteria. That is why there is difference between this and later ups'es.

Look at:
http://trac.networkupstools.org/projects/nut/browser/trunk/drivers/bcmxcp_usb.c#L49

And the difference in line 59 for the phonitextec interface that the 5110 use.

I have backed off a bit from the development, and I don't have any early 
Powerware to test the driver.

But I know that Arnaud made some changes around the problem with the 5110.

Regards
Kjell Claesson



___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser


Re: [Nut-upsuser] bcmxcp_usb can not communicate with Eaton Powerware 5110

2012-07-13 Thread Charles Lepple
On Jul 13, 2012, at 12:41 AM, Greg Vickers wrote:

   0.238682get_answer: (128 bytes) = ab 01 79 01 02 50 00 50 01 00 0e 00 
 01 00 10 50
   0.239445 4f 57 45 52 57 41 52 45 20 55 50 53 20 20 20 5c 00 00 00 00 00 
 00 00 00 00
   0.240107 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 51 51 00 
 00 00 00 51
   0.240351 00 00 00 00 00 00 00 f0 00 f0 00 00 00 f0 00 00 00 00 00 00 00 
 00 f0 00 00
   0.240558 00 00 00 00 00 00 51 00 00 51 00 00 00 00 00 00 00 00 00 f0 00 
 00 00 00 00
   0.241334 00 00 00 00 00 00 00 f0 18 3b ab 01
   0.241969get_answer: block_number = 1
   0.242121get_answer: sequence number (1) is ok
   0.242254get_answer: checksum is ok
   0.242891get_answer: block_number = 1
   0.243072Communications with UPS lost: get_answer: not the right 
 sequence received 0!!!

Well, that's odd.

I'm not an expert on this driver, but a quick read of that portion of the code 
implies that this shouldn't happen.

The last line says the received sequence number is 0. I think the sequence 
number is the 4th byte (my_buf[3]), which is 1 in the hex dump you posted:

http://trac.networkupstools.org/projects/nut/browser/trunk/drivers/bcmxcp_usb.c#L236

I was going to take a look at the source package to see if any extra patches 
were included, but it looks like there's a newer version of Debian for the 
Raspberry Pi (based on wheezy instead of squeeze), and it includes a newer 
build of NUT.

It doesn't look like much has changed in the NUT source tree between 2.4.3 and 
2.6.4, but there's a significant chance that Debian wheezy was built with a 
newer compiler. Can you give that a try? If not, I'd recommend rebuilding NUT 
from source, so that we can patch in a few more debug statements.

Regards,

-- 
Charles Lepple
clepple@gmail




___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser


[Nut-upsuser] bcmxcp_usb can not communicate with Eaton Powerware 5110

2012-07-12 Thread Greg Vickers

Hi,

I have set up a RaspberryPi computer to do monitoring of two UPSs. One 
is an MGE evolution 800, one is an Eaton Powerware 5110.  The MGE was 
being monitored by another Linux (Ubuntu 12.04) computer, and I just 
copied and pasted in the relevant nut config and it works just fine with 
nut.


I've tried to set up the Powerware 5110 with nut, and the bcmxcp_usb 
driver can't communicate with the 5110.


Here are the details of the RaspberryPi (I'm running the pre-built 
Debian distribution):

$ uname -a
Linux monitor 3.1.9+ #90 Wed Apr 18 18:23:05 BST 2012 armv6l GNU/Linux

Here is details of the nut package:
$ dpkg -l nut
||/ Name   VersionDescription
+++-==-==-
ii  nut2.4.3-1.1squeeze1  network UPS tools - core system

Here is the ups.conf file:
$ sudo cat /etc/nut/ups.conf
[pw5110]
driver = bcmxcp_usb
port = auto

Here's what happens when I try to get the driver to talk to the UPS:
$ sudo /lib/nut/bcmxcp_usb -DD -a pw5110
Network UPS Tools - BCMXCP UPS driver 0.23 (2.4.3)
USB communication subdriver 0.18
   0.00debug level is '2'
   0.008810device 004 opened successfully
   0.011517entering get_answer(31)
   0.013401get_answer: (8 bytes) = ab 01 79 01 02 50 00 50
   0.014623get_answer: block_number = 1
   0.015972get_answer: need to read 118 more data
   0.017549get_answer: (16 bytes) = ab 01 79 01 02 50 00 50 01 00 
0e 00 01 00 10 50

   0.018769get_answer: block_number = 1
   0.019927get_answer: need to read 110 more data
   0.030671get_answer: (24 bytes) = ab 01 79 01 02 50 00 50 01 00 
0e 00 01 00 10 50

   0.031399 4f 57 45 52 57 41 52 45
   0.031564get_answer: block_number = 1
   0.032179get_answer: need to read 102 more data
   0.046680get_answer: (32 bytes) = ab 01 79 01 02 50 00 50 01 00 
0e 00 01 00 10 50

   0.047836 4f 57 45 52 57 41 52 45 20 55 50 53 20 20 20 5c
   0.048017get_answer: block_number = 1
   0.048165get_answer: need to read 94 more data
   0.062676get_answer: (40 bytes) = ab 01 79 01 02 50 00 50 01 00 
0e 00 01 00 10 50
   0.063836 4f 57 45 52 57 41 52 45 20 55 50 53 20 20 20 5c 00 00 
00 00 00 00 00 00

   0.064508get_answer: block_number = 1
   0.064703get_answer: need to read 86 more data
   0.078676get_answer: (48 bytes) = ab 01 79 01 02 50 00 50 01 00 
0e 00 01 00 10 50
   0.079436 4f 57 45 52 57 41 52 45 20 55 50 53 20 20 20 5c 00 00 
00 00 00 00 00 00 00

   0.080076 00 00 00 00 00 00 00
   0.080230get_answer: block_number = 1
   0.080842get_answer: need to read 78 more data
   0.094677get_answer: (56 bytes) = ab 01 79 01 02 50 00 50 01 00 
0e 00 01 00 10 50
   0.095441 4f 57 45 52 57 41 52 45 20 55 50 53 20 20 20 5c 00 00 
00 00 00 00 00 00 00

   0.096094 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
   0.096245get_answer: block_number = 1
   0.097018get_answer: need to read 70 more data
   0.110676get_answer: (64 bytes) = ab 01 79 01 02 50 00 50 01 00 
0e 00 01 00 10 50
   0.111436 4f 57 45 52 57 41 52 45 20 55 50 53 20 20 20 5c 00 00 
00 00 00 00 00 00 00
   0.111642 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
51 51 00 00 00

   0.112272get_answer: block_number = 1
   0.112436get_answer: need to read 62 more data
   0.126675get_answer: (72 bytes) = ab 01 79 01 02 50 00 50 01 00 
0e 00 01 00 10 50
   0.127825 4f 57 45 52 57 41 52 45 20 55 50 53 20 20 20 5c 00 00 
00 00 00 00 00 00 00
   0.128075 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
51 51 00 00 00 00 51

   0.128694 00 00 00 00 00 00
   0.128843get_answer: block_number = 1
   0.128980get_answer: need to read 54 more data
   0.142678get_answer: (80 bytes) = ab 01 79 01 02 50 00 50 01 00 
0e 00 01 00 10 50
   0.143436 4f 57 45 52 57 41 52 45 20 55 50 53 20 20 20 5c 00 00 
00 00 00 00 00 00 00
   0.144122 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
51 51 00 00 00 00 51

   0.144361 00 00 00 00 00 00 00 f0 00 f0 00 00 00 f0
   0.145140get_answer: block_number = 1
   0.145314get_answer: need to read 46 more data
   0.158684get_answer: (88 bytes) = ab 01 79 01 02 50 00 50 01 00 
0e 00 01 00 10 50
   0.159443 4f 57 45 52 57 41 52 45 20 55 50 53 20 20 20 5c 00 00 
00 00 00 00 00 00 00
   0.160119 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
51 51 00 00 00 00 51
   0.160332 00 00 00 00 00 00 00 f0 00 f0 00 00 00 f0 00 00 00 00 
00 00 00 00

   0.160956get_answer: block_number = 1
   0.161109get_answer: need to read 38 more data
   0.174685get_answer: (96 bytes) = ab 01 79 01 02 50 00 50 01 00 
0e 00 01 00 10 50
   0.175448 4f 57 45 52 57 41 52 45 20 55 50 53 20 20 20 5c 00 00 
00 00 00 00 00 00 00
   0.176120 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
51 51 00 00 00 00 51
   0.176798 00 00 00 00 00 00 00 f0