linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* udev rules for logitech receiver with mouse and keyboard
@ 2006-06-30  0:40 Asfand Yar Qazi
  0 siblings, 0 replies; only message in thread
From: Asfand Yar Qazi @ 2006-06-30  0:40 UTC (permalink / raw)
  To: linux-hotplug

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\011 Vendor\001 Product\001 Version«41
N: Name="AT Translated Set 2 keyboard"
P: Phys=isa0060/serio0/input0
S: Sysfs=/class/input/input0
H: Handlers=kbd event0
B: EV\x120013
B: KEY@2000000 3802078f840d001 f2ffffdfffefffff fffffffffffffffe
B: MSC\x10
B: LED=7

I: Bus\003 Vendor\x018b Product\x0123 Version\x0123
N: Name="Joytech NEO S V2.0b  Joytech NEO S V2.0b "
P: Phys=usb-0000:00:02.0-10/input0
S: Sysfs=/class/input/input3
H: Handlers=kbd event3 js0
B: EV\x12000b
B: KEYÿf0000000f 0 80000000000000 e0b0ffdf01cfffff fffffffffffffffe
B: ABS\x7f00000300c3
B: LED\x1f

I: Bus\003 Vendor\x018b Product\x0123 Version\x0123
N: Name="Joytech NEO S V2.0b  Joytech NEO S V2.0b "
P: Phys=usb-0000:00:02.0-10/input1
S: Sysfs=/class/input/input4
H: Handlers=mouse1 event4
B: EV=7
B: KEYp000 0 0 0 0
B: REL\x103

I: Bus\003 Vendor\x046d ProductÅ1a VersionA00
N: Name="Logitech USB Receiver"
P: Phys=usb-0000:00:02.0-8/input0
S: Sysfs=/class/input/input9
H: Handlers=mouse0 event1
B: EV=7
B: KEYÿff0000 0 0 0 0
B: REL\x143

