Installation and Configuration of a APC UPS using apcupsd Installation and Configuration of a APC UPS using apcupsd This web-page consists of four sections: Introduction, installation, configuration, and statistics. Introduction Since one of our machines is configured as print server and because it does other monitoring jobs, I wanted to equip it with an uninterruptable power supply (UPS). Having read already years ago, that there are Linux drivers for UPS's from APC (American Power Conversion) and having seen such a device in an electronics store (Mediamarkt) for Swiss Francs 79.- (about Euro 50.-), I bought the UPS 'APC Back-UPS CS 350 Battery Backup 350'. Installation of Hardware and Software The installation of the hardware is easy and explained in the manual (and thanks to the company APC there is a printed manual included, not just a CD, which needs a Micro$oft program to read it). Besides the power cables I also connected the data cable, which on one end (at the UPS) has a RJ-45-like plug and on the other end (at the PC) an USB plug. Software installation under Debian (Sarge) Linux with Kernel 2.4.26 is easy as well: apt-get install apcupsd (and answer 'Y' when asked during installation) 3. Configuration of apcupsd Useful information about the configuration of apcupsd can also be found on (there, click on 'Online Manual') Should you have a 2.6 Kernel, such as Kernel 2.6.7 as we use it, you should first do a few steps (if you use a 2.4 kernel, such as kernel 2.4.26, as we did, skip the following lines): - Add the following line into your /etc/fstab: none /sys sysfs defaults 0 0 - Then enter mount /sys - Make sure, the USB subsystem is there and enter ls -l /sys/bus/usb/drivers - If 'hiddev' is not there, you have a problem.
![Apc serial port settings Apc serial port settings](http://ivolute.com/images/SUA1500i.jpg)
![Port Port](http://kb.open-e.com/kb_upload/image/APCserial.jpg)
Connecting APC UPS 2200 via serial port I used both the serial and USB cables which came with the UPS. I ordered two of these UPS, I connected one to Server. APC UPS and serial port 1 Are there any serial port configuration screens other than the Device Manager > Ports > Serial Ports > Com1 for the Dell Dimension 8100 running Windows 2000 Service Pack 4? I am trying to get HyperTerminal to communicate with an APC SC1500 Smart-UPS SC via serial cable.
We had this problem as well after having upgraded from a 2.4 to a 2.6 kernel and got an error-message when entering apcaccess. I did two things, which helped to resolve the problem: - 1. Apt-get remove apcupsd followed by a apt-get install apcupsd - 2. Plug out and plug in again the USB cable on the PC - then things worked fine again! We continue the description for 2.4 kernels. Now, let's check, whether the connected device was detected: cat /proc/bus/usb/devices reveals (among many other lines): T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 4 Spd=1.5 MxCh= 0 D: Ver= 1.10 Cls=00(ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 P: Vendor=051d ProdID=0002 Rev= 1.00 S: Manufacturer=American Power Conversion S: Product=Back-UPS 350 FW: 5.4.I USB FW: c1 S: SerialNumber=BB C:. #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr= 30mA I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=(none) Ok, the last line tells us, that there is no driver.
We load the driver into the kernel by entering: modprobe hid and enter again cat /proc/bus/usb/devices; now we see: T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 4 Spd=1.5 MxCh= 0 D: Ver= 1.10 Cls=00(ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 P: Vendor=051d ProdID=0002 Rev= 1.00 S: Manufacturer=American Power Conversion S: Product=Back-UPS 350 FW: 5.4.I USB FW: c1 S: SerialNumber=BB C:. #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr= 30mA I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=hid (With a 2.6 kernel you will see 'Driver=usbhid' on the line above). So now the driver 'hid' is activated. We can verify this as well by entering cat /proc/bus/usb/drivers. In order to have this driver loaded at next boot, we enter two lines in /etc/modules: # for apcupsd: hid The next step is to create appropriate device files. The installation comes with a script, which creates these. Simply enter: /usr/share/doc/apcupsd/examples/make-hiddev However, trying to start 'apcupsd' by entering the command: /etc/init.d/apcupsd start results in a comment like: 'Please check your configuration and then remove this warning to make apcupsd work'.
In order so follow, what is happening, you should enter (in a separate window) the command: tail -f /var/log/apcupsd.events and you may watch what is going on. So we edit the file /etc/init.d/apcupsd and comment the three lines: ##echo -n 'Please check your configuration and then remove this' ##echo ' warning to make apcupsd work' ##exit 0 After starting acpupsd again, we get the following message: Mon Oct 04 03:31:50 CEST 2004 apcupsd FATAL ERROR in smartsetup.c at line 177 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 directive is correct.
Mon Oct 04 03:31:50 CEST 2004 apcupsd error shutdown completed It's time to edit the file /etc/apcupsd/apcupsd.conf and there we read, for USB devices we should set the variable DEVICE as follows: DEVICE /dev/usb/hiddev0-15. That's wrong! After starting apcupsd we get the message: Mon Oct 04 14:48:09 CEST 2004 apcupsd FATAL ERROR in smartsetup.c at line 67 Cannot open UPS port /dev/usb/hiddev0-15: No such file or directory Why this? A closer look in /usr/share/doc/apcupsd/examples/make-hiddev gives the explanation: the device files are not created under /dev/usb but under /dev/usb/hid!
So we again edit /etc/apcupsd/apcupsd.conf and set: DEVICE /dev/usb/hid/hiddev0-15 But now we get - when starting apcupsd - the following message: Mon Oct 04 14:50:40 CEST 2004 apcupsd FATAL ERROR in smartsetup.c at line 67 Cannot open UPS port /dev/usb/hid/hiddev0-15: No such file or directory Same error again?
3/6/2011 4:54 AM I cannot get my SUA-1500 to communicate with my win7 ultimate 64bit system and can't figure out why. My serial ports check out fine using a loopback connector and other serial devices but I don't know how to veriify that the UPS serial port is working (USB works fine). I thought I might be able to verify proper communication if it were possible to connect to the UPS via PuTTY or Hyperterminal or similar terminal program.
I am hoping that the UPS would be able to respond to a command or two (sorta like a modem AT command) which would demonstrate the I have a good 'electrical' connection between the UPS and the PC.does anyone know if this is possible for test purposes and what a command/response might be? I am using a 940-0024D serial cable and PowerChute v9 (didn't work with v8 either).
Any feedback would be much appreciated.