Tugger the SLUGger!SLUG Mailing List Archives

Re: [SLUG] UPS woes.

Ahh nice work!

I've actually been up all night looking for more information this thing.
I'm not 100% sure, but it looks like its a copy of UPS made by Microtek
Italia called the MICROedge MEG501.

I wasn't able to find ANY information about the protocol they used.

The company which seems to have developed the software for the UPS
called Commander Pro(windows) and UPSmart (Linux and Novell) is called
WayTech from what I can gather. They dont have any updated software on
their site, they dont make any mention of which UPS unit the software
works with, and they dont have any information about the protocol.

I have spent hours trying to figure out what baud rate, start, stop,
data, and parity bits the UPS uses, but i've had no luck.

All I know is that it does not change any control lines if you pull the

If you go to http://www.exploits.org/nut/ you'll find a heap of useful
info about various UPSes. You might want to let them know about the UPS
and what you've discovered about the protocol so far.

If i knew anything about coding in C i'd help you finnish the software
but i have no idea.

Let me know what else you discover, or if there's anything I can do to
help you develop the software, like testing the ups, etc.

On Sun, 2003-06-22 at 12:59, Ian Wienand wrote:
> On Sun, Jun 22, 2003 at 07:54:28AM +1000, Chris Barnes wrote:
> > Hi everyone,
> > The other day my boss bought a UPS which was on special at Dick Smith
> > Electronics for $100 (400Va, 9pin Serial-to-pc, 6 minutes @ half-load),
> > an ok price i guess.
> yep, a good little buy.  I'm not sure why they even bothered with that
> Linux software, and of course it's 386 only, sigh.  I've 'reversed
> engineered' the protocol and have some software that talks to it, but
> it's not complete as yet (I of course want it to do everything under
> the sun ... ).
> (excuse me just copying and pasting bits of the program below)
> Basically, to get it going send the following 4 strings
> char ups_init1[]  = {0x4D,0x0D,0x4D,0x0D};
> char ups_init2[]  = {0x4D, 0x0D};
> char ups_init3[]  = {0x49, 0x0D, 0x49, 0x0D, 0x51, 0x31, 0x0D};
> char ups_init4[]  = {0x46, 0x0D};
> that sets it up and puts it in a mode where you can poll it with
> char ups_status[] = {0x51, 0x31, 0x0D};
> You'll get back something that can be parsed by scanf as 
> #define SSCANF_STATUS(buf,status)                               \
> sscanf(buf,"(%lf %lf %lf %lf %lf %lf %lf %u",                   \
>       status->in_volts, status->unknown1,                       \
>       status->out_volts, status->load, status->out_frequency,   \
>       status->unknown2, status->temperature, status->flag)
> I don't know what unknown1 and unknown2 actually mean, but flag
> changes like : 
> #define FLAG_NORMAL       1000
> #define FLAG_POWER_SMOOTH 101000
> #define FLAG_POWER_FAIL   10001000
> I might make a sourceforge page if a lot of people have bought these
> things.  
> -i