Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

Problems with nut and UPS [solved]

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
6 posts • Page 1 of 1
Author
Message
at
Apprentice
Apprentice
Posts: 185
Joined: Sun Aug 20, 2006 3:42 pm

Problems with nut and UPS [solved]

  • Quote

Post by at » Fri Sep 08, 2006 12:19 am

Hi,

I am trying to make sys-power/nut to work with Newpoint UPS. Newpoint UPS is supposed to be supported by 'powercom' driver.

The UPS has a USB connection. here is the outpu of 'lsusb':

Code: Select all

Bus 002 Device 006: ID 0d9f:0001 Powercom Co., Ltd 
Bus 002 Device 005: ID 04b3:301b IBM Corp. 
Bus 002 Device 004: ID 04b3:301a IBM Corp. 
Bus 002 Device 003: ID 046d:c03d Logitech, Inc. 
Bus 002 Device 001: ID 0000:0000  
Bus 001 Device 001: ID 0000:0000
I can see '/usr/dev/usb/hiddev0' device.

Code: Select all

ls -l /dev/usb/hiddev0
crw-rw-rw- 1 root root 180, 96 Sep  7 20:07 /dev/usb/hiddev0
If I do 'cat /dev/usb/hiddev0', something is coming out of it.

So I made the following entry in /etc/nut/ups.conf file:

Code: Select all

[Newpoint]
        driver = powercom
        port = /dev/usb/hiddev0
        desc = "Newpoint Surge Protector 525VA 20877"
But when I execute '/usr/l/usr/sbin/upsdrvctl start', I get the following error:

Code: Select all

Network UPS Tools - UPS driver controller 2.0.3
Network UPS Tools - PowerCom and similars protocol UPS driver $ Revision: 0.5 $ (2.0.3)

tcgetattr(/dev/usb/hiddev0): Invalid argument
Driver failed to start (exit status=1)
Thank you for your help.
Last edited by at on Fri Sep 22, 2006 1:47 am, edited 1 time in total.
Top
Xaid
Guru
Guru
Posts: 474
Joined: Sat Oct 30, 2004 4:24 pm
Location: Edmonton / Alberta

  • Quote

Post by Xaid » Fri Sep 08, 2006 1:26 am

I don't have that UPS, but try setting the port to auto and see if it makes a difference.

Good luck.
Top
at
Apprentice
Apprentice
Posts: 185
Joined: Sun Aug 20, 2006 3:42 pm

  • Quote

Post by at » Sat Sep 09, 2006 12:12 am

Thank you.

I tried to change port to "auto", but now I am getting

Code: Select all

/usr/include/usr/sbin/upsdrvctl start
Network UPS Tools - UPS driver controller 2.0.3
Network UPS Tools - PowerCom and similars protocol UPS driver $ Revision: 0.5 $ (2.0.3)


Unable to open auto: No such file or directory

Things to try:

 - Check 'port=' in ups.conf

 - Check owner/permissions of all parts of path

Fatal error: unusable configuration
Driver failed to start (exit status=1)
I am doing it as root, so permissions shouldn't be a problem.

Do you guys have any suggestions?

Thank you
Top
Xaid
Guru
Guru
Posts: 474
Joined: Sat Oct 30, 2004 4:24 pm
Location: Edmonton / Alberta

  • Quote

Post by Xaid » Sat Sep 09, 2006 1:12 am

Hi at,

I wasn't paying attention, the "auto" option for port only works if you are using the newhidups driver.

I googled a bit, and it seems the powercom driver is only for serial UPSes, and I'm assuming you have a USB UPS (since you mentioned /dev/usb/hiddev0)
so using that driver is incorrect, and you should try using the newhidups driver to see if that works.

I suggest subscribing to the NUT dev mailing list and offering help in testing patches and workarounds, I found an interesting thread that you might want to take a look at:
http://www.mail-archive.com/nut-upsuser ... 01115.html

Try with the following for now:

Code: Select all

[Newpoint]
        driver = newhidups
        port =  auto
        desc = "Newpoint Surge Protector 525VA 20877"
Make sure you emerged nut with the usb USE flag and I suggest trying the latest ~x86 Nut to see if it helps.

Good luck.
Top
drew_kay
n00b
n00b
User avatar
Posts: 5
Joined: Sat Mar 05, 2005 5:17 pm
Location: somewhere, nowhere, everywhere

  • Quote

Post by drew_kay » Thu Sep 21, 2006 4:31 pm

Best thing to run is nut-2.0.4-r1 w/ libusb-0.1.12 if you can. I haven't had a chance to test the earlier 2.0.* ebuilds with libusb-0.1.12 (it's on my list for this weekend) but I'll be reporting my results once that's done.

I suggest this because I spent some time debugging an issue in nut that is caused by libusb and fixed in v0.1.12. What was happening was that prior to 0.1.12, libusb was interfacing with the ups through /sys (or /proc but I forget which off the top of my head). That meant the udev rules that nut used were not having any effect on the permissions/ownership of the usb device. The workaround was to manually change permissions/ownership of the relevant file/node. This was a nasty kludge, and dies everytime you reboot or unplug/replug the device. The solution was to use libusb v0.1.12, in which libusb attempts to use /dev first before falling back to /sys. This means that udev's rules created for nut actually do something instead of looking just looking pretty.
-Drew
Top
at
Apprentice
Apprentice
Posts: 185
Joined: Sun Aug 20, 2006 3:42 pm

  • Quote

Post by at » Fri Sep 22, 2006 1:52 am

Hi guys,

Thank you very much for your input.

It was just getting too much for me - spending all this time trying to make something as simple as an UPS to work.

So the solution I found was very simple: return the pathetic Newpoint UPS and get APC instead. APC is a little pricier, but works much better.

By the way, did I mention, that Newpoint UPS manual comes just in 2 languages: English and Chinese? The English version does not have a single sentence without grammatical mistakes. One can only imagine how good that product is past its manual!
Top
Post Reply

6 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic