User:Ned Scott/Sandbox: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
No edit summary
(Replaced content with "= test 1 = Words words words = test 2 = More words words words = test 3 = Even more words words words <headertabs />")
 
(20 intermediate revisions by the same user not shown)
Line 1: Line 1:
Now we write a new rules file for udev:
= test 1 =
Words words words


nano /etc/udev/rules.d/10-irremote.rules
= test 2 =
More words words words


and put the following content in:
= test 3 =
<pre>
Even more words words words
SUBSYSTEM=="input",ATTRS{idVendor}=="05a4",ATTRS{idProduct}=="9881",ATTR{dev}=="13:68",SYMLINK="input/irremote0"
SUBSYSTEM=="input",ATTRS{idVendor}=="05a4",ATTRS{idProduct}=="9881",ATTR{dev}=="13:69",SYMLINK="input/irremote1"
</pre>


'''Note the numbers for ''idVendor'' and ''idProduct'' are the numbers we got from /proc/bus/input/devices.'''
<headertabs />
 
Alternatively, you can avoid relying on specific minor numbers with:
<pre>
KERNEL=="event*",SUBSYSTEM=="input",ATTRS{idVendor}=="05a4",ATTRS{idProduct}=="9881",IMPORT{program}="input_id %p"
KERNEL=="event*",SUBSYSTEM=="input",ATTRS{idVendor}=="05a4",ATTRS{idProduct}=="9881",ENV{ID_INPUT_KEYBOARD}=="1",SYMLINK="input/irremote0"
KERNEL=="event*",SUBSYSTEM=="input",ATTRS{idVendor}=="05a4",ATTRS{idProduct}=="9881",ENV{ID_INPUT_MOUSE}=="1",SYMLINK="input/irremote1"
</pre>
 
Note that without the KERNEL match irremote1 is attached to a device sometimes which seems to be an inappropriate ioctl device (no event but only mouse).
 
Now restart udev and trigger a new discovery:
 
restart udev #notice for Gentoo: rc-service udev restart
udevadm trigger
 
(Restarting udev is optional at least as of Ubuntu lucid, and likely others.)
 
Under /dev/input should now be two more symlinks: irremote0 and irremote1:
 
ls /dev/input

Latest revision as of 01:48, 1 September 2018

[edit]

Words words words

[edit]

More words words words

[edit]

Even more words words words