OS 13.1 apcupsd

Hello,

i have openSUSE 13.1 64bit minimal with apcupsd.
device is APC Smart SMT 1000 i with serial cable 940-0625A at dev/ttyS0

my /etc/apcupsd/apcupsd.conf is:

UPSNAME USV
UPSCABLE smart
UPSTYPE apcsmart
DEVICE /dev/ttyS0

and other things.

message in /var/log/message:

apcupsd FATAL ERROR in smartsetup.c line 172
PANIC! Cannot communicate with Ups via serial port.
Please make sure the port specified on the DEVICE directive is correct,
and that your cable specification on the UPSCABLE specification is correct.

Where is my mistake?
Is the cable right?

USB is working properly.
Incidentally: /etc/sysconfig/apcupsd is missing from installation.
I added it with:
APCUPSD_POWERFAIL_BEHAVIOR=“shutdown”

Best regards

It’s been a while since I last connected to a UPS with a serial cable, and that was on solaris.

Normally, when you connect a serial cable, the system generates a login prompt to allow logins via that serial connection. I seem to recall that for a UPS, you have to exclude that serial device from the set that are listened to by whatever process (used to be “getty”). I don’t know how to do that with current linux, but maybe someone else will step in.

On 2014-05-13 14:06, nrickert wrote:
>
> AchimKl;2642941 Wrote:
>> Where is my mistake?
>
> It’s been a while since I last connected to a UPS with a serial cable,
> and that was on solaris.
>
> Normally, when you connect a serial cable, the system generates a login
> prompt to allow logins via that serial connection. I seem to recall
> that for a UPS, you have to exclude that serial device from the set that
> are listened to by whatever process (used to be “getty”). I don’t know
> how to do that with current linux, but maybe someone else will step in.

No, I never had that problem. The serial port is, or was, typically used
for the modem. Other people used it for the mouse. Thus it could not be
used by default for login, but of course, some people needed it for
precisely that reason. I have seen it used as a backup entry method used
when booting or troubleshooting remotely. I have used it for kernel boot
debugging.

Thus, the default on openSUSE for the serial port should be “nothing”.

I would try a serial port terminal application (minicom?) to find out if
communication with the UPS is possible.


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

No, gentlemen. I only want to connect the server to the APC Smart via COM-Port.
No modem or mouse or other things. The port is free.
Only apcupsd should connect to it.
I assume that i got the wrong cable.
The question was: is my setup/config right?

Best regards

It looks to be correct according to this site

I think so. My config is different, but that’s because I have a USB version. Your config is what mine was before I made the changes needed for USB.

On 2014-05-13 19:06, AchimKl wrote:
>
> No, gentlemen. I only want to connect the server to the APC Smart via
> COM-Port.
> No modem or mouse or other things. The port is free.

We know :slight_smile:

> Only apcupsd should connect to it.
> I assume that i got the wrong cable.

Which is why I suggested trying minicom to see if there is connection.


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

Where is my mistake?
Is the cable right?

Just a guess from me, but perhaps it is related to the chosen cable. Reading the following, it seems to be associated with MODBUS protocol (relevant to recent APC UPS models)

http://www.apcupsd.com/manual/manual.html#modbus-driver

On 2014-05-14 03:06, deano ferrari wrote:

> Just a guess from me, but perhaps it is related to the chosen cable.
> Reading the following, it seems to be associated with MODBUS protocol
> (relevant to recent APC UPS models)

You think they need use a specific cable, not a standard rs232 cable?

> http://www.apcupsd.com/manual/manual.html#modbus-driver

The article says to use a 940-0625A cable, and that’s the one that the
OP says he is using.

(I don’t understand why UPS makers insist on using rs232, when computers
no longer have that port available… they should switch to native USB
instead, IMO).


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

Yes, but he’s using apcsmart protocol (ref UPSTYPE) rather than modbus. (Depending on the UPS model, the latter may not be enabled or even available.)

(I don’t understand why UPS makers insist on using rs232, when computers
no longer have that port available… they should switch to native USB
instead, IMO).

I think it’s because some routers only provide serial port connectivity, although many new UPS models provide network connectivity anyway. So, in a remote telecommunications/network environment that may be all that is available. So, it’s a legacy thing really.

13.05.2014 21:06, AchimKl wrote:
>
> No, gentlemen. I only want to connect the server to the APC Smart via
> COM-Port.
> No modem or mouse or other things. The port is free.
> Only apcupsd should connect to it.
> I assume that i got the wrong cable.
> The question was: is my setup/config right?
>
> Best regards
>
>
Code:

systemctl stop apcupsd

apctest

2014-05-14 11:31:35 apctest 3.14.10 (13 September 2011) suse
Checking configuration …
Attached to driver: apcsmart
sharenet.type = Network & ShareUPS Disabled
cable.type = Custom Cable Smart
mode.type = APC Smart UPS (any)
Setting up the port …
Doing prep_device() …

You are using a SMART cable type, so I’m entering SMART test mode
Hello, this is the apcupsd Cable Test program.
This part of apctest is for testing Smart UPSes.
Please select the function you want to perform.

What your result of apctest?

Ok gentlemen, thank you for your answers.

I phoned up to apc and they said:
if i want to use a serial connection i have to open up the device
(yes, the APC SMT1000i), replace the battery, press a button and rebuild the device)
Ups, thats not customer-friendly.

modbus and cabel 940-0625A are only valid if a modbus card is pluged in.
I don’t have one.

I will use a backups-pro BR1200G-GR, so i can use usb or serial whatever and whenever i want.

So, best regards