osdir.com
mailing list archive F.A.Q. -since 2001!



Subject: APC Smartups protocol - Hidden Programming Mode -
msg#00120

List: monitoring.nut.user

Mail Archive Navigation:
by Date: Prev Next Date Index by Thread: Prev Next Thread Index

Hej!

Hope nut-upsuser is an appropriate place to post additional info about
the smartups protocol, please tell me if not.

I got an APC Smartups 2200 (5U Rack Mount, European/230V version, 48V
batteries) a couple of days ago, was very happy to find the protocol
description at http://www.networkupstools.org/protocols/apcsmart.html,
and started to play. At the point when everything was working fine, I
pressed a couple of random keys with my minicom open and managed to
completely fubar the UPS...

In the end, I discovered a couple of new commands and got the UPS
working again. I'd like to share my findings, so here they are.


Commands (char \n meaning \n typical result \n other info)
==========================================================

1
Enter programming mode
PROG
Send twice with 3s delay
** warning ** Don't try this at home - your might damage your UPS when
changing some parameters **
The output of the ^Z command does not change. You can leave this mode
with the turn dumb ("R") command.


^Y
Clear Everything
Every possible alarm
** Don't do it. ** (Programming mode only)
Resets everything: Voltmeter calibration, model information,
region code, manufacturing date, serial no... Chances are that your UPS
will become unusable.
True stroy: After typing ^Y, my UPS was unhappy with the line frequency
(50Hz instead of 60Hz), the voltage of both line (0V instead of 110V)
and battery. Consequence: it switched itself off - and refused to be
switched
on again. No way to talk over the serial line, no way to fix (I didn't
know how to do so anyway) the config. The solution was to hold the
On-Button pressed - I jammed a wooden stick between the button and a
battery after recharging the batteries with a power supply.


=
???
0000, 3C00, 3C67, ...
???


Variables writeable in programming mode
=======================================

0,3,4,5: Didn't notice any effect

B: Calibrate the battery voltmeter. 0 is maximum gain, correct setting
for my box is FA.

L: Calibrate the line voltmeter. If set to 0, the ups won't detect any
input power. Correct setting for me is EA.

P: Calibrate the power load measurement.

b: Change model and country/region code, e.g.:
Value Revision Model string (^A)
00 40.9.D SMART-UPS 450
06 50.9.A SMART-UPS 700
13 80.9.I SMART-UPS 2200
B7 91.9.I SMART-UPS 3000 XL
D1 82.9.M SMART-UPS 2200 RM
Note: The voltmeter in the ups depend on the correct setting of the
region code. After the "Big Reset" (^Y), my European 230V SmartUPS 2200
thought it were an US Smartups 450; suddenly the battery voltage read
27V instead of 54V, the expected input voltage became 110V etc... I
suspect that an overloaded converter might go undetected if the model
version is incorrectly set (haven't verified that theory, for obvious
reasons).

m: Manufacturing date, actually arbitrary string (8 char)

n: Serial number, actually arbitrary string (12 char)

o: on battery output voltage. Possible values: 220, 225, 230, 240V on my
model - actually works.



Using car batteries
===================

Btw, I'm using car batteries in my UPS. Since I couldn't find any
experience report about that in google, here's mine:

The SMART-UPS 2200 (European version, 110V models may be different)
operates at 48V. So I connected four el cheapo batteries (36Ah) in
series. They served almost five hours with 17% load on my SmartUPS 2200.
That sounds good, but I have no idea of the lifetime yet.

I'm a bit concerned about the different capacity of the batteries: Since
the batteries are connected in series, the weakest one will be
discharged the most, which in turn hurts its capacity. I'm thinking
about connecting a resistor (e.g. 220 Ohm, 1W) in parallel to each
battery, so that they at least get the same tension when being charged.

