<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On 06/02/2011 21:42, Kevin wrote:
<blockquote cite="mid:4D4EB362.2010203@gmail.com" type="cite">on
06/02/2011 21:06 Charles Lepple wrote:
<br>
<blockquote type="cite">
<br>
It looks like the only uncommented code which talks to the
device is
<br>
the last line. (The results from the getval() calls do not seem
to be
<br>
used.)
<br>
<br>
APCDelayBeforeReboot maps to 0xff86007c, so Arjen's suggestion
to
<br>
change the 10 to 1 should be equivalent to the setvalue() line
at the
<br>
end.
<br>
<br>
</blockquote>
<br>
Thanks for the input Charles. I will post back the results
tomorrow.
<br>
<br>
</blockquote>
<br>
Ok, I've tried that. The result of "clientcmd -u apcmon -p pass123
-a apc1500 shutdown.reboot" is nothing. Nothing that I can see
changes at all.<br>
<br>
I did this with the old working modified hidups driver:<br>
<br>
# ./hidups -DDD -k /dev/hiddev0<br>
Network UPS Tools: HID UPS driver 0.13 (2.0.0)<br>
<br>
Warning: This is an experimental driver.<br>
Some features may not function correctly.<br>
<br>
debug level is '3'<br>
Detected American Power Conversion Back-UPS CS 500 FW:808.q10 .I USB
FW:q10<br>
on port /dev/hiddev0<br>
Initiating UPS shutdown<br>
setvalue(ff86007c, 1): obtained 0 (report 40))<br>
setvalue(using type = feature): report sent successfully<br>
<br>
<br>
Something must be different! Is the "type = feature" relevant at
all?<br>
<br>
There are three lines in the apc-hid.c code that reference
shutdown.reboot:<br>
<br>
<ol>
<li>{ "shutdown.reboot", 0, 0,
"UPS.PowerSummary.DelayBeforeReboot", NULL, "10", HU_TYPE_CMD,
NULL },</li>
<li>{ "shutdown.reboot", 0, 0, "UPS.Output.DelayBeforeReboot",
NULL, "10", HU_TYPE_CMD, NULL },</li>
<li>{ "shutdown.reboot", 0, 0,
"UPS.APCGeneralCollection.APCDelayBeforeReboot", NULL, "1",
HU_TYPE_CMD, NULL },<br>
</li>
</ol>
<br>
I did "usbhid-ups -a apc1500 -k -DDD > CS500shutdown.txt
2>&1" and attached the output in case it holds any clues.<br>
<br>
Regards,<br>
Kevin.<br>
</body>
</html>