HP MCE IR Remote on Fedora 16
There is a wide number of so called HP MCE IR Remote. Here is a description how to enable the OVU400102/71 (HP P/N 5187 4593) Transceiver + HP P/N 464961-001 remote in Fedora 16.
First a bit of "what is going on".
1. MCE is some kind of a standard for remote control that came with Windows XP Media Center Edition. This is a Microsoft stuff, but we may bless it ATM as, this is very widely used and most of MCE remote conform to it.2. IR remote usually consist of two things - the IR Transceiver (this is some electronic + Infra diodes and transistors to transmit and receive). There also can be only IR Receiver only if there is no bi-directional communication. The second part is the remote itself.
Therefore to make successfully working IR Remote, you need:
1. IR transceiver supported by Linux
2. IR remote compatible with IR transceiver
3. Interpretation of codes from IR remote to something easy to understand
4. Interpretation what should buttons on IR remote do - i.e. the actions bind to keys
This is pretty wild.
Events vs. LIRC
Linux used to have most of IRs supported thru LIRC project. During linux kernel development around 2.6.38 and up, the LIRC drivers became part of the Linux kernel. These kernel drivers enable to accept the codes from remote keys and makes out of them linux /dev/input/event device. The rest - the interpretation of what to do, is either done by Xorg or by LIRC."The remote" - but which one?
This IR transceiver is identified as USB device:1934:5168 Feature Integration Technology Inc. (Fintek) F71610A or F71612A Consumer Infrared Receiver/TransceiverThe MCE remotes are supported in Fedora 16 out of the box with
mceusb
module, but this way, the remote is used in Xorg as something like a special keys on keyboards - changing the volume, arrows keys etc. Not all keys are used and have some function. If you want to use the IR remote for different purpose - e.g. to drive some application like XBMC, MythTV or VLC you should disable it in Xorg and use LIRC.
To disable the remote in Xorg add this to /etc/X11/xorg.confSection "InputClass" Identifier "Remote" MatchProduct "Media Center Ed. eHome Infrared Remote Transceiver" Option "Ignore" "True" EndSection Section "InputClass" Identifier "Ignore MCE IR keyboard" MatchProduct "MCE IR Keyboard/Mouse (mceusb)" Option "Ignore" "True" EndSectionInstall LIRC packages
yum install lirclirc-libs lirc-remotes gnome-lirc-properties
Then you need to configure the LIRC. You either can try to do it in gui like
gnome-lirc-propertiesor via configs and command line. I was not fully successful with GUI and have to modify it via command line.
Here is /etc/sysconfig/lirc made by gnome-lirc-properties:
# Note: in addition to these parameters, you need to have working -*- sh -*- # configuration file for lircd (and lircmd if enabled). # Options to lircd(8). Typically, this will be empty, as which driver to use # should be specified using the LIRC_DRIVER variable below. LIRCD_OPTIONS="" # The infrared receiver (and/or transmitter) driver to be used by lircd(8), # similar to passing "-H driver" to lircd(8). # Run "/usr/sbin/lircd -H help" to get a listing of supported drivers. LIRC_DRIVER="devinput" # Which lirc device will be used by lircd(8). # This is the same as passing "-d device" to lircd. # An empty value will use the default /dev/lirc0 device. LIRC_DEVICE="/dev/input/event6" # If "yes", the init script will try to start lircmd(8) too. ENABLE_LIRCMD="no" # Options to lircmd(8). LIRCMD_OPTIONS="" # Remote settings required by gnome-lirc-properties MODEL="Media\ Center\ Edition\ remote" VENDOR="HP/Philips/Microsoft/Other" # Remote settings required by gnome-lirc-properties MODULES="" LIRCD_CONF="" # Receiver settings required by gnome-lirc-properties RECEIVER_MODEL="Media\ Center\ Ed.\ eHome\ Infrared\ Remote\ Transceiver\ \(1934:5168\)" RECEIVER_VENDOR="Linux\ Input\ Device"You may notice the receiver model identification and remote model.
This remote model is then included in /etc/lirc/lircd.conf to define the key codes:
include </etc/lirc/lircd.conf.gnome>and the lircd.conf.gnome contains the definition of keys + codes. However this does not work for me as the device is now used like and devinput. Therefore I had to change the /etc/lirc/lircd.conf to point to
include "/usr/share/lirc-remotes/devinput/lircd.conf.devinput"Then you may test with
irwif the key press generates appropriate key code and interpretation. Make a note what kind of events buttons/keys generates - you will need it in next section.
Fedora 18 notes
F18 removes HAL, for that reason gnome-lirc-properties are broken and wont start with dbus exception. Just remove all the junk around HAL and gnome-lirc-properties. I could not get lirc to read the /etc/sysconfig/lirc config, it complains it contains errors. The only option is to specify the lircd options directly in systemd unit at
/lib/systemd/system/lirc.service ExecStart=/usr/sbin/lircd --driver=devinput --device=/dev/input/by-id/usb-FINTEK_eHome_Infrared_Transceiver_88636562727801-event-if00 systemctl start lirc systemctl enable lirc
VLC with LIRC
Next you have to bind it to some application and action. In my case it is VLC. VLC have a definition of a lot of actions (config option) bind to buttons (KEY_). First change the VLC Preferences/Interface/Control interfaces and check the Infrared remote. (If LIRC is not installed this option is missing!)Then you can create in your home the definition of LIRC to VLC mapping for keys in ~/.lircrc:
begin prog = vlc button = KEY_PLAYPAUSE config = key-play-pause end begin prog = vlc button = KEY_PLAYPAUSE config = key-play-pause end begin prog = vlc button = KEY_STOP config = key-stop end begin prog = vlc button = skip config = key-jump+medium end begin prog = vlc button = replay config = key-jump-short end begin prog = vlc button = KEY_NEXT config = key-next end begin prog = vlc button = KEY_PREV config = key-prev end begin prog = vlc button = KEY_UP config = key-nav-up end begin prog = vlc button = KEY_DOWN config = key-nav-down end begin prog = vlc button = KEY_LEFT config = key-lav-left end begin prog = vlc button = KEY_RIGHT config = key-right end begin prog = vlc button = KEY_VOLUMEUP config = key-vol-up repeat = 1 end begin prog = vlc button = KEY_VOLUMEDOWN config = key-vol-down repeat = 1 end begin prog = vlc button = KEY_MUTE config = key-vol-mute end begin prog = vlc button = pictures config = key-audiodelay-up end begin prog = vlc button = music config = key-audiodelay-down end begin prog = vlc button = more config = key-crop end begin prog = vlc button = active config = key-nav-activate end begin prog = vlc button = KEY_CHANNELDOWN config = key-next end begin prog = vlc button = KEY_CHANNELUP config = key-prev end begin prog = vlc button = KEY_MEDIA config = key-toggle-fullscreen endOther actions e.g.:
key-chapter-prev key-chapter-next key-next key-toggle-fullscreen key-disc-menu key-title-prev
Complete list at VLC wiki.
Redefine the keys to your needs and restart the VLC. You are done.