[Nut-upsuser] [Nut-upsdev] Belkin USB UPSes

Kjell Claesson kjell.claesson at epost.tidanet.se
Fri May 18 06:30:10 UTC 2007


Hi Eric,
fre 2007-05-18 klockan 01:28 -0400 skrev Eric S. Raymond:
> Alexander I. Gordeev <lasaine at lvk.cs.msu.su>:
> > Yes, sure. I think, you'll also want to install udev and hotplug rules to
> > setup device permissions automatically as well.
> 
> Where are those rules?  Is their installation procedure documented anwhere?

You find the in 'trunk/scripts/udev' and the README in that directory
document the usage.

>  
> > You only need these lines in ups.conf now:
> > 
> > [myups]
> > 	driver = megatec_usb
> > 	port = auto
> > 
> > After this you can control the driver with upsdrvctl tool:
> > 
> > upsdrvctl start myups
> 
> Results aren't so good.  Driver still starts up on its own, but...
> 
> root at snark:/home/esr/svn/nut/trunk# upsdrvctl start myups
> Network UPS Tools - UPS driver controller 2.1.0
> Network UPS Tools 2.1.0 - Megatec protocol driver 1.5.3 [megatec_usb]
> Carlos Rodrigues (c) 2003-2007
> 
> Serial-over-USB transport layer for Megatec protocol driver [megatec_usb]
> 
> Driver failed to start (exit status=1)
> root at snark:/home/esr/svn/nut/trunk# 
> 
> That is a really uninformative error message.  How do I troubleshoot this?

This may depend on the rights on the device. If you don't have the udev
rules installed, it would be set to root:root.

Check what node it gets by 'lsusb'.

Ex:
lsusb
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 002: ID 0592:0002 Powerware Corp.
Bus 001 Device 001: ID 0000:0000

Then check the device 'ls -l /dev/bus/usb/001/002'
Ex:
ls -l /dev/bus/usb/001/002
crw-rw-r-- 1 root nut 189, 1 18 maj 08.15 /dev/bus/usb/001/002

If it's set to root:root, chown it to the group you used when you 
configured NUT ( --with-group= ). And check that the user you run NUT
as, belong to that group ( --with-user= ) 

Or install the udev rules and replug the ups.

When you did the test with megatec_usb you used -u root, and that make 
the driver run as root so then you don't notice that the dev is set to
root. But when you use upsdrvctl it start up as the user nut is compiled
with.

Regards
Kjell





More information about the Nut-upsuser mailing list