APC UPS Serial Adapter

This documents the adding of a converter cable to utilise a legacy APC UPS system with a Sun V245/V215 system with Telco style rj45 serial ports

Building the Adapter

From supplier ARP DATACOM order part 102157 - Adapter Modular, DB9/m-RJ45 8P/8C

Other parts from other suppliers may work but you will need to recheck the rj45 pin assignments as the table below assumes blue is pin 1 , white is 8 etc.



DB 9 Pin

Color

RJ 45 Pin

Signal

1

Not Connected



2

Yellow

6

RXD

3

Black

3

TXD

4

Orange

2

DTR

5

Green

5

GND

6

Brown

7

DSR

7

Blue

1

RTS

8

White

8

CTS

9

Not Connected





RED

Not connected (cut)

GND



A Standard rj45 network cable is plugged into the ttyb (serial) port on the sun system and connected to the converter , the ups cable is the connected to the converter as show




Do not attempt to directly connect the converter to the up as this will not function and may damage the sun system or the UPS


Testing the Adapter

Using the open source tool apcupsd


cd /etc/opt/apcupsd/sbin

./apctest



2008-08-28 10:46:52 apctest 3.14.4 (18 May 2008) sun

Checking configuration ...

Attached to driver: apcsmart

sharenet.type = DISABLE

cable.type = CUSTOM_SMART


You are using a SMART cable tye, so I'm entering SMART test mode

mode.type = APCSMART_UPS

Setting up the port ...

Hello, this is the apcupsd Cable Test program.

This part of apctest is for testing Smart UPSes.

Please select the function you want to perform.


1) Query the UPS for all known values

2) Perform a Battery Runtime Calibration

3) Abort Battery Calibration

4) Monitor Battery Calibration progress

5) Program EEPROM

6) Enter TTY mode communicating with UPS

7) Quit


Select function number: 1


I am going to run through the series of queries of the UPS

that are used in initializing apcupsd.


Simulating UPSlinkCheck ...

Wrote: Y Got: SM

Attempting to use smart_poll() ...

Sent: Y Got: SMGood -- smart_poll() works!.


Going to ask for valid commands...

Protocol version is: 3

Alert characters are: !$%+?=#|

Command characters are: ^A^N^Z')+-89>@ABCDEFGKLMNOPQRSUVWXYZabcefgjklmnopqrsuxyz^M


Now running through apcupsd get_UPS capabilities().

NAindicates that the feature is Not Available


UPS Status: 08

Line quality: FF

Reason for last transfer to batteries: S

Self-Test Status: NO

Line Voltage: 228.9

Line Voltage Max: 230.4

Line Voltage Min: 228.9

Output Voltage: 228.9

Batt level percent: 100.0

Batt voltage: 27.54

UPS Load: 000.0

Line freq: 50.00

Runtime left: 027

UPS Internal temp: 027.

Dip switch settings: N

Register 1: 00

Register 2: 00

Register 3: 00

Sensitivity: H

Wakeup delay: 000

Sleep delay: 090

Low transfer voltage: 200

High transfer voltage: 253

Batt charge for return: 45

Alarm status: 0

Low battery shutdown level: 02

UPS Name: UPS_IDEN

UPS Self test interval: 336

UPS manufacture date: 03/16/04

UPS serial number: AS041211XXXXXXX

Date battery replaced: 03/16/04

Output voltage when on batteries: 230

Nominal battery voltage: 024

Percent humidity: NA

Ambient temperature: NA

Firmware revision: 616.3.I

Number of external batteries installed: 000

Number of bad batteries installed: NA

UPS model as defined by UPS: FWI

UPS EPROM capabilities string: <snip>

The EPROM string is 286 characters long!

Hours since last self test: NA


That is all for now.


1) Query the UPS for all known values

2) Perform a Battery Runtime Calibration

3) Abort Battery Calibration

4) Monitor Battery Calibration progress

5) Program EEPROM

6) Enter TTY mode communicating with UPS

7) Quit

Select function number: 7

2008-08-28 11:06:59 End apctest.