Hello, I have a UPS connected to my server with the following: Server is Suse 10.1 Nut version is?Network UPS Tools - Generic UPS driver 1.32 (2.0.4) I installed this around 2005 and cannot remember how I installed the software. ups.conf: [sdrups] driver = genericups port = /dev/ttyS0 desc = "For Server & Backup" upstype = 9 upsd.conf: ACL all 0.0.0.0/0 ACL localhost 127.0.0.1/255.255.255.0 ACL server 192.168.0.4/255.255.255.0 ACCEPT localhost ACCEPT server REJECT all upsd.users: [root] password = autocad allowfrom = localhost server instcmds = all upsmon slave upsmon master# or upsmon slave upsmon.conf: POWERDOWNFLAG /etc/killpower MONITOR sdrups at localhost 1 root autocad master SHUTDOWNCMD "/sbin/shutdown -h +0" This has been running flawlessly since I installed it until recently. The problem is that the UPS died. What I did not mention is the UPS is home made using a switching AC to DC and a Inverter to convert the DC back to AC along with a microcontroller and a car battery (it is outside in the garage) While replacing the power supply (because that is what smoked) I decided to rebuild the microcontroller. It is complete however I cannot get the AC present and low battery to work properly. It uses a standard serial port with simple relay switching. I made a simple device to apply either +12 or -12volts to both pin 1(DCD) and pin 8 (CTS) to help me understand the correct handshake but I am very confused. Here is a table of what I get: StatePin 1Pin 9Note?What I understand it means 1+12V+12VOLOn Line -?normal operation. 2-12V+12VLB OLI don't understand this. It should be On Battery. 3+12V-12VOBI thought this should be Low Battery. 4-12V-12VOLI thought the server should shut down? Note: results of running: /usr/local/ups/bin/upsc sdrups at localhost ups.status I am completely confused as this has been working for years.? The only state that I understand is state 1. Also, none of these states causes the server to shut down. Where I live I don't get many power failures that cause the UPS to shut down the server but I have had them and so it used to work. Please help me in understanding what is wrong. Because it has run for years I don't remember anything about how it works. Thank you for any help- Steve -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20120226/4c4a1ffa/attachment.html>
On Feb 26, 2012, at 3:14 PM, Steve Read wrote:> I made a simple device to apply either +12 or -12volts to both pin 1(DCD) and pin 8 (CTS) to help me understand the correct handshake but I am very confused. > > Here is a table of what I get: > > State Pin 1 Pin 9 Note What I understand it means > 1 +12V +12V OL On Line - normal operation. > 2 -12V +12V LB OL I don't understand this. It should be On Battery. > 3 +12V -12V OB I thought this should be Low Battery. > 4 -12V -12V OL I thought the server should shut down? > > Note: results of running: > /usr/local/ups/bin/upsc sdrups at localhost ups.statusFor reference, here is the block for type=9 in genericups.h: /* Type 9 */ { "APC", "Back-UPS", "APC Back-UPS (940-0023A cable)", 0, /* cable power: none */ TIOCM_CD, 0, /* online: CD off */ TIOCM_CTS, TIOCM_CTS, /* low battery: CTS on */ TIOCM_RTS /* shutdown: RTS */ }, And the text from the genericups man page: - - - - - - - - - - 9 = APC Back-UPS/Back-UPS Pro/Smart-UPS with 940-0023A cable [CP=none] [OL=-DCD] [LB=CTS] [SD=RTS] - - - - - - - - - - For your tests where you apply voltage directly, CP is not relevant. (I assume your microcontroller provides its own power to the serial port control lines.) Also, SD=RTS is the shutdown signal *to* the UPS (saying that NUT acknowledges the UPS' low battery condition). But you mentioned pins 1 (DCD) and 8 (CTS), so we can ignore that for now. The way I read this, online with a good battery should be negative voltages on both DCD and CTS. OB+LB should be positive voltages on both. On Battery (but not yet low) should be DCD high, CTS low. (The fourth condition could occur if the power has returned, but the battery has not yet charged.) I am confused as to how you could get OL for both +/+ and -/- states. Your table says Pin 1 and Pin 9, but earlier you mention Pin 1 and Pin 8. Could pin 8 have been floating during the voltage test? You can use statserial to double-check that your serial port hardware is still good. -- Charles Lepple clepple at gmail