Following the "netxms_solution_guid" (is there a more recent document?) I'm trying to configure our PowerWare UPS with NetXMS.
I've added the SubAgent = ups.nsm
and configuration line
# UPS subagent configuration section
*UPS
Device = 0"COM1:":BCMXCP
however I receive the following error: Unable to add UPS device from configuration file. Original configuration record: 0"COM1:":BCMXCP
Guessing that the documentation has a typo I then tried:
# UPS subagent configuration section
*UPS
Device = 0:"COM1:":BCMXCP
I now get the error: UPS: Cannot establish communication with device #0 "BCMXCP-COM1:"
LanSafe is working fine (i disabled the LanSafe service before trying the above) so I don't think it has to do with the UPS.
Is my syntax correct? Something else wrong?
Dan
Hi!
Syntax is correct. Can you please tell exact UPS model? Most probably it uses different protocol or protocol version. Also, please check that you can open COM1 with terminal application - just to make sure that no other apps holds it open.
Best regards,
Victor
Also, I found that some Powerware models shows management interface on serial console by default. They need to be switched into "pass-through" mode before using BCM/XCP protocol. That also may be the reason why UPS subagent cannot communication with the device.
Best regards,
Victor
It's Model 5125.
I'm not sure about how I kan switch to pass-through mode...
Dan
If you connect to com with terminal, what did you get?
Best regards,
Victor
Victor,
I stopped the LanSafe service.
Using Putty I get a connection with the serial port.
If I then run the NetXMS ups subagent I get the "no communication" warning, however the com port is the taken by the subagent as I can no more connect using Putty (nor does LaneSafe work).
Since the ups subagent loads I tried to use the DCI, however they all return Unsupported - this is to be expected I guess.
If I then remove ups subagent I once more can connect to the port.
By what I can find, the PowerWare 5125 does not have a pass-through option.
Any idea?
Dan
Do you have any response from the port when you connect with putty?
When no other application uses the port the Putty connects without an error, however I don't get a prompt. should I get one?
Dan
Victor,
After looking at the ups.cpp and bcmxcp.cpp source code, examining the BCM/XCP protocol and using a serial software that allows sending hexadecimal data to a COM port I found out that our UPS works with a rate op 9600 baud. As the ubs agent speed is hardcoded at 19200 this is probably the reason for it not working.
I guess the subagent ups config format should be extended to allow communication settings.
Dan
Thank you for debugging this! I have added possibility to set serial port speed in UPS subagent. Starting from 1.1.5, you can write like this:
Device = 0:"COM1:,9600":BCMXCP
Best regards,
Victor
Victor,
I think this is what open source software is all about, being able to contribute make software better. Thank you for listening and reacting so promptly to our findings.
If I may make a suggestion, serial communication parameters are Speed, Data bits, Stop bits, Parity and Flow control.
The function used in vcmxp.cpp has most of them: m_serial.Set(19200, 8, NOPARITY, ONESTOPBIT);
Maybe it would be even better to have something like:
Device = 0:"COM1:,9600,8,N,1":BCMXCP
Regards,
Dan
I have added those options. Parity should be specified as N, E, or O. So fully specified string will be
Device = 0:"COM1:,9600,8,N,1":BCMXCP
Default speed is driver-dependent (i.e. 19200 for BCMXCP and 2400 for APC), default data bits is 8, default parity is N (none), and default stop bits is 1.
Best regards,
Victor
Hi,
After installing Agent 1.1.5 and using the new extended syntax the NetXMS recognizes the UPS. DCI works nicely.
Thank you!
Regards,
Dan