LinuxMCE Forums

General => Installation issues => Topic started by: blairkutz on September 17, 2007, 03:53:12 am

Title: Pleeeeassee help with MCE remote :-(
Post by: blairkutz on September 17, 2007, 03:53:12 am
Hey guys,

  The installation went fine, but when I tried to add a remote in the Media Director I'm getting a message as the new Software is installed about 'mce_usb' not able to start correctly. I went back to the KDE-Desktop and did a 'lsmod' and saw lirc_mceusb running ok.. I tried to find the log file for starting that device, it complained about serials and needing rebooting (which I did many times)..

I did some reading on lirc.org and /dev/lirc is not getting created. Dmesg shows one funny message about a 'tainted' kernel but nothing else seems weird:
[  254.566705] lirc_dev: IR Remote Control driver registered, at major 61
[  254.591536] lirc_mceusb: no version for "lirc_unregister_plugin" found: kernel tainted.
[  254.595860] usbcore: registered new interface driver lirc_mceusb
[  254.595985] /home/blisha121/lirc-0.8.2/drivers/lirc_mceusb/lirc_mceusb.c: USB Microsoft IR Transceiver Driver v0.2

After working with this a while I re-installed fiesty without any linuxmce packages, followed the instructions here: https://help.ubuntu.com/community/Install_Lirc_Feisty and still can't get /dev/lirc created. 'lsusb' shows the remote. and /dev/lircd is created. I read that it usually means your using the wrong drivers for your remote but I have the on the right (see http://www.mythtv.org/wiki/index.php/MCE_Remote ) and it says 'lirc_mceusb' is the one to use.

After that installation didn't work I tried the instructions from lirc.org and still no /dev/lirc

I'm pretty sure the /etc/lirc/lird.conf file is correct also.

Does anybody have any suggestions? Anything would be MOST appreciated!
Thanks!
Title: Re: Pleeeeassee help with MCE remote :-(
Post by: darrenmason on September 17, 2007, 04:11:42 am
The remote on the right says to use lirc_mceusb2 doesn't it.

Either way - try the lirc_mceusb2 driver instead of the one you are using. Don't forget to remove lirc_mceusb first.
You should get a line that shows the device actually being registered.  At that point it will create the /dev/lirc (or maybe /dev/lirc0 /dev/lirc/0 )

Try that  - if it doesn't work then post the output of lsusb and also 'cat /proc/bun/usb/devices'

Title: Re: Pleeeeassee help with MCE remote :-(
Post by: totallymaxed on September 17, 2007, 12:37:01 pm
Hey guys,

  The installation went fine, but when I tried to add a remote in the Media Director I'm getting a message as the new Software is installed about 'mce_usb' not able to start correctly. I went back to the KDE-Desktop and did a 'lsmod' and saw lirc_mceusb running ok.. I tried to find the log file for starting that device, it complained about serials and needing rebooting (which I did many times)..

I did some reading on lirc.org and /dev/lirc is not getting created. Dmesg shows one funny message about a 'tainted' kernel but nothing else seems weird:
[  254.566705] lirc_dev: IR Remote Control driver registered, at major 61
[  254.591536] lirc_mceusb: no version for "lirc_unregister_plugin" found: kernel tainted.
[  254.595860] usbcore: registered new interface driver lirc_mceusb
[  254.595985] /home/blisha121/lirc-0.8.2/drivers/lirc_mceusb/lirc_mceusb.c: USB Microsoft IR Transceiver Driver v0.2

After working with this a while I re-installed fiesty without any linuxmce packages, followed the instructions here: https://help.ubuntu.com/community/Install_Lirc_Feisty and still can't get /dev/lirc created. 'lsusb' shows the remote. and /dev/lircd is created. I read that it usually means your using the wrong drivers for your remote but I have the on the right (see http://www.mythtv.org/wiki/index.php/MCE_Remote ) and it says 'lirc_mceusb' is the one to use.

After that installation didn't work I tried the instructions from lirc.org and still no /dev/lirc

I'm pretty sure the /etc/lirc/lird.conf file is correct also.

Does anybody have any suggestions? Anything would be MOST appreciated!
Thanks!

Generally if your  IR receiver was not auto-detected by lmce-0704 the best place to fix this is inside lmce and not down at the console or kde level (there are exceptions to this though!).

If your mce receiver was not auto-detected got to Web admin -> Wizard -> Devices -> Media Directors and find the Core/Hybrid MD or other MD you want to add IR to. IR Receivers should be set to 'Default' (try that first... then try mce_usb2 if it doesn't) and then add an MCE remote by clicking on the 'Add Remote' button (select 'Windows XP MC Remote') then click 'Update'. You should see adding software messages start to appear in the top left hand corner of your MD's screens. Wait for the full screen annoucement that this process has finished and then do a reload router.

Your remote should now work... if it is MCE compatible.
Title: Re: Pleeeeassee help with MCE remote :-(
Post by: blairkutz on September 17, 2007, 03:25:57 pm
Thanks for the replies!

Ok so reloaded a clean installation, then tried to load mce_usb2, but I got the same message about 'waiting for devices to start mce_usb' after a reboot.. then got a message about the functionality of the device may not work correctly.

Then I tried adding 'default' and a MCE remote and the same message came up about could not load 'default'!

The contents of /proc/usb/device is below.. I think the receiver is working ok, because I can see the light respond to button presses.

Even though it said it could not start mce_usb2 I did a lsmod and saw that is was running. I couldn't find anything named 'default' with lsmod so I'm not sure if it started anything.

dmesg showed me a little more this time:
[   65.545306] **WARNING** I2C adapter driver [NVIDIA i2c adapter 0 at 1:00.0] forgot to specify physical device; fix it!
[   65.548332] **WARNING** I2C adapter driver [NVIDIA i2c adapter 1 at 1:00.0] forgot to specify physical device; fix it!
[   65.551089] **WARNING** I2C adapter driver [NVIDIA i2c adapter 2 at 1:00.0] forgot to specify physical device; fix it!
[  142.326282] lirc_dev: IR Remote Control driver registered, at major 61
[  143.235966] ide0: I/O resource 0x3F6-0x3F6 not free.
[  143.235972] ide0: ports already in use, skipping probe
[  143.236455] ide1: I/O resource 0x376-0x376 not free.
[  143.236459] ide1: ports already in use, skipping probe


(Interesting section of /proc/usb/bus/devices)
T:  Bus=04 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#=  3 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0609 ProdID=0334 Rev= 1.00
S:  Manufacturer=SMK CORPORATION
S:  Product=MCE TRANCEIVR Emulator Device 2006
S:  SerialNumber=PA070417050404C
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=100mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=01(O) Atr=03(Int.) MxPS=  32 Ivl=2ms
E:  Ad=81(I) Atr=03(Int.) MxPS=  32 Ivl=2ms


Thanks for your help!
Title: Re: Pleeeeassee help with MCE remote :-(
Post by: darrenmason on September 18, 2007, 01:38:55 am
I have got some good news and some bad news. What do you want first? ;)

The good news is that your remote is supported by lirc and someone has added support to the lirc_mceusb2 driver on June 29 (version 1.30 of lirc_mceusb2.c)

The bad news is that lirc-0.8.2 (which I am pretty sure is the latest version and the one linuxMCE is using) was made on June 9.

What is happening is that you are loading the right driver but the driver has an explicit list of remote IDs that it supports. Your remote ID was basically added on June 29 to the Source code.

So your options are to wait , I don't know how long, for the next release of linuxMCE which may have a newer version of lirc in it.
Or, you could rebuild lirc from the latest code (or at least version 1.30 of lirc_mceusb2.c). If you choose to do this it is not that hard and there are instructions on the lirc.org website.

Make sure you run the setup stuff correctly and do the make install.

I have done the same thing the other day with basically the same reason, but unfortunately my remote has other issues.

HTH
Darren
Title: Re: Pleeeeassee help with MCE remote :-(
Post by: darrenmason on September 18, 2007, 01:43:55 am
Just to add... if you get really stuck I could send you a compiled module file to copy in. That should work, but it would be better if it was built on the machine that you are running it on.

Some hints.
Install the compiler first (sudo aptitude install g++)
and the kernel source (sudo aptitude install linux-source I think from memory)
The rest of the instructions from lirc.org should be fine.

Title: Re: Pleeeeassee help with MCE remote :-(
Post by: blairkutz on September 18, 2007, 02:01:59 am
Great!!!

Would it be possible to use apt-get to doiwnload lirc 8.2, replace lirc_usbmce2.c with version 1.30 and follow the steps here: https://help.ubuntu.com/community/Install_Lirc_Feisty

or you think from source would be the best way?

Thanks again!
Title: Re: Pleeeeassee help with MCE remote :-(
Post by: darrenmason on September 18, 2007, 06:52:34 am
Sort of - I am pretty sure that you can get the source as a package. The file lirc_usbmce2.c is the source code for the lirc_mceusb2 driver.
So when you get the source for 0.8.2 then you should be able to replace with version 1.30 and rebuild the module.

This is actually probably better than getting the trunk version of all the source (from CVS) as there is probably some bits that might not be ready for use yet.

The instructions in the link looked OK from what I saw - but to be honest I thought downloading the tar file of the .0.8.2 release and compiling that is actually simpler.
Title: Re: Pleeeeassee help with MCE remote :-(
Post by: blairkutz on September 20, 2007, 05:15:14 am
Yeah!! it's working!!

Ok for anybody else having problems with their remote this is one thing to try:
Go to the CVS repository for lirc and search for some distinguishing feature from your 'lsusb' call..

eg. Download CVS snapshot: http://lirc.org/cvs.html
my 'lsusb' showed me: Bus 004 Device 007: ID 0609:0334 SMK Manufacturing, Inc.

Searching that for SMK: "grep -ri SMK *"

Saw that is it in lirc_mceusb2.c. Then you can go to the CVS site and run 'annotate' on the file to see which version has your remote added. Download that version of the file (in my case 1.30).  Download the src lirc from http://lirc.org/, copy in your version of the file and follow instructions.

Other stuff that I had to do: (I think this stuff is necessary anyway  ;-)
*  Linuxmce uses a wrapper call to start lircd. In order for linuxmce to use the new lircd you installed you must update the script at /etc/init.d/lirc with the script included with lirc src code (contrib/lirc.debian)
* cp the .rules file included in the lirc to /etc/udev/rules.d/10-lirc.rules (not sure if the numbers were necessary but all other rules had numbers). Change the "lirc/%n" to "lirc" (so the /dev will be created at /dev/lirc to make things easy)
* Looks like the src version of lircd looks at /etc/lircd.conf for the config file. I bet you can change that with a ./configure option but I just created a link to where the old version of lircd looked for the file (/etc/lircd/lircd.conf) just in case
* restarted!

Hope this helps! And thanks for all the help!  :D
Title: Re: Pleeeeassee help with MCE remote :-(
Post by: darrenmason on September 20, 2007, 06:02:36 am
Well done!

The /etc/lircd.conf file is deleted and regenerated each time the linuxMCE device is run (LIRC_DCE) so changing it will not have lasting effects. To change lircd configs you need to have remote device(s) added to the Media Director and the conf file for each is one of the device parameters. LIRC_DCE will read them all in and concatenate them into /etc/lircd.conf. It then passes the location of this file to lircd as it starts it.
Once you have rebuilt lirc and done a 'make install' then it should install the new modules and the executables (such as lircd) so you shouldn't really need to be touching the startup scripts - actually come to think of it there should not be a startup script for lirc as the linuxMCE launch manager takes on that role.

Probably worth putting all your findings in a wiki page as well so your work doesn't get lost in the forums.

Hopefully with the next release it'll all work straight out of the box for you.

regards
Darren
Title: Re: Pleeeeassee help with MCE remote :-(
Post by: leonja on November 07, 2007, 06:38:57 am
Blairkutz,
Could you please give a more detailed explanation of the procedure you followed?
I have the Hauppauge PVR-150 MCE kit which comes with an RC6 transmitter and a SMK receiver and IR blaster.  I have been trying for a week to get my remote to work with LMCE 0704 without much success.  I think your solution is exactly what I need. 

I have downloaded the g++ compiler, the linux-source package, the lirc 0.8.2 release source, and the lirc_mceusb2.c version 1.37.  I am not sure if I need to replace lirc_mceusb2.c in the lirc source files and then compile.  The instructions from the Ubuntu page seem rather complicated and I am not well experienced in compiling code.

Thanks,
Jaime
Title: Re: Pleeeeassee help with MCE remote :-(
Post by: Hagen on November 07, 2007, 07:25:12 am
I have filed a bug report on this issue.
Title: Re: Pleeeeassee help with MCE remote :-(
Post by: darrenmason on November 08, 2007, 06:10:58 am
I have downloaded the g++ compiler, the linux-source package, the lirc 0.8.2 release source, and the lirc_mceusb2.c version 1.37.  I am not sure if I need to replace lirc_mceusb2.c in the lirc source files and then compile.  The instructions from the Ubuntu page seem rather complicated and I am not well experienced in compiling code.
Yes, you will need to compile the code.

First make sure the source that you downloaded compiles (without replacing the file).
You do this by running 'make' in the lirc source directory. If it complains about not having a Makefile then you generate one with './configure'

You should be able to make a new version of the lirc_mceusb2 driver module.
Now replace the file with the updated one and run make again. You should now have compiled a lirc_mceusb2 version that works for you.

To install it you will need to run 'make install' as root. This will copy the compiled module into right area so that it is loaded when needed.

If it has an error installing then it make have already loaded and you may need to unload it first. 'rmmod lirc_mceusb2' should do this for you.

Then run 'modprobe lirc_mceusb2' and check the bottom few lines of 'dmesg' to see what log messages were generating when trying to load the driver.

HTH, it is from memory - so there may be some errors.

Regards
Darren
Title: Re: Pleeeeassee help with MCE remote :-(
Post by: AK83 on November 30, 2007, 01:30:18 pm
@blairkutz: Thanks for your HOW TO!

I just downloaded lirc-0.8.3pre1.tar.bz2 from http://lirc.sourceforge.net/software/snapshots/. Shall I first run "./setup.sh" as described here http://www.mythtv.org/wiki/index.php/MCE_Remote#Installation_guides ?

I think I know how to do the "Other stuff" you described. I just don't know how to start.
Could anyone help?

Title: Re: Pleeeeassee help with MCE remote :-(
Post by: Zaerc on November 30, 2007, 04:51:49 pm
Pleeeeassee help with adding stuff like that to the wiki... :-(
Title: Re: Pleeeeassee help with MCE remote :-(
Post by: totallymaxed on November 30, 2007, 04:57:04 pm
Pleeeeassee help with adding stuff like that to the wiki... :-(

And as we move closer n closer to 0710 its important to make sure that Wiki information is clearly identified as relating to 0704.... otherwise this could cause all kinds of problems ;-)
Title: Re: Pleeeeassee help with MCE remote :-(
Post by: AK83 on November 30, 2007, 05:12:11 pm
Sorry, but I'm new to LinuxMCE and to Linux as well and I have to work with it for a while to get into it. I will fix it somehow. I made some steps forward but I still have the problem with installing packages as I posted here: http://forum.linuxmce.org/index.php?topic=3319.0
If you could help me with that would be great.

Greets
Title: Re: Pleeeeassee help with MCE remote :-(
Post by: Hagen on November 30, 2007, 06:38:54 pm
I am slightly tempted to answer:
Wait for the 710 release instead of doing all this work that is allready done in the next release.
But I woun't ;)
Title: Re: Pleeeeassee help with MCE remote :-(
Post by: leonja on November 30, 2007, 08:32:42 pm
AK83
I got your PM.  I wrote down what I did to resolve my MCE remote proble in this thread:

http://forum.linuxmce.org/index.php?topic=3049.0 (http://forum.linuxmce.org/index.php?topic=3049.0)

Let us know if you need more help.

Good luck,
Jaime
Title: Re: Pleeeeassee help with MCE remote :-(
Post by: AK83 on December 01, 2007, 01:46:30 pm
leonja, thanks a lot!

My problem is that I get this error message
Code: [Select]
configure: error: *** you need to have the Linux kernel source installed for this driverwhen typing this
Code: [Select]
./configure --prefix=/usr --sysconfdir=/etc/conf.d --with-x --with-driver=mceusb2
I read that it has something to do with the kernel headers. As described here http://www.mythtv.org/wiki/index.php/MCE_Remote#Installation_guides (http://www.mythtv.org/wiki/index.php/MCE_Remote#Installation_guides) uname -a gives me back 2.6.20-16-generic. So I tried to update but it says that it is already the latest version. Any ideas?

Again, thanks a lot for your help!
Title: Re: Pleeeeassee help with MCE remote :-(
Post by: leonja on December 02, 2007, 04:01:35 am
AK83
I don't really know what could be wrong with your configuration.  I see you used the latest lirc source code.  One of the threads I read while trying to resolve the MCE remote problem warned about installing the latest lirc beta version, as it could contain code that was not supported under the current LMCE version.  For this reason, I downloaded the same lirc version 0.8.2 (official release) source code used in LMCE 704 and then overlaid the lirc_mceusb2 module source code version 1.37.  Thus, only updating the small part of lirc required to support the MCE remote with the SMK receiver.  Follow the instructions I wrote in my thread.

Again, I am not sure if this is your problem, but this is what worked for me.  Support for the MCE remote and SMK receiver is supposedly included in LMCE 710, as mentioned by several other persons in this forum.  Date for the 710 release is delayed though.

Good luck,
Jaime
Title: Re: Pleeeeassee help with MCE remote :-(
Post by: darrenmason on December 03, 2007, 04:13:30 am
leonja, thanks a lot!

My problem is that I get this error message
Code: [Select]
configure: error: *** you need to have the Linux kernel source installed for this driverwhen typing this
Code: [Select]
./configure --prefix=/usr --sysconfdir=/etc/conf.d --with-x --with-driver=mceusb2
I read that it has something to do with the kernel headers. As described here http://www.mythtv.org/wiki/index.php/MCE_Remote#Installation_guides (http://www.mythtv.org/wiki/index.php/MCE_Remote#Installation_guides) uname -a gives me back 2.6.20-16-generic. So I tried to update but it says that it is already the latest version. Any ideas?

Again, thanks a lot for your help!

Have you done "apt-get install linux-headers"?
If that doesn't work try "apt-get install kernel-headers" - Can't remember which one it was  :-\
Title: Re: Pleeeeassee help with MCE remote :-(
Post by: AK83 on December 03, 2007, 08:23:46 am
hey!

@leonja: I also tried version 0.8.2 with the latest lirc_mceusb2 drivers. Doesn't work.
@darrenmason: "apt-get install linux-headers [version]" says that I already have the newest version.

What I get now is this:
Code: [Select]
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.

I read that I need the GCC (build essential) package to compile. But I can't install that package using the terminal as I am told that it cannot be found. I think that is because of the lmce sources.list. Could I download some kind of .deb-file for this and run it after downloading?

Thanks! 
Title: Re: Pleeeeassee help with MCE remote :-(
Post by: darrenmason on December 04, 2007, 12:37:43 am
That error looks like you might not have the C++ compiler.

try 'apt-get install g++'
Title: Re: Pleeeeassee help with MCE remote :-(
Post by: AK83 on December 05, 2007, 08:47:54 pm
Hey!

The Terminal tells me that I already have the latest version of "gcc" (that's what you meant I guess).
Code: [Select]
alex@dcerouter:~$ dpkg -l gcc
...
||/ Name                       Version                    Beschreibung
+++-==========================-==========================-====================================================================
ii  gcc                        4.1.2-1ubuntu1             The GNU C compiler
and
Code: [Select]
alex@dcerouter:~$ dpkg -l make
...
||/ Name                       Version                    Beschreibung
+++-==========================-==========================-====================================================================
ii  make                       3.81-3build1               The GNU version of the "make" utility.

I still get that error:
Code: [Select]
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.

I don't know. Do I need something else?
Title: Re: Pleeeeassee help with MCE remote :-(
Post by: AK83 on December 05, 2007, 09:11:06 pm
Ok, sorry. I just read this:
"gcc is first built without the C++ compiler"

What I need is "gcc-c++", but I can't install any packages. The Terminal always tells me that the package cannot be found, doesn't matter which package I choose. Perhaps something went wrong during installation. That's why I asked for a different way to get packages I need.
 :-[
Title: Re: Pleeeeassee help with MCE remote :-(
Post by: darrenmason on December 05, 2007, 11:47:28 pm
I am sure the following worked for me....

apt-get update
apt-get install g++

What do you get when you enter these commands?
Title: Re: Pleeeeassee help with MCE remote :-(
Post by: AK83 on December 06, 2007, 11:16:10 am
Code: [Select]
alex@dcerouter:~$ sudo apt-get update
Reading package lists... Done
alex@dcerouter:~$ sudo apt-get install g++
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Couldn't find package g

When I just try "apt-get install g++", I get:
Code: [Select]
E: Could not open lock file /var/lib/dpkg/lock - open (13 Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

Perhaps LMCE can't update the packages? Is there some kind of log file I could check?
Title: Re: Pleeeeassee help with MCE remote :-(
Post by: AK83 on December 07, 2007, 03:33:16 pm
Hi!

I don't know, but probably there's something wrong with my sources.list. Would I get an error if "apt-get update" failed? Could someone post his sources.list so I can check if there's anything missing? Would be nice!
Title: Re: Pleeeeassee help with MCE remote :-(
Post by: rafik24 on December 09, 2007, 08:16:17 pm
 Hi AK83,

 make sure you have       deb http://archive.ubuntu.com/ubuntu feisty main restricted universe multiverse
in you /etc/apt/sources.list

 i would recommend to comment the line once you have finished downloading packages to avoid dependency  issues if update / upgrade happens from within lmce.

 Rafik
Title: Re: Pleeeeassee help with MCE remote :-(
Post by: kengtay on April 29, 2008, 06:27:53 am
Can you guy use this Windows MCE IR as a IR Blaster?

Title: Re: Pleeeeassee help with MCE remote :-(
Post by: tschak909 on April 29, 2008, 07:55:19 am
yes, but the IR learning must be done by a supported learning device, such as a USB UIRT, or a GC-100.

-Thom