[LINUX] HOW-TO to use iMON Remote on Ubuntu 10.10 with Linux input layer on Harmony
#1
Thumbs Up 
I posted this here but i found that this my be useful to those who want to use IMON remote (or harmony remote with IMON codes) instead of MCE remote on IMON receiver.

With Ubuntu 10.10 due to some changes to lirc and its modules, my harmony-mce remote stopped to work. I decided to try to use IMON codes and follow the new way of lirc:

Quote:sudo dpkg-reconfigure lirc

then select
Quote:Linux input layer (/dev/input/eventX)

on "IR transmitter" i picked none.

on "Custom event interface for your dev/input device: " open a new shell and run:

Quote:cat /proc/bus/input/devices

you will face somethig like this:
Quote:I: Bus=0003 Vendor=15c2 Product=0038 Version=0001
N: Name="iMON Remote (15c2:0038)"
P: Phys=usb-0000:00:0b.0-6/input0
S: Sysfs=/devices/pci0000:00/0000:00:0b.0/usb2/2-6/2-6:1.0/rc/rc0/input5
U: Uniq=
H: Handlers=kbd mouse1 event5
B: EV=100007
B: KEY=fff 0 0 400000 108c0320 2d50082 0 0 30000 4 119000 4196 14100801 809e1680 0 2000000 10004002
B: REL=103

select the event you want lirc to listen, in my case:
Quote:/dev/input/event5

after this try
Quote:irw
and check if it works.
my device prints something like:

Quote:000000008001001c 00 KEY_ENTER devinput

since my remote declare himself as "devinput" i had to edit Lircmap.xml:

Quote:sudo gedit /usr/share/xbmc/system/Lircmap.xml

You can change them following your taste.
Quote:
<remote device="devinput">
<pause>KEY_PLAY</pause>
<stop>KEY_STOP</stop>
<forward>KEY_FASTFORWARD</forward>
<reverse>KEY_REWIND</reverse>
<left>KEY_LEFT</left>
<right>KEY_RIGHT</right>
<up>KEY_UP</up>
<down>KEY_DOWN</down>
<select>KEY_ENTER</select>
<pageplus>KEY_CHANNELUP</pageplus>
<pageminus>KEY_CHANNELDOWN</pageminus>
<back>KEY_BACKSPACE</back>
<menu>KEY_MENU</menu>
<play>KEY_PLAY</play>
<info>KEY_COMPOSE</info>
<skipplus>KEY_NEXT</skipplus>
<skipminus>KEY_PREVIOUS</skipminus>
<volumeplus>KEY_VOLUMEUP</volumeplus>
<volumeminus>KEY_VOLUMEDOWN</volumeminus>
<mute>KEY_MUTE</mute>
<power>KEY_POWER</power>
<title>KEY_PROG1</title>
<display>KEY_ZOOM</display>
<tab>KEY_SCREEN</tab>
<home>KEY_EXIT</home>
<backslash>KEY_CYCLEWINDOWS</backslash>
<myvideo>KEY_VIDEO</myvideo>
<mymusic>KEY_MEDIA</mymusic>
<mypictures>KEY_CAMERA</mypictures>
<mytv>KEY_TV</mytv>
<subtitle>KEY_SUBTITLE</subtitle>
<language>KEY_LANGUAGE</language>
<one>KEY_NUMERIC_1</one>
<two>KEY_NUMERIC_2</two>
<three>KEY_NUMERIC_3</three>
<four>KEY_NUMERIC_4</four>
<five>KEY_NUMERIC_5</five>
<six>KEY_NUMERIC_6</six>
<seven>KEY_NUMERIC_7</seven>
<eight>KEY_NUMERIC_8</eight>
<nine>KEY_NUMERIC_9</nine>
<zero>KEY_NUMERIC_0</zero>
</remote>

