-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Fri, 30 May 2003 10:54 am, Sylvain Jaboeuf wrote: > Hi, > > As my english is not so good, and my issue quite complex, I'll take a > concrete example to explain my request: > > Here is the situation: > - I have two USB mice > - my distrib is Mandrake 9.1 (kernel 2.4.21-0.13mdk) > > I am a software (may be a daemon), I know the USB devices number of > each mouse (in /proc/bus/usb: Dev# of each mouse is 3 and 4). > I know there are two paths to access theses devices (for example: > /dev/input/mouse0 with Major/minor=13/32, /dev/input/mouse1 and > Major/Minor=13/33). > And I would like to know what is the Major/Minor of the mouse with the > Dev#=3. How can I do that if I am a software? Perhaps you can use /proc/bus/input/devices: I: Bus=0003 Vendor=046d Product=c501 Version=0910 N: Name="Logitech USB Receiver" P: Phys=usb-00:1d.0-2.2/input0 H: Handlers=mouse1 event4 B: EV=20007 B: KEY=1f0000 0 0 0 0 0 0 0 0 B: REL=103 B: LED=400 and then do a lookup on the physical path or vendor/product/version.
> ---------------------------------------------- > In fact my request is not only for USB mice, it is for any USB devices: > If I know that I can "speak" with an USB device that has the > Major/Minor= x/y, how can I know its device # (or any other info in > /proc/bus/usb/* )? > in other words, is there a link between info we can found in > /proc/bus/usb/* and the Major/Minor of each USB device? You cannot do this in general. Many devices don't have a major/minor. Perhaps you could explain what you are trying to do (ie what is the purpose of your application, and why do you want to associate this information)? If so, we might be able to help. Brad -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE+1swEW6pHgIdAuOMRAk8dAKCX1d7VKDtrcRs5dEEQcsD+D10qJQCcDI9R yeIzL39ppe0xG58hvspOQaI= =lYta -----END PGP SIGNATURE----- ------------------------------------------------------- This SF.net email is sponsored by: eBay Get office equipment for less on eBay! http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-users
