Gerald Nunn's Blog
« Maven, WebLogic Portal and APPC | Main | Configuring the HTPC network card »Upgrading lirc in Mythbuntu 8.0.4
Sunday, June 08, 2008
The HP Media Center comes with a nice remote, pictured below, that I wanted to use with MythTV. While Mythbuntu has a control center application that allows you to configure the remote that you are using I could not get the remote working with it. The first time I installed Mythbuntu I selected the newer Microsoft media center remotes which corresponds to the mceusb2 device. When I went to try it it didn't work, no matter how much I stubbornly kept pressing buttons it would not kick-in so queue the troubleshooting.
I tried using irw to test the remote but it would just kick out right away and then subsequent irw attempts showed a connection refused message. After doing a bit more digging I ran the lsusb command and saw that my remote IR device was from a company called Formosa Industrial Computing, Inc. A friendly IRC person on the Mythbuntu IRC channel pointed out this device was not supported in the lirc 0.8.3-pre1 release that ships with Mythbuntu 8.0.4 so I would have to replace it with the newly released 0.8.3 release.
That same friendly user attempted to aid me with this process, unfortunately somewhere along the way things got toasted sufficiently that it was easier to just re-install Mythbuntu. I think the fault was mine, when I first tried compiling lirc I used some non-standard commands that probably screwed things up.
Anyways, I finally had some time this weekend for round 2. I reinstalled Mythbuntu from scratch and started the remote process again. I guess convential wisdon is wrong because for me the second time is the charm as I found the process to be relatively painless. Here are the steps I used to get this going.
- Download the lirc 0.8.3 release from the lirc website here. The file to download is lirc-0.8.3.tar.bz2 and is linked on the left side of the lirc page.
- Copy the file to /usr/src.
- Open a terminal and go to the /usr/src directory and execute the following commands.
- tar xjvf lirc-0.8.3.tar.bz2
- cd lirc-0.8.3
- ./setup.sh
- When you run the setup command you will get a dialog screen with options. Select option 1, Driver Configuration.
- Next pick the USB Devices option.
- Finally scroll through the list until you get to Windows Media Center Remotes (new version, Philips et al.) and select that.
- Back at the main screen, select Save configuration and run configure
- After this you can compile and install the driver. To do this, run the sudo make install command.
Now that the driver is installed, we need to fix a few more things before we can start using it. One problem we have is that Mythbuntu puts the lirc executables and module files in different locations then lirc does by default so we have to replace them everywhere. This is where I got hung up on previous attempt and went down the wrong path, this time I was able to locate a helpful forum posting that pointed me in the right direction. You can read that posting here
In addition to that posting, I also found I needed the lircd.conf from the 0.8.3 branch rather then the ones included with Mythbuntu. To copy the file I did the following:
sudo cp /usr/src/lirc-0.8.3/remotes/mceusb/lircd.conf.mceusb /etc/lirc/lircd.conf sudo cp /usr/src/lirc-0.8.3/remotes/mceusb/lircd.conf.mceusb /etc/lircd.conf
I also copied the file to /etc/lircd.conf because lirc seems to look there for the file by default even though the /etc/init.d/lirc script looks for it in /etc/lirc/lircd.conf. Finally I adjusted /etc/lirc/hardware.conf so the line REMOTE_LIRCD_CONF would point at the correct location for lircd.conf. Here is my change:
REMOTE_LIRCD_CONF="/etc/lirc/lircd.conf"
After making these changes I ran the following set of commands to replace the 0.8.3pre1 lirc files that Mythbuntu installed with the newly built ones.
sudo cp /lib/modules/2.6.24-16-generic/misc/lirc_dev.ko /lib/modules/2.6.24-16-generic/ubuntu/media/lirc/lirc_dev sudo cp /lib/modules/2.6.24-16-generic/misc/lirc_mceusb2.ko /lib/modules/2.6.24-16-generic/ubuntu/media/lirc/lirc_mceusb2 sudo cp /usr/local/sbin/lircd /usr/sbin/lircd sudo cp /usr/local/sbin/lircmd /usr/sbin/lircmd rmmod lirc_mceusb2 rmmod lirc_dev
Note the original instructions moved the driver files, I opted to copy them just in case something else looked for them here. After all these steps I could now run irw successfully and the remote works correctly with MythTV. Hopefully this positing will help others trying to get the same remote working with Mythubuntu 8.0.4
Posted by Gerald Nunn at 4:00 PM | Categories: Home Theater | Permalink
