• Try connecting your UPS to another machine. If it works, then you
probably have a bad serial port card. As unlikely as this may sound,
at least two of our users have had to replace bad serial port cards.
• Try doing an lsof /dev/ttyS0 where you replace the /dev/ttyS0
with your serial port name. If you get no output, the port is free (or
there is no physical port). If you get output, then another program is
using the port, and you should see which one.
• Try doing a dmesg | grep tty. This may show you if a program has
grabbed the port. (Thanks to Joe Acosta for the suggestion.)
• If all else fails, make sure your system is configured for serial port
support.
• If you are running Linux, check your /proc file system. For ex-
ample: cat /proc/devices should print something like 4 ttyS if
you have a serial port. If your serial port is working, a cat
/proc/interrupts should show the serial port usage (e.g. 4: 294553
XT-PIC serial) Also, cat /proc/ioports should show up some-
thing like 03f8-03ff : serial(auto). Or, cat /proc/tty should
print a line like serial /dev/ttyS 4 64-127 serial. Finally, a cat
/proc/tty/driver/serial should print something like the following:
serinfo:1.0 driver:5.05c revision:2001-07-08
0: uart:16550A port:3F8 irq:4 baud:9600 tx:1503168 rx:1461721 fe:8
The first thing to do is to look at your log file, usually /var/log/messages
because apcupsd writes more detailed information to the log file whenever
there is an error.
If you have a UPS that uses apcsmart protcol (see table of types (see
type
table) for a list of the UPSes using these protocols), you can manu-
ally test the serial communications with the UPS by starting a serial port
communications program (such as minicom, tip, or cu) with the settings
2400 8N1 (2400 baud, 8 bits, no parity, 1 stop bit). Be extremely careful
what you send to your UPS as certain characters may cause it to power
down or may even cause damage to the UPS. Try sending an upper case Y
to the UPS (without a return at the end). It should respond with SM. If
this is not the case, review the possible problems listed above. If you fat
finger the Y and enter y instead, no cause for alarm, you will simply get the
APC copyright notice.
Once you are sure that serial port communications is working, proceed to
the next test.
157