hope it helps someone.
Reply
#2
Although above method works to get a imon pad setup working, you will be creating a problem wih keypresses. No matter the sensitivity set up in the Harmony Remote control, sometimes one keypress triggers a neverending cycle of keypresses and xbmc wil not function anymore. The only solution to this is to setup the harmony as mce remote. And, as mentioned, this does not work on Ubuntu 10.10.
However the bug report (https://bugs.launchpad.net/ubuntu/+sourc...)describes provides a workaround, which basically removes the new faulting lirc_imon kernel driver and installs the old one:
- remove the default kernel's /lib/modules/2.6.35-22-generic/kernel/drivers/staging/lirc/lirc_imon.ko (which does not work, as well)

- install lirc-modules-source package (this will add an old, but working lirc_imon.ko to the module directory)

- Add this blacklist to /etc/modprobe.d/blacklist-imon.conf:

blacklist ir_core
blacklist ir_lirc_codec
blacklist ir_sony_decoder
blacklist ir_jvc_decoder
blacklist ir_rc6_decoder
blacklist ir_rc5_decoder
blacklist ir_nec_decoder
blacklist rc_imon_pad
blacklist imon

- Add this entry to /etc/modules:

lirc_imon

- Add this parameter to /etc/modprobe.d/lirc_imon.conf:

options lirc_imon ir_protocol=1

With this I can control xbmc with the mce remote on an antec fusion with imon reciever and now ubuntu doesn't see the remote's inpute as keyboard presses.
Reply
#3
Big_Noid Wrote:Although above method works to get a imon pad setup working, you will be creating a problem wih keypresses. No matter the sensitivity set up in the Harmony Remote control, sometimes one keypress triggers a neverending cycle of keypresses and xbmc wil not function anymore. The only solution to this is to setup the harmony as mce remote. And, as mentioned, this does not work on Ubuntu 10.10.
However the bug report (https://bugs.launchpad.net/ubuntu/+sourc...)describes provides a workaround, which basically removes the new faulting lirc_imon kernel driver and installs the old one:
- remove the default kernel's /lib/modules/2.6.35-22-generic/kernel/drivers/staging/lirc/lirc_imon.ko (which does not work, as well)

- install lirc-modules-source package (this will add an old, but working lirc_imon.ko to the module directory)

- Add this blacklist to /etc/modprobe.d/blacklist-imon.conf:

blacklist ir_core
blacklist ir_lirc_codec
blacklist ir_sony_decoder
blacklist ir_jvc_decoder
blacklist ir_rc6_decoder
blacklist ir_rc5_decoder
blacklist ir_nec_decoder
blacklist rc_imon_pad
blacklist imon

- Add this entry to /etc/modules:

lirc_imon

- Add this parameter to /etc/modprobe.d/lirc_imon.conf:

options lirc_imon ir_protocol=1

With this I can control xbmc with the mce remote on an antec fusion with imon reciever and now ubuntu doesn't see the remote's inpute as keyboard presses.

What if I upgraded to kernel 2.6.37-RC2? Do I need to remove the kernels lirc_imon.ko module?
Reply
#4
Big_Noid wrote:

Quote:- remove the default kernel's /lib/modules/2.6.35-22-generic/kernel/drivers/staging/lirc/lirc_imon.ko (which does not work, as well)

How exactly does one do that from the CLI?

I'm pretty confident I can do the rest of the steps because it looks like editing text files.

Any help would be appreciated. I've been banging my bonce on this problem for four days now, and this is the first instance I've come across that mentions 10.10's broken lirc_imon driver.

Is it as simple as deleting this file:
/lib/modules/2.6.35-22-generic/kernel/drivers/staging/lirc/lirc_imon.ko

...or is there some command that needs to be executed to excise this properly?
Reply
#5
I have posted this in the forum but havent any luck with the answers

Linux Mint Julia 10 (Ubuntu 10)
Dharma

Hello I have a Imon PAD remote that I like to use for my HTPC.
As we know lirc have messed up the Imon driver a solution were made by lyka at XBMC forum http://forum.xbmc.org/showthread.php?tid=83284

It almost works but the direction buttons acts like a mouse I dont want that I need up/down/left/right key strokes for it to work properly in XBCM. irw and irxevent doesn't react to the direction bottoms the mouse is always moving around even when irw is on.

I have read that it should simulate keys on default but it doesn't. There is something that I could change in X11 (nvidia gt210) but I have messed up that file one time to many so I dare not to touch it and try something like this.

Isn't there a way to say to lirc trow away mouse option like you did in ubuntu 9.10 edition ??

/etc/modprobe.d/lirc.conf

Code:
options lirc_imon debug=1 [b]nomouse=1[/b] display_type=1 pad_thresh=5

I have found lirc.conf for the devinput in /etc/lirc/

Code:
#This configuration has been automatically generated via
#the Ubuntu LIRC package maintainer scripts.
#
#It includes the default configuration for the remote and/or
#transmitter that you have selected during package installation.
#
#Feel free to add any custom remotes to the configuration
#via additional include directives or below the existing
#Ubuntu include directives from your selected remote and/or
#transmitter.

#Configuration for the Linux input layer (/dev/input/eventX) remote:
include "/usr/share/lirc/remotes/devinput/lircd.conf.devinput"

But I dont know witch values to put in there.

And I also found /etc/lirc/lircmd.conf (mouse emulator)

Code:
#UNCONFIGURED
#
# To find out how to get a proper configuration file please read:
#
#    /usr/share/doc/lirc/README.Debian

Thanks in advance
Reply
#6
bump
Reply
#7
Thank you. This solved my problem.
Reply
#8
Hi there,

I finally managed to get my Harmony-Remote working (thanks for the tutorial).

When testing with irw in the terminal my device prints something like:
000000008001001c 00 KEY_ENTER devinput

But still I am struggeling on how to configure XBMC? Editing /usr/share/xbmc/system/Lircmap.xml and creating a new

<remote device="devinput">
...
</remote>

does not work for me - there is no change in the behavior of my remote when using XBMC ... So wehre and what do I have to edit to get my Harmony-Remote to work correctly with XBMC? Which files do I have to edit?

I am using:
Ubuntu 10.10; XBMC-Live (installation); OrigenAE M10 case with VF310 VFD-Display and Imon PAD; Harmony 885 (remote);

Thanks for any hint in advice!
Reply
#9
XBMC uses two files to configure the remote:

~/.xbmc/userdata/Lircmap.xml
and
~/.xbmc/userdata/keymaps/remote.xml

Note that a copy of remote.xml is also created in the installation directory:
(installation directory)/system/keymaps/remote.xml

remote.xml contains predefined button names for the xbmc actions that they will perform.

Lircmap.xml then maps those tags to your remote buttons. It is important that the device name in Lircmap.xml matches that remote name in your lirc config (get that from /etc/lirc/hardware.conf), so that should be the first thing you check.

<lircmap>
<remote device="Linux input layer (/dev/input/eventX)">

Or else it's just not going to work.

Lircmap.xml is fairly simple to setup. (go here http://wiki.xbmc.org/index.php?title=Lir...ircmap.xml for better info; note, however, that keymap.xml is the older name for remote.xml).

It takes the form:

Code:
<lircmap>
       <remote device="devicename">
               <XBMC_button>LIRC_button</XBMC_button>
               ...
       </remote>
</lircmap>

1 tag for each button and not all the buttons have to be configured.

The remote.xml configuration, however, can take some time because you have a global section and then a bunch of smaller "context" sections such as what happens when you push a certain button while your playing a video or when the OSD is open. This is kind of neat because you can set one button to do multiple things depending on what menu or section your on. For instance, pushing the Power button to open the power menu and then defaulting to Suspend when you press the power button again. However, it takes a bit of wading through but its structure is pretty easy to understand one you get the hang of it.

This is part of the global section of my remote.xml (I'll let you figure out the other sections because they are mostly a matter of choice):

Code:
<global>
    <remote>
      <play>Play</play>
      <pause>Pause</pause>
      <stop>Stop</stop>
    </remote>
      <universalremote>
    <obc1>XBMC.ActivateWindow(Weather)</obc1>
        <obc2>EjectTray()</obc2>
    <obc3>PlayDVD</obc3>
    <obc4>AudioNextLanguage</obc4>
      </universalremote>
</global>

You can't have more remote tags than the predefined ones that are available for remote.xml (list is here: http://wiki.xbmc.org/index.php?title=Keymap.xml). If you have more buttons, then you define obcX tags in the universalremote section (not covered here but you can get an idea above).

So let's say I want to set my play button to "play"
I run irw and find that the play button code is:
00000000800100cf 00 KEY_PLAY devinput

I see that the remote.xml action for Play is set to the tag "play":
<play>Play</play>

So I map "play" to KEY_PLAY in the Lircmap.xml knowing that the format is <xbmctag>REMOTE_BUTTON</xbmctag>. I put the following in my Lirc.xml under the remote device:

<play>KEY_PLAY</play>

Here's my current Lircmap.xml (I'm still in the process of programming my remote. It works pretty well and is close to how I want it but consider this mostly for example purposes):

Code:
<lircmap>
<remote device="Linux input layer (/dev/input/eventX)">
    <altname>RM200</altname>
    <altname>devinput</altname>
        <left>KEY_LEFT</left>
        <right>KEY_RIGHT</right>
        <up>KEY_UP</up>
        <down>KEY_DOWN</down>
        <select>KEY_ENTER</select>
        <start>KEY_SELECT</start>
        <menu>KEY_COMPOSE</menu>
        <record>KEY_RECORD</record>
        <back>KEY_BACKSPACE</back>
        <play>KEY_PLAY</play>
        <pause>KEY_PAUSE</pause>
        <stop>KEY_STOP</stop>
        <forward>KEY_FASTFORWARD</forward>
        <reverse>KEY_REWIND</reverse>
        <volumeplus>KEY_VOLUMEUP</volumeplus>
        <volumeminus>KEY_VOLUMEDOWN</volumeminus>
        <channelplus>KEY_CHANNELUP</channelplus>
        <channelminus>KEY_CHANNELDOWN</channelminus>
        <skipplus>KEY_NEXTSONG</skipplus>
        <skipminus>KEY_PREVIOUSSONG</skipminus>
        <title>KEY_TEXT</title>
        <subtitle>KEY_SUBTITLE</subtitle>
        <green>KEY_PROG1</green>
        <mute>KEY_MUTE</mute>
        <power>KEY_POWER</power>
        <myvideo>KEY_VIDEO</myvideo>
        <mymusic>KEY_AUDIO</mymusic>
        <mypictures>KEY_CAMERA</mypictures>
        <mytv>KEY_TV</mytv>
        <language>Key_LANGUAGE</language>
        <one>KEY_1</one>
        <two>KEY_2</two>
        <three>KEY_3</three>
        <four>KEY_4</four>
        <five>KEY_5</five>
        <six>KEY_6</six>
        <seven>KEY_7</seven>
        <eight>KEY_8</eight>
        <nine>KEY_9</nine>
        <zero>KEY_0</zero>
        <obc1>KEY_TIME</obc1>
        <obc2>KEY_EJECTCD</obc2>
        <obc3>KEY_DVD</obc3>
        <obc4>KEY_LANGUAGE</obc4>                
    </remote>
</lircmap>

I'm assuming that I could theoretically setup multiple remotes by creating another remote section for another remote, but haven't tested that yet. Hell, I'm still working out the bugs in my custom remote config. Wink

Don't know if I explained it that well, but hope it helps at least get you on the right track.

Booboo Wrote:Hi there,

I finally managed to get my Harmony-Remote working (thanks for the tutorial).

When testing with irw in the terminal my device prints something like:
000000008001001c 00 KEY_ENTER devinput

But still I am struggeling on how to configure XBMC? Editing /usr/share/xbmc/system/Lircmap.xml and creating a new

<remote device="devinput">
...
</remote>

does not work for me - there is no change in the behavior of my remote when using XBMC ... So wehre and what do I have to edit to get my Harmony-Remote to work correctly with XBMC? Which files do I have to edit?

I am using:
Ubuntu 10.10; XBMC-Live (installation); OrigenAE M10 case with VF310 VFD-Display and Imon PAD; Harmony 885 (remote);

Thanks for any hint in advice!
Reply
#10
8301 Wrote:I have posted this in the forum but havent any luck with the answers

Linux Mint Julia 10 (Ubuntu 10)
Dharma

Hello I have a Imon PAD remote that I like to use for my HTPC.
As we know lirc have messed up the Imon driver a solution were made by lyka at XBMC forum http://forum.xbmc.org/showthread.php?tid=83284

It almost works but the direction buttons acts like a mouse I dont want that I need up/down/left/right key strokes for it to work properly in XBCM. irw and irxevent doesn't react to the direction bottoms the mouse is always moving around even when irw is on.

The iMon pad remote that you have looks similar to my RM200. There is a button that toggles the mouse/keyboard modes of the remote. It is on the directional pad right above the "joystick" and between the backspace select/space keys.

Image

Number 4 in the pic.
Reply
#11
Hey toddwv, thanks alot for your reply!

Now I have a clear view on what to do and what to take care of!
I´ll let you know if it worked.

Thanks mate :-)
Reply
#12
Booboo Wrote:Hey toddwv, thanks alot for your reply!

Now I have a clear view on what to do and what to take care of!
I´ll let you know if it worked.

Thanks mate :-)

No problem. Hope my limited knowledge was clear enough. Smile

One thing I should note is that I mentioned that xbmc puts a remote.xml in the install directory . I'm pretty sure that it also puts a Lirc.xml there too. These globals are loaded before the files in your ~/.xmbc/userdata directory. I believe that the .xbmc configs override the installation directory globals but can't confirm that 100%. I usually just delete or rename the globals after compiling and installing. I'm sure there's an easier more automatic way of doing it but haven't got around to finding it.
Reply
#13
Hi,

I have remote as show in post #10. I managed to get irw to display all the remote keycodes correctly, but XBMC is not reacting to any key press (except for knob, Enter, volume and few more).

I have done exactly as lyka did in #1 post (even have two remote sections in Lircmap
(<remote device="devinput"> and <remote device="Linux input layer (/dev/input/eventX)">), but seems XMBC does not receive presses. Like system is stealing the codes.

Also I have only /dev/lircd, and not /dev/lirc0. Does XBMC listen only on lirc0?

Is there something else to be done, maybe (like using inputlircd or eventlircd)?

Thanks...
Reply
#14
Hey!


Big_Noid Wrote:Although above method works to get a imon pad setup working, you will be creating a problem wih keypresses. No matter the sensitivity set up in the Harmony Remote control, sometimes one keypress triggers a neverending cycle of keypresses and xbmc wil not function anymore.

How is it possbile to change sensitivity when using "linux input layer"? - Is this still the "pad_tresh" value in "/etc/modprobe.d/lirc.conf"?

thanks
Reply
#15
Big_Noid Wrote:Although above method works to get a imon pad setup working, you will be creating a problem wih keypresses. No matter the sensitivity set up in the Harmony Remote control, sometimes one keypress triggers a neverending cycle of keypresses and xbmc wil not function anymore. The only solution to this is to setup the harmony as mce remote. And, as mentioned, this does not work on Ubuntu 10.10.
However the bug report (https://bugs.launchpad.net/ubuntu/+sourc...)describes provides a workaround, which basically removes the new faulting lirc_imon kernel driver and installs the old one:
- remove the default kernel's /lib/modules/2.6.35-22-generic/kernel/drivers/staging/lirc/lirc_imon.ko (which does not work, as well)

- install lirc-modules-source package (this will add an old, but working lirc_imon.ko to the module directory)

- Add this blacklist to /etc/modprobe.d/blacklist-imon.conf:

blacklist ir_core
blacklist ir_lirc_codec
blacklist ir_sony_decoder
blacklist ir_jvc_decoder
blacklist ir_rc6_decoder
blacklist ir_rc5_decoder
blacklist ir_nec_decoder
blacklist rc_imon_pad
blacklist imon

- Add this entry to /etc/modules:

lirc_imon

- Add this parameter to /etc/modprobe.d/lirc_imon.conf:

options lirc_imon ir_protocol=1

With this I can control xbmc with the mce remote on an antec fusion with imon reciever and now ubuntu doesn't see the remote's inpute as keyboard presses.

this method not works for me.
My usb-devices:
T: Bus=01 Lev=02 Prnt=04 Port=03 Cnt=01 Dev#= 6 Spd=1.5 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=15c2 ProdID=0042 Rev=00.02
C: #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=100mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=02 Driver=lirc_imon
I: If#= 1 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=lirc_imon
My lsusb:
Bus 001 Device 006: ID 15c2:0042 SoundGraph Inc.

Device:IR Antec Veris Multimedia Station E-Z.

The original method it works with IMON Harmony config. but one keypress triggers a neverending cycle of keypresses.

Any Idea?

Help please.

Thx.
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
[LINUX] HOW-TO to use iMON Remote on Ubuntu 10.10 with Linux input layer on Harmony00