Re: [Apcupsd-users] killpower via USB cable - unsuccessful try
Brought to you by:
adk0212
|
From: Sergey V. <vs...@al...> - 2003-04-21 12:15:48
|
On Sat, 19 Apr 2003 10:51:28 +1000 Milan Durovic <mi...@mi...> wrote: > I tried it, and, unfortunately, it did not work. My UPS model is sold > here in Australia as Back UPS ES 350 (official name from the unit is BF > 350 AZ), which should be very similar to the one Sergey used. Just to > avoid any confusion on my side: is "killpower" supposed to switch off > UPS completely - the action equivalent to pressing a certain button on > the UPS itself? I thought the primary reason for this function would be to: > > 1) prevent battery from completely draining. > > 2) provide "power loss" signal to PC's power supply unit, so that when > the power is restored, the PC starts the boot process. At least on Back-UPS CS 500, "killpower" is not equivalent to switching off the UPS manually. The UPS goes into sleep mode - when the power is restored, it turns back on automatically. If "killpower" is attempted when the external power is OK, the UPS turns its output off for about a second (so the PC reboots even if the power was already restored at the time of killpower). Also, with Back-UPS CS 500 there is a delay (about 45 seconds) between the command and the actual UPS shutdown. Immediately after the killpower command UPS starts to flash "On Line" and "Overload" alternately. > Is there anything I can do to dig out more diagnostic information in > order to see what the problem is? I tried running "apctest" from "src" > directory and this is what I got: > > -- start quote -- > 1) Test 1 - kill UPS power (not yet working!) > 2) Quit > > Select function number: 1 > > > This test will attempt to power down the UPS. > The USB cable should be plugged in to the UPS, but the > AC power plug to the UPS should be DISCONNECTED. > > PLEASE DO NOT RUN THIS TEST WITH A COMPUTER CONNECTED TO YOUR UPS!!! > > Please enter any character when ready to continue: k > > 2003-04-19 10:26:21 calling kill_power function. > apcupsd: linux-usb.c:1028 REPORTINFO num_fields=1 > apcupsd: linux-usb.c:1032 HIDIOCGFIELDINFO for shutdown failed. > ERR=Invalid argument I did not get this; however, I have commented out some lines in src/drivers/usb/linux-usb.c: /******* DEBUG testing */ // write_int_to_ups(ups, CI_WarningCapacityLimit, 40, "CIWarningCapacityLimit"); // write_int_to_ups(ups, CI_RemCapLimit, 20, "CI_RemCapLibmit"); These lines are already removed in the current CVS; they were causing some USB error messages in the logs (but this did not prevent killpower from working). To get more debug info, you can try "dmesg -n8" to get all kernel debug messages on the console (you may also configure syslog to save all kern.* messages to a file, but it is more complex). If you also uncomment #define DEBUG and #define DEBUG_DATA in linux/drivers/usb/hid-core.c, you will get even more debug output from the kernel. |