Two Possibilities

March 23, 2010

iMon Remote and lirc

Filed under: MythTV — Eric Friedrich @ 11:09 am

A HTPC isn’t much good without a remote control. Nobody wants to have a keyboard and mouse sitting out on their coffee table. I use a Logitech Harmony 720 that I picked up from Costco. It can control my TV, Receiver, DVD Player, Cable Box, and Squeezebox Radio. I’ve previously had the remote working with a Hauppage PVR-250 IR receiver. With the new Antec RemoteFusion case, I now use the included iMon IR receiver (plus Volume Knob!) on the other end of the Harmony remote.

During the Mythbuntu setup I selected iMon Veris. When I first started up Myth, this left me with no respone to IR commands to the Frontend. Doublechecking with irw and irrecord, I saw that neither of these programs were receiving IR codes. I did some research, finding the following sites useful:

I ran the ‘lsusb’ command to determine which version of the iMon LCD I have. (Its the 0038 version).

eric@mythbox:~$ lsusb | grep SoundGraph
Bus 003 Device 002: ID 15c2:0038 SoundGraph Inc. 

I then added the following section to my xorg file (/etc/X11/xorg.conf). It allows my remote input to be recognized as a mouse by the X Windows GUI.

 Section "InputDevice"
     Identifier "Remote"
     Driver "mouse"
     Option "Device" "/dev/lircm"
     Option "Protocol" "IntelliMouse"
     Option "SendCoreEvents"
     Option "Buttons" "5"
     Option "ZAxisMapping" "4 5"
 EndSection

 Section "ServerLayout"
     Identifier "StandardLayout"
     Screen 0 "Default Screen" 0 0
     InputDevice "Remote"
 EndSection

The Working With MythTV blog above recommends checking which driver is associated with the SoundGraph device, because usbhid (the generic keyboard/mouse driver) occasionally takes control of it from lirc.

mount -t usbfs none /proc/bus/usb
cat ./devices
T:  Bus=03 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#=  3 Spd=1.5 MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=15c2 ProdID=0038 Rev= 0.01
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
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=10ms
I:* If#= 1 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=lirc_imon
E:  Ad=82(I) Atr=03(Int.) MxPS=   8 Ivl=10ms``

The above output shows that the lirc_imon driver is being correctly used. I was running out of ideas and everything looked like it should be working, so I decided to try the IR module with another computer. Not surprisingly, it worked perfectly on the first try. While removing the IR module, I accidentally spilled a bowl full of change directly onto my powered-up and running motherboard. Luckily no nickles, dimes or pennies caused permanent damage. I did pull the power cable out the back of the machine as fast as I possibly could. Maybe throwing money at this problem fixed something ;-)

I’ll be honest, I’m not quite sure what I did, but once I reinstalled the IR module in the Antec case, it worked immediately. I have noticed that the IR field of view is pretty narrow, maybe 60 degrees? Its completely possible that I was outside the IR sensor’s receiving angle when I was having the initial problems.

Now that the the IR device & lirc are running, back to MythTV. The Remote still didn’t work in the frontend, but now irw showed remote names like KEY_DOWN, KEY_UP, etc… This didn’t match “button” and “remote” settings in the mythtv lircrc(~/.myth/lircrc) file. I corrected these (manually) and restarted the frontend.

I can now control MythTV with my Harmony remote. The IR receiving angle is still an issue, sitting on one of the two couches in the living room, maybe 60-70 degrees off the axis of the sensor, leaves the remote useless. I might consider some optical (lens/mirror) means of giving a wider angle to the IR sensor. Otherwise, it works great. I still need to tweak my button mappings a little bit to add support for OSDs and menus, but those are relatively minor tasks.

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

You must be logged in to post a comment.

Powered by WordPress