Desc: Information about the ups-trust425+625 daemon
File: ups-trust425+625.txt
Date: 31 May 1999
Auth: Peter Bieringer <pb@bieringer.de>

Contents:
- UPS Protocol description
- Cable description (for those which looses it):
- Is there a UPS simulator available (for further developing the related daemon)

UPS Protocol description
========================

    Serial interface: 8,n,1 at 1200 baud
    
    Values for sending:
	0x01:	trigger sending of binary data string
	0x03:	trigger battery testing (UPS switches for a short time in 
	         Power Fail state
    
    Format of the received binary string (11 bytes long):
	(conversion see ups-trust425+625.c for details)
	
    Byte 0: load level
	 1: battery level
	 2: input AC voltage 
	 3: output AC voltage (Attention: different values at OnLine and OnBatt for same output voltage!)
	 4: input AC frequency 
	 5: <don't know, tracing always shows 0x00> 
	 6: output AC frequency
	 7: <don't know, tracing always shows 0x00> 
	 8: <don't know, tracing always shows 0x00> 
	 9: status A
	10: status B
	
	Status A (can be or'ed):
	    0x00:	ok
	    0x01:	Line Fail
	    0x02:	Low Battery
	    0x08:	AVR Buck (BOOST or TRIM)
	    0x20:	Overload
	    0x80:	Off
	    
	Status B (can be or'ed):
	    0x02:	Bad Battery
	    0x04:	UPS in test cycle


Cable description (for those which looses it):
=======================
    UPS		Cable		Cable		RS-232 (PC)
    (SUB-D 9	(SUB-D 9	(SUB-D 9	(SUB-D 9
     female)	 male)		 female)	 male)
    
	     4 ---------------------------- 5	GND
	     8 ---------------------------- 7	RTS (out) (+V power supply)
	     9 ---------------------------- 4	DTR (out) (-V power supply)
	     1 ---------------------------- 2	RxD (in)
	     6 ---------------------------- 3	TxD (out)


Is there a UPS simulator available (for further developing the related daemon)
==============================================================================
    Yes, a small simulator, written in Pascal (Borland's Turbo Pascal 7.0)
    for DOS is available.
    If you need the source code, send a mail to <pb@bieringer.de>
    
	     