One thing to keep in mind is that car batteries produce emit hydrogen
gas, which may explode violently. That's dangerous enough by itself,
but when a couple of batteries full with sulfuric acid explode together,
that's real fun. Car batteries need fresh (circulating) air - and keep
fire and sparks away.

I agree with those who argue that car batteries are built for delivery
of high currents during a short period of time, while they are not very
good at delivering moderate currents for hours. But they are four or
more times cheaper than gel batteries, so I don't care if their lifetime
is a bit shorter.



Greetings from Vienna,

Alexander


Thread at a glance:

Previous Message by Date:

Re: [Fwd: Re: Install problem & Geek Squad UPS]

Hi Gary, sorry, that was my fault. I quoted the wrong file (from the development version, not 2.0.5). In version 2.0.5, the information is also in the file INSTALL, but it is contained in step 2, not step 1: 2. Build the programs. make Optionaly, you can also build the USB drivers using: make usb Note that you need to install libusb development package or files. Them NUT version you have (2.0.5) is the correct one. -- Peter Gary Redden wrote: > > Here is what I found in the nut-2.0.5 top level directory. Where do I > get the correct version? > ============================================================================ > > Build and install > ================= > > > 1. Configure the source tree for your system. Add the --with-user > switch to set the user name that you created above. If you need > any other switches for configure, add them here. > > ./configure --with-user=nut > > If you alter paths with additional switches, be sure to use those > new paths while reading the rest of the steps. > > *** Reference: docs/configure.txt > > --------------------------------------------------------------------------- > Peter Selinger wrote: > > >From the file INSTALL, step 1: > > > > 1. Configure the source tree for your system. Add the --with-user > > switch to set the user name that you created above. > > > > ./configure --with-user=nut > > > > If you need any other switches for configure, add them here. For > > example: > > > > * to build and install USB drivers, add --with-usb (note that you > > need to install libusb development package or files). > > > > That last sentence answers your question. Libusb is at: > > http://libusb.sourceforge.net/ (or type "libusb" into Google). > > > > -- Peter > > > > Gary Redden wrote: > > > >> When I try to build newhidups I seem to be missing a file (usb.h) or=20 > >> should be setting a parameter SHUT_MODE. I did a search of my system and=20 > >> do not have the file usb.h. I also poked around on WebSvn but could not=20 > >> turn up the file. I think SHUT_MODE is for a different device than I=20 > >> have. Where do I find usb.h? Is this the correct list for this problem? > >> Error messages > >> > >> gary@redden-p700:/home/nut/nut-2.0.5/drivers$ make newhidups > >> gcc -I../include -O -Wall -Wsign-compare -c newhidups.c > >> In file included from newhidups.c:25: > >> libhid.h:50:18: error: usb.h: No such file or directory > >> In file included from newhidups.c:25: > >> libhid.h:51: error: syntax error before =91hid_dev_handle=92 > >> libhid.h:51: warning: type defaults to =91int=92 in declaration of=20 > >> =91hid_dev_handle=92 > >> libhid.h:51: warning: data definition has no type or storage class > >> libhid.h:178: error: syntax error before =91*=92 token > >> libhid.h:183: error: syntax error before =91*=92 token > >> libhid.h:184: error: syntax error before =91*=92 token > >> libhid.h:186: error: syntax error before =91*=92 token > >> libhid.h:188: error: syntax error before =91*=92 token > >> libhid.h:190: error: syntax error before =91*=92 token > >> libhid.h:201: error: syntax error before =91*=92 token > >> libhid.h:206: error: syntax error before =91*=92 token > >> libhid.h:211: error: syntax error before =91*=92 token > >> libhid.h:216: error: syntax error before =91*=92 token > >> libhid.h:227: error: syntax error before =91*=92 token > >> libhid.h:232: error: syntax error before =91*=92 token > >> libhid.h:237: error: syntax error before =91*=92 token > >> In file included from newhidups.c:26: > >> newhidups.h:39: error: syntax error before =91*=92 token > >> newhidups.h:39: warning: type defaults to =91int=92 in declaration of =91= > >> udev=92 > >> newhidups.h:39: warning: data definition has no type or storage class > >> newhidups.c:69: error: syntax error before =91*=92 token > >> newhidups.c:69: warning: type defaults to =91int=92 in declaration of =91= > >> udev=92 > >> newhidups.c:69: warning: data definition has no type or storage class > >> make: *** [newhidups.o] Error 1 > >> gary@redden-p700:/home/nut/nut-2.0.5/drivers$ > >> > >> Code from libhid.h > >> > >> #ifdef SHUT_MODE > >> struct shut_dev_handle_s { > >> int upsfd; /* point to main.c/upsfd */ > >> char *device_path; > >> }; > >> typedef struct shut_dev_handle_s shut_dev_handle; > >> typedef shut_dev_handle hid_dev_handle; > >> #else > >> #include <usb.h> > >> typedef usb_dev_handle hid_dev_handle; > >> #endif > >> > >> > >> _______________________________________________ > >> Nut-upsuser mailing list > >> Nut-upsuser@xxxxxxxxxxxxxxxxxxxxxxx > >> http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser > >> > >> > > > > > > > > > _______________________________________________ > Nut-upsuser mailing list > Nut-upsuser@xxxxxxxxxxxxxxxxxxxxxxx > http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser >

Next Message by Date:

Re: APC Smartups protocol - Hidden Programming Mode

> Hope nut-upsuser is an appropriate place to post additional info about > the smartups protocol, please tell me if not. We would prefer nut-devel I think, since that's more about the development of drivers and such. [...] > Using car batteries > =================== [...] > I'm a bit concerned about the different capacity of the batteries: Since > the batteries are connected in series, the weakest one will be > discharged the most, which in turn hurts its capacity. I'm thinking > about connecting a resistor (e.g. 220 Ohm, 1W) in parallel to each > battery, so that they at least get the same tension when being charged. What do you think a car battery actually is? Six individual 2V cells connected in series. What you're essentially doing with connecting four car batteries in series, is just adding more cells in the battery string. As long as you use the same make/type/age of batteries, there is no need for equalizing with a resistor, the capacity will be practically the same. Besides wasting energy, you might prevent the charging circuit from detecting full battery state (since the charge current will never go to virtually zero). Only in *very* large installations it is worthwhile (and cost effective) to charge and monitor each cell separately to make the most out of the lifetime of them. But you'd be looking at the scale of batteries used in submarines, rather than at a home/small office UPS. Best regards, Arjen -- Eindhoven - The Netherlands Key fingerprint - 66 4E 03 2C 9D B5 CB 9B 7A FE 7E C1 EE 88 BC 57

Previous Message by Thread:

[Fwd: Re: Install problem & Geek Squad UPS]

