Subject: Re: apcmon (was Re: UPS hookup)
To: Michael L. VanLoon -- <>
From: David Gilbert <>
List: current-users
Date: 11/22/1995 08:32:39
>>>>> "Michael" == Michael L VanLoon <--" <>> writes:

Michael> [stuff about weird APC cables deleted]
>> I'm interested in this debate because I'm planning on purchasing a
>> UPS sometime soon.

Michael> Then why even bother with APC?  They're selfish little boys.

Michael> I've heard nothing but good things about the BEST UPCs, and
Michael> supposedly their implementation is completely open.

if they gave out source since several of the computers that are
protected were not listed in their literature.  They were happy to


Things I've noticed in the code:

- Wait 1 second for each charcter sent (now that's *slow*)
- Takes 2 seconds for fortress to respond
- "f\r" seems to be the 'request status' command
- The returned string will start with a digit, end with '\r' and is in Hex
- if char buf[256] is your serial read buffer,
	- buf[17] == 1 when the inverter is on.
	- When I say buf[x] & 1, convert buf[x] to binary first
	- buf[20] & 1 --> low AC out
	- buf[21] & 2 --> near low battery
	- buf[22] & 2 --> user test alarm
	- buf[20] & 8 is some other alarm.
	- buf[58..61] is MMSS time left on battery

- This string should be 80 characters long, and should satisfy the
  following checksum:
	- for the first 40 charcters, do
		- Take each pair of hex digits, and sum their binary
                  value as bytes.
	- sum mod 256 should be 0.

	That seems to be all they check for in that string.  You'd
think that there's more in there, but only someone who wants to
experiment a lot would find out.  There also might be other commands,
but I can find any documented or used here.

	Someone should probably archive this.


|Mail:                |  equal if and only if they |
|               |   are precisely opposite.  |