Kodi Community Forum

Full Version: XBMC + lirc + MCE Remote problems.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello all,

Bear with me, my Linux skill level is minimal.

I am slowly driving myself insane trying to get this setup working. I have installed XBMC, and it's (now) working like a charm. However, I cannot seem to get the IR remote to recognize.
I've spent about 3 hours combing through various forums and Google trying to find a solution to my problems but I haven't had any luck.

This is where I stand: I did a sudo apt-get install lirc, and everything installed fine. The config popped up, I selected the incorrect remote, and things went downhill from there. After a ton of wrangling around, re-installing, etc...I finally figured out I could have simply done a dpkg-reconfigure lirc to re-select a remote. I went back and reconfigured lirc for the Windows MCE Remote (v2). After I selected the remote, it asked which transceiver I had. I don't have one (it's a receiver + remote) so I selected None.

After running various things like irrecord or irw (no idea what they do -- I was under the impression one of those would display your remote button presses in hex values so you can verify you are getting raw input) nothing shows up, at all in my terminal window.

The Receiver light is blinking red, and so is the remote. I thought I may have made a mistake by selecting no transceiver, so i went back and one at a time selected every option that had anything to do with usb and windows media center remote...no dice.

So, the long and short of it is lirc is installed, selected the correct remote, but it does not recognize at all in xbmc or in the terminal using the command irw or irrecord. This is where I am lost -- I know I am overlooking something or doing something wrong...please help!
Check /etc/lirc/hardware.conf. It should look like:

# /etc/lirc/hardware.conf
#
#Chosen Remote Control
REMOTE="Windows Media Center Remotes (new version Philips et al.)"
REMOTE_MODULES="lirc_dev lirc_mceusb2"
REMOTE_DRIVER=""
REMOTE_DEVICE="/dev/lirc0"
REMOTE_LIRCD_CONF="mceusb/lircd.conf.mceusb"
REMOTE_LIRCD_ARGS=""
#

And post any relevant errors from $ dmesg|grep lirc
Also, try running $ sudo /etc/init.d/lirc restart
before running irw.
I suggest you try and run the XBMC Live CD .
Just run it off the CD and check that the remote is working.
DDM123 Wrote:Check /etc/lirc/hardware.conf. It should look like:

# /etc/lirc/hardware.conf
#
#Chosen Remote Control
REMOTE="Windows Media Center Remotes (new version Philips et al.)"
REMOTE_MODULES="lirc_dev lirc_mceusb2"
REMOTE_DRIVER=""
REMOTE_DEVICE="/dev/lirc0"
REMOTE_LIRCD_CONF="mceusb/lircd.conf.mceusb"
REMOTE_LIRCD_ARGS=""
#

And post any relevant errors from $ dmesg|grep lirc
Also, try running $ sudo /etc/init.d/lirc restart
before running irw.

My config looks like that exactly.

dmesg|grep lirc yields the following:

[ 24.824409] lirc_dev: IR Remote Control driver registered, major 61
[ 25.322043] lirc_mceusb2: Philips eHome USB IR Transceiver and Microsoft MCE 2005 Remote Control driver for LIRC $Revision: 1.44 $
[ 25.322052] lirc_mceusb2: Daniel Melander <[email protected]>, Martin Blatter <[email protected]>
[ 25.711853] lirc_dev: lirc_register_plugin: sample_rate: 0
[ 25.716806] lirc_mceusb2[2]: Philips eHome Infrared Transceiver on usb1:2
[ 25.716935] usbcore: registered new interface driver lirc_mceusb2

restarting lirc then running irw gives me a blinking cursor...at which point i pressed every button on the remote and nothing changed on the screen.
cejstrup Wrote:I suggest you try and run the XBMC Live CD .
Just run it off the CD and check that the remote is working.

Live CD doesn't work...i select ATI drivers and the screen just goes black.
Still having a problem with this...anyone have any suggestions?

http://www.mythtv.org/wiki/MCE_Remote

I have the third remote from the left (the one with no colored buttons)
Sethar Wrote:restarting lirc then running irw gives me a blinking cursor...at which point i pressed every button on the remote and nothing changed on the screen.

Either your IR receiver does not work properly (driver problem?) or your lircd.conf is not correct. "irw" is not the right tool to test your lirc configuration.

First you should check if your IR receiver is working properly. You can do this with the command line tool "mode2". Stop the lirc daemon and check if a device "/dev/lirc" or "/dev/lirc0" exists. Then use the following command:

mode2 --device=/dev/lirc
or
mode2 --device=/dev/lirc0

Pressing some buttons on the remote should print the raw IR codes on the screen. If you don't get any output on the screen, then you have a driver problem. You can exit the mode2 tool with Ctrl-C.

If you get some strange numbers on the screen using mode2 then your driver is working and your lirc configuration is the culprit. In this case your lircd.conf does not fit to your remote. If you don't find a lircd.conf file for your remote, you can always train it manually with "irrecord". Just type:

sudo irrecord mceusb

Follow the instructions on the screen and when you are finished you should have a new config file "mceusb" or "mcesub.conf" in your current directory. Just copy this config file to your /etc/lirc/ directory:

sudo cp mceusb.conf /etc/lirc/lircd.mceusb.conf

Now change:
REMOTE_LIRCD_CONF="mceusb/lircd.mceusb.conf"
to
REMOTE_LIRCD_CONF="/etc/lirc/lircd.mceusb.conf"

and start the lirc daemon. NOW it's the right time to use "irw" to check for some real lirc output. If it works you have to adjust your XBMC configuration files "Lircmap.xml" and "Keymap.xml" to fit your new configuration.

Temar
Temar Wrote:Either your IR receiver does not work properly (driver problem?) or your lircd.conf is not correct. "irw" is not the right tool to test your lirc configuration.

First you should check if your IR receiver is working properly. You can do this with the command line tool "mode2". Stop the lirc daemon and check if a device "/dev/lirc" or "/dev/lirc0" exists. Then use the following command:

mode2 --device=/dev/lirc
or
mode2 --device=/dev/lirc0

Pressing some buttons on the remote should print the raw IR codes on the screen. If you don't get any output on the screen, then you have a driver problem. You can exit the mode2 tool with Ctrl-C.

If you get some strange numbers on the screen using mode2 then your driver is working and your lirc configuration is the culprit. In this case your lircd.conf does not fit to your remote. If you don't find a lircd.conf file for your remote, you can always train it manually with "irrecord". Just type:

sudo irrecord mceusb

Follow the instructions on the screen and when you are finished you should have a new config file "mceusb" or "mcesub.conf" in your current directory. Just copy this config file to your /etc/lirc/ directory:

sudo cp mceusb.conf /etc/lirc/lircd.mceusb.conf

Now change:
REMOTE_LIRCD_CONF="mceusb/lircd.mceusb.conf"
to
REMOTE_LIRCD_CONF="/etc/lirc/lircd.mceusb.conf"

and start the lirc daemon. NOW it's the right time to use "irw" to check for some real lirc output. If it works you have to adjust your XBMC configuration files "Lircmap.xml" and "Keymap.xml" to fit your new configuration.

Temar

Thank you for your help, I am stuck partway in doing your instructions.

I stopped the lirc daemon, and tried both mode2 --device=/dev/lirc and mode2 --device=/dev/lirc0

the /dev/lirc one said it didn't exist, the lirc0 one worked, and as i pressed buttons on my remote i saw raw code appear on the screen. Cool.

Then I tried "sudo irrecord mceusb" and i got this as a result:

irrecord: could not get file information for /dev/lirc
irrecord: devault-init(): No such file or directory
irrecord: could not init hardware (lircd running? --> close it, check permissions)

I suspect this is because /dev/lirc doesn't "exist" but /dev/lirc0 is. I don't know how to instruct irrecord to look at the other location. Further suggestions?

Thanks for the help so far.
Sethar Wrote:<snip>

I suspect this is because /dev/lirc doesn't "exist" but /dev/lirc0 is. I don't know how to instruct irrecord to look at the other location. Further suggestions?

Thanks for the help so far.

Working from memory right now, but there should be a --device parameter similar to what the mode2 command has, should be able to just add --device=/dev/lirc0 to the irrecord command..
cporter23 Wrote:Working from memory right now, but there should be a --device parameter similar to what the mode2 command has, should be able to just add --device=/dev/lirc0 to the irrecord command..

Okay. I ran

irrecord --device=/dev/lirc0 mceusb

and it worked, it asked me to hold down buttons for about a second. As I pressed buttons it made dots on the screen. Eventually it reached a point where it said it found gap: 84995. After exiting, I issued the command:

sudo cp mceusb /etc/lirc/lircd.conf.mceusb (I realize i flipped the mceusb and conf)

in my hardware.conf i changed

REMOTE_LIRCD_CONF="/etc/lirc/lircd.conf.mceusb"

I restarted lirc with

/etc/init.d/lirc restart

but part of that failed. so I did

/etc/init.d/lirc stop
/etc/init.d/lirc start

and it was fine. i then ran irw, and button mashed my remote. No output showed up on the screen.
Sethar Wrote:Okay. I ran

irrecord --device=/dev/lirc0 mceusb

and it worked, it asked me to hold down buttons for about a second. As I pressed buttons it made dots on the screen. Eventually it reached a point where it said it found gap: 84995. After exiting, I issued the command:

Did you actually train your remote by pressing all buttons? Normally the process is like that:

  1. Press buttons for a while (you did that).
  2. Enter a name for a button.
  3. Press the button.
  4. Go back to step 2 for the next buton.

Did you actually train every single button of you remote and gave it a name?

EDIT:
If you don't want to train your remote yourself, you can always check the lirc remote config file repository: http://lirc.sourceforge.net/remotes/
There you can find many config files for all kind of remotes.

Quote:sudo cp mceusb /etc/lirc/lircd.conf.mceusb (I realize i flipped the mceusb and conf)

in my hardware.conf i changed

REMOTE_LIRCD_CONF="/etc/lirc/lircd.conf.mceusb"

That should work. The name of the config file does not matter.

Temar
Temar Wrote:Did you actually train your remote by pressing all buttons? Normally the process is like that:

  1. Press buttons for a while (you did that).
  2. Enter a name for a button.
  3. Press the button.
  4. Go back to step 2 for the next buton.

Did you actually train every single button of you remote and gave it a name?

EDIT:
If you don't want to train your remote yourself, you can always check the lirc remote config file repository: http://lirc.sourceforge.net/remotes/
There you can find many config files for all kind of remotes.



That should work. The name of the config file does not matter.

Temar

Yes, but instead of that I am taking your advice and downloading the config. Below are my files:

/etc/lirc/hardware.conf

# /etc/lirc/hardware.conf
#
#Chosen Remote Control
REMOTE="Windows Media Center Remotes (new version Philips et al.)"
REMOTE_MODULES="lirc_dev lirc_mceusb2"
REMOTE_DRIVER=""
REMOTE_DEVICE="/dev/lirc0"
REMOTE_LIRCD_CONF="/etc/lirc/lircd.conf.mceusb"
REMOTE_LIRCD_ARGS=""

#Chosen IR Transmitter
TRANSMITTER="None"
TRANSMITTER_MODULES=""
TRANSMITTER_DRIVER=""
TRANSMITTER_DEVICE=""
TRANSMITTER_LIRCD_CONF=""
TRANSMITTER_LIRCD_ARGS=""

#Enable lircd
START_LIRCD="true"

#Don't start lircmd even if there seems to be a good config file
#START_LIRCMD="false"

#Try to load appropriate kernel modules
LOAD_MODULES="true"

# Default configuration files for your hardware if any
LIRCMD_CONF=""

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




This is /etc/lirc/lircd.conf.mceusb



#
# brand: HP
# model no. of remote control: TSGH-IR01
# devices being controlled by this remote: HP Slimline S3100y
#
# Derived from MCEUSB2 lircd.conf file (lircd.conf.mceusb) found at:
# https://help.ubuntu.com/community/Install_Lirc_Feisty

