Re: udev-> libusb issue, already posted to libusb group

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 25, 2009 at 11:12:29AM -0700, jack craig wrote:
> I knew the 'Big Guns' wouldnt fail me! :)
> 
> 
> Greg KH wrote:
> > On Thu, Jun 25, 2009 at 09:04:59AM -0700, jack craig wrote:
> >> i have created the rule, ...
> >>
> >> BUS=="usb", ATTRS{idVendor}=="1808", ATTRS{idProduct}=="5555", NAME="obdii", MODE="0666", SYMLINK+="obdii"
> >>
> >> when i plug in my widget, sure enough, i get a /dev/obdii created with
> >> my desired permissions so udev is ok (AFAIK).
> > 
> > It should be a symlink, right?  What is the link pointing to?
> 
> well, as i expect it, /dev/obdii should get created on usb hotplug
> event and evaporate when its unplugged.

Again, what is that link pointing to?

> from the udev docs i expected all this would just get handled, but if
> its in the moblin stack, that explains why the libusb group didn't
> have any insight.

No, if you really did set up the correct link, libusb should work
properly.  Odds are, based on your udev rule, you are not pointing to
the correct device node.

> >> however, when i try and run my program and use the libusb functions,
> >> it tries to open the /dev/bus/usb/003/002 device node which is not
> >> device file i have so carefully created.
> > 
> > Why not?  What device file did you create?
> 
> what i meant is that with that rule, the /dev/obdii gets created with
> 0666 as i want, its just then ignored by the subsequent libusb_open()

Because you are creating the wrong link.

> > And that sounds like your problem right there, you are matching on the
> > wrong thing in your udev rule.
> 
> i thought the match of idVendor & idProduct was correct, what is the correct usage?

Run 'udevadm monitor' to see exactly what device you are wanting to
modify the mode for.  Odds are you need to change your device type.

good luck,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux