Archive:HOW-TO:Configure VRC-1100 remote for Ubuntu

This page is all about getting the Hama MCE Remote 52451 (also known as the VRC-1100) to run with XBMC.

This remote is sold under several brand names or non-branded and is made by Ortek (check it out here).

NOTE: There is also an alternative tool available on trac for using the HAMA MCE remote with XBMC that works around the unusual protocol used by this remote.



As reference system I use a minimal Ubuntu 9.10 (Karmic).

UDev rule
First you have to create an own udev rule to ensure, that your device nodes are always the same.

We get the vendor id and the product id from /proc/bus/input/devices:

cat /proc/bus/input/devices

the output is something like this: ...

I: Bus=0003 Vendor=05a4 Product=9881 Version=0110 N: Name="HID 05a4:9881" P: Phys=usb-0000:00:06.0-1/input0 S: Sysfs=/devices/pci0000:00/0000:00:06.0/usb4/4-1/4-1:1.0/input/input4 U: Uniq= H: Handlers=kbd event4 B: EV=120013 B: KEY=e080ffdf01cfffff fffffffffffffffe B: MSC=10 B: LED=7

I: Bus=0003 Vendor=05a4 Product=9881 Version=0110 N: Name="HID 05a4:9881" P: Phys=usb-0000:00:06.0-1/input1 S: Sysfs=/devices/pci0000:00/0000:00:06.0/usb4/4-1/4-1:1.1/input/input5 U: Uniq= H: Handlers=kbd mouse1 event5 B: EV=17 B: KEY=1f0000 2020000 3878d801d001 1e000000000000 0 B: REL=103 B: MSC=10

...

What we need are the numbers behind Vendor= and Product=. In my case 05a4 and 9881. We also need to know the minor and major numbers. In my example, I need to run these two commands.

udevadm info -q all -n /dev/input/event3 udevadm info -q all -n /dev/input/event4

At the bottom you will find the MINOR and MAJOR numbers, in my example these are: 13, 13 (majors) and 68, 69 (minors)

Now we write a new rules file for udev:

nano /etc/udev/rules.d/10-irremote.rules

and put the following content in: 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"

Note the numbers for idVendor and idProduct are the numbers we got from /proc/bus/input/devices.

Alternatively, you can avoid relying on specific minor numbers with: 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"

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

Lirc installation
First you have to install lirc and inputlirc: sudo apt-get install lirc inputlirc

You get some screens asking for IR remotes. Say none to every question here.

hardware.conf
This is the hardware.conf (located under /etc/lirc/hardware.conf) REMOTE="None" REMOTE_MODULES="" REMOTE_DRIVER="" REMOTE_DEVICE="phys=" REMOTE_SOCKET="" REMOTE_LIRCD_CONF="" REMOTE_LIRCD_ARGS=""
 * 1) /etc/lirc/hardware.conf
 * 2) Chosen Remote Control
 * 1) Chosen Remote Control

TRANSMITTER="None" TRANSMITTER_MODULES="" TRANSMITTER_DRIVER="" TRANSMITTER_DEVICE="" TRANSMITTER_SOCKET="" TRANSMITTER_LIRCD_CONF="" TRANSMITTER_LIRCD_ARGS=""
 * 1) Chosen IR Transmitter

START_LIRCD="false"
 * 1) Enable lircd


 * 1) Don't start lircmd even if there seems to be a good config file
 * 2) START_LIRCMD="false"

LOAD_MODULES="false"
 * 1) Try to load appropriate kernel modules

LIRCMD_CONF=""
 * 1) Default configuration files for your hardware if any

FORCE_NONINTERACTIVE_RECONFIGURATION="false" START_LIRCMD=""
 * 1) Forcing noninteractive reconfiguration
 * 2) If lirc is to be reconfigured by an external application
 * 3) that doesn't have a debconf frontend available, the noninteractive
 * 4) frontend can be invoked and set to parse REMOTE and TRANSMITTER
 * 5) It will then populate all other variables without any user input
 * 6) If you would like to configure lirc via standard methods, be sure
 * 7) to leave this set to "false"

Note, that START_LIRCD is set to false, because we don't need the LIRC-Daemon.

lircd.conf
The file /etc/lirc/lircd.conf is empty.

/etc/default/inputlirc
EVENTS="/dev/input/irremote0 /dev/input/irremote1" OPTIONS="-g -m 0 -c"

The entries unter EVENTS are the devices we created via udev. The OPTION entries mean the following:

In Gentoo, you have to modify the file /etc/conf.d/inputlircd instead. Make it look like this:

INPUTLIRCD_OPTS="-g -m 0 -c /dev/input/irremote0 /dev/input/irremote1"
 * 1) Options to pass to the lircd process

Now restart inputlirc /etc/init.d/inputlirc restart

You can now test the device via 'irw': irw

This are some sample output from irw: 14 0 CTRL_SHIFT_KEY_T irremote0 a4 0 KEY_PLAYPAUSE irremote1 a4 0 KEY_PLAYPAUSE irremote1 a6 0 KEY_STOPCD irremote1 110 0 BTN_LEFT irremote1

110 0 BTN_MOUSE /dev/input/irremote1 111 0 BTN_RIGHT /dev/input/irremote1 6c 0 KEY_DOWN /dev/input/irremote0 6c 0 KEY_DOWN /dev/input/irremote0 67 0 KEY_UP /dev/input/irremote0

due to a move of /dev/lircd to /var/run/lirc/lircd in the LIRC project the default device of irw is now the one under /var... Either insert a sym link or let the inputlircd generate the lircd Unix Domain Socket at the new location with adding the '-d /var/run/lirc/lircd' to the inputlirc options - this is just needed for the test with irw!

Lircmap.xml
Important: The remote device attribute content is the mapping between the recognized input device and the remote commands defined in this file:  ... ... 

This is my Lircmap.xml: KEY_HOMEPAGE KEY_SLEEP KEY_NEXTSONG KEY_PREVIOUSSONG KEY_PLAYPAUSE KEY_STOPCD BTN_RIGHT BTN_LEFT KEY_VOLUMEUP KEY_VOLUMEDOWN KEY_MIN_INTERESTING CTRL_SHIFT_KEY_T CTRL_KEY_M CTRL_KEY_I CTRL_KEY_E CTRL_SHIFT_KEY_B CTRL_SHIFT_KEY_F CTRL_SHIFT_KEY_M CTRL_KEY_R KEY_BACKSPACE KEY_LEFT KEY_RIGHT KEY_UP KEY_DOWN KEY_ENTER KEY_PAGEUP KEY_PAGEDOWN KEY_KP1 KEY_KP2 KEY_KP3 KEY_KP4 KEY_KP5 KEY_KP6 KEY_KP7 KEY_KP8 KEY_KP9 KEY_KP0 KEY_KPASTERISK KEY_ESC ALT_META_KEY_ENTER

Note: With some controls, a BTN_LEFT event isn't sent by the control for the left mouse button - instead, it sends BTN_MOUSE. Try changing it in the above configuration if you find that you can't access the context menu.

Note 2: If you find that you suffer this problem where pausing and unpausing video seems to cause a problem with buffering, you may want to employ the workaround that's suggested and make use of the "play" button rather than the "pause" button - so change: KEY_PLAYPAUSE to KEY_PLAYPAUSE

There's no difference between the play and pause buttons on the remote - they both send the same event, so you just have to decide whether you want it to send "play" or "pause".