#
# RC-6 config file
#
# source: http://home.hccnet.nl/m.majoor/projects_...ontrol.htm
# http://home.hccnet.nl/m.majoor/pronto.pdf
#
# used by: Philips
#
#########
#
# Philips Media Center Edition remote control
# For use with the USB MCE ir receiver
#
# Dan Conti dconti|acm.wwu.edu
#
# Updated with codes for MCE 2005 Remote additional buttons
# *, #, Teletext, Red, Green, Yellow & Blue Buttons
# Note: TV power button transmits no code until programmed.
# Updated 12th September 2005
# Graham Auld - mce|graham.auld.me.uk
#
# Radio, Print, RecTV are only available on the HP Media Center remote control
#
#
# Updated with codes for MCE 2007 Remote additional buttons
# Visualization, Aspect, SlideShow, Eject
# Note:
# Renamed some buttons: DVD->DVDMenu, More->MoreInfo, Star->Asterisk, Hash->Pound
# Note:
# Blue, Yellow, Green, Red, and Teletext buttons do not exist on the HP remote

begin remote

name mceusb
bits 16
flags RC6|CONST_LENGTH
eps 30
aeps 100

header 2667 889
one 444 444
zero 444 444
pre_data_bits 21
pre_data 0x37FF0
gap 105000
toggle_bit 22
rc6_mask 0x100000000


begin codes

#unused by HP remote
Blue 0x00007ba1
Yellow 0x00007ba2
Green 0x00007ba3
Red 0x00007ba4
Teletext 0x00007ba5

#ba6 - bae unused
BA6 0x00007ba6
BA7 0x00007ba7
BA8 0x00007ba8
BA9 0x00007ba9
BAA 0x00007baa
BAB 0x00007bab
BAC 0x00007bac
BAD 0x00007bad
BAE 0x00007bae

Radio 0x00007baf
Print 0x00007bb1

#bb2 - bb4 unused
BB2 0x00007bb2
BB3 0x00007bb3
BB4 0x00007bb4

Videos 0x00007bb5
Pictures 0x00007bb6
RecTV 0x00007bb7
Music 0x00007bb8
TV 0x00007bb9

#bba - bbf unused
BBA 0x00007bba
BBB 0x00007bbb
BBC 0x00007bbc
BBD 0x00007bbd
BBE 0x00007bbe
BBF 0x00007bbf
#bc1 - bca unused
BC1 0x00007bc1
BC2 0x00007bc2
BC3 0x00007bc3
BC4 0x00007bc4
BC5 0x00007bc5
BC6 0x00007bc6
BC7 0x00007bc7
BC8 0x00007bc8
BC9 0x00007bc9
BCA 0x00007bca

Eject 0x00007bcb
SlideShow 0x00007bcc
Visualization 0x00007bcd

#bce - bcf unused
BCE 0x00007bce
BCF 0x00007bcf
#bd1 - bd7 unused
BD1 0x00007bd1
BD2 0x00007bd2
BD3 0x00007bd3
BD4 0x00007bd4
BD5 0x00007bd5
BD6 0x00007bd6
BD7 0x00007bd7

Aspect 0x00007bd8
Guide 0x00007bd9
LiveTV 0x00007bda
DVD 0x00007bdb
#NoGap
Back 0x00007bdc
OK 0x00007bdd
Right 0x00007bde
Left 0x00007bdf
Down 0x00007be0
Up 0x00007be1
#NoGap
Star 0x00007be2
Hash 0x00007be3
#NoGap
Replay 0x00007be4
Skip 0x00007be5
Stop 0x00007be6
Pause 0x00007be7
Record 0x00007be8
Play 0x00007be9
Rewind 0x00007bea
Forward 0x00007beb
#NoGap
ChanDown 0x00007bec
ChanUp 0x00007bed
VolDown 0x00007bee
VolUp 0x00007bef
#NoGap
More 0x00007bf0
Mute 0x00007bf1
Home 0x00007bf2
Power 0x00007bf3
#NoGap
Enter 0x00007bf4
Clear 0x00007bf5
#NoGap
Nine 0x00007bf6
Eight 0x00007bf7
Seven 0x00007bf8
Six 0x00007bf9
Five 0x00007bfa
Four 0x00007bfb
Three 0x00007bfc
Two 0x00007bfd
One 0x00007bfe
Zero 0x00007bff
end codes

