Edited:
Hi all!
I've been out of these forums much time, so this Howto hasn't been mantained by myself at all. I couldn't imagine this "Howto" would be seen so much, so I'm really sorry for keeping this outdated.
This thread has grown so much, that I think it's time to put our efforts in mantaining another kind of system that allows everybody to fix, edit, or add new info.. I reffer on a wiki, of course
Bodhi.zazen already ported this howto to a wiki (thank you very much), so we can use it from now on. Please, it would be great if anyone who have followed this thread and sent fixes or completed it, visit that wiki and complete/mantain it. Here it is: http://doc.gwos.org/index.php/Lirc
I'd like to add that you've got a wiki mantained by Superm1 with much more info than this thread. So please, read it in order to fix your problems. I'd like to thank Superm1 his unvaluable help for mantaining this thread and helping people with their lirc problems.
Here it is: http://help.ubuntu.com/community/Install_Lirc_Edgy
Regards
hexion
P.S.: Of course, you can still post here your doubts. And remember, now everybody can edit this howto (in the wiki created by Bodhi.zazen) so if you find a solution for someone's problem feel free to complete/fix that wiki so you'll help the comunity
---------------------------
Old thread follows:
---------------------------
Advertisement: this howto is provided as is. It may contain errors and have no support. If you find any problem, post it and I'll try to solve it. But sorry if I can't
To simplify the howto, we become root at the beginning. If you don't want it, you must put "sudo" in almost all the sentences.
1) Download lirc (you'll need at least version 0.8.1pre2)
2) Install linux sources and other utilssudo -s
cd /usr/src
wget http://lirc.sourceforge.net/software....1pre2.tar.bz2
tar xvfj lirc-0.8.1pre2.tar.bz2
3) Install lirc from repos (to make some config issues in your system, we wont use edgy binaries)aptitude install linux-source-2.6.17 build-essential gcc-3.4
tar xvfj linux-source-2.6.17.tar.bz2
unlink linux
ln -s linux-source-2.6.17 linux
cd linux
cp /boot/config-2.6.17-10-generic .config
4) Lirc setupaptitude install lirc lirc-x
Choose option 1. Driver configurationcd /usr/src/lirc-0.8.1pre2/drivers
ln -s /usr/src/linux/drivers drivers
cd ..
./setup
You have to choose your card. In example, for avermedia capture 98, you must choose 1)driver configuration 2) TV Card 6)Avermedia TV Card (TV Capture 98 )
At the end, choose option "Save configuration & run configure"
5) Build and install lirc from source
(note we are in /usr/src/lirc-0.8.1pre2 directory and we are root)
6) Load module and test lircmake
make install
When "make install" finishes, it will tell you which module to load. In my case it's lirc_gpio. Change first line if yours is different.
At this point, press your remote control keys to test if it works.modprobe lirc_gpio
lircd
irw
EDIT: Acording to a user (elchupakabra), if your module is "lirc_serial", prior to modprobe line you'll have to do this:
7) Autoload lirc at boot-timeaptitude install setserial
setserial /dev/ttyS0 uart none
killall lircdThis command works with lirc_gpio. I think if your module is another, you'll have to change "lirc_gpio" for it, but I'm not sure if it will work. Report if it doesn't.echo "alias char-major-61-* lirc_gpio" | sudo tee /etc/modprobe.d/lirc
In that file, add these 2 lines before "exit 0" line:gedit /etc/rc.local
mknod /dev/lirc c 61 0
lircd
8 ) Disable ir_common (NEW IN EDGY!!!). Explanation and test
Since kernel 2.6.17, there's a new "feature" that manages remote control keys of certain TV Cards. This cannot be disabled nor configured, and will interfeer with normal behaviour of LIRC.
To work well with our LIRC configuration, we must disable this module. It cannot be unloaded because bttv module needs it to work. I've made a "kernel hack" (explained at the end of this howto) to build an "ir_common" module with such management disabled.
At this point you need to test if that module is by default doing something in your system, and if so, disable it.
a) Open a terminal
b) With lirc unloaded (killall lircd), press a number key of your remote control.
If that number appears in the terminal, you must continue with step 9).
If there's anything in the terminal window, continue with step 10
9) Disable ir_common (NEW IN EDGY!!!). Doing the trick
You've got 2 options. Loading my "hacked" ir_common module (THIS IS ONLY FOR KERNEL 2.6.17-10-generic),or building your own "hacked" ir_common module.
9.a) Loading my module (easier but only valid for edgy's default kernel)
Download attached ir_common.ko (uncompress tar.gz file) and move it to /lib/modules/2.6.17-10-generic/kernel/drivers/media/common
(note, you'll need root privileges to do so)
9.b) Building your own module
In this file, there are definitions of the remote control keys of certain TV cards. We need to delete such definitions to avoid ir_common module to manage our card.gedit /usr/src/linux-source-2.6.17/drivers/media/common/ir-keymaps.c
Go to the definition of "ir_codes_empty" copy what's between the symbols {} and paste it in ALL other definitions.
In example, "ir_codes_avermedia_dvbt" definition should look like this:
When you finish, save changes. Then, compile modules of your kernel/* Matt Jesson <dvb@jesson.eclipse.co.uk */
IR_KEYTAB_TYPE ir_codes_avermedia_dvbt[IR_KEYTAB_SIZE] = {
[ 0x2a ] = KEY_COFFEE,
};
Ok, now you've got your own ir_common module build. Copy it to /lib/modules...cd /usr/src/linux-source-2.6.17/drivers/media/common/
rm *.o
rm *.ko
cd /usr/src/linux-source-2.6.17/drivers/media/video/bt8xx/
rm *.o
rm *.ko
cd /usr/src/linux-source-2.6.17
make modules
10) Reboot and enjoycp /usr/src/linux-source-2.6.17/drivers/media/common/ir_common.ko /lib/modules/2.6.17-10-generic/kernel/drivers/media/common
At this point, this HOWTO finishes
*) I'll make one of these days a HOWTO to configure lirc keys to do many things. When I've got time, I promise
Mine is configured to manage:
amarok, totem, mplayer, vlc player, xdtv, shutdown computer, change between desktops (emerald & compiz), volume control, put on and off the screen, (...)
EDIT: Added my ir-keymaps.c file ("hacked" one)
EDIT2: Changed ir-keymaps.c file. The earlier was the normal one, not my hacked file. Sorry for the error...
Bookmarks