keymaps/remote.xml
XBMC.EjectTray Play Pause Stop FastForward Rewind Left Right Up Down Select PageUp PageDown ParentDir PreviousMenu ContextMenu Info SkipNext SkipPrevious FullScreen PreviousMenu Screenshot VolumeUp VolumeDown Mute XBMC.ShutDown XBMC.ActivateWindow(MyVideos) XBMC.ActivateWindow(MyMusic) XBMC.ActivateWindow(MyPictures) XBMC.Quit XBMC.ActivateWindow(Home) XBMC.ActivateWindow(MyVideos) XBMC.ActivateWindow(MyMusic) XBMC.ActivateWindow(MyPictures) Number0 Number1 JumpSMS2 JumpSMS3 JumpSMS4 JumpSMS5 JumpSMS6 JumpSMS7 JumpSMS8 JumpSMS9  XBMC.Skin.ToggleSetting(HomeViewToggle) XBMC.ActivateWindow(SystemInfo) XBMC.ActivateWindow(Weather) XBMC.ActivateWindow(Settings)   Delete  <MyMusicPlaylist> Playlist Delete </MyMusicPlaylist> <MyMusicPlaylistEditor> Queue </MyMusicPlaylistEditor> <MyMusicFiles> Queue Queue </MyMusicFiles> <MyMusicLibrary> Queue Queue </MyMusicLibrary> <FullscreenVideo> Number0 Number1 Number2 Number3 Number4 Number5 Number6 Number7 Number8 Number9 StepBack StepForward BigStepForward</up> BigStepBack SmallStepBack OSD OSD CodecInfo Info AspectRatio AspectRatio XBMC.ActivateWindow(Teletext) ShowSubtitles AudioNextLanguage </FullscreenVideo> <FullscreenInfo> CodecInfo Close OSD </FullscreenInfo> <PlayerControls> Close </PlayerControls> <Visualisation> PreviousPreset NextPreset IncreaseRating</up> DecreaseRating LockPreset CodecInfo XBMC.ActivateWindow(VisualisationPresetList) XBMC.ActivateWindow(MusicOSD) XBMC.ActivateWindow(MusicOSD) Info </Visualisation> <MusicOSD> Close Info CodecInfo </MusicOSD> <VisualisationSettings> Close </VisualisationSettings> <VisualisationPresetList> Close </VisualisationPresetList> <SlideShow> ZoomNormal ZoomLevel1 ZoomLevel2 ZoomLevel3 ZoomLevel4 ZoomLevel5 ZoomLevel6 ZoomLevel7 ZoomLevel8 ZoomLevel9 CodecInfo NextPicture PreviousPicture Info Rotate PreviousMenu </SlideShow> <ScreenCalibration> NextCalibration NextCalibration ResetCalibration NextResolution NextResolution </ScreenCalibration> <GUICalibration> NextCalibration NextCalibration ResetCalibration </GUICalibration> <SelectDialog> Close </SelectDialog> <VideoOSD> PreviousMenu Close Close </VideoOSD> <VideoMenu> OSD PreviousMenu Info CodecInfo Number0 Number1 Number2 Number3 Number4 Number5 Number6 Number7 Number8 Number9 Select </VideoMenu> <OSDVideoSettings> Close Close Close </OSDVideoSettings> <OSDAudioSettings> Close Close Close </OSDAudioSettings> <VideoBookmarks> Close Close Close Delete </VideoBookmarks> <MyVideoLibrary> Queue Delete </MyVideoLibrary> <MyVideoFiles> Queue Queue </MyVideoFiles> <MyVideoPlaylist> Playlist Delete Delete </MyVideoPlaylist> <VirtualKeyboard> BackSpace Shift Symbols Number0 Number1 Number2 Number3 Number4 Number5 Number6 Number7 Number8 Number9 CursorLeft CursorRight </VirtualKeyboard> <ContextMenu> Close Close </ContextMenu> <FileStackingDialog> Close </FileStackingDialog> <Scripts> XBMC.ActivateWindow(ScriptsDebugInfo) </Scripts> <ScriptsDebugInfo> Info </ScriptsDebugInfo> <NumericInput> Number0 Number1 Number2 Number3 Number4 Number5 Number6 Number7 Number8 Number9 BackSpace </NumericInput> <Weather> PreviousMenu </Weather> <Settings> PreviousMenu </Settings> <MyPicturesSettings> PreviousMenu </MyPicturesSettings> <MyProgramsSettings> PreviousMenu </MyProgramsSettings> <MyWeatherSettings> PreviousMenu </MyWeatherSettings> <MyMusicSettings> PreviousMenu </MyMusicSettings> <SystemSettings> PreviousMenu </SystemSettings> <MyVideosSettings> PreviousMenu </MyVideosSettings> <NetworkSettings> PreviousMenu </NetworkSettings> <AppearanceSettings> PreviousMenu </AppearanceSettings> <Profiles> PreviousMenu </Profiles> PreviousMenu PreviousMenu PreviousMenu <MusicInformation> Close </MusicInformation> <MovieInformation> Close </MovieInformation> <LockSettings> Close PreviousMenu </LockSettings> <ProfileSettings> Close PreviousMenu </ProfileSettings> <PictureInfo> NextPicture PreviousPicture Close Close </PictureInfo> <Teletext> number0 number1 number2 number3 number4 number5 number6 number7 number8 number9 Red Green Yellow Blue Info Close Close Close Close </Teletext> <Favourites> Close </Favourites>

After a restart, the Remote should now work fluently with XMBC.

At the moment, 14th of September,there is a glitch with xbmc source code. Checkout this ticket for more info