Discussion:
[Nut-upsuser] How do I get the richcomm_usb driver
Iain Simpson
2011-11-16 13:22:42 UTC
Permalink
I am a complete novice in this area so please bear with me.
I have installed nut version 2.6.2-1 for my debian 64bit system.
I am trying to implement 'nut' for a new VIX2120 home UPS and have
determined that I need the richcomm_usb driver [usb 0925:1234]. But it
is not in /lib/nut although referenced in the documentation (driver.list)

How do get hold of a copy?
Due to ignorance I am not very keen on compiling from scratch.

tia
Iain
Charles Lepple
2011-11-16 13:37:43 UTC
Permalink
Post by Iain Simpson
I am a complete novice in this area so please bear with me.
I have installed nut version 2.6.2-1 for my debian 64bit system.
I am trying to implement 'nut' for a new VIX2120 home UPS and have determined that I need the richcomm_usb driver [usb 0925:1234]. But it is not in /lib/nut although referenced in the documentation (driver.list)
How do get hold of a copy?
Due to ignorance I am not very keen on compiling from scratch.
A fix is pending - see this email:

http://article.gmane.org/gmane.comp.monitoring.nut.user/6727

However, I don't think that a new revision of the nut package is available yet.

Compiling from scratch shouldn't be too hard, as Arnaud has listed the exact ./configure command line earlier in that thread:

http://article.gmane.org/gmane.comp.monitoring.nut.user/6724

You can file a bug to remind Arnaud: http://www.debian.org/Bugs/Reporting
Post by Iain Simpson
Nut-upsuser mailing list
Nut-upsuser at lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser
Charles Lepple
2011-11-17 00:40:36 UTC
Permalink
Here yet again
$19:54:10 ~/nut/nut-2.6.2/drivers >sudo ./upsdrvctl -D start
Network UPS Tools - UPS driver controller 2.6.2
0.000000 Starting UPS: vix2120
Network UPS Tools - Richcomm dry-contact to USB driver 0.04 (2.6.2)
Warning: This is an experimental driver.
Some features may not function correctly.
USB device [0925:1234] matches, but driver callback failed: could not detach kernel driver from interface 0: Operation not permitted
0.091309 Driver failed to start (exit status=1)
What does 'ls -lR /proc/bus/usb' say?

Also, what if you try 'sudo /lib/nut/richcomm_usb -D -a vix2120 -u root'?
Sorry I don't really understand what's happening.
'Operation not permitted' means there's probably a permissions error, in this case on the node in /proc/bus/usb corresponding to your UPS.
Iain Simpson
2011-11-17 15:51:43 UTC
Permalink
Thanks for suggestions

I've attached (con) listings of 'lsusb' & 'ls-lR /proc/bus/usb'
everything looks OK with 'root:root' & '-rw-rw-rw-'
(ups is 0925:1234)
when
'sudo /lib/nut/richcomm_usb -D -a vix2120 -u root' was run
I got
Network UPS Tools - Richcomm dry-contact to USB driver 0.04 (2.6.2)
Warning: This is an experimental driver.
Some features may not function correctly.
0.000000 debug level is '1'
0.000315 Can't chdir to /var/run/nut: No such file or directory
if I manually created '/var/run/nut'
and reran - it ran (as per attached) until ^C
sudo upsdrvctl -u root start
Network UPS Tools - UPS driver controller 2.6.1
Network UPS Tools - Richcomm dry-contact to USB driver 0.04 (2.6.2)
Warning: This is an experimental driver.
Some features may not function correctly.
It also responded if I disconnected the usb cable.

so it seems that permissions are the cause - but where?
(/etc/nut has owner:group nut:root)



I don't think it is relevent but I had originally installed 2.6.1 from
'Debian' (without richcomm_usb) and then built 2.6.2 as per Arnaud's
instructions - just copying ...nut/drivers/richcomm_usb to /lib/nut
(not nut/drivers/.libs/richcomm_usb to /lib/nut - drivers/.libs was
empty) I didn't overwrite anything else.

Hope this helps

As I said - I don't have a feel for what's involved yet - still reading
the manual.

