From simpact!nosc!trout.nosc.mil!humu!pilikia!art@decwrl.dec.com Fri May 17 04:23:20 1991
Return-Path: <simpact!nosc!trout.nosc.mil!humu!pilikia!art@decwrl.dec.com>
Received: from uucp-gw-1.pa.dec.com by  vaxkiller.agi.org  (NeXT-1.0 (From Sendmail 5.52)/NeXT-2.0)
	id AA06613; Fri, 17 May 91 04:23:17 PDT
Received: by uucp-gw-1.pa.dec.com; id AA01030; Fri, 17 May 91 04:25:13 -0700
Received: from nosc by dcs.simpact.com (DECUS UUCP ///1.3-1/2.5/);
          Fri, 17 May 91 02:25:02 PDT
Received: by trout.nosc.mil (5.59/1.27)
          id AA04496; Fri, 17 May 91 02:25:11 PDT
Received: from pilikia.UUCP by humu.nosc.mil (5.61/1.35)
          id AA04264; Thu, 16 May 91 20:13:52 -1000
Received: by pilikia.pegasus.com (/\==/\ Smail3.1.20.1 #20.1)
          id <m0jdwiO-0000t8C@pilikia.pegasus.com>; Thu, 16 May 91 18:46 HST
Message-Id: <m0jdwiO-0000t8C@pilikia.pegasus.com>
Date: Thu, 16 May 91 18:46 HST
From: humu!pilikia.pegasus.com!art@trout.nosc.mil (Art Neilson)
In-Reply-To: Richard E. Showalter's message as of Thu May 16, 1991
X-Mailer: Mail User's Shell (7.2.2 4/12/91)
To: rich@vaxkiller.agi.org (Richard E. Showalter)
Subject: Re: upsd and American Power Conversions 1200VX UPS
Status: RO

On Thu May 16, 1991, Richard E. Showalter writes:
> Hi Art,
> 
> 	I downloaded the upsd package from the net and I would like  
> to install it on a NeXT workstation using a APC 1200 UPS.  I bought  
> the UPS second hand without manuals.  I noticed from your README file  
> that your UPS is an American Power Conversions unit and I was  
> wondering if you could send me the pin outs on the DB9 that comes of  
> the back of the UPS.  This is assuming that the two models use the  
> same DB connector.  If so I will assume that the pinouts are the same  
> as well.  

I do have the manual which came with my APC unit, and I can give you the
information on what each pin is used for.  I have a DB9 to DB25 converter
on the end of the DB-9 cable coming out of the APC UPS, I don't have pinouts
for that cable.  I got my cable from APC.  I can speak with a friend of mine
who is using my upsd package on his UNIX system, he made his own cable for it.
Here's the specs from my APC manual:

Pin 1:	User sends a HI RS232 level for 4-5 seconds.  This will signal
	the UPS to turn off it's output until proper line voltage returns
	(Only if UPS is on battery backup).

Pin 2:	UPS sends a high RS232 level within 1 second of a line fail and 
	transfer to on battery backup.  This pin is normally a RS232 low.

Pin 3:	UPS simulates a relay closing between pin 3 and pin 4 in conjunction
	with pin 2.

Pin 4:	Switch common for pins 3, 5 and 6.

Pin 5:	UPS simulates a relay closing when the battery inside the UPS has
	less than 2 minutes (configurable to 5 minutes see "Using your UPS"
	configuration switches).

Pin 6:	UPS simulates a relay opening between pin 6 and pin 4 in conjunction
	with pin 2.

Pin 7:	User may send a HI RS232 level for 1 second to externally turn on
	the UPS.  User may ground this pin for 1 second to externally turn
	off the UPS instantly.

Pin 8:	Unregulated +24VDC protected internally by a 10k Ohm impedance.
	Voltage is present whenever the rear panel switch is ON.

Pin 9:	Chassis ground.
	
I'm currently making some mods to my upsd program to detect and shutdown
the system if the APC UPS signals a low battery condition.  I will be
testing the changes in the next few days, I'll submit the patches to
comp.sources.misc in a week or so.  I also am researching on how to 
tell the UPS to turn off.  According to the docs, you just bring pin 1
high I'm not quite sure how I can do this with software tho.  Maybe if I
can tie it to another output, that'd require cable changes tho.  If I
can make a separate utility called suicide or something, I can call it
from the init.d run level 0 script which is invoked when the system 
shutdown script completes.  This would keep the battery from running on
and on after the system has been shut down.  Anyway, I'll get the cable 
specs from my friend and will email it to you.  Hope the info I've provided
is helpful.
how to do it and sh

-- 
Arthur W. Neilson III		| INET: art@pilikia.pegasus.com
Bank of Hawaii Tech Support	| UUCP: uunet!ucsd!nosc!pilikia!art