Here is what I found in the nut-2.0.5 top level directory. Where do I get the correct version? ============================================================================ Build and install ================= 1. Configure the source tree for your system. Add the --with-user switch to set the user name that you created above. If you need any other switches for configure, add them here. ./configure --with-user=nut If you alter paths with additional switches, be sure to use those new paths while reading the rest of the steps. *** Reference: docs/configure.txt --------------------------------------------------------------------------- Peter Selinger wrote: >From the file INSTALL, step 1: 1. Configure the source tree for your system. Add the --with-user switch to set the user name that you created above. ./configure --with-user=nut If you need any other switches for configure, add them here. For example: * to build and install USB drivers, add --with-usb (note that you need to install libusb development package or files). That last sentence answers your question. Libusb is at: http://libusb.sourceforge.net/ (or type "libusb" into Google). -- Peter Gary Redden wrote: When I try to build newhidups I seem to be missing a file (usb.h) or=20 should be setting a parameter SHUT_MODE. I did a search of my system and=20 do not have the file usb.h. I also poked around on WebSvn but could not=20 turn up the file. I think SHUT_MODE is for a different device than I=20 have. Where do I find usb.h? Is this the correct list for this problem? Error messages gary@redden-p700:/home/nut/nut-2.0.5/drivers$ make newhidups gcc -I../include -O -Wall -Wsign-compare -c newhidups.c In file included from newhidups.c:25: libhid.h:50:18: error: usb.h: No such file or directory In file included from newhidups.c:25: libhid.h:51: error: syntax error before =91hid_dev_handle=92 libhid.h:51: warning: type defaults to =91int=92 in declaration of=20 =91hid_dev_handle=92 libhid.h:51: warning: data definition has no type or storage class libhid.h:178: error: syntax error before =91*=92 token libhid.h:183: error: syntax error before =91*=92 token libhid.h:184: error: syntax error before =91*=92 token libhid.h:186: error: syntax error before =91*=92 token libhid.h:188: error: syntax error before =91*=92 token libhid.h:190: error: syntax error before =91*=92 token libhid.h:201: error: syntax error before =91*=92 token libhid.h:206: error: syntax error before =91*=92 token libhid.h:211: error: syntax error before =91*=92 token libhid.h:216: error: syntax error before =91*=92 token libhid.h:227: error: syntax error before =91*=92 token libhid.h:232: error: syntax error before =91*=92 token libhid.h:237: error: syntax error before =91*=92 token In file included from newhidups.c:26: newhidups.h:39: error: syntax error before =91*=92 token newhidups.h:39: warning: type defaults to =91int=92 in declaration of =91= udev=92 newhidups.h:39: warning: data definition has no type or storage class newhidups.c:69: error: syntax error before =91*=92 token newhidups.c:69: warning: type defaults to =91int=92 in declaration of =91= udev=92 newhidups.c:69: warning: data definition has no type or storage class make: *** [newhidups.o] Error 1 gary@redden-p700:/home/nut/nut-2.0.5/drivers$ Code from libhid.h #ifdef SHUT_MODE struct shut_dev_handle_s { int upsfd; /* point to main.c/upsfd */ char *device_path; }; typedef struct shut_dev_handle_s shut_dev_handle; typedef shut_dev_handle hid_dev_handle; #else #include <usb.h> typedef usb_dev_handle hid_dev_handle; #endif _______________________________________________ Nut-upsuser mailing list Nut-upsuser@xxxxxxxxxxxxxxxxxxxxxxx http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser

Next Message by Thread:

Re: APC Smartups protocol - Hidden Programming Mode

> Hope nut-upsuser is an appropriate place to post additional info about > the smartups protocol, please tell me if not. We would prefer nut-devel I think, since that's more about the development of drivers and such. [...] > Using car batteries > =================== [...] > I'm a bit concerned about the different capacity of the batteries: Since > the batteries are connected in series, the weakest one will be > discharged the most, which in turn hurts its capacity. I'm thinking > about connecting a resistor (e.g. 220 Ohm, 1W) in parallel to each > battery, so that they at least get the same tension when being charged. What do you think a car battery actually is? Six individual 2V cells connected in series. What you're essentially doing with connecting four car batteries in series, is just adding more cells in the battery string. As long as you use the same make/type/age of batteries, there is no need for equalizing with a resistor, the capacity will be practically the same. Besides wasting energy, you might prevent the charging circuit from detecting full battery state (since the charge current will never go to virtually zero). Only in *very* large installations it is worthwhile (and cost effective) to charge and monitor each cell separately to make the most out of the lifetime of them. But you'd be looking at the scale of batteries used in submarines, rather than at a home/small office UPS. Best regards, Arjen -- Eindhoven - The Netherlands Key fingerprint - 66 4E 03 2C 9D B5 CB 9B 7A FE 7E C1 EE 88 BC 57
blog comments powered by Disqus

Home | News | Sitemap | FAQ | advertise | OSDir is an Inevitable website. GBiz is too!