I: Bus\003 Vendor\x046d ProductÅ1a VersionA00
N: Name="Logitech USB Receiver"
P: Phys=usb-0000:00:02.0-8/input1
S: Sysfs=/class/input/input10
H: Handlers=kbd event2
B: EV=f
B: KEYÀ002 40000000000 1 f8000078000 6639fad84157ad 8e000000000000 0
B: REL@
B: ABS\x100000000


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 attributes
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="event1"
    SUBSYSTEM="input"
    SYSFS{dev}="13:65"

  looking at device '/class/input/input9':
    ID="input9"
    BUS="input"
    DRIVER=""
    SYSFS{uniq}=""
    SYSFS{phys}="usb-0000:00:02.0-8/input0"
    SYSFS{name}="Logitech USB Receiver"

  looking at device '/devices/pci0000:00/0000:00:02.0/usb2/2-8/2-8:1.0':
    ID="2-8:1.0"
    BUS="usb"
    DRIVER="usbhid"
    SYSFS{modalias}="usb:v046DpC51Ad4100dc00dsc00dp00ic03isc01ip02"
    SYSFS{bInterfaceProtocol}="02"
    SYSFS{bInterfaceSubClass}="01"
    SYSFS{bInterfaceClass}="03"
    SYSFS{bNumEndpoints}="01"
    SYSFS{bAlternateSetting}=" 0"
    SYSFS{bInterfaceNumber}="00"

  looking at device '/devices/pci0000:00/0000:00:02.0/usb2/2-8':
    ID="2-8"
    BUS="usb"
    DRIVER="usb"
    SYSFS{configuration}="RR41.00_B0021"
    SYSFS{product}="USB Receiver"
    SYSFS{manufacturer}="Logitech"
    SYSFS{maxchild}="0"
    SYSFS{version}=" 2.00"
    SYSFS{devnum}="6"
    SYSFS{speed}="12"
    SYSFS{bMaxPacketSize0}="8"
    SYSFS{bNumConfigurations}="1"
    SYSFS{bDeviceProtocol}="00"
    SYSFS{bDeviceSubClass}="00"
    SYSFS{bDeviceClass}="00"
    SYSFS{bcdDevice}="4100"
    SYSFS{idProduct}="c51a"
    SYSFS{idVendor}="046d"
    SYSFS{bMaxPower}=" 98mA"
    SYSFS{bmAttributes}="a0"
    SYSFS{bConfigurationValue}="1"
    SYSFS{bNumInterfaces}=" 2"

  looking at device '/devices/pci0000:00/0000:00:02.0/usb2':
    ID="usb2"
    BUS="usb"
    DRIVER="usb"
    SYSFS{configuration}=""
    SYSFS{serial}="0000:00:02.0"
    SYSFS{product}="OHCI Host Controller"
    SYSFS{manufacturer}="Linux 2.6.17-gentoo ohci_hcd"
    SYSFS{maxchild}="10"
    SYSFS{version}=" 1.10"
    SYSFS{devnum}="1"
    SYSFS{speed}="12"
    SYSFS{bMaxPacketSize0}="64"
    SYSFS{bNumConfigurations}="1"
    SYSFS{bDeviceProtocol}="00"
    SYSFS{bDeviceSubClass}="00"
    SYSFS{bDeviceClass}="09"
    SYSFS{bcdDevice}="0206"
    SYSFS{idProduct}="0000"
    SYSFS{idVendor}="0000"
    SYSFS{bMaxPower}="  0mA"
    SYSFS{bmAttributes}="e0"
    SYSFS{bConfigurationValue}="1"
    SYSFS{bNumInterfaces}=" 1"

  looking at device '/devices/pci0000:00/0000:00:02.0':
    ID="0000:00:02.0"
    BUS="pci"
    DRIVER="ohci_hcd"
    SYSFS{modalias}="pci:v000010DEd0000005Asv00001458sd00005004bc0Csc03i10"
    SYSFS{local_cpus}="1"
    SYSFS{irq}="50"
    SYSFS{class}="0x0c0310"
    SYSFS{subsystem_device}="0x5004"
    SYSFS{subsystem_vendor}="0x1458"
    SYSFS{device}="0x005a"
    SYSFS{vendor}="0x10de"

  looking at device '/devices/pci0000:00':
    ID="pci0000:00"
    BUS=""
    DRIVER=""


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 attributes
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="event2"
    SUBSYSTEM="input"
    SYSFS{dev}="13:66"

  looking at device '/class/input/input10':
    ID="input10"
    BUS="input"
    DRIVER=""
    SYSFS{uniq}=""
    SYSFS{phys}="usb-0000:00:02.0-8/input1"
    SYSFS{name}="Logitech USB Receiver"

  looking at device '/devices/pci0000:00/0000:00:02.0/usb2/2-8/2-8:1.1':
    ID="2-8:1.1"
    BUS="usb"
    DRIVER="usbhid"
    SYSFS{modalias}="usb:v046DpC51Ad4100dc00dsc00dp00ic03isc00ip00"
    SYSFS{bInterfaceProtocol}="00"
    SYSFS{bInterfaceSubClass}="00"
    SYSFS{bInterfaceClass}="03"
    SYSFS{bNumEndpoints}="01"
    SYSFS{bAlternateSetting}=" 0"
    SYSFS{bInterfaceNumber}="01"

  looking at device '/devices/pci0000:00/0000:00:02.0/usb2/2-8':
    ID="2-8"
    BUS="usb"
    DRIVER="usb"
    SYSFS{configuration}="RR41.00_B0021"
    SYSFS{product}="USB Receiver"
    SYSFS{manufacturer}="Logitech"
    SYSFS{maxchild}="0"
    SYSFS{version}=" 2.00"
    SYSFS{devnum}="6"
    SYSFS{speed}="12"
    SYSFS{bMaxPacketSize0}="8"
    SYSFS{bNumConfigurations}="1"
    SYSFS{bDeviceProtocol}="00"
    SYSFS{bDeviceSubClass}="00"
    SYSFS{bDeviceClass}="00"
    SYSFS{bcdDevice}="4100"
    SYSFS{idProduct}="c51a"
    SYSFS{idVendor}="046d"
    SYSFS{bMaxPower}=" 98mA"
    SYSFS{bmAttributes}="a0"
    SYSFS{bConfigurationValue}="1"
    SYSFS{bNumInterfaces}=" 2"

  looking at device '/devices/pci0000:00/0000:00:02.0/usb2':
    ID="usb2"
    BUS="usb"
    DRIVER="usb"
    SYSFS{configuration}=""
    SYSFS{serial}="0000:00:02.0"
    SYSFS{product}="OHCI Host Controller"
    SYSFS{manufacturer}="Linux 2.6.17-gentoo ohci_hcd"
    SYSFS{maxchild}="10"
    SYSFS{version}=" 1.10"
    SYSFS{devnum}="1"
    SYSFS{speed}="12"
    SYSFS{bMaxPacketSize0}="64"
    SYSFS{bNumConfigurations}="1"
    SYSFS{bDeviceProtocol}="00"
    SYSFS{bDeviceSubClass}="00"
    SYSFS{bDeviceClass}="09"
    SYSFS{bcdDevice}="0206"
    SYSFS{idProduct}="0000"
    SYSFS{idVendor}="0000"
    SYSFS{bMaxPower}="  0mA"
    SYSFS{bmAttributes}="e0"
    SYSFS{bConfigurationValue}="1"
    SYSFS{bNumInterfaces}=" 1"

  looking at device '/devices/pci0000:00/0000:00:02.0':
    ID="0000:00:02.0"
    BUS="pci"
    DRIVER="ohci_hcd"
    SYSFS{modalias}="pci:v000010DEd0000005Asv00001458sd00005004bc0Csc03i10"
    SYSFS{local_cpus}="1"
    SYSFS{irq}="50"
    SYSFS{class}="0x0c0310"
    SYSFS{subsystem_device}="0x5004"
    SYSFS{subsystem_vendor}="0x1458"
    SYSFS{device}="0x005a"
    SYSFS{vendor}="0x10de"

  looking at device '/devices/pci0000:00':
    ID="pci0000:00"
    BUS=""
    DRIVER=""


Are these udev rules alright to distinguish the event device delivering
keyboard events from mouse events?

# Logitech Receiver Mouse
BUS="usb", \
SYSFS{modalias}="usb:v046DpC51Ad4100dc00dsc00dp00ic03isc01ip02", \
SYSFS{bInterfaceNumber}="00", \
KERNEL="event?", \
NAME="input/%k", \
SYMLINK="input/logitech_receiver_mouse"

# Logitech Receiver Keyboard
BUS="usb", \
SYSFS{modalias}="usb:v046DpC51Ad4100dc00dsc00dp00ic03isc01ip02", \
SYSFS{bInterfaceNumber}="01", \
KERNEL="event?", \
NAME="input/%k", \
SYMLINK="input/logitech_receiver_keyboard"


Thanks for your help

And if you're curious, here's approximately what's going in my xorg.conf file:

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 easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x120709&bid&3057&dat\x121642
_______________________________________________
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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-06-30  0:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-30  0:40 udev rules for logitech receiver with mouse and keyboard Asfand Yar Qazi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).