--- Begin Message ---
On 2011-01-14 20.52, Chris Adams wrote:
Hi Chris,
> I have an older Powerware 9315 UPS that I monitor from a Linux box
> running Network UPS Tools and the bcmxcp driver. I upgraded that
> server, including a much newer version of NUT (2.4.3), and now it can't
> monitor my UPS. You are listed as the current author for that driver,
> and since I haven't been able to subscribe to the mailing list so far
> (I'm not getting the confirmation emails), I thought I'd try a direct
> email to you.
>
That is OK.
> I have tracked down much of my problem to the newer driver trying to use
> configuration that my UPS doesn't support, such as the command list,
> outlet monitoring, and alarm blocks from the ID response. The XCP PDF
> on the NUT website says under "Exceptions" (page 31):
>
> Unimplemented features may truncate this block; implementations
> before BCM Rev AE did not include the fields after the Statistics
> map.
>
> Mine stops after the Statistics map; I've added code to detect this and
> not attempt to decode/use this info (this may be the real cause of the
> PW5115 "bug" noted in bcmxcp.c; I was getting an outlet block length of
> 127 and crazier values for the others).
>
Yep, The older type of firmware trunkate this after the statistic map.
> I'm still having communications problems that I didn't have before;
> sometimes bcmxcp is unable to initialize communication with the UPS, and
> sometimes it connects and goes stale within a minute (the old setup
> never had that problem). Once it goes stale, it never recovers.
>
8<-----------------------------------snip-------------------------------------
Yep the code is not made for this.
Insert this into the code.
Line 1160
/* Next is statistics map */
len = answer[iIndex++];
upsdebugx(2, "Length of statistics map: %d\n", len);
/* init_statistics_map(answer+iIndex, len); */
iIndex += len;
/* Size of the alarm history log */
+ len = get_word(answer+iIndex);
+ upsdebugx(2, "Length of Alarm history Log: %d\n", len);
iIndex += 2;
-------------------------------------------------------------------------------------
Now run it with debug.
/path/to/bcmxcp -DD -a <ups> -u root
Check what you get in the answer of 'length of alarm history log'.
Now We can skip the rest of the init down to the
dstate_addcmd("shutdown.return");
Depending on the answer.
If it reads NULL (0) then it is a simple
if (len > 0) {
Yada yada
}
/* FIXME: leave up to init_command_map() to add instant commands? */
dstate_addcmd("shutdown.return");
We start ther, then I can have a check if it is something more that we need to
change.
Regards
Kjell
signature.asc
Description: This is a digitally signed message part.
--- End Message ---
_______________________________________________
Nut-upsdev mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/nut-upsdev