The Aviem PRO2100 is a SOHO Line-Interactive Uninterruptible Power Supply (UPS) unit that sells at a very compelling price/performance point. The PRO2100 is a 1000VA unit that sells at a price which is only slightly above that of other manufacturers` 650VA units, whereas comparable strength units typically sell for twice as much. What this means is that you can use if to power two computers for the price typically paid to power one.
That being said, the Aviem`s weak point is it`s Linux support (I cannot vouch for Windows support since I did not attempt to connect it to a Windows machine). While The UPS does ship with a CD that includes Linux software, it suffers from several shortcomings that are unfortunately all too common even for enterprise-level Linux supporting hardware:
- The CD only contains precompiled 32bit X86 binaries without any source code or any pointers to where the source code may be found.
- No pointers are given as to where updated software versions be be found, what seems to be the product name, “PowerD”, also doesn’t yield anything useful in a Google search.
- The software relies on an installation shell-script rather being packaged for use with the system`s package manager (E.g. RPM or DPKG) or at least something like Autopackage. The installation script also seems to assume all Linux systems are roughly built and behave like RedHat and would generally make a mess of your system regardless of the distribution (For example, the script tries to place binaries in “/etc” and set insecure file permissions such as “777”).
This particular software CD has another strange problem to it as the included “Readme.txt” file seems to be completely unreadable gibberish as well as resist being converted to anything readable with “iconv”.
All in all the software on the CD has a very strong abandon-ware feel to it and it is nothing I would be willing to install on my systems.
Given the shipped software was so bad, I set out to look for support from one of the mainstream Linux UPS support packages.
The first step when looking for hardware support is to properly identify the hardware, since the Aviem connects via a USB cable, there are two places to look for hardware information, one is the “lsusb” command which yields the following output:
Bus 002 Device 002: ID 0925:1234 Lakeview Research
The second place to look is the messages printed into the SYSLOG file (Typically in “/var/log/messages”) when the cable is connected:
Oct 10 20:30:27 factory11 kernel: [ 1858.240037] usb 2-3: new low speed USB device using ohci_hcd and address 3 Oct 10 20:30:27 factory11 kernel: [ 1858.455293] usb 2-3: New USB device found, idVendor=0925, idProduct=1234 Oct 10 20:30:27 factory11 kernel: [ 1858.455302] usb 2-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0 Oct 10 20:30:27 factory11 kernel: [ 1858.455308] usb 2-3: Product: UPS USB MON V1.4 Oct 10 20:30:27 factory11 kernel: [ 1858.455313] usb 2-3: Manufacturer: Љ Oct 10 20:30:27 factory11 kernel: [ 1858.455588] usb 2-3: configuration #1 chosen from 1 choice Oct 10 20:30:27 factory11 kernel: [ 1858.469610] generic-usb 0003:0925:1234.0002: hiddev0,hidraw0: USB HID v1.00 Device [Љ UPS USB MON V1.4] on usb-0000:00:02.0-3/input0
Armed with the above information I set out on a Google search which landed me in a support mailing list for the excellent Linux Network UPS Tools (NUT) package. As the mailing list thread seemed to indicate, UPS devices with the “0925:1234” USB device ID are well supported in NUT with the “richcomm_usb” driver.
Since the NUT documentation indicated that the NUT Debian packages are well supported and indeed maintained by one of NUT`s core developers, I first installed the packages using “synaptic”, unfortunately I quickly found out that not only do the packages included in the Debian Squeeze repository do not include the “richcomm_usb” driver, they are also rather old (they include NUT version “2.4.3” whereas the recently released version seem to be “2.6.2”).
Looking in the “packages.debian.org” website, I found out that Sid, the unstable Debian branch, does include newer NUT packages, and while the Debian Backports repository does not include the NUT packages at all, it seems that fortunately one can install the Sid packages in Squeeze without encountering the typical package dependency problems. I therefore manually downloaded and installed the following packages:
It is noteworthy that since the above packages are interdependent, one is aught to install them with a single “dpkg” command, as follows:
dpkg -i nut-server_2.6.2-1_amd64.deb nut-client_2.6.2-1_amd64.deb nut_2.6.2-1_all.deb
(Note: Depending on your platform, the particular package file names might be different, the above command is for the 64bit X86 packages)
Unfortunately, once I’ve installed the packages, I quickly found out that they do not include the needed driver as well, not giving up, I headed to the NUT website and downloaded the relevant source tarball.
With the default configuration, the NUT source package installs various files in locations that are rather different and therefore incompatible with where those files are placed by the Debian packages. The source package needs to be configured with the following command which would also set it to only compile the missing driver (The command was run from the directory created by extracting the source tarball):
./configure --with-drivers=richcomm_usb --with-statepath=/var/run/nut --with-pidpath=/var/run/nut --with-user=nut --with-group=nut
Once the configuration step is done, one can ren the compilation process with the following command:
My system was already configured for building software, so the configuration and compilation steps went smoothly and I cannot venture information as to exactly which packages one need to add to a bare-bones system, I do suppose as a minimum, one need to have the “build-essential” package installed.
Since I only need a single driver to add to my already installed NUT packages, I opted not to rung the source package installation step, and instead simply copied the missing file with the following command:
cp drivers/richcomm_usb /lib/nut/
Once the driver was installed I followed the NUT documentation to configure it by adding the following lined to the “/etc/nut/ups.conf” file:
[aviem] driver = richcomm_usb port = auto desc = 'Aviem PRO2100'
The driver could then be started with the following command:
upsdrvctl -D start
With the follwing output indicating successful driver initialization:
Network UPS Tools - UPS driver controller 2.6.2 0.000000 Starting UPS: aviem Network UPS Tools - Richcomm dry-contact to USB driver 0.04 (2.6.2) Warning: This is an experimental driver. Some features may not function correctly.
Seeing the driver finally load and recognize the hardware was a relief, what was left was to configure the rest of the NUT package, I opted to have it only manage a single stand-alone computer for the time being, though I do plan to have it also manage the 2nd computer connected to the UPS through the network at a later date. To configure NUT I first edited the “/etc/nut/upsd.users” file, and added the following lines:
[upsmon] password = ******** upsmon master
Choose the password carefully (obviously I’m not showing mine here) as it enables managing NUT over the network.
I also edited the “/etc/nut/upsmon.conf” file to indicate how the UPS should be monitored, the following line was added below a set of ceomments in the file showing examples for similar lines:
MONITOR aviem@localhost 1 upsmon ******** master
(The asterisks need to be replaced with the password from the “/etc/nut/upsd.users” file)
Finally I edited the “/etc/nut/nut.conf” to set the NUT running mode:
Having done editing the configuration files, the only this that was left was to start the NUT service:
In order to test the configuration I simply unplugged the UPS unit from the power socked and watched as NUT first sent notification messages to my console windows and eventually shut-down the system.