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

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

 





Greg KH wrote:
On Fri, Jun 26, 2009 at 11:23:08AM -0700, jack craig wrote:

perms.

i tried this code with and w/o the symlink and it made no difference.
And again, what exactly is this device node, or link?  What does:
	ls -l /dev/obdii
show?
crw-rw-rw- 1 root root 251, 29 2009-06-26 07:02 /dev/obdii

and the node that libusb is using ...

251:29?  What is major 251?  What does /proc/devices/ show?

yes, its usb_endpoint while the /dev/bus/usb/003/002 is 189, usb_device


crw-rw-r-- 1 root root 189, 257 2009-06-26 07:02 /dev/bus/usb/003/002

Yup, that's the device you need to be modifying.

and lsusb's view of the world, ...

Bus 001 Device 004: ID 058f:6335 Alcor Micro Corp. SD/MMC Card Reader
Bus 001 Device 003: ID 13fe:1f00 Kingston Technology Company Inc. DataTraveler 2.0 4GB Flash Drive
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 002: ID 0b05:b700 ASUSTek Computer, Inc.
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 1808:5555 Multiplex Engineering OBDII to USB Interface
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 046d:c526 Logitech, Inc.
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

the rule i am trying to make work, ...

BUS=="usb", ATTRS{idVendor}=="1808", ATTRS{idProduct}=="5555", NAME="obdii", MODE="0666"

note i removed the SYMLINK bit as that was a shot in the dark on my part thinking well,
maybe if i added the SYMLINK, it would link /dev/obdii to /dev/bus/usb/003/002, but that didnt work.

What is this device?
an obdII interface.

Which is what?

on board diagnostic is the connection to your cars computer.


   Does a kernel driver bind to it already?

yes, as i needed to use the libusb_detach_kernel_driver so i could access my device with libusb.

What driver is binding to it?

i admit i dont know how to determine that. udev is new to me. it is clear that /proc/devices has  alist
of drivers to majors for char/block, but which kernel driver 'owns' usb_endpoint?

early in my libusb use, i had access issues and i was told to use the
api to detach the kernels binding so i could use libusb to talk to it.

the guidance seemed to work so i used it.


   If so,
why are you trying to mess with libusb?
because i'd prefer not to write any kernel level driver code.



Change your rule to apply to the correct device, you are binding to the
usb device created by some driver that binds to it, not the usbfs
device.

i have been searching for udev guidance and have read daniel drakes paper on how to perform this action.

however, the best i could see was to goto the /sys/../usb/003/002/... directory for my widget and see the
discovered info there to claim my device. i had expected that if i provided the vendor & product, then udev would
act on my requested NAME and use my mode for it, using my device node instead of /dev/bus/usb/003/002.

as this is clearly not the case, would you suggest the correct method to do that?

thx again, jackc...


--
   jack craig
      jackc@xxxxxxxxxxxxxxxxxxx
         831-684-1375 (Office)
            831-596-6924 (cell)
               IM: jackcraigaptos (AIM)
_________________________________
This email has been ClamScanned !
    www.LinuxLightHouse.com
--
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