<br><br><div class="gmail_quote">On Sat, Jun 25, 2011 at 5:48 PM, Charles Lepple <span dir="ltr"><<a href="mailto:clepple@gmail.com" target="_blank">clepple@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>On Jun 24, 2011, at 8:50 PM, Martin Ewing wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I had been using NUT's Ubuntu package (64 bit) with no problems until upgrading to Ubuntu 11.04.<br>
</blockquote>
<br></div>
What was the previous NUT package version?<div><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Now, I get the following message when I try usbhid-ups:<br>
<br>
$ sudo /lib/nut/usbhid-ups -a mybelkin<br>
Network UPS Tools - Generic HID driver 0.35 (2.6.0)<br>
USB communication driver 0.31<br>
Can't claim USB device [050d:1100]: could not detach kernel driver from interface 0: Operation not permitted<br>
</blockquote>
<br></div>
Do you get the same error if you add "-u root" to the command line? If so, there might be something other than filesystem permissions causing this error.<div><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
ups.conf:<br>
[mybelkin]<br>
driver = usbhid-ups<br>
port = auto<br>
desc = "Belkin 1200 VA UPS"<br>
<br>
The udev rule seems OK:<br>
# F6C1100-UNV, F6C1200-UNV - usbhid-ups<br>
ATTR{idVendor}=="050d", ATTR{idProduct}=="1100", MODE="664", GROUP="nut"<br>
<br>
Using udevadm monitor and plugging in the USB:<br>
KERNEL[1308961682.706704] add /devices/pci0000:00/0000:00:<u></u>1d.0/usb6/6-1 (usb)<br>
KERNEL[1308961682.709615] add /devices/pci0000:00/0000:00:<u></u>1d.0/usb6/6-1/6-1:1.0 (usb)<br>
KERNEL[1308961682.709674] add /devices/pci0000:00/0000:00:<u></u>1d.0/usb6/6-1/6-1:1.0/0003:<u></u>050D:1100.0007 (hid)<br>
KERNEL[1308961682.979776] add /devices/pci0000:00/0000:00:<u></u>1d.0/usb6/6-1/6-1:1.0/usb/<u></u>hiddev0 (usb)<br>
KERNEL[1308961682.979802] add /devices/pci0000:00/0000:00:<u></u>1d.0/usb6/6-1/6-1:1.0/0003:<u></u>050D:1100.0007/hidraw/hidraw0 (hidraw)<br>
<br>
However, the usb devices are created in root group and without read access to nut group.<br>
$ ls -l /dev/usb<br>
crw------- 1 root root 180, 96 2011-06-24 20:43 hiddev0<br>
</blockquote>
<br></div>
This device would disappear if the detach error hadn't occurred.<br>
<br>
Around the time of the first udev event listed above, udev should have created /dev/bus/usb/006/001, and that node should be owned by group nut.<br>
<br>
I just upgraded to 11.04, and the tripplite_usb driver did not have a problem attaching to it. (This driver uses the same method of detaching the kernel HID driver as usbhid-ups.)<br>
<br>
If I have time later this weekend, I'll swap out that UPS for one which uses the usbhid-ups driver and see if I can reproduce the problem.<br>
</blockquote></div><br>Charles,<br><br><br>Tried -u root -- different response, but still not right:<br><br>$ sudo /lib/nut/usbhid-ups -a mybelkin -u root<br>Network UPS Tools - Generic HID driver 0.35 (2.6.0)<br>USB communication driver 0.31<br>
Using subdriver: Belkin HID 0.12<br>libusb_get_report: could not claim interface 0: Device or resource busy<br>libusb_get_report: could not claim interface 0: Device or resource busy<br>Got disconnected by another driver: Device or resource busy<br>
Can't initialize data from HID UPS<br><br clear="all">Device:<br>$ ls -l /dev/bus/usb/006/001<br>crw-rw-r-- 1 root root 189, 640 2011-06-24 18:29 /dev/bus/usb/006/001<br><br>Not in group nut.<br><br>But I tried one more thing. I powered down the UPS completely and restarted everything. (I wondered if the Belkin's USB was hung up.) Now, I get something different:<br>
<br>$ sudo /lib/nut/usbhid-ups -a mybelkin <br>Network UPS Tools - Generic HID driver 0.35 (2.6.0)<br>USB communication driver 0.31<br>Using subdriver: Belkin HID 0.12<br>libusb_get_report: error sending control message: Operation not permitted<br>
libusb_get_report: error sending control message: Operation not permitted<br>Can't initialize data from HID UPS<br><br>and<br>$ ls -l /dev/usb<br>total 0<br>crw------- 1 root root 180, 96 2011-06-25 18:58 hiddev0<br>crw-rw---- 1 root lp 180, 0 2011-06-25 18:58 lp0<br>
martin@gimli:~$ ls -l /dev/bus/usb/006/001<br>crw-rw-r-- 1 root root 189, 640 2011-06-25 18:58 /dev/bus/usb/006/001<br><br>If I try -u root<br>$ sudo /lib/nut/usbhid-ups -a mybelkin -u root<br>Network UPS Tools - Generic HID driver 0.35 (2.6.0)<br>
USB communication driver 0.31<br>Using subdriver: Belkin HID 0.12<br>libusb_get_report: No error<br>libusb_get_report: No error<br>libusb_get_report: No error<br>libusb_get_report: No error<br>libusb_get_report: No error<br>
libusb_get_report: No error<br>libusb_get_report: No error<br>...<br><br>and now there is a process<br> 3544 ? Ss 0:00 /lib/nut/usbhid-ups -a mybelkin -u root<br><br>I think I am understanding less and less!<br>
<br>Martin<br>-- <br>Martin Ewing<br>
Branford, Connecticut<br><a href="mailto:martin.s.ewing@gmail.com" target="_blank">martin.s.ewing@gmail.com</a><br>