end remote


and finally, /etc/lirc/lircd.conf

#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 Windows Media Center Remotes (new version Philips et al.) remote:
include /etc/lirc/lircd.conf.mceusb


services stopped/restarted....still nothing showing up in irw.
Sethar Wrote:# brand: HP
# model no. of remote control: TSGH-IR01
# devices being controlled by this remote: HP Slimline S3100y

Is the TSGH-IR01 really your remote?

Sometimes even the IR receiver is important. If you record IR codes with different IR receivers they *can* have different codes.

Quote:services stopped/restarted....still nothing showing up in irw.

If mode2 works, but irw does not it always comes down to a wrong lircd.conf. If in doubt it is always better to record the codes yourself.

EDIT: Just start with training only a few buttons - let's say 5 and test the configuration. If you get those 5 buttons to work, then train the rest.

A good way to check your configuration is to start the lircd manually and watch its output:

sudo /etc/init.d/lirc stop
sudo lircd -n --device=/dev/lirc0 --output=/dev/lircd /etc/lirc/lircd.conf.mceusb

Then open a different terminal, start irw:

sudo irw

Then press some buttons. If there are errors, the lircd should print them on the console where it was started. To terminate the lircd press Ctrl-C.

Press many different buttons as sometimes only a few buttons work. This can happen if you hold the remote to close to the receiver while training it.

Temar
I got one of the SMK IR receivers (mce v2 as far as I can tell), and using mode2 it detects all my signals on /dev/lirc0. I'm using the conf from here:

http://lirc.sourceforge.net/remotes/mceu...onf.mceusb

and the hardware.conf looks like this:

Code:
# /etc/lirc/hardware.conf
#
#Chosen Remote Control
REMOTE="Windows Media Center Remotes (new version Philips et al.)"
REMOTE_MODULES="lirc_dev lirc_mceusb2"
REMOTE_DRIVER=""
REMOTE_DEVICE="/dev/lirc0"
REMOTE_LIRCD_CONF="/usr/share/lirc/remotes/mceusb/lircd.conf.mceusb"
REMOTE_LIRCD_ARGS=""

#Chosen IR Transmitter
TRANSMITTER="None"
TRANSMITTER_MODULES=""
TRANSMITTER_DRIVER=""
TRANSMITTER_DEVICE=""
TRANSMITTER_LIRCD_CONF=""
TRANSMITTER_LIRCD_ARGS=""

#Enable lircd
START_LIRCD="true"

#Don't start lircmd even if there seems to be a good config file
#START_LIRCMD="false"

#Try to load appropriate kernel modules
LOAD_MODULES="true"

# Default configuration files for your hardware if any
LIRCMD_CONF=""

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

For the remote, I am using a universal remote which has been programmed with the Windows Media Center v2 codes (JP1 remote using Remotemaster upgrade). It 'should' work..but when I start lircd and use irw I get no output.

I'm on Intrepid, lircd 0.8.4a.
philter Wrote:http://lirc.sourceforge.net/remotes/mceu...onf.mceusb

For the remote, I am using a universal remote which has been programmed with the Windows Media Center v2 codes (JP1 remote using Remotemaster upgrade).

The config file you linked above is only for:

# brand: HP
# model no. of remote control: TSGH-IR01

remote controls. If you don't have THIS remote or if your remote is not sending the EXACT SAME remote codes like the HP TSGH-IR01 then it won't work. You have to get the right config file or train your remote codes with irrecord.

Quote:It 'should' work..but when I start lircd and use irw I get no output.

Same answer for you. Best way to go is train the remote yourself. Just train a few buttons and start the lircd manually (like described in my last post). As soon as you get it working, train the rest of your buttons.

Temar
Pages: 1 2