View Poll Results: Did this help you set up lirc and your device?

Voters
38. You may not vote on this poll
  • Yes and thanks...

    25 65.79%
  • Could be more usefull...

    4 10.53%
  • Not really...

    6 15.79%
  • Stinks like high heaven!

    3 7.89%
Page 1 of 8 123 ... LastLast
Results 1 to 10 of 77

Thread: HOWTO setup lirc with homebrew reciever and program your keybindings...

  1. #1
    Join Date
    Nov 2005
    Location
    Finland, Oulu
    Beans
    1,501
    Distro
    Ubuntu 9.10 Karmic Koala

    Smile HOWTO setup lirc with homebrew reciever and program your keybindings...

    These instructions are no longer valid for the latest ubuntu. Might I recommend closing this and going here...
    http://ubuntuforums.org/showthread.p...79#post8741679
    It is based on these instructions.
    BR...
    I would like to say that it looks like a fix for this every annoying problem has been released. https://bugs.launchpad.net/ubuntu/+s...irc/+bug/65174 As soon as I get the guts to try gutsy, I hope to try it out and see how well it works with the serial setups. Post if you find any good news.
    HOW-TO: Home-brew receiver setup, common uses, and ideas for IR receiver
    I would like to say thank you for everyone who helped me do this. I learned a great deal from those that have helped me. In so much that I feel others should know what I know. So I am producing a how-to to help others who felt like me.
    Cheer y'all.
    I started be going to the lirc website and looking for recommended receivers. I always wanted to make my own receiver but never had the time so I ended up purchasing one from here for very cheap.. http://www.zapway.de/index1.htm. The device came very quickly. Got it from Germany and I live in Finland. I was impressed with the device. But how to start.

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    1.Downloads and Installs...
    NOTE: With the next command that I used the 2.6.12 kernel, which at the time was the newest I could use with Ubuntu defaults, so if you wish to use a different one enter it. If you want to use one the matches you computer... look at...

    uname -r
    It should tell you something like 2.6.12 so just take that num.num.num and replace it with the one I used...
    OK got it? (hope so)...

    sudo apt-get remove lirc
    sudo apt-get install linux-source-2.6.12 build-essential
    cd /usr/src/
    sudo tar xvf linux-source-2.6.10.tar.bz2
    sudo ln -s /usr/src/linux-source-2.6.12 /usr/src/linux
    cd /usr/src/linux
    sudo make oldconfig
    sudo make menuconfig
    sudo make include/linux/version.h
    sudo make modules
    sudo touch /usr/src/linux/Rules.make
    Download the source code for the lirc tool... http://www.lirc.org/
    Go to where you downloaded the file and type: (remember the name of the file... mine with lirc-0.8.0.tar.bz2)
    It would be important to also note that this file needs to be in the /usr/src/linux/directory when it is extracted. So move it there when you do finaly get it downloaded... then run.

    tar -xvf lirc-0.8.0.tar.bz2
    A new directory will be created with a pile of files in it:
    Change to that directory and type:

    sudo ./setup.sh
    ALL righty... now select the first option then select the home-brew receiver.
    All good? Lets get compiling and installing....



    make
    sudo make install
    If everything went good, no errors that is, lets start-up that lirc receiver!
    <--/dev/ttyS0 is com port 1 so if you need com 2 use ttyS1...-->

    setserial /dev/ttyS0 uart none
    sudo update-modules
    sudo depmod -ae
    sudo modprobe lirc_serial
    sudo modprobe lirc_dev
    You should get a /dev/lirc0. That is your lirc device!
    Now lets poke the animal to see if it moves:
    You should get something like this...

    sudo mode2
    Point your remote control or other IR device to the receiver and press some buttons.
    "OH MY GOSH!!"
    (At least that's what I said as I hugged my confused wife hold the remote I told her to press buttons from.)


    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


    2. Setup and use...

    The next step is to make these changes permanent so that when you reboot, your device will be up and running every time you boot.
    We need to create a file so let's use an editor...

    nano lircd
    Type the following in the editor and save and close with the file name:
    'homebrew'

    #! /bin/sh
    # /etc/init.d/homebrew: Loading the Homebrew IR receiver (IT'S ALIVE!).
    setserial /dev/ttyS0 uart none
    modprobe lirc_serial
    modprobe lirc_dev
    sleep 1
    ln /dev/lirc0 /dev/lirc
    lircd
    Close and save the file with 'ctrl-x'
    A few more things...

    chmod +x homebrew
    sudo mv homebrew /etc/init.d/
    sudo ln -s /etc/init.d/homebrew /etc/rcS.d/S99homebrew
    Once that is done... everything hardware wise should be working just fine. You can test it by rebooting... and typing:

    mode2
    and pressing buttons again. (Don't forget to hug your wife.)
    If it works, let's move on to setting up your remote control.
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

    3. Setup your transmitter with your reciever...

    First find out your remote control. I hand a 'KONIG IR9836', how did I know? It is on the remote itself.
    Then I checked out the list of preconfigured remotes found here... http://lirc.sourceforge.net/remotes/
    My remote was not on the support list, so I had to make my own which wasn't too hard.
    If your remote is on the support list... skip this next section...

    A. Use irrecord to program a driver for your remote...
    As scary as it sounded to me, I found irrecord a very simple program to use.
    Knowing that your system is ready, type:

    sudo irrecord remote_name
    this will start the irrecord program and record your buttons to the file remote_name. This file is what will be used as your lircd.conf file located in the /etc/ directory.
    Follow the intructions carefully. If you make a mistake just start up the program again... and use a different name like remote_name2 and 3 and so forth. It took a while for me... I kept messing up what name to what button... so I had remote_name 13 when I was done.

    B. Time to insert the lircd.conf file...
    Next, once you have your config file for your remote the way that you want it:

    sudo cp remote_name13 /etc/lircd.conf
    sudo killall lircd
    sudo lircd
    Lets see if you can make your beast take your language!

    irw
    now press some remote keys...
    you should get something like this...

    It will have the names of the buttons that you have entered into irrecord diplayed everytime you press a button.
    If so your over all the hard parts.
    We can now set your remote buttons to do different things with different programs.
    Attached to this post is a file called 'lircrc.txt' this file will have a basic setup of what I used for my remote with my lirc program.
    Go ahead a get that file... open it with nano and setup a nother terminal window with irw running.
    Like this:

    now... when you are typing in your settings just go to the command you want to change...
    prog = totem <--- this is the program that uses lirc that lircd should look for...
    button = GREEN <--- This is the button signal that is given when you press the button you want... you will see it on the left with the irw command running. in my case 'GREEN'
    repeat = 1 <--- This is if you want the computer to sence the signal over and over, or just once and ignore the repeated signals from the remote. This is good to have on with things like volume and channnel change.
    config = play <--- this is the command sent to the program that lirc is set to look at. In this case, play is sent to the program totem to well, play the information in totem.
    The begin and end is just to devide the file up into sections of commands... they are needed and I wouldn't change them.
    OK so you have made your changes, now press ctrl-x and save the file as .lircrc in your home directory.
    That should be it... try your program, like totem, and start a file and press pause or adjust the volume. IT should work, if you want, I will do my best to help you out.

    Additions notes:
    Keyboard events:
    I wanted to use my reciever while using OOImpress and found this little guy...
    irxevent
    I set the fallowing in my lircrc file...
    begin
    prog = irxevent
    button = BLUE
    config = Key Right CurrentWindow
    end

    begin
    prog = irxevent
    button = RED
    config = Key Left CurrentWindow
    end
    That makes it so that when I have my presentation running I can go forward and back in my presentation.

    If you have more ideas or things you have done... feel free to email me and I will place it here and give you credit.
    NOTE: you can record signals from many different things... forinstance, now I can shutdown my computer at night with my cellphone. Cool huh? if you have any ideas.. please submit and I can add it to this howto.
    Attached Files Attached Files
    Last edited by encompass; January 29th, 2010 at 07:28 AM. Reason: Typos and a few improvements... Amazing what you find wrong when you have to follow your own instructions!
    Like my avatar? Help us make more and your own! http://launchpad.net/memaker
    Book of Mormon-MP3 or BOOK
    "Microsoft is open-source friendly in the same way that a butcher is friendly to a cow." -- This Guy

  2. #2
    Join Date
    Sep 2005
    Beans
    119

    Re: HOWTO setup lirc with homebrew reciever and program your keybindings...

    You said
    sudo apt-get remove lirc
    sudo apt-get install linux-source-2.6.12 build-essential
    sudo tar xvf linux-source-2.6.10.tar.bz2
    sudo ln -s /usr/src/linux-source-2.6.12 /usr/src/linux
    cd /usr/linux
    sudo make oldconfig
    sudo make menuconfig
    sudo make include/linux/version.h
    sudo make modules
    sudo touch /usr/src/linux/Rules.make
    but "sudo tar xvf linux-source-2.6.10.tar.bz2" doesn't work because I never downloaded the file

    how do i correct this?

  3. #3
    Join Date
    Nov 2005
    Location
    Finland, Oulu
    Beans
    1,501
    Distro
    Ubuntu 9.10 Karmic Koala

    Smile Re: HOWTO setup lirc with homebrew reciever and program your keybindings...

    Quote Originally Posted by Greeface
    You said but "sudo tar xvf linux-source-2.6.10.tar.bz2" doesn't work because I never downloaded the file

    how do i correct this?
    You quoted me... my second line...
    sudo apt-get install linux-source-2.6.12 build-essential
    contains the download. it is located in
    /usr/src/
    NOTE: I see your problem... if you fallow everything you may not have been in the /usr/src/ dir... added the change thanks.
    Last edited by encompass; April 23rd, 2006 at 06:23 AM.
    Like my avatar? Help us make more and your own! http://launchpad.net/memaker
    Book of Mormon-MP3 or BOOK
    "Microsoft is open-source friendly in the same way that a butcher is friendly to a cow." -- This Guy

  4. #4
    Join Date
    Sep 2005
    Beans
    108

    Question Re: HOWTO setup lirc with homebrew reciever and program your keybindings...

    Hi!

    I'm trying to set up my remote. It works through a tv tuner (winfast2000xp).

    I'd like to follow your suggestions, but since I'm fairly fresh to Linux, I would like to know what I'm doing...

    I assume I can copy these steps of yours:
    sudo apt-get remove lirc
    sudo apt-get install linux-source-2.6.12 build-essential
    sudo tar xvf linux-source-2.6.10.tar.bz2
    sudo ln -s /usr/src/linux-source-2.6.12 /usr/src/linux
    cd /usr/linux
    sudo make oldconfig
    sudo make menuconfig
    sudo make include/linux/version.h
    sudo make modules
    sudo touch /usr/src/linux/Rules.make
    So after this step, we have a Linux kernel ready to be compiled. Where exactly did you add the lirc? Where did you learn it? I'm lacking some basic knowledge...

    Next step depends on using your homebrew receiver:

    If everything went good, no errors that is, lets start-up that lirc receiver!
    <--/dev/ttyS0 is com port 1 so if you need com 2 use ttyS1...-->

    Quote:
    setserial /dev/ttyS0 uart none
    sudo update-modules
    sudo depmod -ae
    sudo modprobe lirc_serial
    sudo modprobe lirc_dev
    Mine works a bit differently. It's connected directly to the tuner, through a jack socket. According to my dmesg my ir receiver is detected as bttv0's subdevice: remote0.
    /sys/bus/bttv-sub/devices/remote0
    /sys/devices/pci0000:00/0000:00:09.0/remote0
    Can I use it to connect to LIRC? There is a configuration file for my receiver, so i guess it's supported.

    And here's my dmesg

    [4294727.018000] Linux video capture interface: v1.00
    [4294727.130000] bttv: driver version 0.9.15 loaded
    [4294727.130000] bttv: using 8 buffers with 2080k (520 pages) each for capture
    [4294727.141000] bttv: Bt8xx card found (0).
    [4294727.143000] ACPI: PCI Interrupt Link [LNKB] enabled at IRQ 5
    [4294727.143000] PCI: setting IRQ 5 as level-triggered
    [4294727.143000] ACPI: PCI Interrupt 0000:00:09.0[A] -> Link [LNKB] -> GSI 5 (level, low) -> IRQ 5
    [4294727.143000] bttv0: Bt878 (rev 17) at 0000:00:09.0, irq: 5, latency: 32, mmio: 0xde000000
    [4294727.143000] bttv0: detected: Leadtek TV 2000 XP [card=34], PCI subsystem ID is 107d:6609
    [4294727.143000] bttv0: using: Leadtek WinFast 2000/ WinFast 2000 XP [card=34,insmod option]
    [4294727.143000] bttv0: gpio: en=00000000, out=00000000 in=003ff502 [init]
    [4294727.182000] bttv0: using tuner=38
    [4294727.182000] bttv0: i2c: checking for MSP34xx @ 0x80... not found
    [4294727.184000] bttv0: i2c: checking for TDA9875 @ 0xb0... not found
    [4294727.186000] bttv0: i2c: checking for TDA7432 @ 0x8a... not found
    [4294727.189000] bttv0: i2c: checking for TDA9887 @ 0x86... not found
    [4294727.293000] tuner 1-0061: chip found @ 0xc2 (bt878 #0 [sw])
    [4294727.293000] tuner 1-0061: type set to 38 (Philips PAL/SECAM multi (FM1216ME MK3))
    [4294727.343000] bttv0: registered device video0
    [4294727.348000] bttv0: registered device vbi0
    [4294727.353000] bttv0: registered device radio0
    [4294727.353000] bttv0: PLL: 28636363 => 35468950 .. ok
    [4294727.561000] bttv0: add subdevice "remote0"
    [4294727.957000] bt878: AUDIO driver version 0.0.0 loaded
    [4294727.968000] bt878: Bt878 AUDIO function found (0).
    I've been struggling with this tuner of mine for 3 months, and it turned out it's recognised wrong. I've corrected it and posted the solution in the forums, but I need to add a way to make the remote controll working as well.

    Thanx for Your help!

  5. #5
    Join Date
    Nov 2005
    Location
    Finland, Oulu
    Beans
    1,501
    Distro
    Ubuntu 9.10 Karmic Koala

    Smile Re: HOWTO setup lirc with homebrew reciever and program your keybindings...

    If , according to lirc's website, your reciever work with linux then we are doing good so far. I can't describe the full reason why we need to recompile the kernel, but I think it is to grabe certain parts that are needed when compiling our lirc download that we do later.
    When you get to the choice of what kind of reciever you have... don't choose the homebrew but what ever reciever your suppose to have. Not sure what. But it will probably be on that list somewhere. from there... you do't have to free the com port. But you should run mode2... if you get a signal that great you can make it work. Otherwise... well, I can try to help, but havn't the fogiest clue how your reciever works.
    Like my avatar? Help us make more and your own! http://launchpad.net/memaker
    Book of Mormon-MP3 or BOOK
    "Microsoft is open-source friendly in the same way that a butcher is friendly to a cow." -- This Guy

  6. #6
    Join Date
    Nov 2005
    Location
    Jamaica
    Beans
    35

    Re: HOWTO setup lirc with homebrew reciever and program your keybindings...

    Wondering if any can help me here... when i do
    Code:
    mode2
    i see gibberish when i press keys on my remote, btw which is a One-for-All URC-8910. When i use
    Code:
    irw
    Nada .... I know that is sorta good . If i remember correctly i jsut need to find lircd.conf file for my 8910.
    Any help would be greatly appreciated.

  7. #7
    Join Date
    Nov 2005
    Location
    Finland, Oulu
    Beans
    1,501
    Distro
    Ubuntu 9.10 Karmic Koala

    Wink Re: HOWTO setup lirc with homebrew reciever and program your keybindings...

    Quote Originally Posted by [Yatta]
    Wondering if any can help me here... when i do
    Code:
    mode2
    i see gibberish when i press keys on my remote, btw which is a One-for-All URC-8910. When i use
    Code:
    irw
    Nada .... I know that is sorta good . If i remember correctly i jsut need to find lircd.conf file for my 8910.
    Any help would be greatly appreciated.
    Did you happen to do step three in my instructions? It gives you the site to see if your remote is already setup. It also sounds like you have a programmable remote... Those are great because you get to set the remote you want to use.
    Probalby the easiest thing to do is to pick a remote setting in your remote control that uses all buttons. Then setup the remote manually so that you can assign each button to a different event. Need more help keep dropping lines here on the forum.
    Like my avatar? Help us make more and your own! http://launchpad.net/memaker
    Book of Mormon-MP3 or BOOK
    "Microsoft is open-source friendly in the same way that a butcher is friendly to a cow." -- This Guy

  8. #8
    Join Date
    Dec 2004
    Location
    Buffalo, NY
    Beans
    29
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: HOWTO setup lirc with homebrew reciever and program your keybindings...

    Greate how-to, but for some reason this is not working for me.

    I'm working off of a fresh install of Breezy, kernel version 2.6.12-9-686, and all is well until I get to the 'make' step in compiling lirc. At this point, I get a string of errors:
    Code:
    make[5]: *** [/usr/src/lirc-0.7.2/drivers/lirc_gpio/lirc_gpio.o] Error 1
    make[4]: *** [_module_/usr/src/lirc-0.7.2/drivers/lirc_gpio] Error 2
    make[4]: Leaving directory `/usr/src/linux-headers-2.6.12-9-686'
    make[3]: *** [lirc_gpio.o] Error 2
    make[3]: Leaving directory `/usr/src/lirc-0.7.2/drivers/lirc_gpio'
    make[2]: *** [all-recursive] Error 1
    make[2]: Leaving directory `/usr/src/lirc-0.7.2/drivers'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/usr/src/lirc-0.7.2'
    make: *** [all] Error 2
    This happens with lirc versions 0.7.2 and 0.8.0.

    I'm hoping I made a stupid mistake that will stand out. I have successfully done this in the past, on this exact machine, with the same hardware and software configuration, though the kernel version may have been different.

  9. #9
    Join Date
    Nov 2005
    Location
    Jamaica
    Beans
    35

    Re: HOWTO setup lirc with homebrew reciever and program your keybindings...

    encompass Sorry i never noticed there was a reply. I have my URC-8910 working now. I found the lircd files needed

    NOW my problem is that every time i boot up i lose my lirc When i check the dev dir i get:
    $ ls -l /dev/li*
    crw-rw---- 1 root root 61, 0 2006-05-27 05:17 /dev/lirc0

    Where previuoulsy i had
    /dev/lircd= and /dev/lircm|

    On boot i also get:
    Code:
    [4294689.432000] lirc_serial: port 03f8 already in use
    [4294689.432000] lirc_serial: use 'setserial /dev/ttySX uart none'
    [4294689.432000] lirc_serial: or compile the serial port driver as module and
    [4294689.432000] lirc_serial: make sure this module is loaded first
    Right now i'm trying to script to see if this will still allow lircd to work

    ===EDIT===

    I tried the script.. nothing.. quick question dont i have to be root to setserial? .. i'm redoing the script but doing it as sudo -s -H not sure if that'll make a difference but nothign tried nothing gained

    === Edit #2===

    NOW it works .. no applause please, no applause..
    I typed in irw at the command prompt pressed keys on my remote and i recievved a output. BRAP!!! BRAP!!! Thanks for the script.
    Granted i know there should be an easier way.. but i'll save that for when i get more verse in linux.
    When i do ls -l /dev/li* :
    Code:
    $ ls -l /dev/li*
    crw-rw----  2 root root 61, 0 2006-05-27 06:34 /dev/lirc
    crw-rw----  2 root root 61, 0 2006-05-27 06:34 /dev/lirc0
    srw-rw-rw-  1 root root     0 2006-05-27 06:34 /dev/lircd
    So i guess it generates the files upon load???
    Last edited by [Yatta]; May 27th, 2006 at 12:42 PM.

  10. #10
    Join Date
    Nov 2005
    Location
    Jamaica
    Beans
    35

    Re: HOWTO setup lirc with homebrew reciever and program your keybindings...

    One thign i noticed.... the homebrew script doens't work all the time. Soemtime when i reboot...
    irw works no problem other times
    Code:
    ~$ irw
    connect: Connection refused
    So i have to run
    /etc/init.d/homebrew
    Then i'm back working again

    Starting to get to me now... i want to know how to properly
    setserial /dev/ttyS0 uart none
    from the beginning so lircd_serial can take it over.. instead of it hearing that t is in use

Page 1 of 8 123 ... 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
  •