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...
It should tell you something like 2.6.12 so just take that num.num.num and replace it with the one I used...uname -r
OK got it? (hope so)...
Download the source code for the lirc tool... http://www.lirc.org/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
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.
A new directory will be created with a pile of files in it:tar -xvf lirc-0.8.0.tar.bz2
Change to that directory and type:
ALL righty... now select the first option then select the home-brew receiver.sudo ./setup.sh
All good? Lets get compiling and installing....
If everything went good, no errors that is, lets start-up that lirc receiver!make
sudo make install
<--/dev/ttyS0 is com port 1 so if you need com 2 use ttyS1...-->
You should get a /dev/lirc0. That is your lirc device!setserial /dev/ttyS0 uart none
sudo update-modules
sudo depmod -ae
sudo modprobe lirc_serial
sudo modprobe lirc_dev
Now lets poke the animal to see if it moves:
You should get something like this...
Point your remote control or other IR device to the receiver and press some buttons.sudo mode2
"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...
Type the following in the editor and save and close with the file name:nano lircd
'homebrew'
Close and save the file with 'ctrl-x'#! /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
A few more things...
Once that is done... everything hardware wise should be working just fine. You can test it by rebooting... and typing:chmod +x homebrew
sudo mv homebrew /etc/init.d/
sudo ln -s /etc/init.d/homebrew /etc/rcS.d/S99homebrew
and pressing buttons again. (Don't forget to hug your wife.)mode2
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:
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.sudo irrecord remote_name
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:
Lets see if you can make your beast take your language!sudo cp remote_name13 /etc/lircd.conf
sudo killall lircd
sudo lircd
now press some remote keys...irw
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...
I set the fallowing in my lircrc file...irxevent
That makes it so that when I have my presentation running I can go forward and back in my presentation.begin
prog = irxevent
button = BLUE
config = Key Right CurrentWindow
end
begin
prog = irxevent
button = RED
config = Key Left CurrentWindow
end
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.
Bookmarks