Hi Angela,<br><br>as I understand, your issue is now fixed (confirmed?).<br>thanks a lot to Keven for addressing this.<br><br>cheers,<br>Arnaud<br clear="all">-- <br>Linux / Unix Expert R&D - Eaton - <a href="http://powerquality.eaton.com/" target="_blank">http://powerquality.eaton.com</a><br>
Network UPS Tools (NUT) Project Leader - <a href="http://www.networkupstools.org/" target="_blank">http://www.networkupstools.org/</a><br>Debian Developer - <a href="http://www.debian.org/" target="_blank">http://www.debian.org</a><br>
Free Software Developer - <a href="http://arnaud.quette.free.fr/" target="_blank">http://arnaud.quette.free.fr/</a><br><br><br><div class="gmail_quote">2011/5/18 Angela Williams <span dir="ltr"><<a href="mailto:angierfw@gmail.com">angierfw@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi All and Keven in particular!<br>
<br>
On Tuesday 17 May 2011 at 18:38 Keven L. Ates :-<br>
<div><div></div><div class="h5"><br>
> Hmmm...<br>
> I patched the "BNT-other" driver. You may want to try using that as<br>
> an alternative driver, since you can specify ALL the settings for your<br>
> UPS.<br>
><br>
> But to address your problem, we can look at the system and its<br>
> settings. The BNT type defaults as follows:<br>
><br>
> /* Type */ "BNT",<br>
> /* Number of Bytes */ 16,<br>
> /* Flow Control */ { "no_flow_control", no_flow_control },<br>
> /* Validation Bytes */ { { 11U, 0x42U }, { 8U, 0U }, { 8U, 0U } },<br>
> /* Power Kill Delay */ { { 1U, 30U }, 'y' },<br>
> /* Frequency */ { 0.00020803, 0.0 },<br>
> /* Load % */ { 1.4474, 0.0, 0.8594, 0.0 },<br>
> /* Battery % */ { 5.0000, 0.3268, -825.00, 0.46511, 0 },<br>
> /* Voltage */ { 1.9216, -0.0977, 0.82857, 0.0000 },<br>
><br>
> You have:<br>
><br>
> driver = powercom<br>
> type = BNT<br>
> port = /dev/ttyS1<br>
> numOfBytesFromUPS = 16<br>
> methodOfFlowControl = no_flow_control<br>
> validationSequence = {{11,0x42},{8,0},{8,0}}<br>
> shutdownArguments = {{1,30},y}<br>
> modelname = BNT2000APT<br>
> serialnumber = 2233445566<br>
> Desc = Computer Room Small UPS<br>
><br>
> So, the "numOfBytesFromUPS", "methodOfFlowControl",<br>
> "validationSequence", and "shutdownArguments" are all defaults for<br>
> "BNT" and can be commented out of the config file. You can also let<br>
> NUT attempt to figure it all out by commenting out the "type" as well.<br>
</div></div>This I did with the settings below!<br>
<div class="im"><br>
> However, I would simplify the config file as follows:<br>
> >> > > [APC1]<br>
> >> > ><br>
> >> > > driver = powercom<br>
> >> > > port = /dev/ttyS1<br>
> >> > > modelname = BNT2000APT<br>
> >> > > serialnumber = 2233445566<br>
> >> > > desc = Computer Room Small UPS<br>
<br>
</div>Result was worse with only 11 bytes!<br>
<div><div></div><div class="h5"><br>
> and then, if that doesn't give you what you need, add "type =<br>
> BNT-other", repeat test, and add other elements as needed until you<br>
> get what you want.<br>
> Using "BNT-other", you can tweak all the settings to what you need for<br>
> display. The defaults for "BNT-other" will choose between BNT, KIN,<br>
> and IMP based on raw values. Especially, if you have a 120 volt (US)<br>
> model, use "BNT-other" or set "linevoltage = 240". I use KNutClient to<br>
> check that my values are being reported accurately and tweak them<br>
> until they are correct (assuming there isn't a problem with the UPS).<br>
> An example "BNT-other" config:<br>
><br>
> [BNT1500AP]<br>
> driver = powercom<br>
> port = /dev/ttyS0<br>
> desc = "PowerCom BNT 1500 AP"<br>
> manufacturer = PowerCom<br>
> modelname = BNT1500AP<br>
> serialnumber = 13245678900<br>
> type = BNT-other<br>
> # linevoltage = 120<br>
> # numOfBytesFromUPS = 16<br>
> # methodOfFlowControl = no_flow_control<br>
> # validationSequence = {{8,0},{8,0},{8,0}}<br>
> # shutdownArguments = {{1,30},y}<br>
> # frequency = {0.00027778,0.0000}<br>
> # loadPercentage = {1.0000,0.0,1.0000,0.0}<br>
> # batteryPercentage = {1.0000,0.0000,0.0000,1.0000,0.0000}<br>
> # voltage = {2.0000,0.0000,2.0000,0.0000}<br>
<br>
</div></div>I just added the type as suggest of BNT-other and would you believe that it<br>
worked!<br>
<br>
Here is the debug output!<br>
<div class="im"><br>
gatekeeper nut # /lib/nut/powercom -a APC1 -DDDDDDDDDD<br>
Network UPS Tools - PowerCom protocol UPS driver 0.13 (2.6.0-r2984)<br>
0.000000 debug level is '10'<br>
</div> 0.001862 Flow control disable<br>
0.002045 Num of bytes requested for reading from UPS: 16<br>
0.147783 Num of bytes received from UPS: 16<br>
Raw data from UPS:<br>
0 0x0f ( )<br>
1 0x64 (d)<br>
2 0x70 (p)<br>
3 0x70 (p)<br>
<div class="im"> 4 0x32 (2)<br>
5 0xff (ÿ)<br>
6 0x32 (2)<br>
7 0x00 ( )<br>
8 0x00 ( )<br>
9 0x04 ( )<br>
10 0x00 ( )<br>
11 0x4b (K)<br>
12 0x98 ()<br>
13 0x00 ( )<br>
14 0x00 ( )<br>
15 0x00 ( )<br>
</div> 0.147958 Detected: BNT-other-2000AP , 220V<br>
0.148042 Values of arguments:<br>
0.148065 manufacturer : 'PowerCom'<br>
0.148085 model name : 'BNT2000APT'<br>
0.148105 serial number : '2233445566'<br>
0.148125 line voltage : '220'<br>
0.148144 type : 'BNT-other'<br>
0.148164 number of bytes from UPS: '16'<br>
0.148183 method of flow control : 'no_flow_control'<br>
0.148206 validation sequence: '{{8,0},{8,0},{8,0}}'<br>
0.148227 shutdown arguments: '{{1,30},y}'<br>
0.148264 frequency calculation coefficients: '{0.000278,0.000000}'<br>
0.148292 load percentage calculation coefficients:<br>
'{1.000000,0.000000,1.000000,0.000000}'<br>
0.148321 battery percentage calculation coefficients:<br>
'{1.000000,0.000000,0.000000,1.000000,0.000000}'<br>
0.148345 voltage calculation coefficients: '{2.000000,0.000000}'<br>
0.148387 send_to_all: SETINFO device.type "ups"<br>
0.148415 send_to_all: SETINFO driver.version "2.6.0-r2984"<br>
0.148442 send_to_all: SETINFO driver.version.internal "0.13"<br>
0.148469 send_to_all: SETINFO <a href="http://driver.name" target="_blank">driver.name</a> "powercom"<br>
0.148497 send_to_all: SETINFO ups.mfr "PowerCom"<br>
0.148523 send_to_all: SETINFO ups.model "BNT2000APT"<br>
0.148550 send_to_all: SETINFO ups.serial "2233445566"<br>
0.148576 send_to_all: SETINFO ups.model.type "BNT-other"<br>
0.148603 send_to_all: SETINFO input.voltage.nominal "220"<br>
0.148628 send_to_all: ADDCMD test.battery.start<br>
0.148650 send_to_all: ADDCMD shutdown.return<br>
0.148673 send_to_all: ADDCMD shutdown.stayoff<br>
0.148811 Num of bytes requested for reading from UPS: 16<br>
0.301784 Num of bytes received from UPS: 16<br>
Raw data from UPS:<br>
0 0x0e ( )<br>
1 0x64 (d)<br>
2 0x70 (p)<br>
3 0x70 (p)<br>
<div class="im"> 4 0x32 (2)<br>
5 0xff (ÿ)<br>
6 0x32 (2)<br>
7 0x00 ( )<br>
8 0x00 ( )<br>
</div> 9 0x01 ( )<br>
10 0x04 ( )<br>
<div class="im">11 0x4b (K)<br>
12 0x98 ()<br>
13 0x00 ( )<br>
14 0x00 ( )<br>
15 0x00 ( )<br>
</div> 0.301948 input.frequency (raw data): [raw: 50]<br>
0.301996 send_to_all: SETINFO input.frequency "72.00"<br>
0.302020 input.frequency: 72.00<br>
0.302040 output.frequency (raw data): [raw: 50]<br>
0.302070 send_to_all: SETINFO output.frequency "72.00"<br>
0.302091 output.frequency: 72.00<br>
0.302110 ups.load (raw data): [raw: 14]<br>
0.302140 send_to_all: SETINFO ups.load "14.0"<br>
0.302161 ups.load: 14.0<br>
0.302180 battery.charge (raw data): [raw: 100]<br>
0.302211 send_to_all: SETINFO battery.charge "100.0"<br>
0.302232 battery.charge: 100.0<br>
0.302251 input.voltage (raw data): [raw: 112]<br>
0.302281 send_to_all: SETINFO input.voltage "224.0"<br>
0.302303 input.voltage: 224.0<br>
0.302322 output.voltage (raw data): [raw: 112]<br>
0.302352 send_to_all: SETINFO output.voltage "224.0"<br>
0.302373 output.voltage: 224.0<br>
0.302403 send_to_all: SETINFO ups.status "OB TEST"<br>
0.302425 STATUS: OB TEST<br>
0.302445 send_to_all: DATAOK<br>
0.302723 dstate_init: sock /var/lib/nut/powercom-APC1 open on fd 5<br>
0.302833 send_to_all: SETINFO driver.parameter.pollinterval "2"<br>
0.302872 send_to_all: SETINFO device.mfr "PowerCom"<br>
0.302900 send_to_all: SETINFO device.model "BNT2000APT"<br>
0.302928 send_to_all: SETINFO device.serial "2233445566"<br>
<div class="im"><br>
<br>
> I hope that clears up any problems,<br>
<br>
</div>It certainly seems to have! If you want me to try anything else give me a<br>
shout! I'm sure my customer will be happier that the firewall/front-end mail-<br>
server will be shudown on a power outage! They are in a sightly rural<br>
industrial area. Power demands is at the supply capability level. But then<br>
that's quite common here in South Africa at the moment! We are expecting<br>
rolling blackouts again this winter until the new power stations come on line!<br>
2012 and onwards should see things improve!<br>
<br>
Cheers<br>
Ang!<br>
<font color="#888888"><br>
--<br>
Angela Williams<br>
angierfw at gmail dot com<br>
Linux/Networking Hacker<br>
Blog <a href="http://angierfw.wordpress.com" target="_blank">http://angierfw.wordpress.com</a><br>
<br>
Smile! Jesus Loves You!<br>
<br>
</font></blockquote></div><br><br>