NetXMS Support Forum

English Support => General Support => Topic started by: DanG on September 16, 2011, 01:18:25 PM

Title: UPS configuration
Post by: DanG on September 16, 2011, 01:18:25 PM
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
Title: Re: UPS configuration
Post by: Victor Kirhenshtein on September 16, 2011, 01:36:07 PM
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
Title: Re: UPS configuration
Post by: Victor Kirhenshtein on September 16, 2011, 01:40:53 PM
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
Title: Re: UPS configuration
Post by: DanG on September 16, 2011, 01:54:59 PM
It's Model 5125.
I'm not sure about how I kan switch to pass-through mode...

Dan
Title: Re: UPS configuration
Post by: Victor Kirhenshtein on September 16, 2011, 02:33:22 PM
If you connect to com with terminal, what did you get?

Best regards,
Victor
Title: Re: UPS configuration
Post by: DanG on September 16, 2011, 02:53:08 PM
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
Title: Re: UPS configuration
Post by: Victor Kirhenshtein on September 16, 2011, 03:25:34 PM
Do you have any response from the port when you connect with putty?
Title: Re: UPS configuration
Post by: DanG on September 16, 2011, 03:31:13 PM
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
Title: Re: UPS configuration
Post by: DanG on September 17, 2011, 02:10:29 AM
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
Title: Re: UPS configuration
Post by: Victor Kirhenshtein on September 22, 2011, 09:48:34 PM
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
Title: Re: UPS configuration
Post by: DanG on September 23, 2011, 09:56:29 AM
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
Title: Re: UPS configuration
Post by: Victor Kirhenshtein on September 26, 2011, 02:14:18 PM
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

Title: Re: UPS configuration
Post by: DanG on October 02, 2011, 12:40:16 AM
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