[Nut-upsuser] How do I get the richcomm_usb driver - to work !
Charles Lepple
clepple at gmail.com
Fri Nov 18 04:20:20 UTC 2011
On Nov 17, 2011, at 10:51 AM, Iain Simpson wrote:
> 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.
>
> I then ran 'sudo upsdrvctl -D -u root start' and it ran :
>
> >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).
> (/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.
> Hope this helps
>
> As I said - I don't have a feel for what's involved yet - still reading the manual.
>
> Thanks
> Iain
>
>
>
>
>
> On 17/11/11 00:40, Charles Lepple wrote:
>> On Nov 16, 2011, at 3:34 PM, Iain Simpson wrote:
>>
>>> Here yet again
>>> got the driver built but when I ran got the following errors :
>>>
>>>
>>> $19:54:10 ~/nut/nut-2.6.2/drivers>sudo ./upsdrvctl -D start
>>> [sudo] password for iain:
>>> 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
More information about the Nut-upsuser
mailing list