<br><div class="gmail_quote">2009/5/4 Konstantin &#39;Kastus&#39; Shchuka <span dir="ltr">&lt;<a href="mailto:kastus@epocrates.com">kastus@epocrates.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Arnaud,<br>
</blockquote><div><br>Hi Kastus,<br><br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
As you are patching apcsmart.h, can you also apply my patch that I sent<br>
back in November last year for 2.2.1 for the old SU600 model to the upsdev<br>
list?<br>
<br>
I am attaching my original post.<br>
</blockquote><div><br>thanks for the reminder. it seems that I&#39;ve been reseted at some point in time...<br>I&#39;ve just applied your patch to the trunk.<br><br>thanks for your contrib.<br>Arnaud<br>-- <br>Linux / Unix Expert R&amp;D - Eaton - <a href="http://www.eaton.com/mgeops">http://www.eaton.com/mgeops</a><br>
Network UPS Tools (NUT) Project Leader - <a href="http://www.networkupstools.org/">http://www.networkupstools.org/</a><br>Debian Developer - <a href="http://www.debian.org">http://www.debian.org</a><br>Free Software Developer - <a href="http://arnaud.quette.free.fr/">http://arnaud.quette.free.fr/</a><br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="h5">
On Mon, May 04, 2009 at 10:32:23AM +0200, Arnaud Quette wrote:<br>
&gt; 2009/5/3 Thomas Juerges<br>
&gt;<br>
&gt; &gt; -----BEGIN PGP SIGNED MESSAGE-----<br>
&gt; &gt; Hash: SHA1<br>
&gt; &gt;<br>
&gt; &gt; Hi Arnaud,<br>
&gt; &gt;<br>
&gt;<br>
&gt; Hi Thomas,<br>
&gt;<br>
&gt;<br>
&gt; &gt; I just checked the 2.4.1 version of nut and found that you forgot to add<br>
&gt; &gt; my old UPS model (APC Smart-UPS 900).  I guess it is because you were<br>
&gt; &gt; busy at the time when I sent you the patch.  So here it goes again. :)<br>
&gt; &gt;<br>
&gt;<br>
&gt; uh, right sorry.<br>
&gt; I was pretty sure I applied it, but seems not.<br>
&gt; it&#39;s now done and commited to the Development tree.<br>
&gt;<br>
&gt; I&#39;ve left your below information about older SmartUPS and Mac os tweaks<br>
&gt; since I&#39;m sure people will be interested in...<br>
&gt;<br>
&gt; thanks a lot for your contrib and reminder ;-)<br>
&gt;<br>
&gt; cheers,<br>
&gt; Arnaud<br>
&gt; --<br>
&gt; Linux / Unix Expert R&amp;D - Eaton - <a href="http://www.eaton.com/mgeops" target="_blank">http://www.eaton.com/mgeops</a><br>
&gt; Network UPS Tools (NUT) Project Leader - <a href="http://www.networkupstools.org/" target="_blank">http://www.networkupstools.org/</a><br>
&gt; Debian Developer - <a href="http://www.debian.org" target="_blank">http://www.debian.org</a><br>
&gt; Free Software Developer - <a href="http://arnaud.quette.free.fr/" target="_blank">http://arnaud.quette.free.fr/</a><br>
&gt;<br>
&gt;  Arnaud Quette wrote:<br>
&gt; &gt; &gt; Hi Thomas,<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; just to ack your mails. I&#39;m currently on trip, at the FossCamp /<br>
&gt; &gt; &gt; Ubuntu Developer Summit.<br>
&gt; &gt; &gt; I&#39;ll really reply to you soon.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; thanks for your contrib and feedback.and see you soon.<br>
&gt; &gt; &gt; -- Arnaud<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; 2008/12/6 Thomas Juerges &lt;<a href="mailto:thomas@sokrates.homelinux.net">thomas@sokrates.homelinux.net</a>&gt;:<br>
&gt; &gt; &gt; Hi Arnaud,<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; I am not sure if the message which I sent to you via your <a href="http://free.fr" target="_blank">free.fr</a><br>
&gt; &gt; &gt; account could reach you.  Therefore i have attached it here and send<br>
&gt; &gt; &gt; this one to both email addresses.  In the case that you receive both,<br>
&gt; &gt; &gt; please accept my apologies.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Anyway, I have two patches for you which make the APC SmartUPS-900 work<br>
&gt; &gt; &gt; (did already before) and report all of its status information (did not<br>
&gt; &gt; &gt; do that before).  I have attached two patches for inclusion into the<br>
&gt; &gt; &gt; next release for your convenience.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; The mentioned patches are as well a reply for the question asked on the<br>
&gt; &gt; &gt; NUT mailing list when somebody asked why an older SmartUPS would not<br>
&gt; &gt; &gt; provide the same information as under apcupsd.  Simple reason is that<br>
&gt; &gt; &gt; the older SmartUPSes (at least mine, SmartUPS-900 w. 7TD firmware) do<br>
&gt; &gt; &gt; not respond to the ^Z, a or b commands which are used to inquire what<br>
&gt; &gt; &gt; they support.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; I hope you&#39;ll find this useful.  Cheers,<br>
&gt; &gt; &gt;        Thomas Juerges<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; -------- Original Message --------<br>
&gt; &gt; &gt; Subject: Restarting Power Macs after power loss<br>
&gt; &gt; &gt; Date: Fri, 05 Dec 2008 08:48:02 -0700<br>
&gt; &gt; &gt; From: Thomas Juerges &lt;<a href="mailto:thomas@sokrates.homelinux.net">thomas@sokrates.homelinux.net</a>&gt;<br>
&gt; &gt; &gt; To: <a href="mailto:arnaud.quette@free.fr">arnaud.quette@free.fr</a><br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Hi Arnaud,<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; first thanks for yor nice piece of software.  I am using it on my Mac<br>
&gt; &gt; &gt; Mini G4 since I installed Gentoo on it and I am quite happy with it<br>
&gt; &gt; &gt; [<a href="https://www.sokrates.homelinux.net/nut/" target="_blank">https://www.sokrates.homelinux.net/nut/</a>].  There are a few quirks but,<br>
&gt; &gt; &gt; well, that&#39;s life.  No free lunch. :)<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; All right.  Now for the more important things:  I write to you in<br>
&gt; &gt; &gt; response to your comment in  this question in the NUT FAQ:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Q: My PowerMac G4 won&#39;t power back up by itself (into Linux) after the<br>
&gt; &gt; &gt;    UPS shuts down.  What can I do about this?<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; [...]<br>
&gt; &gt; &gt; Unfortunately, the hardware has evolved and there is no good<br>
&gt; &gt; &gt;    equivalent for this hack on today&#39;s systems.<br>
&gt; &gt; &gt; [...]<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Here is what you have to do nowadays on Linux (Kernel 2.6.x).<br>
&gt; &gt; &gt; Unfortunately this setting is not stored in NVRAM so you&#39;ll better have<br>
&gt; &gt; &gt; it somewhere in rc.local or any other script that gets run every time<br>
&gt; &gt; &gt; during a boot up.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; echo &quot;server_mode=1&quot; &gt; /proc/pmu/options<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; This will let the PowerMac restart every time after the power was lost -<br>
&gt; &gt; &gt; as far as I can tell.  I&#39;ve got only one. :)<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Cheers,<br>
&gt; &gt; &gt;        Thomas<br>
&gt; &gt; &gt;&gt;<br>
&gt; &gt; - --- nut-2.2.2/drivers/apcsmart.c        2007-12-12 13:34:51.000000000<br>
&gt; &gt; -0700<br>
&gt; &gt; +++ nut-2.2.2-r1/drivers/apcsmart.c     2008-12-06 03:24:36.000000000 -0700<br>
&gt; &gt; @@ -536,6 +536,7 @@<br>
&gt; &gt;               /* found one, force the model information */<br>
&gt; &gt;               if (!strcmp(buf, &quot;6QD&quot;) || /* (APC600.) */<br>
&gt; &gt;                               !strcmp(buf, &quot;8QD&quot;) || /* (SmartUPS 1250,<br>
&gt; &gt; vintage 07/94.) */<br>
&gt; &gt; +                               !strcmp(buf, &quot;7TD&quot;) || /* (SmartUPS 900,<br>
&gt; &gt; vintage 11/94.) */<br>
&gt; &gt;                               !strcmp(buf, &quot;6TI&quot;) || /* (APC600.) */<br>
&gt; &gt;                               !strcmp(buf, &quot;6QI&quot;)) { /* (APC600.) */<br>
&gt; &gt;                       upsdebugx(1, &quot;Found Smart-UPS&quot;);<br>
&gt; &gt; &gt;&gt;<br>
&gt; &gt; - --- nut-2.2.2/drivers/apcsmart.h        2007-12-12 13:34:51.000000000<br>
&gt; &gt; -0700<br>
&gt; &gt; +++ nut-2.2.2-r1/drivers/apcsmart.h     2008-12-06 03:00:48.000000000 -0700<br>
&gt; &gt; @@ -261,6 +261,8 @@<br>
&gt; &gt;       { &quot;D6&quot;,         &quot;789ABCEFGKLMNOPQRSUVWXYZ&quot;, 0 },<br>
&gt; &gt;       { &quot;D5&quot;,         &quot;789ABCEFGKLMNOPQRSUVWXYZ&quot;, 0 },<br>
&gt; &gt;       { &quot;D4&quot;,         &quot;789ABCEFGKLMNOPQRSUVWXYZ&quot;, 0 },<br>
&gt; &gt; +       /* SmartUPS 900 */<br>
&gt; &gt; +       { &quot;7TD&quot;,        &quot;79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz&quot;, 0 },<br>
&gt; &gt;       /* SmartUPS 1250. */<br>
&gt; &gt;       { &quot;8QD&quot;,        &quot;79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz&quot;, 0 },<br>
&gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt;&gt;<br>
&gt; &gt; &gt;&gt;<br>
&gt; &gt;<br>
&gt; &gt; -----BEGIN PGP SIGNATURE-----<br>
&gt; &gt; Version: GnuPG v2.0.11 (GNU/Linux)<br>
&gt; &gt; Comment: Using GnuPG with Mozilla - <a href="http://enigmail.mozdev.org" target="_blank">http://enigmail.mozdev.org</a><br>
&gt; &gt;<br>
&gt; &gt; iEYEARECAAYFAkn+AowACgkQMiyRSD9s+zV0oQCffFhtV0zs2InekhBrVey+fQ6o<br>
&gt; &gt; EW0An12lictuhgsldN/Yhfh2oVeTxmeP<br>
&gt; &gt; =9+Pn<br>
&gt; &gt; -----END PGP SIGNATURE-----<br>
</div></div><br><br>---------- Message transféré ----------<br>From: &quot;Konstantin &#39;Kastus&#39; Shchuka&quot; &lt;<a href="mailto:kastus@epocrates.com">kastus@epocrates.com</a>&gt;<br>To: <a href="mailto:nut-upsdev@lists.alioth.debian.org">nut-upsdev@lists.alioth.debian.org</a><br>
Date: Thu, 27 Nov 2008 19:16:52 -0800<br>Subject: Re: [Nut-upsdev] patch for old APC Smart-UPS 600<br>I am sorry to return to this old issue again.<br>
<br>
I discovered that my venerable SU-600 sometimes responds with other D codes<br>
than I added to compat_tab already. I had to add 3 more codes there to<br>
make it recognized properly by NUT.<br>
<br>
Here is the diff:<br>
<br>
--- nut-2.2.1.orig/drivers/apcsmart.h    2007-12-17 07:13:09.000000000 -0800<br>
+++ nut-2.2.1/drivers/apcsmart.h  2008-11-27 18:56:36.292018933 -0800<br>
@@ -258,6 +258,9 @@<br>
        /* CS 350 */<br>
        { &quot;5.4.D&quot;,      &quot;\1ABPQRSUYbdfgjmnx9&quot;,  0 },<br>
        /* Smart-UPS 600 */<br>
+       { &quot;D9&quot;,         &quot;789ABCEFGKLMNOPQRSUVWXYZ&quot;, 0 },<br>
+       { &quot;D8&quot;,         &quot;789ABCEFGKLMNOPQRSUVWXYZ&quot;, 0 },<br>
+       { &quot;D7&quot;,         &quot;789ABCEFGKLMNOPQRSUVWXYZ&quot;, 0 },<br>
        { &quot;D6&quot;,         &quot;789ABCEFGKLMNOPQRSUVWXYZ&quot;, 0 },<br>
        { &quot;D5&quot;,         &quot;789ABCEFGKLMNOPQRSUVWXYZ&quot;, 0 },<br>
        { &quot;D4&quot;,         &quot;789ABCEFGKLMNOPQRSUVWXYZ&quot;, 0 },<br>
<br>
Thanks,<br>
-Kastus<br>
<br>
On Fri, Nov 24, 2006 at 08:43:09PM -0800, Konstantin &#39;Kastus&#39; Shchuka wrote:<br>
&gt; Hi there,<br>
&gt;<br>
&gt; I am using an old (really old) APC Smart-UPS 600. It worked fine<br>
&gt; under apcupsd but when I tried NUT it did not work.<br>
&gt;<br>
&gt; The error I was getting was:<br>
&gt;<br>
&gt; sudo /lib/nut/apcsmart -DDD /dev/ttyS1<br>
&gt; Network UPS Tools (version 2.0.4) - APC Smart protocol driver<br>
&gt;         Driver version 1.99.8, command table version 2.0<br>
&gt; debug level is &#39;3&#39;<br>
&gt; Attempting firmware lookup<br>
&gt; Firmware: [D4]<br>
&gt; Not found in table - trying normal method<br>
&gt; APC - Attempting to find command set<br>
&gt; APC - Parsing out command set<br>
&gt; Unable to split APC version string<br>
&gt; Bailing out<br>
&gt;<br>
&gt; I tried running commands manually from minicom, and indeed, the UPS<br>
&gt; was returning D6, D5, or D4 in response to &quot;b&quot; command. I still do not<br>
&gt; understand the inconsistency, but I have observed these 3 strings at least.<br>
&gt;<br>
&gt; I came up with the following patch to apcsmart.h:<br>
&gt;<br>
&gt; --- nut-2.0.4.orig/drivers/apcsmart.h<br>
&gt; +++ nut-2.0.4/drivers/apcsmart.h<br>
&gt; @@ -254,6 +254,10 @@<br>
&gt;         /* APC600 */<br>
&gt;         { &quot;6QD&quot;,        &quot;79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz&quot;, 0 },<br>
&gt;         { &quot;6TI&quot;,        &quot;79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz&quot;, 0 },<br>
&gt; +       /* Smart-UPS 600 */<br>
&gt; +       { &quot;D6&quot;,         &quot;789ABCEFGKLMNOPQRSUVWXYZ&quot;, 0 },<br>
&gt; +       { &quot;D5&quot;,         &quot;789ABCEFGKLMNOPQRSUVWXYZ&quot;, 0 },<br>
&gt; +       { &quot;D4&quot;,         &quot;789ABCEFGKLMNOPQRSUVWXYZ&quot;, 0 },<br>
&gt;         /* CS 350 */<br>
&gt;         { &quot;5.4.D&quot;,      &quot;\1ABPQRSUYbdfgjmnx9&quot;,  0 },<br>
&gt;<br>
&gt; I understand that it is a clumsy way to make it work but it was the easiest<br>
&gt; for me.<br>
&gt;<br>
&gt; I am not sure how many more old Smart-UPS 600 are still in use and if it&#39;s<br>
&gt; worth including into NUT.<br>
&gt;<br>
&gt; Thanks,<br>
&gt; --<br>
&gt; Kastus Shchuka<br>
<br>
</blockquote></div><br>