[Nut-upsuser] APCsmart serial port problem

Patrick Nolan Patrick.Nolan at stanford.edu
Mon Jun 4 21:49:57 UTC 2007

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:
         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
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.

More information about the Nut-upsuser mailing list