[Nut-upsuser] Nut setup with CyberPower AVR900

Miguel mth at mth.com
Sun Oct 23 13:09:36 UTC 2005


Frank wrote:

>   Nut 2.0.2
>   Gentoo Linux 2.6.13-r3
>   CyberPower AVR900

Last week I set up nut with a CyberPower 1250AVR
I also have two 900AVR units that I need to set up on other machines.  I
am running Fedora Core 4.

>   According to the hardware compatibility guide this setup should work.
>
>   Here's what I get:
>
>   root at gentoo (0) [552] % upsdrvctl start
>   Network UPS Tools - UPS driver controller 2.0.2
>   Network UPS Tools - CyberPower driver 1.00 (2.0.2)
>   Giving up on hardware detection after 3 tries
>   Unable to get initial hardware info string
>   Driver failed to start (exit status=1)
>
>   My ups.conf looks like this:
>
>   [gentoo]
>   driver = cyberpower
>   port = /dev/ttyS0
>   desc = "gentoo UPS"

That looks OK to me.
It is equivalent to what I have for the 1250AVR unit.
I am using the same 'cyberpower' driver with serial cable through
/dev/ttyS0 to a 1250AVR.

** 5 minutes later **

I just swapped my 1250AVR unit with one of my 900AVR units.
It continues to work fine.

This confirms that the 'cyberpower' driver is the right one to use ... as
stated in the documentation.

> Permission on /dev/ttyS0 are 777 while I'm testing so
> I don't think this is a "user" related issue.

If there are permissions problems then the driver will complain loudly
upon startup.

----
Starting upsdrvctl: Network UPS Tools - UPS driver controller 2.0.2
Network UPS Tools - CyberPower driver 1.00 (2.0.2)

Unable to open /dev/ttyS0: Permission denied

  Current user id: nut (57)
Serial port owner: root (0)
Serial port group: root (0)
     Mode of port: 0660

Things to try:

 - Use another port (with the right permissions)

 - Fix the port owner/group or permissions on this port

 - Run this driver as another user (upsdrvctl -u or 'user=...' in ups.conf).
   See upsdrvctl(8) and ups.conf(5).

Fatal error: unusable configuration
Driver failed to start (exit status=1)
                                                           [FAILED]
----

(Note: When I was working on this a few days ago I had a problem with the
ownership/permissions on /dev/ttyS0 being reset to root:uucp upon system
start. The solution was to make my 'nut' user a member of the uucp group.)

You are not getting this message ... so I agree that you do not have a
permissions problem.


Q: Have you confirmed that your serial port is operational?

Perhaps you are plugged into the wrong serial port

OR

Perhaps your external DB9 connector is not properly connected to your
motherboard.


I suggest that you try another application through the serial port.


> I've tried this with a straight through DB9 cable and
> the CyberPower DB9 cable which I was told by tech support
> was straight through, but not every pin is hooked up.
> Neither worked.

I am using the CyberPower DB9 serial cable.

I have not tried with another serial cable.

> Also, CyberPower has a linux module that works with both
> cables, but isn't network capable and won't work with my
> other setup which has its own CyberPower 900AVR but runs
> FreeBSD 5.4

The CyberPower linux module will not work with 2.6 kernels. That is why I
switched to nut.

> I also tried cpsups, and with USB, hidups and newhidups, none worked.

I don't know what these are.

> Anyone done this? Are there other files I need to be tweaking?

I believe that ups.conf is the only config file that is involved at the
driver layer.

Here are the notes/configurations that I have for ups.conf, upsd.users,
and upsmon.conf:

# emacs ups.conf
 * add a UPS definition at the bottom
[mykissUPS]
        driver = cyberpower
        port = /dev/ttyS0
        desc = "Cyberpower 1250AVR on mykiss"

# emacs upsd.users
 * create a nutmonitor user at the bottom
[nutmonitor]
    password = nutmonitorPassword
    allowfrom = localhost

# emacs upsmon.conf
 * create a MONITOR entry in the middle
MONITOR mykissUPS at localhost 1 nutmonitor nutmonitorPassword master



Note that I am running on Fedora Core 4.

I initially built from the nut sources, but then blew it away and switched
to an rpm installation. It turns out that the shutdown scripts for Fedora
already included detection and support for /etc/killpower. So by switching
to the .rpm installation I did not need to modify my shutdown scripts.

When you start up cyberpower driver (through upsdrvctl) you should see the
following:

Starting upsdrvctl: Network UPS Tools - UPS driver controller 2.0.2
Network UPS Tools - CyberPower driver 1.00 (2.0.2)
Detected 900AVR on /dev/ttyS0


I did not have problems with cabling. My problems were with:
 1. confusion caused by settings/scripts in in /etc/sysconfig/ups and
/etc/rc.d/init.d/ups that did not work (a Fedora thing)
 2. permanently setting permissions on /dev/ttyS0 (which I explained
above)


Hope this helps.


Miguel






More information about the Nut-upsuser mailing list