From mboxrd@z Thu Jan 1 00:00:00 1970 From: Asfand Yar Qazi Date: Fri, 30 Jun 2006 00:40:05 +0000 Subject: udev rules for logitech receiver with mouse and keyboard Message-Id: <44A472E5.90102@asfandyar.cjb.net> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org Hi, I wanna setup my logitech receiver properly, i.e. if I also buy a logitech wireless keyboard, I also want it to work. I did the following: $ cat /proc/bus/input/devices I: Bus=0011 Vendor=0001 Product=0001 Version=AB41 N: Name=3D"AT Translated Set 2 keyboard" P: Phys=3Disa0060/serio0/input0 S: Sysfs=3D/class/input/input0 H: Handlers=3Dkbd event0 B: EV=120013 B: KEY@2000000 3802078f840d001 f2ffffdfffefffff fffffffffffffffe B: MSC=10 B: LED=3D7 I: Bus=0003 Vendor=018b Product=0123 Version=0123 N: Name=3D"Joytech NEO S V2.0b Joytech NEO S V2.0b " P: Phys=3Dusb-0000:00:02.0-10/input0 S: Sysfs=3D/class/input/input3 H: Handlers=3Dkbd event3 js0 B: EV=12000b B: KEY=FFf0000000f 0 80000000000000 e0b0ffdf01cfffff fffffffffffffffe B: ABS=7F00000300c3 B: LED=1F I: Bus=0003 Vendor=018b Product=0123 Version=0123 N: Name=3D"Joytech NEO S V2.0b Joytech NEO S V2.0b " P: Phys=3Dusb-0000:00:02.0-10/input1 S: Sysfs=3D/class/input/input4 H: Handlers=3Dmouse1 event4 B: EV=3D7 B: KEYp000 0 0 0 0 B: REL=103 I: Bus=0003 Vendor=046d Product=C51a VersionA00 N: Name=3D"Logitech USB Receiver" P: Phys=3Dusb-0000:00:02.0-8/input0 S: Sysfs=3D/class/input/input9 H: Handlers=3Dmouse0 event1 B: EV=3D7 B: KEY=FFff0000 0 0 0 0 B: REL=143 I: Bus=0003 Vendor=046d Product=C51a VersionA00 N: Name=3D"Logitech USB Receiver" P: Phys=3Dusb-0000:00:02.0-8/input1 S: Sysfs=3D/class/input/input10 H: Handlers=3Dkbd event2 B: EV=3Df B: KEY=C0002 40000000000 1 f8000078000 6639fad84157ad 8e000000000000 0 B: REL@ B: ABS=100000000 Then the following: $ sudo udevinfo -a -p `sudo udevinfo -q path -n /dev/input/event1` udevinfo starts with the device the node belongs to and then walks up the device chain, to print for every device found, all possibly useful attribut= es in the udev key format. Only attributes within one device section may be used together in one rule, to match the device for which the node will be created. looking at device '/class/input/input9/event1': KERNEL=3D"event1" SUBSYSTEM=3D"input" SYSFS{dev}=3D"13:65" looking at device '/class/input/input9': ID=3D"input9" BUS=3D"input" DRIVER=3D"" SYSFS{uniq}=3D"" SYSFS{phys}=3D"usb-0000:00:02.0-8/input0" SYSFS{name}=3D"Logitech USB Receiver" looking at device '/devices/pci0000:00/0000:00:02.0/usb2/2-8/2-8:1.0': ID=3D"2-8:1.0" BUS=3D"usb" DRIVER=3D"usbhid" SYSFS{modalias}=3D"usb:v046DpC51Ad4100dc00dsc00dp00ic03isc01ip02" SYSFS{bInterfaceProtocol}=3D"02" SYSFS{bInterfaceSubClass}=3D"01" SYSFS{bInterfaceClass}=3D"03" SYSFS{bNumEndpoints}=3D"01" SYSFS{bAlternateSetting}=3D" 0" SYSFS{bInterfaceNumber}=3D"00" looking at device '/devices/pci0000:00/0000:00:02.0/usb2/2-8': ID=3D"2-8" BUS=3D"usb" DRIVER=3D"usb" SYSFS{configuration}=3D"RR41.00_B0021" SYSFS{product}=3D"USB Receiver" SYSFS{manufacturer}=3D"Logitech" SYSFS{maxchild}=3D"0" SYSFS{version}=3D" 2.00" SYSFS{devnum}=3D"6" SYSFS{speed}=3D"12" SYSFS{bMaxPacketSize0}=3D"8" SYSFS{bNumConfigurations}=3D"1" SYSFS{bDeviceProtocol}=3D"00" SYSFS{bDeviceSubClass}=3D"00" SYSFS{bDeviceClass}=3D"00" SYSFS{bcdDevice}=3D"4100" SYSFS{idProduct}=3D"c51a" SYSFS{idVendor}=3D"046d" SYSFS{bMaxPower}=3D" 98mA" SYSFS{bmAttributes}=3D"a0" SYSFS{bConfigurationValue}=3D"1" SYSFS{bNumInterfaces}=3D" 2" looking at device '/devices/pci0000:00/0000:00:02.0/usb2': ID=3D"usb2" BUS=3D"usb" DRIVER=3D"usb" SYSFS{configuration}=3D"" SYSFS{serial}=3D"0000:00:02.0" SYSFS{product}=3D"OHCI Host Controller" SYSFS{manufacturer}=3D"Linux 2.6.17-gentoo ohci_hcd" SYSFS{maxchild}=3D"10" SYSFS{version}=3D" 1.10" SYSFS{devnum}=3D"1" SYSFS{speed}=3D"12" SYSFS{bMaxPacketSize0}=3D"64" SYSFS{bNumConfigurations}=3D"1" SYSFS{bDeviceProtocol}=3D"00" SYSFS{bDeviceSubClass}=3D"00" SYSFS{bDeviceClass}=3D"09" SYSFS{bcdDevice}=3D"0206" SYSFS{idProduct}=3D"0000" SYSFS{idVendor}=3D"0000" SYSFS{bMaxPower}=3D" 0mA" SYSFS{bmAttributes}=3D"e0" SYSFS{bConfigurationValue}=3D"1" SYSFS{bNumInterfaces}=3D" 1" looking at device '/devices/pci0000:00/0000:00:02.0': ID=3D"0000:00:02.0" BUS=3D"pci" DRIVER=3D"ohci_hcd" SYSFS{modalias}=3D"pci:v000010DEd0000005Asv00001458sd00005004bc0Csc03i1= 0" SYSFS{local_cpus}=3D"1" SYSFS{irq}=3D"50" SYSFS{class}=3D"0x0c0310" SYSFS{subsystem_device}=3D"0x5004" SYSFS{subsystem_vendor}=3D"0x1458" SYSFS{device}=3D"0x005a" SYSFS{vendor}=3D"0x10de" looking at device '/devices/pci0000:00': ID=3D"pci0000:00" BUS=3D"" DRIVER=3D"" Then the following: $ sudo udevinfo -a -p `sudo udevinfo -q path -n /dev/input/event2` udevinfo starts with the device the node belongs to and then walks up the device chain, to print for every device found, all possibly useful attribut= es in the udev key format. Only attributes within one device section may be used together in one rule, to match the device for which the node will be created. looking at device '/class/input/input10/event2': KERNEL=3D"event2" SUBSYSTEM=3D"input" SYSFS{dev}=3D"13:66" looking at device '/class/input/input10': ID=3D"input10" BUS=3D"input" DRIVER=3D"" SYSFS{uniq}=3D"" SYSFS{phys}=3D"usb-0000:00:02.0-8/input1" SYSFS{name}=3D"Logitech USB Receiver" looking at device '/devices/pci0000:00/0000:00:02.0/usb2/2-8/2-8:1.1': ID=3D"2-8:1.1" BUS=3D"usb" DRIVER=3D"usbhid" SYSFS{modalias}=3D"usb:v046DpC51Ad4100dc00dsc00dp00ic03isc00ip00" SYSFS{bInterfaceProtocol}=3D"00" SYSFS{bInterfaceSubClass}=3D"00" SYSFS{bInterfaceClass}=3D"03" SYSFS{bNumEndpoints}=3D"01" SYSFS{bAlternateSetting}=3D" 0" SYSFS{bInterfaceNumber}=3D"01" looking at device '/devices/pci0000:00/0000:00:02.0/usb2/2-8': ID=3D"2-8" BUS=3D"usb" DRIVER=3D"usb" SYSFS{configuration}=3D"RR41.00_B0021" SYSFS{product}=3D"USB Receiver" SYSFS{manufacturer}=3D"Logitech" SYSFS{maxchild}=3D"0" SYSFS{version}=3D" 2.00" SYSFS{devnum}=3D"6" SYSFS{speed}=3D"12" SYSFS{bMaxPacketSize0}=3D"8" SYSFS{bNumConfigurations}=3D"1" SYSFS{bDeviceProtocol}=3D"00" SYSFS{bDeviceSubClass}=3D"00" SYSFS{bDeviceClass}=3D"00" SYSFS{bcdDevice}=3D"4100" SYSFS{idProduct}=3D"c51a" SYSFS{idVendor}=3D"046d" SYSFS{bMaxPower}=3D" 98mA" SYSFS{bmAttributes}=3D"a0" SYSFS{bConfigurationValue}=3D"1" SYSFS{bNumInterfaces}=3D" 2" looking at device '/devices/pci0000:00/0000:00:02.0/usb2': ID=3D"usb2" BUS=3D"usb" DRIVER=3D"usb" SYSFS{configuration}=3D"" SYSFS{serial}=3D"0000:00:02.0" SYSFS{product}=3D"OHCI Host Controller" SYSFS{manufacturer}=3D"Linux 2.6.17-gentoo ohci_hcd" SYSFS{maxchild}=3D"10" SYSFS{version}=3D" 1.10" SYSFS{devnum}=3D"1" SYSFS{speed}=3D"12" SYSFS{bMaxPacketSize0}=3D"64" SYSFS{bNumConfigurations}=3D"1" SYSFS{bDeviceProtocol}=3D"00" SYSFS{bDeviceSubClass}=3D"00" SYSFS{bDeviceClass}=3D"09" SYSFS{bcdDevice}=3D"0206" SYSFS{idProduct}=3D"0000" SYSFS{idVendor}=3D"0000" SYSFS{bMaxPower}=3D" 0mA" SYSFS{bmAttributes}=3D"e0" SYSFS{bConfigurationValue}=3D"1" SYSFS{bNumInterfaces}=3D" 1" looking at device '/devices/pci0000:00/0000:00:02.0': ID=3D"0000:00:02.0" BUS=3D"pci" DRIVER=3D"ohci_hcd" SYSFS{modalias}=3D"pci:v000010DEd0000005Asv00001458sd00005004bc0Csc03i1= 0" SYSFS{local_cpus}=3D"1" SYSFS{irq}=3D"50" SYSFS{class}=3D"0x0c0310" SYSFS{subsystem_device}=3D"0x5004" SYSFS{subsystem_vendor}=3D"0x1458" SYSFS{device}=3D"0x005a" SYSFS{vendor}=3D"0x10de" looking at device '/devices/pci0000:00': ID=3D"pci0000:00" BUS=3D"" DRIVER=3D"" Are these udev rules alright to distinguish the event device delivering keyboard events from mouse events? # Logitech Receiver Mouse BUS=3D"usb", \ SYSFS{modalias}=3D"usb:v046DpC51Ad4100dc00dsc00dp00ic03isc01ip02", \ SYSFS{bInterfaceNumber}=3D"00", \ KERNEL=3D"event?", \ NAME=3D"input/%k", \ SYMLINK=3D"input/logitech_receiver_mouse" # Logitech Receiver Keyboard BUS=3D"usb", \ SYSFS{modalias}=3D"usb:v046DpC51Ad4100dc00dsc00dp00ic03isc01ip02", \ SYSFS{bInterfaceNumber}=3D"01", \ KERNEL=3D"event?", \ NAME=3D"input/%k", \ SYMLINK=3D"input/logitech_receiver_keyboard" Thanks for your help And if you're curious, here's approximately what's going in my xorg.conf fi= le: Section "InputDevice" Identifier "LogitechReceiverMouse" Driver "evdev" Option "Dev Name" "Logitech USB Wireless Mouse" Option "Device" "/dev/input/logitech_receiver_mouse" Option "Buttons" "8" Option "ZAxisMapping" "4 5 7 8" Option "Emulate3Buttons" "no" EndSection p.s. Please CC me, I'm not on the list. Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easi= er Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=120709&bid&3057&dat=121642 _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel