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.
On Tue, 05 Jun 2007, Patrick Nolan wrote:> [myups] > driver = apcsmart > port = /dev/ttyS0 > cable = 940-0095B > sdtype = 0I've got a Smart-UPS 700 (SU700I, about 5 years old) working with a more or less identical upsd.conf, however because person I bought it from had misplaced the serial cable, I have a pair of DB9-RJ45 adapters and a short network cable. You might get some more helpful error messages if you try and start apcsmart manually. # /lib/nut/apcsmart -D -a myups should work for your system. '-D' = verbose (try up to -DDD or -DDDD), '-a [upsname]' tells apcsmart to read upsd.conf for its config. I get this output from my UPS: # /lib/nut/apcsmart -D -a su700 Network UPS Tools (version 2.0.5) - APC Smart protocol driver Driver version 1.99.8, command table version 2.0 debug level is '1' Attempting firmware lookup APC - Attempting to find command set APC - Parsing out command set protocol_verify: 0x56 [V] unrecognized APC - About to get capabilities string Supported capability: 75 (I) - input.transfer.high Supported capability: 6c (I) - input.transfer.low Supported capability: 65 (4) - battery.charge.restart Supported capability: 6f (I) - output.voltage.nominal Supported capability: 73 (4) - input.sensitivity Supported capability: 71 (4) - battery.runtime.low Supported capability: 70 (4) - ups.delay.shutdown Supported capability: 6b (4) - battery.alarm.threshold Supported capability: 72 (4) - ups.delay.start Supported capability: 45 (4) - ups.test.interval APC - UPS capabilities determined Detected SMART-UPS 700 [GS0017000324] on /dev/ttyS0 If you can't find anything from software, it might be worth getting a multimeter out and checking the serial cable's wiring. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part. Url : http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20070605/ddf7a4d8/attachment.pgp
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 > >