Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Trying to create symlink for ir-remote via udev
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
marens
Apprentice
Apprentice


Joined: 05 Aug 2004
Posts: 173

PostPosted: Tue Sep 01, 2009 6:33 pm    Post subject: [SOLVED] Trying to create symlink for ir-remote via udev Reply with quote

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

Code:
~ # 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

Code:
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:

Code:
~ # 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?
_________________
If English was good enough for Jesus, then it's good enough for you!


Last edited by marens on Tue Sep 01, 2009 7:21 pm; edited 1 time in total
Back to top
View user's profile Send private message
Naib
Watchman
Watchman


Joined: 21 May 2004
Posts: 6069
Location: Removed by Neddy

PostPosted: Tue Sep 01, 2009 7:20 pm    Post subject: Reply with quote

reference: ATTRS{modalias}=="pci:v000014F1d00008801sv00000070sd00009202bc04sc80i00"
and also do a reboot

udev and forcing a reload can sometimes be a bit... hit & miss
_________________
#define HelloWorld int
#define Int main()
#define Return printf
#define Print return
#include <stdio>
HelloWorld Int {
Return("Hello, world!\n");
Print 0;
Back to top
View user's profile Send private message
marens
Apprentice
Apprentice


Joined: 05 Aug 2004
Posts: 173

PostPosted: Tue Sep 01, 2009 7:24 pm    Post subject: Reply with quote

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 :lol:
And having to restart the pc to reload udev properly stinks! :evil:
_________________
If English was good enough for Jesus, then it's good enough for you!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum