[Nut-upsuser] Nut setup with CyberPower AVR900

Frank Goodman fmg at frank-goodman.com
Sun Oct 23 17:52:09 UTC 2005


-- 
Frank Goodman
ROI Internet Business Solutions
http://www.roi-ibs.com
mailto:frank.goodman at roi-ibs.com
Ph: (310) 745-4565


On [Oct 23 09:09 AM], Miguel wrote:
> 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

  When I run the CyberPower upssrv (daemon) it works fine on the
  same serial port so I don't think there is anything wrong with the
  serial port
> 
> OR
> 
> Perhaps your external DB9 connector is not properly connected to your
> motherboard.

  Again, the CyberPower uppsrv does work on my Gentoo 2.6.13 kernel
  without any errors or problems. It uses the same serial cable i'm
  trying NUT with and everything works fine. I prefer to use NUT for
  the reasons previously stated...
> 
> 
> 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.

The CyberPower DB9 serial cable AND my straight through serial cable
both work with the CyperPower ups daemon, but neither work with NUT (so
far).
> 
> 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.

Works fine with my Gentoo 2.6.13 kernel
> 
> > I also tried cpsups, and with USB, hidups and newhidups, none worked.
> 
> I don't know what these are.

These are just other NUT drivers that I noticed had cyberpower
mentioned in the source code and/or are used for USB. The docs don't
suggest these should work, I just tried them anyway. It should be the
CyberPower driver for this setup w/ Nut.

> 
> > 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

  Yeah, I get all but the last line. I get the time out saying it
  couldn't find the device.

  Did you build NUT from source? Do you know if you set any special
  flags (like timeouts, etc.)?

> 
> 
> 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)

  Yeah, this is a weird one. It makes no sense to me that the
  CyberPower linux modules work fine with my setup but Nut can talk to
  the device. I'm wondering if there is a compile setting I need to use
  to make this work for me...

> 
> 
> Hope this helps.
> 
> 
> Miguel
> 
> 
> 



More information about the Nut-upsuser mailing list