<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.3562" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=907130615-05082009><FONT face=Arial
color=#0000ff size=2>Ok, you're right, it is indeed a permission
issue.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=907130615-05082009><FONT face=Arial
color=#0000ff size=2>I have to chown root:dialout and chmod 0660 the
/proc/bus/usb/003/006... </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=907130615-05082009><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=907130615-05082009><FONT face=Arial
color=#0000ff size=2>However this should have been done by udev rules. Here is
the line for my device :</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=907130615-05082009><FONT face=Arial
color=#0000ff size=2># various models -
usbhid-ups<BR>ATTR{idVendor}=="0463", ATTR{idProduct}=="ffff", MODE="664",
GROUP="dialout"</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=907130615-05082009><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=907130615-05082009><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=907130615-05082009><FONT face=Arial
color=#0000ff size=2>It works well if I use the option -u root. I prefer to use
usermode instead of super user if possible.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=907130615-05082009><SPAN
class=907130615-05082009><FONT face=Arial color=#0000ff size=2>In case there is
a infinite loop or any misbehavior in usbhid-ups (or any driver), will it make a
difference to run it as "nut" user instead of root. I mean towards other
applications?</FONT></SPAN></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=907130615-05082009><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=907130615-05082009><FONT face=Arial
color=#0000ff size=2>By the way I found this in the mailing list archive (from
Charles Lepple) :</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=907130615-05082009>"When I plug in the USB
cable I get the following message in my system log:<BR><BR>kernel: usbhid: probe
of 2-1:1.0 failed with error -5</SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=907130615-05082009>actually, this part is
normal. The device is blacklisted from the<BR>kernel usbhid driver so that it
can be claimed in userspace by<BR>newhidups.<BR><BR>Did you see any error
messages from the driver or other NUT components?"</SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=907130615-05082009><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=907130615-05082009><FONT face=Arial
color=#0000ff size=2>I even tried to use the old rules from nut-2.2.0 but it
doesn't work.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><FONT style="BACKGROUND-COLOR: #ffffff" face=Arial
color=#0000ff size=2><SPAN class=907130615-05082009>The only solution I see is
to always use -u root. So I modified ups init script to call upsdrvctl with
option "-u root". Don't forget do set UPSD_OPTIONS="-u root" in
/etc/sysconfig/ups after installation.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=907130615-05082009><FONT face=Arial color=#0000ff size=2>How do
I send you the RPM for redistribution?</FONT></SPAN></DIV>
<DIV><SPAN class=907130615-05082009><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=907130615-05082009><FONT face=Arial color=#0000ff size=2>Thanks
for all the time spent on this.</FONT></SPAN></DIV>
<DIV><SPAN class=907130615-05082009><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=907130615-05082009><FONT face=Arial color=#0000ff
size=2>Antoine</FONT></SPAN></DIV>
<DIV><BR></DIV>
<DIV class=OutlookMessageHeader lang=fr dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>De :</B> Arnaud Quette
[mailto:aquette.dev@gmail.com] <BR><B>Envoyé :</B> mercredi 5 août 2009
16:42<BR><B>À :</B> Antoine Gatineau<BR><B>Cc :</B>
nut-upsuser<BR><B>Objet :</B> Re: [Nut-upsuser] Usbhip-ups going
wild<BR></FONT><BR></DIV>
<DIV></DIV><BR><BR>
<DIV class=gmail_quote>2009/8/5 Antoine Gatineau <SPAN dir=ltr><<A
href="mailto:antoine.gatineau@alcatel-lucent.com">antoine.gatineau@alcatel-lucent.com</A>></SPAN><BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff size=2>Well,
</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff size=2>I have
unfortunately uplugged the usb cord. Now I am not able to start the drivers
again.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff size=2>When I
plug in the usb cord I get : </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff size=2>Aug
5 16:23:33 localhost kernel: usb 3-2: new low speed USB device using address
6<BR>Aug 5 16:23:34 localhost kernel: usbhid: probe of 3-2:1.0 failed
with error -5</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff size=2>When I
start the nut driver using upsdrvctl start, I get :</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff size=2>Aug
5 16:24:05 localhost upsdrvctl: Can't claim USB device [0463:ffff]: could not
detach kernel driver from interface 0: Operation not
permitted</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff size=2>Aug
5 16:24:05 localhost upsdrvctl: Network UPS Tools - Generic HID driver 0.34
(2.4.1)<BR>Aug 5 16:24:05 localhost upsdrvctl: USB communication driver
0.31<BR>Aug 5 16:24:05 localhost upsdrvctl: Network UPS Tools - UPS
driver controller 2.4.1<BR>Aug 5 16:24:05 localhost upsdrvctl: Driver
failed to start (exit status=1)</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff size=2>I gess
there are some conflicts somewhere. What is really wierd is that I get the
same messages after reboot or reinstallation of the rpms.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff size=2>Any
idea?</FONT></SPAN></DIV></DIV></BLOCKQUOTE>
<DIV><FONT face=Arial color=#0000ff size=2></FONT><BR>check that your hotplug or
udev file is installed correctly, and that the permissions on the USB device are
correctly set (using the lsusb + ls -l /dev/bus/usb/XXX/YYY method)<BR><BR>to
first validate that it's a device perm issue, simply launch the driver as root,
ie:<BR>$ /path/to/usbhid-ups -a <ups><BR><BR>this should start and happily
says "Detected something..."<BR><BR>cheers,<BR>Arnaud<BR>-- <BR>Linux / Unix
Expert R&D - Eaton - <A
href="http://www.eaton.com/mgeops">http://www.eaton.com/mgeops</A><BR>Network
UPS Tools (NUT) Project Leader - <A
href="http://www.networkupstools.org/">http://www.networkupstools.org/</A><BR>Debian
Developer - <A href="http://www.debian.org">http://www.debian.org</A><BR>Free
Software Developer - <A
href="http://arnaud.quette.free.fr/">http://arnaud.quette.free.fr/</A><BR><BR></DIV>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV><BR>
<DIV lang=fr dir=ltr align=left>
<HR>
<FONT face=Tahoma size=2>
<DIV class=im><B>De :</B> Arnaud Quette [mailto:<A
href="mailto:aquette.dev@gmail.com" target=_blank>aquette.dev@gmail.com</A>]
<BR></DIV><B>Envoyé :</B> mercredi 5 août 2009 11:16
<DIV>
<DIV></DIV>
<DIV class=h5><BR><B>À :</B> Antoine Gatineau<BR><B>Cc :</B>
nut-upsuser<BR><B>Objet :</B> Re: [Nut-upsuser] Usbhip-ups going
wild<BR></DIV></DIV></FONT><BR></DIV>
<DIV>
<DIV></DIV>
<DIV class=h5>
<DIV></DIV><BR>
<DIV class=gmail_quote>2009/8/4 Antoine Gatineau <SPAN dir=ltr><<A
href="mailto:antoine.gatineau@alcatel-lucent.com"
target=_blank>antoine.gatineau@alcatel-lucent.com</A>></SPAN><BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff size=2>Hello
everyone,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff
size=2></FONT></SPAN></DIV></DIV></BLOCKQUOTE>
<DIV><BR>Hi Antoine,<BR> <BR></DIV>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV>
<DIV dir=ltr align=left> </DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff size=2>I have
nut and nut-client installed from rpm, up and running without any error in
the logs or at screen.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff size=2>upsc
gives me the state of the battery and stuff. It seems
functional.</FONT></SPAN></DIV></DIV></BLOCKQUOTE>
<DIV><BR>nice<BR> <BR></DIV>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV>
<DIV dir=ltr align=left></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff size=2>Is there
something to do in order to verify the health of the whole chain? (upsmon
-> upsd -> upsdrv)</FONT></SPAN></DIV></DIV></BLOCKQUOTE>
<DIV><FONT face=Arial color=#0000ff size=2></FONT><BR>yep, unplug the UPS'
power cord, and check that upsc has an ups.status = OB<BR><BR> </DIV>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV>
<DIV dir=ltr align=left></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff size=2>One last
question, after installing the rpms, /var/state/ups is not created and the
rights are not given like it should. I was suprised to see that this was not
ntegrated in RHEL5 rpms... Is there some restriction to integrate that
configuration?</FONT></SPAN></DIV></DIV></BLOCKQUOTE>
<DIV><FONT face=Arial color=#0000ff size=2></FONT><BR>most modern distro have
a volatile /var fs. For example, on Debian, the init.d script create these
dirs at launch time...<BR><BR>cheers,<BR>Arnaud<BR>-- <BR>Linux / Unix Expert
R&D - Eaton - <A href="http://www.eaton.com/mgeops"
target=_blank>http://www.eaton.com/mgeops</A><BR>Network UPS Tools (NUT)
Project Leader - <A href="http://www.networkupstools.org/"
target=_blank>http://www.networkupstools.org/</A><BR>Debian Developer - <A
href="http://www.debian.org" target=_blank>http://www.debian.org</A><BR>Free
Software Developer - <A href="http://arnaud.quette.free.fr/"
target=_blank>http://arnaud.quette.free.fr/</A><BR><BR></DIV>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV><BR>
<DIV lang=fr dir=ltr align=left>
<HR>
<FONT face=Tahoma size=2>
<DIV><B>De :</B> Arnaud Quette [mailto:<A
href="mailto:aquette.dev@gmail.com" target=_blank>aquette.dev@gmail.com</A>]
<BR></DIV><B>Envoyé :</B> lundi 3 août 2009 21:46
<DIV><BR><B>À :</B> Antoine Gatineau<BR><B>Cc :</B>
nut-upsuser<BR><B>Objet :</B> Re: [Nut-upsuser] Usbhip-ups going
wild<BR></DIV></FONT><BR></DIV>
<DIV></DIV><BR>
<DIV>
<DIV></DIV>
<DIV><BR>
<DIV class=gmail_quote>2009/8/3 Antoine Gatineau <SPAN dir=ltr><<A
href="mailto:antoine.gatineau@alcatel-lucent.com"
target=_blank>antoine.gatineau@alcatel-lucent.com</A>></SPAN><BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff size=2>I
tried to recompile without xorg-x11-devel and I get this error
:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff
size=2>configure: error: libgd not found, required for CGI
build.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff size=2>It is
indeed required for nut-cgi</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff
size=2>udev-devel, however, is not required.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV></DIV></BLOCKQUOTE>
<DIV><BR>yup, you got me wrong: only the dbus-glib as to be removed.
xorg-devel (or xpm-devel) is needed for nut-cgi<BR> <BR></DIV>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV>
<DIV dir=ltr align=left></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff size=2>Anyway
I made it build correctly.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff size=2>I
attached nut.spec (modified for RHEL4) and nut.spec.ori (original spec
file for RHEL5) for info.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff size=2>There
were no %files entry for libhidups,
libhid.usermap</FONT></SPAN></DIV></DIV></BLOCKQUOTE>
<DIV><BR>these 2 are for hotplug. if you use udev, you don't need
these.<BR> <BR></DIV>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff size=2>and
20-ups-nut-device.fdi</FONT></SPAN></DIV></DIV></BLOCKQUOTE>
<DIV><BR>this file is for HAL. so not needed too.<BR> <BR></DIV>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff size=2>in the
original spec file, so I added them. I'm not an rpm building expert but I
wonder how it could work...</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff size=2>I also
removed hal, powerman and netxml-ups man page and related files as they
are not used in this package.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff size=2>I
didn't test it running yet but I expect it to be OK. I'll come back to you
with results. </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN><FONT face=Arial color=#0000ff size=2>BTW,
in the first answer to this (too?) long thread, Arjen said that there
were lot of bug fixes and performance improvement done since nut-2.2.0. Is
there a bug tracker to seek if my issues will be solved with this new
one?</FONT></SPAN></DIV></DIV></BLOCKQUOTE>
<DIV><BR>to be short: ChangeLog<BR><BR>cheers<BR></DIV>Arnaud<BR></DIV>--
<BR>Linux / Unix Expert R&D - Eaton - <A
href="http://www.eaton.com/mgeops"
target=_blank>http://www.eaton.com/mgeops</A><BR>Network UPS Tools (NUT)
Project Leader - <A href="http://www.networkupstools.org/"
target=_blank>http://www.networkupstools.org/</A><BR>Debian Developer - <A
href="http://www.debian.org" target=_blank>http://www.debian.org</A><BR>Free
Software Developer - <A href="http://arnaud.quette.free.fr/"
target=_blank>http://arnaud.quette.free.fr/</A><BR><BR></DIV></DIV></DIV></BLOCKQUOTE></DIV><BR><BR
clear=all><BR><BR></DIV></DIV></DIV></BLOCKQUOTE></DIV><BR><BR
clear=all><BR></BODY></HTML>