Thanks
Iain
Here yet again
$19:54:10 ~/nut/nut-2.6.2/drivers>sudo ./upsdrvctl -D start
Network UPS Tools - UPS driver controller 2.6.2
0.000000 Starting UPS: vix2120
Network UPS Tools - Richcomm dry-contact to USB driver 0.04 (2.6.2)
Warning: This is an experimental driver.
Some features may not function correctly.
USB device [0925:1234] matches, but driver callback failed: could not detach kernel driver from interface 0: Operation not permitted
0.091309 Driver failed to start (exit status=1)
What does 'ls -lR /proc/bus/usb' say?
Also, what if you try 'sudo /lib/nut/richcomm_usb -D -a vix2120 -u root'?
Sorry I don't really understand what's happening.
'Operation not permitted' means there's probably a permissions error, in this case on the node in /proc/bus/usb corresponding to your UPS.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: con
URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20111117/5917961d/attachment.ksh>
Charles Lepple
2011-11-18 04:20:20 UTC
Permalink
Post by Iain Simpson
Thanks for suggestions
I've attached (con) listings of 'lsusb' & 'ls-lR /proc/bus/usb'
everything looks OK with 'root:root' & '-rw-rw-rw-'
(ups is 0925:1234)
when
'sudo /lib/nut/richcomm_usb -D -a vix2120 -u root' was run
I got
Network UPS Tools - Richcomm dry-contact to USB driver 0.04 (2.6.2)
Warning: This is an experimental driver.
Some features may not function correctly.
0.000000 debug level is '1'
0.000315 Can't chdir to /var/run/nut: No such file or directory
if I manually created '/var/run/nut'
and reran - it ran (as per attached) until ^C
Once you get the driver running manually like this, you should be able to run 'upsdrvctl start' (which is what an init script would do, to launch one or more drivers from /etc/nut/ups.conf). upsdrvctl launches the drivers in the background.

http://www.networkupstools.org/docs/man/upsdrvctl.html

Then, you start upsd, which allows you to run commands like 'upsc vix2120' to see all the variables.

Last, you run upsmon, which monitors for low battery conditions.
Post by Iain Simpson
sudo upsdrvctl -u root start
Network UPS Tools - UPS driver controller 2.6.1
Network UPS Tools - Richcomm dry-contact to USB driver 0.04 (2.6.2)
Warning: This is an experimental driver.
Some features may not function correctly.
It also responded if I disconnected the usb cable.
so it seems that permissions are the cause - but where?
Usually, /proc/bus/usb doesn't have -rw-rw-rw- permissions, so you might have to tweak the udev rules file to include the USB VID:PID for your UPS (0925:1234).
Post by Iain Simpson
(/etc/nut has owner:group nut:root)
I don't think it is relevent but I had originally installed 2.6.1 from 'Debian' (without richcomm_usb) and then built 2.6.2 as per Arnaud's instructions - just copying ...nut/drivers/richcomm_usb to /lib/nut
(not nut/drivers/.libs/richcomm_usb to /lib/nut - drivers/.libs was empty) I didn't overwrite anything else.
That should work.
Post by Iain Simpson
Hope this helps
As I said - I don't have a feel for what's involved yet - still reading the manual.
Thanks
Iain
Here yet again
$19:54:10 ~/nut/nut-2.6.2/drivers>sudo ./upsdrvctl -D start
Network UPS Tools - UPS driver controller 2.6.2
0.000000 Starting UPS: vix2120
Network UPS Tools - Richcomm dry-contact to USB driver 0.04 (2.6.2)
Warning: This is an experimental driver.
Some features may not function correctly.
USB device [0925:1234] matches, but driver callback failed: could not detach kernel driver from interface 0: Operation not permitted
0.091309 Driver failed to start (exit status=1)
What does 'ls -lR /proc/bus/usb' say?
Also, what if you try 'sudo /lib/nut/richcomm_usb -D -a vix2120 -u root'?
Sorry I don't really understand what's happening.
'Operation not permitted' means there's probably a permissions error, in this case on the node in /proc/bus/usb corresponding to your UPS.
<con.txt>_______________________________________________
Nut-upsuser mailing list
Nut-upsuser at lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser
Loading...