[Nut-upsdev] patch for old APC Smart-UPS 600
Charles Lepple
clepple at gmail.com
Sat Dec 6 16:16:40 UTC 2008
On Thu, Nov 27, 2008 at 10:16 PM, Konstantin 'Kastus' Shchuka
<kastus at epocrates.com> wrote:
> I am sorry to return to this old issue again.
>
> I discovered that my venerable SU-600 sometimes responds with other D codes
> than I added to compat_tab already. I had to add 3 more codes there to
> make it recognized properly by NUT.
Kastus,
is there a chance that the digit at the end of the code is some form
of status? Is there a chance we might see D1, D2 or D3 in the future?
I don't see any harm in applying the patch, but I would like to
understand a little more about what is going on here. (Sorry, I don't
have a serial APC UPS to test with.)
> Here is the diff:
>
> --- nut-2.2.1.orig/drivers/apcsmart.h 2007-12-17 07:13:09.000000000 -0800
> +++ nut-2.2.1/drivers/apcsmart.h 2008-11-27 18:56:36.292018933 -0800
> @@ -258,6 +258,9 @@
> /* CS 350 */
> { "5.4.D", "\1ABPQRSUYbdfgjmnx9", 0 },
> /* Smart-UPS 600 */
> + { "D9", "789ABCEFGKLMNOPQRSUVWXYZ", 0 },
> + { "D8", "789ABCEFGKLMNOPQRSUVWXYZ", 0 },
> + { "D7", "789ABCEFGKLMNOPQRSUVWXYZ", 0 },
> { "D6", "789ABCEFGKLMNOPQRSUVWXYZ", 0 },
> { "D5", "789ABCEFGKLMNOPQRSUVWXYZ", 0 },
> { "D4", "789ABCEFGKLMNOPQRSUVWXYZ", 0 },
>
> Thanks,
> -Kastus
>
> On Fri, Nov 24, 2006 at 08:43:09PM -0800, Konstantin 'Kastus' Shchuka wrote:
>> Hi there,
>>
>> I am using an old (really old) APC Smart-UPS 600. It worked fine
>> under apcupsd but when I tried NUT it did not work.
>>
>> The error I was getting was:
>>
>> sudo /lib/nut/apcsmart -DDD /dev/ttyS1
>> Network UPS Tools (version 2.0.4) - APC Smart protocol driver
>> Driver version 1.99.8, command table version 2.0
>> debug level is '3'
>> Attempting firmware lookup
>> Firmware: [D4]
>> Not found in table - trying normal method
>> APC - Attempting to find command set
>> APC - Parsing out command set
>> Unable to split APC version string
>> Bailing out
>>
>> I tried running commands manually from minicom, and indeed, the UPS
>> was returning D6, D5, or D4 in response to "b" command. I still do not
>> understand the inconsistency, but I have observed these 3 strings at least.
>>
>> I came up with the following patch to apcsmart.h:
>>
>> --- nut-2.0.4.orig/drivers/apcsmart.h
>> +++ nut-2.0.4/drivers/apcsmart.h
>> @@ -254,6 +254,10 @@
>> /* APC600 */
>> { "6QD", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 },
>> { "6TI", "79ABCDEFGKLMNOPQRSUVWXYZcefgjklmnopqrsuxz", 0 },
>> + /* Smart-UPS 600 */
>> + { "D6", "789ABCEFGKLMNOPQRSUVWXYZ", 0 },
>> + { "D5", "789ABCEFGKLMNOPQRSUVWXYZ", 0 },
>> + { "D4", "789ABCEFGKLMNOPQRSUVWXYZ", 0 },
>> /* CS 350 */
>> { "5.4.D", "\1ABPQRSUYbdfgjmnx9", 0 },
>>
>> I understand that it is a clumsy way to make it work but it was the easiest
>> for me.
>>
>> I am not sure how many more old Smart-UPS 600 are still in use and if it's
>> worth including into NUT.
>>
>> Thanks,
>> --
>> Kastus Shchuka
>
> _______________________________________________
> Nut-upsdev mailing list
> Nut-upsdev at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/nut-upsdev
>
--
- Charles Lepple
More information about the Nut-upsdev
mailing list