Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Jan 96 22:54 WET
From:      uhclem@nemesis.lonestar.org (Frank Durda IV)
To:        hackers@freebsd.org
Subject:   APC UPS Command set
Message-ID:  <m0tYn7i-000CMKC@nemesis.lonestar.org>

next in thread | raw e-mail | index | archive | help
I see there has been some discussion about writing stronger tools
to manage APC UPS systems under FreeBSD.   Great!  I have systems with
1400s and 600s if you need some beta sites for code.   

I had originally wanted to do the same thing but have been far too busy.
Someone sent me this and I don't know where they got it, so the true author
is unknown, and perhaps someone has filled-in more of the blanks since then.

-----cut here-----

APC Smart UPS Commands / Protocol
=================================

Interface
---------

The APC UPS's use a simple three wire interface with a shield.

 CPU				UPS
 ---				---

 TxD 2 --------------------- 2	RxD
 RxD 3 --------------------- 1	TxD
 GND 5 --------------------- 9	GND
 Shield ----------------- Shield

[Note on a proper DB25 RS-232 connection, pin 7 is ground, not pin 5]


Communication Parameters
------------------------

2400 Baud, 8 Data Bits, 1 Stop Bit, No Parity ( Standard Stuff Here )


Init Ups ( Smart Mode )
-----------------------

To Start the UPS Responding to Smart UPS Commands send the
character "Y", 0x59, ( A capital y ).


The UPS will respond with the character string "SM" which means
I assume Smart Mode.

>From this point on the UPS will respond to the commands below.


General Commands
----------------

Command	Description
------- --------

A	Test Front Panel        
B	Battery Voltage "xx.x"  
C	Battery Voltage "xx.x" ?
D	N / A                  
E	?? Generates   "OK" 
F	Line Frequency Hz "xx.x"
G	generates "R","T" or "S"
H	N / A                   
I	N / A
J	N / A
K	Shutdown UPS Send a "K", wait 1 sec. Send another "K", wait
	another sec. then send a <CR>. <CR> = 0x0d
	After 15-30 Secs UPS will Shutdown.
L	Input Line Voltage      "xxx.x"
M	Max. Line Voltage Rcvd. "xxx.x"
N	Min. Line Voltage Rcvd. "xxx.x"
O	Output Voltage          "xxx.x"
P	Power Load on UPS in %  "xx.x"
Q	?? generates "08" on mine
R	N / A
S	N / A
T	generates "000.1"  TIME??
U	Self Test gen. "OK<CR>!!S"
V	Version Req. "6KD" on mine
W	Self Test
X	?? Generates "OK"
Y	Init UPS as Smart Mode
Z	N / A


Return Codes
------------

The Following is a list of characters generated by the UPS & what
I did to get them:

"SM"	Received after sending a "Y", SMART MODE ???
"6KD"	UPS Version Number.
"!"	Unplug ac line cord from UPS. Also rcvd when cord plugged
	back in. call it LINE TRANSITION OCCURED.
"?"	Send from UPS after powered up by 1 switch on front panel.
"*"     Sent by UPS after second "K" sent by me. WARNING ABOUT TO
	SHUTDOWN??
"R"	Sent by UPS after I sent it the "G" command. ???
"S"	Sent by UPS after I sent it the "G" command. ???
"T"	Sent by UPS after I sent it the "G" command. ???


------

Frank Durda IV <uhclem@nemesis.lonestar.org>|"The Knights who say "LETNi"
or uhclem%nemesis@rwsystr.nkn.net           | demand...  A SEGMENT REGISTER!!!"
	  ^------(this is the fastest route)|"A what?"
or ...letni!rwsys!nemesis!uhclem	    |"LETNi! LETNi! LETNi!"  - 1983

And no, we don't use "The Chair" in Texas anymore.  But California does
use a slightly different model of that particular piece of furniture.
In Texas we use "The Couch".  The power companies cause sufficient power
problems all by themselves.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?m0tYn7i-000CMKC>