# [SOLVED] Trying to create symlink for ir-remote via udev

## marens

I'm trying to create a symlink for my ir-remote (hauppauge tv-card) like i did for my logitech usb mouse.

Here the content of my /dev/input directory

```
~ # ls -l /dev/input/

total 0

drwxr-xr-x 2 root root    100 2009-09-01 20:21 by-id

drwxr-xr-x 2 root root    100 2009-09-01 20:21 by-path

crw-r----- 1 root root 13, 64 2009-09-01 20:21 event0

crw-r----- 1 root root 13, 65 2009-09-01 20:21 event1

crw-r----- 1 root root 13, 66 2009-09-01 20:21 event2

lrwxrwxrwx 1 root root      6 2009-09-01 20:21 logitech_g5_usb_mouse -> event1

crw-r----- 1 root root 13, 63 2009-09-01 20:21 mice

crw-r----- 1 root root 13, 32 2009-09-01 20:21 mouse0

~ # 
```

As you can see the symlink for my mouse is working via the following udev rule from /etc/udev/rules.de/10-local.rules

```
KERNEL=="event*", ATTRS{product}=="USB Gaming Mouse", SYMLINK+="input/logitech_g5_usb_mouse", MODE="0666"
```

Now i try to create a symlink for the ir-remote so i can use that symlink for my lircd config instead of /dev/event* . Using the /dev/event2 for lircd already works as i want it so it must be the correct device.

Looking at the device gives the following:

```
~ # udevadm info -a -p $(udevadm info -q path -n /dev/input/event2)

Udevadm info starts with the device specified by the devpath and then

walks up the chain of parent devices. It prints for every device

found, all possible attributes in the udev rules key format.

A rule to match, can be composed by the attributes of the device

and the attributes from one single parent device.

  looking at device '/class/input/input2/event2':

    KERNEL=="event2"

    SUBSYSTEM=="input"

    DRIVER==""

  looking at parent device '/devices/pci0000:00/0000:00:08.0/0000:01:08.1':

    KERNELS=="0000:01:08.1"

    SUBSYSTEMS=="pci"

    DRIVERS=="cx88_audio"

    ATTRS{vendor}=="0x14f1"

    ATTRS{device}=="0x8801"

    ATTRS{subsystem_vendor}=="0x0070"

    ATTRS{subsystem_device}=="0x9202"

    ATTRS{class}=="0x048000"

    ATTRS{irq}=="17"

    ATTRS{local_cpus}=="1"

    ATTRS{local_cpulist}=="0"

    ATTRS{modalias}=="pci:v000014F1d00008801sv00000070sd00009202bc04sc80i00"

    ATTRS{enable}=="1"

    ATTRS{broken_parity_status}=="0"

    ATTRS{msi_bus}==""

  looking at parent device '/devices/pci0000:00/0000:00:08.0':

    KERNELS=="0000:00:08.0"

    SUBSYSTEMS=="pci"

    DRIVERS==""

    ATTRS{vendor}=="0x10de"

    ATTRS{device}=="0x006c"

    ATTRS{subsystem_vendor}=="0x0000"

    ATTRS{subsystem_device}=="0x0000"

    ATTRS{class}=="0x060400"

    ATTRS{irq}=="0"

    ATTRS{local_cpus}=="1"

    ATTRS{local_cpulist}=="0"

    ATTRS{modalias}=="pci:v000010DEd0000006Csv00000000sd00000000bc06sc04i00"

    ATTRS{enable}=="1"

    ATTRS{broken_parity_status}=="0"

    ATTRS{msi_bus}=="1"

  looking at parent device '/devices/pci0000:00':

    KERNELS=="pci0000:00"

    SUBSYSTEMS==""

    DRIVERS==""

~ # 
```

So how do i address that ir-remote via an udev rule?

Guess i can't use the parent device '/devices/pci0000:00/0000:00:08.0/0000:01:08.1': with DRIVERS=="cx88_audio" because it doesn't seem to be the ir_remote but a part of the tv-card when it is controlled by the audio driver.

Anyway i tried to address both parent nodes via the vendor and device ATTRS but the symlink didn't get created.

Any ideas?

----------

## Naib

reference: ATTRS{modalias}=="pci:v000014F1d00008801sv00000070sd00009202bc04sc80i00" 

and also do a reboot

udev and forcing a reload can sometimes be a bit... hit & miss

----------

## marens

Thank you very much. Works now. Still wondering why i have to address the DRIVERS=="cx88_audio" device when i want the ir-remote device   :Laughing: 

And having to restart the pc to reload udev properly stinks!   :Evil or Very Mad: 

----------

