From owner-freebsd-hackers Sat Jan 6 21:57:01 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id VAA17770 for hackers-outgoing; Sat, 6 Jan 1996 21:57:01 -0800 (PST) Received: from fw.ast.com (fw.ast.com [165.164.6.25]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id VAA17765 for ; Sat, 6 Jan 1996 21:56:58 -0800 (PST) Received: from nemesis by fw.ast.com with uucp (Smail3.1.29.1 #2) id m0tYnjG-0000zeC; Sat, 6 Jan 96 23:33 CST Received: by nemesis.lonestar.org (Smail3.1.27.1 #20) id m0tYn7i-000CMKC; Sat, 6 Jan 96 22:54 WET Message-Id: Date: Sat, 6 Jan 96 22:54 WET To: hackers@freebsd.org From: uhclem@nemesis.lonestar.org (Frank Durda IV) Sent: Sat Jan 6 1996, 22:54:26 CST Subject: APC UPS Command set Sender: owner-hackers@freebsd.org Precedence: bulk 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 . = 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!!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 |"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.