Bug#611082: apcupsd: USB problems with APC CS 500

2011-02-19 Thread Sergij Gorel's'kiy

Hi!
I'm user APC CS500 too. I tried to use 3.14.7 version of apcupsd. This 
version works fine, so i tried to see difference between two versions 
(3.14.7 and 3.14.8).
After experiments, i have made sure the driver is not functioning 
correctly(apcupsd-3.14.8/src/drivers/usb/usb.c) and i compared the two 
versions of the driver.
Experimenting with a partial return to the previous driver (commenting 
on new lines in last driver), gave me stable work apcupsd with my UPS 
APC CS500.
In version 3.14.8(-2) apcupsd we must commented 68 line in driver file 
apcupsd-3.14.8/src/drivers/usb/usb.c, it must be like there:


line 67|   {CI_VBATT,   0x00840030, P_BATTERY, 
T_UNITS,true },  /* Battery Voltage */
line 68|   //{CI_VBATT,   0x00840030, P_PWSUM,   
T_UNITS,true },  /* Battery Voltage (alternative) */
line 69|   {CI_NONE,0x00840031, P_ANY, 
T_UNITS,false},  /* Current */


Patch file (can be downloaded _http://pastebin.com/fgKhqjsC ):
--- apcupsd-3.14.8/src/drivers/usb/usb.c2010-01-10 
17:29:00.0 +0200
+++ apcupsd-3.14.8/src/drivers/usb/usb.c2011-02-19 
20:34:34.109519477 +0200

@@ -65,7 +65,7 @@
{CI_VLINE,   0x00840030, P_INPUT,   T_UNITS,
true },  /* Line Voltage */
{CI_VOUT,0x00840030, P_OUTPUT,  T_UNITS,
true },  /* Output Voltage */
{CI_VBATT,   0x00840030, P_BATTERY, T_UNITS,
true },  /* Battery Voltage */
-   {CI_VBATT,   0x00840030, P_PWSUM,   T_UNITS,true 
},  /* Battery Voltage (alternative) */
+   //{CI_VBATT,   0x00840030, P_PWSUM,   T_UNITS,
true },  /* Battery Voltage (alternative) */
{CI_NONE,0x00840031, P_ANY, T_UNITS,
false},  /* Current */
{CI_FREQ,0x00840032, P_OUTPUT,  T_UNITS,
true },  /* Frequency */
{CI_NONE,0x00840033, P_ANY, T_UNITS,
false},  /* ApparentPower */



--
Best regards, Sergiy!




--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#611082: apcupsd: USB problems with APC CS 500

2011-01-31 Thread hugo vanwoerkom
Hi,

Where did you get 3.14.7?

Regards,

Hugo Vanwoerkom


Bug#611082: apcupsd: USB problems with APC CS 500

2011-01-25 Thread A Mennucc
Package: apcupsd
Version: 3.14.8-2
Severity: important

hi,

Over the past few months, it had become impossible to use apcupsd
with my APC box, labeled APC Back-UPS CS 500

The symptoms are: every ~30seconds, the kernel would log 
a message such as 
[  302.969832] usb 3-2: USB disconnect, address 6
[  302.970094] usb 3-2: ctrl urb status -62 received
[  307.376532] usb 3-2: new low speed USB device using ohci_hcd and address 7
[  307.552176] usb 3-2: New USB device found, idVendor=051d, idProduct=0002
[  307.552184] usb 3-2: New USB device strings: Mfr=3, Product=1, SerialNumber=2
[  307.552190] usb 3-2: Product: Back-UPS 500 FW: 6.4.I USB FW: c1 
[  307.552194] usb 3-2: Manufacturer: American Power Conversion
[  307.552199] usb 3-2: SerialNumber: BB0309024776
[  307.552309] usb 3-2: configuration #1 chosen from 1 choice
[  307.931440] generic-usb 0003:051D:0002.0006: hiddev0,hidraw0: USB HID v1.00 
Device [American Power Conversion Back-UPS 500 FW: 6.4.I USB FW: c1 ] on 
usb-:00:13.1-2/input0
and then the daemon apcupsd would send an email claiming 
' `hostname` Communications with UPS restored '
and would send a similar message to all terminals.
This was quite annoying; moreover, in older kernels,
it would sometimes trigger a kernel oops (see bug 534579).
So I had to deinstall apcupsd.

Yesterday I decided to Google around, and I found that many people
are having similar trouble with this same APC model and this 
specific version of apcupsd. See e.g. 
http://blog.bigsmoke.us/2009/08/09/apc-cs-500-cuase-usb-disruption
http://old.nabble.com/client-communications-failure-td30468668.html

One of those web pages tell that the problem does not happen
with apcupsd 3.14.7 . And indeed I have compiled and installed
it, and it works fine.

A.

ps: I attach the output of /sbin/apcaccess

-- System Information:
Debian Release: 6.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-openvz-amd64 (SMP w/2 CPU cores)
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages apcupsd depends on:
ii  libc6 2.11.2-9   Embedded GNU C Library: Shared lib
ii  libgcc1   1:4.4.5-8  GCC support library
ii  libwrap0  7.6.q-19   Wietse Venema's TCP wrappers libra

Versions of packages apcupsd recommends:
ii  apcupsd-doc   3.14.8-2   APC UPS Power Management (document

Versions of packages apcupsd suggests:
pn  apcupsd-cgi   none (no description available)
pn  hal   none (no description available)
ii  udev  164-3  /dev/ and hotplug management daemo

-- Configuration Files:
/etc/apcupsd/apcupsd.conf changed:
UPSCABLE usb
UPSTYPE usb
LOCKFILE /var/lock
ONBATTERYDELAY 6
BATTERYLEVEL 10
MINUTES 3
TIMEOUT 0
ANNOY 300
ANNOYDELAY 60
NOLOGON disable
KILLDELAY 0
NETSERVER on
NISIP 127.0.0.1
NISPORT 3551
EVENTSFILE /var/log/apcupsd.events
EVENTSFILEMAX 10
UPSCLASS standalone
UPSMODE disable
STATTIME 0
STATFILE /var/log/apcupsd.status
LOGSTATS off
DATATIME 0

/etc/default/apcupsd changed:
APCACCESS=/sbin/apcaccess
ISCONFIGURED=yes


-- no debconf information

-- 
Andrea Mennucc

The EULA sounds like it was written by a team of lawyers who want to tell 
me what I can't do, and the GPL sounds like it was written by a human 
being who wants me to know what I can do.
Anonymous,http://www.securityfocus.com/columnists/420
APC  : 001,018,0457
DATE : Tue Jan 25 06:00:37 CET 2011
HOSTNAME : tonelli
VERSION  : 3.14.7 (1 August 2009) debian
UPSNAME  : tonelli
CABLE: USB Cable
MODEL: Back-UPS 500 
UPSMODE  : Stand Alone
STARTTIME: Mon Jan 24 13:40:03 CET 2011
STATUS   : COMMLOST 
MBATTCHG : 10 Percent
MINTIMEL : 3 Minutes
MAXTIME  : 0 Seconds
NUMXFERS : 0
TONBATT  : 0 seconds
CUMONBATT: 0 seconds
XOFFBATT : N/A
STATFLAG : 0x07000108 Status Flag
END APC  : Tue Jan 25 14:36:26 CET 2011


signature.asc
Description: Digital signature