Page 1 of 26 12311 ... LastLast
Results 1 to 10 of 254

Thread: HOWTO: Lirc in Edgy

  1. #1
    Join Date
    Aug 2006
    Location
    Ireland
    Beans
    203
    Distro
    Ubuntu 12.04 Precise Pangolin

    Arrow HOWTO: Lirc in Edgy

    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)

    sudo -s
    cd /usr/src
    wget http://lirc.sourceforge.net/software....1pre2.tar.bz2
    tar xvfj lirc-0.8.1pre2.tar.bz2
    2) Install linux sources and other utils

    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
    3) Install lirc from repos (to make some config issues in your system, we wont use edgy binaries)

    aptitude install lirc lirc-x
    4) Lirc setup

    cd /usr/src/lirc-0.8.1pre2/drivers
    ln -s /usr/src/linux/drivers drivers
    cd ..
    ./setup
    Choose option 1. Driver configuration

    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)


    make
    make install
    6) Load module and test lirc

    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.

    modprobe lirc_gpio
    lircd
    irw
    At this point, press your remote control keys to test if it works.

    EDIT: Acording to a user (elchupakabra), if your module is "lirc_serial", prior to modprobe line you'll have to do this:

    aptitude install setserial
    setserial /dev/ttyS0 uart none
    7) Autoload lirc at boot-time

    killall lircd
    echo "alias char-major-61-* lirc_gpio" | sudo tee /etc/modprobe.d/lirc
    This 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.

    gedit /etc/rc.local
    In that file, add these 2 lines before "exit 0" line:
    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

    gedit /usr/src/linux-source-2.6.17/drivers/media/common/ir-keymaps.c
    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.

    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:

    /* Matt Jesson <dvb@jesson.eclipse.co.uk */
    IR_KEYTAB_TYPE ir_codes_avermedia_dvbt[IR_KEYTAB_SIZE] = {
    [ 0x2a ] = KEY_COFFEE,
    };
    When you finish, save changes. Then, compile modules of your kernel

    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
    Ok, now you've got your own ir_common module build. Copy it to /lib/modules...

    cp /usr/src/linux-source-2.6.17/drivers/media/common/ir_common.ko /lib/modules/2.6.17-10-generic/kernel/drivers/media/common
    10) Reboot and enjoy


    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...
    Attached Files Attached Files
    Last edited by hexion; January 28th, 2007 at 11:18 PM.

  2. #2
    Join Date
    Oct 2006
    Beans
    Hidden!

    Re: HOWTO: Lirc in Edgy

    Hello, I have error on step 6
    I'we tried to reboot but i still have this error
    root@zz-desktop:~# modprobe lirc_serial
    FATAL: Error inserting lirc_serial (/lib/modules/2.6.17-10-generic/misc/lirc_serial.ko): Device or resource busy

    update:
    is solved this problem:
    checking serial ports i'we found something:
    dmesg | grep tty
    [17179570.572000] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
    [17179570.576000] 00:0a: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
    [17179709.196000] lirc_serial: use 'setserial /dev/ttySX uart none'
    [17179858.384000] lirc_serial: use 'setserial /dev/ttySX uart none'
    and then :
    apt-get install setserial
    setserial /dev/ttyS0 uart none
    Last edited by elchupakabra; October 30th, 2006 at 12:36 AM.

  3. #3
    Join Date
    Oct 2005
    Location
    Austin, TX
    Beans
    2,983
    Distro
    Ubuntu Development Release

    Re: HOWTO: Lirc in Edgy

    I've actually put together a howto already on the wiki that doesn't install anything from source. It includes a section to cover issues with I2C and GPIO ( I assembed a debian package already for lirc that has 2.6.17 support for these two modules ). It's a lot more manageable since it uses debian init scripts and module-assistant for module building rather then spewing binaries across the system that aren't easily uninstallable unless you wrote down every single one installed.

    https://help.ubuntu.com/community/Install_Lirc_Edgy

  4. #4
    Join Date
    Aug 2006
    Location
    Ireland
    Beans
    203
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: HOWTO: Lirc in Edgy

    Quote Originally Posted by superm1 View Post
    I've actually put together a howto already on the wiki that doesn't install anything from source. It includes a section to cover issues with I2C and GPIO ( I assembed a debian package already for lirc that has 2.6.17 support for these two modules ). It's a lot more manageable since it uses debian init scripts and module-assistant for module building rather then spewing binaries across the system that aren't easily uninstallable unless you wrote down every single one installed.

    https://help.ubuntu.com/community/Install_Lirc_Edgy
    You don't mention the ir_common problem since 2.6.17 kernel. That's precisely my contribution in this howto.
    I knew about lirc-modules-source packet, but I still preffer building from source. For me nothing except this worked.

  5. #5
    Join Date
    Oct 2005
    Location
    Austin, TX
    Beans
    2,983
    Distro
    Ubuntu Development Release

    Re: HOWTO: Lirc in Edgy

    Sorry,
    I haven't come across the ir_common problem myself as I don't use i2c. Could you better explain what functionality ir_common is supposed to include and why it doesn't work correctly with lirc?

    Debian upstream hasn't had any bugs issued about this, and has i2c support fixed since about 20 days ago:
    http://packages.debian.org/changelog....0-9/changelog

  6. #6
    Join Date
    Aug 2006
    Location
    Ireland
    Beans
    203
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: HOWTO: Lirc in Edgy

    Quote Originally Posted by superm1 View Post
    Sorry,
    I haven't come across the ir_common problem myself as I don't use i2c. Could you better explain what functionality ir_common is supposed to include and why it doesn't work correctly with lirc?

    Debian upstream hasn't had any bugs issued about this, and has i2c support fixed since about 20 days ago:
    http://packages.debian.org/changelog....0-9/changelog
    Please, read the bugs I filed in ubuntu and upstream (kernel.org)

    https://launchpad.net/products/linux/+bug/67399
    http://bugzilla.kernel.org/show_bug.cgi?id=7395


    Mainly, bttv now supports a IR module in certain TV cards. But cannot be disabled (compiled in kernel and BTTV depends on it) nor configured.

  7. #7
    Join Date
    Oct 2005
    Location
    Austin, TX
    Beans
    2,983
    Distro
    Ubuntu Development Release

    Re: HOWTO: Lirc in Edgy

    Hexion, This make a lot more sense now. Thanks.

  8. #8
    Join Date
    Feb 2005
    Beans
    215

    Re: HOWTO: Lirc in Edgy

    Mario,

    I am confused as I want to install lirc for a /dev/eventx type remote that doesn't need a module.

    How do I configure lirc to start with using the .debs, as you would if you installed from source?

    Thanks,
    "If I have seen further it is by standing on the shoulders of Giants."

  9. #9
    Join Date
    Oct 2005
    Location
    Austin, TX
    Beans
    2,983
    Distro
    Ubuntu Development Release

    Re: HOWTO: Lirc in Edgy

    Lerrup,

    You will need to modify /etc/lirc/hardware.conf.

    You will find a line, LIRCD_ARGS=""

    Modify this line to include
    Code:
    LIRCD_ARGS="-d /dev/eventX"

  10. #10
    Join Date
    Aug 2005
    Location
    NorCal
    Beans
    144
    Distro
    Ubuntu Jaunty Jackalope (testing)

    Re: HOWTO: Lirc in Edgy

    I followed your wiki..

    When I go to start lirc, here is the output

    bdmorrison@ubuntu:/etc/lirc$ sudo /etc/init.d/lirc start
    ##################################################
    ## LIRC IS NOT CONFIGURED ##
    ## ##
    ## read /usr/share/doc/lirc/html/configure.html ##
    ##################################################
    Starting lirc daemon:.
    I have /etc/lirc/lircd.conf and /etc/lirc/lircd.conf.hauppauge

    I have stopped/started/restarted w/o success.

    I think the remote is one of the last things I need to deal with!!

Page 1 of 26 12311 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •