How to control AP9221 from serial port

Suppose, hypothetically, that a friend decided to give you an APC power strip that he wasn’t using, and that you could theoretically control 8 of the ports’ on/off status individually, but you didn’t know how.  If you’re a DIYer like myself, you would of course want to make this happen.  So you Google and instantly find this:

Adventures with the APC 9221

Looks promising, right?  But alas, it takes you to a landing page.  Someone must have forgotten to renew their domain.  Alas the journey ends here, and you give up in despair, right?  WRONG!

Google Search Cache to the rescue!  This is more like it:

I recently came into posession of an APC AP9221 (several actually) through the Electronics Flea Market at De Anza College. These are older rack-mountable power strips with 8 always-on outlets and 8 controllable outlets. Natually, coming from a flea market, the controller was nowhere to be seen. A quick e-bay/google search revealed a few controllers (AP9224) for several hundred dollars each. Being rather unwilling to buy a $300 controller for my newly (and cheaply!) acquired power strips, I disassembled one to see what it was made of. To make a long story short, it’s a Phillips microcontroller in there, communicating out the RJ-11 ports via 2 UARTS. For the technically uninitiated, it’s got a pair of serial ports. I tried to manually figure out the wiring (I’m pretty sure I got close), but couldn’t quite get it.

I contacted APC tech support to see if they could help me. The AP9221 is discontinued, so I figured they might be willing to reveal the connection oriented details so I could control it from my desktop. They couldn’t do that, but they were very helpful in pointing me at the appropriate communications cable, with the part number 940-0144. It’s not for sale anymore, but pinouts are widely available online. You can make your own for a few bucks. I picked up a few RJ12 (6P6C) Reversed cables, meaning that the cable rolls once between endpoints. They’re available from (part number 941) for around $0.80 each. To interface these with the serial port on my computer, I had a few DB9F-RJ45 connectors lying around that did the trick just great. They’re available from Jameco (part number 615005) for around $3.

All that needs to be done is assemble the adapter to match the desired wiring. Remember you’re using a rolled cable! The simple wiring is below:

DB9 Pin Connector Wire Color RJ45 Pin
2 Green 5
3 Red 4
5 Yellow 3

After wiring up the connector and plugging it into your serial port, plugging the RJ12 cable into the adapter and the APC unit, you should be able to communicate via HyperTerm/minicom at 2400 baud, 8N1. The default password is apc. Enjoy!

All information is provided as is. It may or may not be correct. Use at your own risk.

Copyright (c) 2008-2009 Daniel Nelson
Eat your veggies

Thanks Dan.  So I tried this, and it worked!  One thing though, you may need to unplug and replug the power strip once your cable is connected to get it to talk to the serial port.  Mine tended to fall asleep after awhile, it may have been set up that way, but I reset it to default settings once I was able to log in, and it hasn’t happened since.

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.