Hi
I have set up rules in udev. I have 4 hid devices, all them works except one. I 
did not understand why, but I have done workaround. The issue is that 
libusb-0.9 expects file in /dev/bus/usb/001/001 to be O_RDWR, and errors out if 
not the case, so I allowed O_RDONLY in libusb which solves the issue in 
libusb/os/linux_usbfs.c. I don't understand why libusb always reads from 
/dev/bus/001/001 instead of /dev/bus/002/001 which is more recent entry. I have 
removed my device several times but it cached that info of HID device. If I 
change the permission to allow O_RDONLY, this problem goes away. Please let the 
dev path having read only permission to use the device. All the permission I 
set are correct but the caching is issue, we need to disable caching in libusb.

Thanks
Amruth p.v


--- On Thu, 8/28/08, Lou <[EMAIL PROTECTED]> wrote:

> From: Lou <[EMAIL PROTECTED]>
> Subject: Re: [Libusb-devel] permission denied for opening HID device
> To: "amruth" <[EMAIL PROTECTED]>
> Cc: "Marian Aldenhoevel" <[EMAIL PROTECTED]>, "Charles Lepple" <[EMAIL 
> PROTECTED]>, [EMAIL PROTECTED], "libhid-discuss List" 
> <[email protected]>
> Date: Thursday, August 28, 2008, 1:58 PM
> On Tue, Aug 26, 2008 at 05:32:33PM -0700, amruth wrote:
> > Hi
> > I am using libusb-0.9.2 and libcompat-0.1-beta with
> libhid-0.1.
> > I am facing this problem whenever I am trying to open
> my HID device.
> > libusb is always trying to open from
> > libusb could'nt open USB device
> /dev/bus/usb/001/001 permission denied.
> > I have unplugged the HID device several times but
> libusb is always trying open from /dev/bus/usb/001/001
> location. Please let me know if anybody has any idea.
> 
> That is a basic permissions problem.  Look at the
> permissions on that
> node.  Some folks run their libusb app as root to get
> around that, but
> that's obviously a security problem.
> 
> A better measure will vary by OS.  My system uses udev, so
> I created a
> udev rule that sets permissions to something else (which I
> can access as a
> normal user) when that node is created for my particular
> device.


      


_______________________________________________
libhid-discuss mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/libhid-discuss

Reply via email to