[Nut-upsuser] APCsmart serial port problem

Doug Parsons doparsons at earthlink.net
Tue Jun 5 00:57:21 UTC 2007


I currently have 14 of these units running on NUT 2.0.4 . They all use the 
940-1524C black cable. In my configuration I do not use the cable 
description or sdtype.  I only have the drive, port and a description. 
Unless there has been a change from .4 to .5 that requires the other 
settings I would omit them.

This is all on CentOS which is also a clone of RedHat on kernel 2.6.

As for the ownership of the port, I believe you are running into an issue 
with udev. Udev creates the ports on boot up and thus is resetting the 
ownership and group.

Go to /etc/udev/permissions.d and find the section on dialup and serial 
devices. You will find a line like:

ttyS*:root:uucp:0660

try putting the line:
ttyS0:nut:uucp:0660
in front of the other line.

I have not done this myself as I use virtual serial ports.

This should set the owner to nut upon creation. The driver will take care of 
the port speed.

Doug

----- Original Message ----- 
From: "Patrick Nolan" <Patrick.Nolan at stanford.edu>
To: "NUT user list" <nut-upsuser at lists.alioth.debian.org>
Sent: Monday, June 04, 2007 5:49 PM
Subject: [Nut-upsuser] APCsmart serial port problem


>I have a new APC Smart-UPS SUA2200RM2U.  I've had no success with the
> manufacturer's PowerChute software and smart signaling, so I have
> decided to try NUT.  The smartups driver can't make contact through
> the serial port.
>
> Since this is rack-mounted, it comes with a 940-1524 serial cable.
> As far as I can tell, this is supposed to work with smart signaling.
> Here's my ups.conf:
> [myups]
>         driver = apcsmart
>         port = /dev/ttyS0
>         cable = 940-0095B
>         sdtype = 0
>
> Here's a session which illustrates the problem:
>
> [root]# ls -l /dev/ttyS0
> crw------- 1 nut nut 4, 64 Jun  4 14:28 /dev/ttyS0
> [root]# /usr/local/nut/bin/upsdrvctl start
> Network UPS Tools - UPS driver controller 2.0.5
> Network UPS Tools (version 2.0.5) - APC Smart protocol driver
>         Driver version 1.99.8, command table version 2.0
> smartmode: ser_send_char failed: Input/output error
> Unable to detect an APC Smart protocol UPS on port /dev/ttyS0
> Check the cabling, port name or model name and try again
> Driver failed to start (exit status=1)
> [root]# ls -l /dev/ttyS0
> crw--w---- 1 root root 4, 64 Jun  4 14:28 /dev/ttyS0
>
> The ownership of the serial port somehow got changed back to
> root.  The scripts in the hotplug* directories don't seem to
> address this situation.  By the way, this is kernel 2.6.18
> and Scientific Linux 5.0 (a clone of Red Hat Enterprise).
>
> Some of the other characteristics of the serial port are
> changing too.  After I try to start upsdrvctl, it looks like this:
> [root@]# stty -F /dev/ttyS0 -a
> speed 9600 baud; rows 0; columns 0; line = 0;
> intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
> eol2 = <undef>; swtch = <undef>;
> start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V;
> flush = ^O; min = 1; time = 0;
> parenb parodd cs7 hupcl -cstopb cread -clocal -crtscts
> -ignbrk -brkint -ignpar -parmrk inpck istrip -inlcr -igncr icrnl ixon
> ixoff -iuclc -ixany -imaxbel
> -iutf8
> opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0
> vt0 ff0
> isig icanon -iexten -echo echoe echok -echonl -noflsh -xcase -tostop
> -echoprt -echoctl echoke
>
> According to APC, the baud rate should be 2400.  If I set it to 2400,
> it gets reset to 9600.
>
> _______________________________________________
> Nut-upsuser mailing list
> Nut-upsuser at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser
>
> 





More information about the Nut-upsuser mailing list