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