Difference between revisions of "LIRC Device Examples"

From ArchWiki
Jump to navigation Jump to search
(redirect old duplicate, see talk)
(11 intermediate revisions by 5 users not shown)
Line 1: Line 1:
[[Category:Other hardware]]
{{Related articles start}}
{{Related articles end}}
This article includes device specific examples of LIRC function configurations.
==Asus DH Deluxe series motherboard==
Check the output of:
{{bc|$ cat /dev/usb/hiddevX}}
where X is 0,1 or bigger, and press some buttons on remote.  If characters result, then the device is working, follow steps:<br>
1. In file {{ic|/etc/conf.d/lircd.conf}} add:<br>
2. Reload LIRC:
# systemctl restart lirc
==ASRock ION series (Nuvoton) quickstart==
$ ln -s /usr/share/lirc/remotes/lirc_wb677/lircd.conf.wb677 /etc/lirc/lircd.conf
# systemctl restart lirc
== Logitech Wireless Presenter R400 ==
The R400 Presenter can be used with default configuration from devinput. Follow the following steps to be able to use the following buttons: {{ic|KEY_PAGEDOWN KEY_PAGEUP KEY_DISPLAYTOGGLE KEY_PRESENTATION}}.
1. Copy the default devinput configuration which should work out of the box for the R400:
# cp /usr/share/lirc/devinput/lircd.conf.devinput /etc/lirc/lircd.conf
2. Create the following Udev rule to create the correct symlink whenever you connect your presenter:
ExecStart&#61;/usr/bin/lircd --driver&#61;devinput --device&#61;/dev/input/ir}}
3. Create the lirc service configuration file to start the lirc service with the correct settings for your presenter whenever you want to transform it into a remote control:
ExecStart&#61;/usr/bin/lircd --driver&#61;devinput --device&#61;/dev/input/ir}}
3. Use {{ic|systemctl start lirc.service}} to start lirc and {{ic|irw}} to test whether your keys are recognised:
$ irw
000000008001006d 00 KEY_PAGEDOWN devinput
0000000080010068 00 KEY_PAGEUP devinput
00000000800101af 00 KEY_DISPLAYTOGGLE devinput
00000000800101a9 00 KEY_PRESENTATION devinput
4. Create your program-specific configurations as described [https://wiki.archlinux.org/index.php/Lirc#Program_Specific_Configuration here].
== Serial Port "Home Brew" IR Receiver ==
1. Create a udev rule to give non-privleged users read/write access to the serial port.  In this example, ttyS0 is used.
# For serial port ttyS0 and LIRC
2. Create the needed modprobe configs
{{hc|/etc/modprobe.d/lirc_serial.conf|install lirc_serial /usr/bin/setserial /dev/ttyS0 uart none && /sbin/modprobe --first-time --ignore-install lirc_serial
options lirc_serial type&#61;0
remove lirc_serial /sbin/modprobe -r --first-time --ignore-remove lirc_serial && /sbin/modprobe -r lirc_dev}}
{{Note|Using [[udev]] rules to run the setserial command does not work in my experience because lirc_serial gets loaded before the serial port rules are applied.}}
3. Install a custom systemd service file.
Description&#61;Linux Infrared Remote Control
ExecStartPre&#61;/bin/rm -f /dev/lirc /dev/lircd /var/run/lirc/lircd
ExecStart&#61;/usr/sbin/lircd -n -r -P /run/lirc/lircd.pid -d /dev/lirc0 -o /run/lirc/lircd
ExecStartPost&#61;/usr/bin/ln -sf /run/lirc/lircd /dev/lircd
ExecStartPost&#61;/usr/bin/ln -sf /dev/lirc0 /dev/lirc
ExecReload&#61;/bin/kill -SIGHUP $MAINPID
4. We still need the default tmpfiles to be created, so copy that config file to {{ic|/etc/tmpfiles.d/lirc.conf}}.
{{bc|# cp -a /usr/lib/tmpfiles.d/lirc.conf /etc/tmpfiles.d/lirc.conf}}
5. Create a {{ic|~/.lircrc}} or a {{ic|/etc/lirc/lircrc}} file for system wide use.
6. Have the service start at boot and then test with a reboot
{{bc|1=# systemctl enable lirc.service
# systemctl reboot}}
or load the module and start the lirc.service.
{{bc|# modprobe lirc_serial
# systemctl start lirc.service}}
==Streamzap PC Remote (USB)==
This particular remote is known to not function with the {{Pkg|lirc-utils}} package included lirc.service.  [https://bugs.archlinux.org/task/37958 Flyspray #37958] has been created.  Until it is acted upon, users can create a custom service file that does work:
Description&#61;LIRC Daemon
ExecStartPre&#61;/bin/mkdir -p /run/lirc
ExecStartPre&#61;/bin/rm -f /dev/lircd
ExecStartPre&#61;/bin/rm -f /run/lirc/lircd
ExecStartPre&#61;/bin/ln -s /run/lirc/lircd /dev/lircd
ExecStart&#61;/usr/bin/lircd -d /dev/lirc0 -P /run/lirc/lircd.pid
ExecStopPost&#61;/bin/rm -f /dev/lircd
ExecStopPost&#61;/bin/rm -fR /run/lirc
{{Note|When the batteries in this remote are low, it may stop working even though the red LED on the received still flashes upon receiving signals!}}
== X10 ==
There is a dedicated wiki page with information about [[X10]]

Latest revision as of 09:51, 22 October 2015

Redirect to: