[libhid-discuss] hid_force_open failed with return code 12

Marius Scurtescu marius.scurtescu at gmail.com
Wed Mar 21 18:30:14 CET 2007


On 3/21/07, Charles Lepple <clepple at ghz.cc> wrote:
> Marius Scurtescu wrote:
> > On 3/21/07, Charles Lepple <clepple at ghz.cc> wrote:
> >> On Mar 20, 2007, at 10:34 PM, Marius Scurtescu wrote:
> >>
> >> > Hi,
> >> >
> >> > I am using libhid under Ubuntu Edgy, tried both i386 and amd64
> >> > (0.2.15+20060325-2ubuntu1).
> >> >
> >> > Trying to access a Radio Shark 2 device. The problem is that libhid
> >> > cannot detach the kernel driver from the USB device.
> >> >
> >> > Using libhid-detach-device, same thing.
> >> >
> >> > Any suggestions?
> >>
> >> The most common problem is not having write permission to the device
> >> node in /dev/bus/usb/*/*.
> >
> > That must be it. If I am running as root then it detaches fine. Only
> > root has write access to these devices. How can I change this? Should
> > I change the group or force write for all?
> >
> > Also, the device gets created when you insert the USB connector, can
> > you control permissions on that?
>
> You can do something like what we have in Network UPS Tools for USB UPSes:
>
> http://boxster.ghz.cc/projects/nut/browser/trunk/scripts/udev/nut-usbups.rules.in
>
> I think the README file one level up has some info on installing the udev
> rules file. (Note that the autoconf script would take the
> nut-usbups.rules.in file and replace @RUN_AS_GROUP@ with the actual
> configured group, writing the output to nut-usbups.rules. Your udev script
> could do something similar with your userid instead of the group.)

Thanks for the suggestion. I will look into this.

Marius



More information about the libhid-discuss mailing list