PCLinuxOS New User Guide : LircRemote

HomePage :: PCLinuxOS Forum | Index | Categories | Changes | Login/Register
Most recent edit on 2008-07-15 06:08:57 by GetlaZelpa [allimonracg]

Additions:
oracelacelcn



Edited on 2007-05-24 20:48:17 by SySy [moved]

Additions:
moved to http://docs.mypclinuxos.com/LircRemote

Deletions:
Moving to the new wiki => http://docs.mypclinuxos.com/LircRemote

Setting up your Remote Control

Back to Making Your Hardware Work
The following is a guide to help you install a Remote Control in PCLinuxOS using the LIRC (Linux Infrared Remote Control). I personally use the ATI Remote Wonder I but this guide should work for all LIRC supported remote controls so let's get started.
PCLinuxOS currently has an older version of LIRC so I recommend that you download the latest version of LIRC since remotes have been added since the LIRC version that is used by PCLinuxOS. You'll need to start Synaptic and do a search for lirc. From there, you'll need to remove lirc, liblirc0, and liblirc0-devel. In order to compile the latest version of LIRC, you'll need the source code for the linux kernel you're currently running. If you don't have the kernel source, LIRC will give you errors when trying to compile. To determine the current kernel you are running, you'll need to open up a terminal and type the following command which will return your kernel.
$uname -r
2.6.13-oci2.mdk-i586-up-1GB

In my case, I'm running oci2 but yours may return a different value. From there, you'll have to go back to Synaptic and do a search for the kernel number. In my case, I'll do a search for oci2. This search will return a few choices so you'll need to look for the one that gives a description that says "the source code for the Linux kernel". Once you find the sources, you'll need to install these.

Getting and Installing LIRC

Next, you'll want to go to http://www.lirc.org and download the latest version of LIRC. From there, you'll want to go back to your terminal program and type the following.
$su
#tar -xzf lirc-0.8.0.tar.gz
#cd lirc-0.8.0
#./configure

Once you run ./configure, you'll be given a screen inside the terminal that will give you some menu options. You'll need to select option one. From there, you'll need to select your remote. Once you've completed this step, you'll need to select "OK" to take you back to the main menu. From there, you'll need to select option 3 to continue the configure process. Once this is done, you'll need to enter the following commands as su.
#make
#make install

This will complete the installation of LIRC.

Checking LIRC

To make sure everything has installed, you can type the command below which will return the location of lirc which will more than likely be /usr/local/sbin/lircd.
#which lircd
/usr/local/sbin/lircd

You can also check which driver was installed by typing
#lsmod | grep lirc

which'll return the drivers being used
lirc_atiusb            16960  0
lirc_dev               12388  1 lirc_atiusb
usbcore               103100  9 ati_remote,lirc_atiusb,usbmouse,usbhid,usblp,uhci_hcd,usb_storage,ehci_hcd

In my case it installed, the lirc_atiusb and ati_remote
You'll also want to check one more thing to make sure the remote is being detected.
#dmesg | grep lirc

which'll return
lirc_dev: IR Remote Control driver registered, at major 61
lirc_atiusb: USB remote driver for LIRC v0.5
lirc_atiusb: Paul Miller <pmiller9@users.sourceforge.net>
lirc_dev: lirc_register_plugin: sample_rate: 0
lirc_atiusb[2]: X10 Wireless Technology Inc USB Receiver on usb2:2
usbcore: registered new driver lirc_atiusb

If you receive any errors this could mean that you may not have installed the correct remote.
Now you'll have to check to see which devices were installed so type
#ls -l /dev/lirc*

which'll return
crw-rw----  1 root root 61, 0 Mar  5 19:35 /dev/lirc0
srw-rw-rw-  1 root root     0 Mar  5 19:37 /dev/lircd=

If you do not have an /dev/lirc0 you'll need this so you'll have to make a symbolic link to lircd by typing the following command.
#ln -s /dev/lirc /dev/lirc0

If nothing displays with the ls -l /dev/lirc* command or dmesg doesn't indicate LIRC loaded, try rebooting.
Next you'll want to change the permission of the device files.
#chmod 666 /dev/lirc0
#chmod 666 /dev/lircd

Configuring LIRC

Now, you'll have to make sure you have a lircd.conf file. When LIRC installs, a lircd.conf file is automatically generated in your etc folder. You'll need to go to /etc/lircd.conf and make sure you have just one remote in the file since LIRC can have multiple remote configurations in one file. Once this is done, it's time to test your remote
Just to start out type the following command.
#lircd -d /dev/lirc0 /etc/lircd.conf --nodaemon

The nodaemon option keeps lircd running in the terminal window so you can check to see if you receive any errors if not you should see
lircd: lircd(atiusb) ready

If you have a different remote the atiusb will be something different. If you receive any errors, something has gone wrong in the setup of LIRC or you could have a problem with your lircd.conf file. If everything looks good, you can CTRL-C out of the lircd. Next you'll want to run lircd in the background.
#lircd -d /dev/lirc0 /etc/lircd.conf

Next you'll want to make sure lirc is receiving commands from your remote so you'll want to type
#irw

then you'll want to start pressing buttons on your remote so you should see
0000001447720000 00 mouse-up SAPPHIRE_ATIUSB_5000023600
0000001447720000 01 mouse-up SAPPHIRE_ATIUSB_5000023600

From there, you'll want to CTRL-C out of irw. Congratulations, your remote is working.
If you're not receiving any signals, you could have a problem with your lircd.conf file.
Next you'll want to try, the following command
#mode2 -d /dev/lirc0

which will display the codes sent from the remote. In my case, I get the following codes.
code: 0x1447720000
code: 0x1447720000

You'll then want to CTRL-C out of mode2
You'll want to make sure the code you're receiving for the buttons pushed in mode2 match the codes you've setup in your lircd.conf file. If the numbers are off, you probably have a bad lircd.conf file. I recommend doing a search on the internet to find a lircd.conf file to match your remote to the codes you generated with the mode2 command.

Setting up MythTV

Once you've got your remote working you'll need to setup the keys for whatever application you're trying to get the remote working with. In my case, I wanted my remote to work with MythTV so I needed to generate a lircrc file to map the MythTV keys with the remote and you'll need to place this file in your /home/username/.mythtv folder. The following is a snippet from lircrc
begin
#Jumppoint for Program Guide created in Mythweb
	prog = mythtv
	button = TV
	config = !
end
begin
#Jumppoint for DVD playback created in Mythweb
	prog = mythtv
	button = DVD
	config = @
end
begin
	prog = mythtv
#Jumppoint for MythWeater created in Mythweb
	button = WEB
	config = #
end

Setting up LIRC at boot

Lastly, since you removed the LIRC version that is currently used by PCLinuxOS, you won't be able to have LIRCD automatically start through the Control Center so this'll mean that you'll have to add the following command to your /etc/rc.local to have lircd start automatically at boot. If you don't add this command, you'll have to start lircd manually each time.
/usr/local/sbin/lircd -d /dev/lirc0 /etc/lircd.conf


CategoryHardware




Edited on 2007-05-22 21:24:44 by JasonBrowne [Moving to new Wiki]

Additions:
Moving to the new wiki => http://docs.mypclinuxos.com/LircRemote



Edited on 2006-03-18 02:21:32 by LexNL

Additions:
Back to Making Your Hardware Work

Deletions:
Back to Adding or Upgrading your Hardware



Edited on 2006-03-07 02:30:36 by LexNL [Added some headers]

Additions:

Getting and Installing LIRC

Checking LIRC

Configuring LIRC

Setting up MythTV

Setting up LIRC at boot





Edited on 2006-03-07 02:27:24 by LexNL [minor formatting additions]

Additions:
The following is a guide to help you install a Remote Control in PCLinuxOS using the LIRC (Linux Infrared Remote Control). I personally use the ATI Remote Wonder I but this guide should work for all LIRC supported remote controls so let's get started. PCLinuxOS currently has an older version of LIRC so I recommend that you download the latest version of LIRC since remotes have been added since the LIRC version that is used by PCLinuxOS. You'll need to start Synaptic and do a search for lirc. From there, you'll need to remove lirc, liblirc0, and liblirc0-devel. In order to compile the latest version of LIRC, you'll need the source code for the linux kernel you're currently running. If you don't have the kernel source, LIRC will give you errors when trying to compile. To determine the current kernel you are running, you'll need to open up a terminal and type the following command which will return your kernel.



















Once you've got your remote working you'll need to setup the keys for whatever application you're trying to get the remote working with. In my case, I wanted my remote to work with MythTV so I needed to generate a lircrc file to map the MythTV keys with the remote and you'll need to place this file in your /home/username/.mythtv folder. The following is a snippet from lircrc

Lastly, since you removed the LIRC version that is currently used by PCLinuxOS, you won't be able to have LIRCD automatically start through the Control Center so this'll mean that you'll have to add the following command to your /etc/rc.local to have lircd start automatically at boot. If you don't add this command, you'll have to start lircd manually each time.


Deletions:
The following is a guide to help you install a Remote Control in PCLinuxOS using the LIRC (Linux Infrared Remote Control). I personally use the ATI Remote Wonder I but this guide should work for all LIRC supported remote controls so let's get started.
PCLinuxOS currently has an older version of LIRC so I recommend that you download the latest version of LIRC since remotes have been added since the LIRC version that is used by PCLinuxOS. You'll need to start Synaptic and do a search for lirc. From there, you'll need to remove lirc, liblirc0, and liblirc0-devel. In order to compile the latest version of LIRC, you'll need the source code for the linux kernel you're currently running. If you don't have the kernel source, LIRC will give you errors when trying to compile. To determine the current kernel you are running, you'll need to open up a terminal and type the following command which will return your kernel.
Once you've got your remote working you'll need to setup the keys for whatever application you're trying to get the remote working with. In my case, I wanted my remote to work with MythTV so I needed to generate a lircrc file to map the MythTV keys with the remote and you'll need to place this file in your /home/username/.mythtv folder. The following is a snippet from lircrc
Lastly, since you removed the LIRC version that is currently used by PCLinuxOS, you won't be able to have LIRCD automatically start through the Control Center so this'll mean that you'll have to add the following command to your /etc/rc.local to have lircd start automatically at boot. If you don't add this command, you'll have to start lircd manually each time.




Edited on 2006-03-05 23:52:07 by GizmoBay

Additions:
Lastly, since you removed the LIRC version that is currently used by PCLinuxOS, you won't be able to have LIRCD automatically start through the Control Center so this'll mean that you'll have to add the following command to your /etc/rc.local to have lircd start automatically at boot. If you don't add this command, you'll have to start lircd manually each time.
/usr/local/sbin/lircd -d /dev/lirc0 /etc/lircd.conf




Edited on 2006-03-05 23:44:07 by GizmoBay

Additions:
To make sure everything has installed, you can type the command below which will return the location of lirc which will more than likely be /usr/local/sbin/lircd.

Deletions:
To make sure everything has installed, you can type which will return the location of lirc which will more than likely be /usr/local/sbin/lircd.



Edited on 2006-03-05 23:42:05 by GizmoBay

Additions:
The following is a guide to help you install a Remote Control in PCLinuxOS using the LIRC (Linux Infrared Remote Control). I personally use the ATI Remote Wonder I but this guide should work for all LIRC supported remote controls so let's get started.
PCLinuxOS currently has an older version of LIRC so I recommend that you download the latest version of LIRC since remotes have been added since the LIRC version that is used by PCLinuxOS. You'll need to start Synaptic and do a search for lirc. From there, you'll need to remove lirc, liblirc0, and liblirc0-devel. In order to compile the latest version of LIRC, you'll need the source code for the linux kernel you're currently running. If you don't have the kernel source, LIRC will give you errors when trying to compile. To determine the current kernel you are running, you'll need to open up a terminal and type the following command which will return your kernel.
$uname -r
2.6.13-oci2.mdk-i586-up-1GB
In my case, I'm running oci2 but yours may return a different value. From there, you'll have to go back to Synaptic and do a search for the kernel number. In my case, I'll do a search for oci2. This search will return a few choices so you'll need to look for the one that gives a description that says "the source code for the Linux kernel". Once you find the sources, you'll need to install these.
Next, you'll want to go to http://www.lirc.org and download the latest version of LIRC. From there, you'll want to go back to your terminal program and type the following.
$su
#tar -xzf lirc-0.8.0.tar.gz
#cd lirc-0.8.0
#./configure
Once you run ./configure, you'll be given a screen inside the terminal that will give you some menu options. You'll need to select option one. From there, you'll need to select your remote. Once you've completed this step, you'll need to select "OK" to take you back to the main menu. From there, you'll need to select option 3 to continue the configure process. Once this is done, you'll need to enter the following commands as su.
#make
#make install
This will complete the installation of LIRC.
To make sure everything has installed, you can type which will return the location of lirc which will more than likely be /usr/local/sbin/lircd.
#which lircd
/usr/local/sbin/lircd
You can also check which driver was installed by typing
#lsmod | grep lirc
which'll return the drivers being used
lirc_atiusb 16960 0
lirc_dev 12388 1 lirc_atiusb
usbcore 103100 9 ati_remote,lirc_atiusb,usbmouse,usbhid,usblp,uhci_hcd,usb_storage,ehci_hcd
In my case it installed, the lirc_atiusb and ati_remote
You'll also want to check one more thing to make sure the remote is being detected.
#dmesg | grep lirc
which'll return
lirc_dev: IR Remote Control driver registered, at major 61
lirc_atiusb: USB remote driver for LIRC v0.5
lirc_atiusb: Paul Miller <pmiller9@users.sourceforge.net>
lirc_dev: lirc_register_plugin: sample_rate: 0
lirc_atiusb[2]: X10 Wireless Technology Inc USB Receiver on usb2:2
usbcore: registered new driver lirc_atiusb
If you receive any errors this could mean that you may not have installed the correct remote.
Now you'll have to check to see which devices were installed so type
#ls -l /dev/lirc*
which'll return
crw-rw
1 root root 61, 0 Mar 5 19:35 /dev/lirc0 srw-rw-rw- 1 root root 0 Mar 5 19:37 /dev/lircd=
If you do not have an /dev/lirc0 you'll need this so you'll have to make a symbolic link to lircd by typing the following command.
#ln -s /dev/lirc /dev/lirc0
If nothing displays with the ls -l /dev/lirc* command or dmesg doesn't indicate LIRC loaded, try rebooting.
Next you'll want to change the permission of the device files.
#chmod 666 /dev/lirc0
#chmod 666 /dev/lircd
Now, you'll have to make sure you have a lircd.conf file. When LIRC installs, a lircd.conf file is automatically generated in your etc folder. You'll need to go to /etc/lircd.conf and make sure you have just one remote in the file since LIRC can have multiple remote configurations in one file. Once this is done, it's time to test your remote
Just to start out type the following command.
#lircd -d /dev/lirc0 /etc/lircd.conf --nodaemon
The nodaemon option keeps lircd running in the terminal window so you can check to see if you receive any errors if not you should see
lircd: lircd(atiusb) ready
If you have a different remote the atiusb will be something different. If you receive any errors, something has gone wrong in the setup of LIRC or you could have a problem with your lircd.conf file. If everything looks good, you can CTRL-C out of the lircd. Next you'll want to run lircd in the background.
#lircd -d /dev/lirc0 /etc/lircd.conf
Next you'll want to make sure lirc is receiving commands from your remote so you'll want to type
#irw
then you'll want to start pressing buttons on your remote so you should see
0000001447720000 00 mouse-up SAPPHIRE_ATIUSB_5000023600
0000001447720000 01 mouse-up SAPPHIRE_ATIUSB_5000023600
From there, you'll want to CTRL-C out of irw. Congratulations, your remote is working.
If you're not receiving any signals, you could have a problem with your lircd.conf file.
Next you'll want to try, the following command
#mode2 -d /dev/lirc0
which will display the codes sent from the remote. In my case, I get the following codes.
code: 0x1447720000
code: 0x1447720000
You'll then want to CTRL-C out of mode2
You'll want to make sure the code you're receiving for the buttons pushed in mode2 match the codes you've setup in your lircd.conf file. If the numbers are off, you probably have a bad lircd.conf file. I recommend doing a search on the internet to find a lircd.conf file to match your remote to the codes you generated with the mode2 command.
Once you've got your remote working you'll need to setup the keys for whatever application you're trying to get the remote working with. In my case, I wanted my remote to work with MythTV so I needed to generate a lircrc file to map the MythTV keys with the remote and you'll need to place this file in your /home/username/.mythtv folder. The following is a snippet from lircrc
begin
#Jumppoint for Program Guide created in Mythweb
prog = mythtv
button = TV
config = !
end
begin
#Jumppoint for DVD playback created in Mythweb
prog = mythtv
button = DVD
config = @
end
begin
prog = mythtv
#Jumppoint for MythWeater created in Mythweb
button = WEB
config = #
end


Deletions:
Work in progress.



Edited on 2006-03-05 14:13:31 by LexNL [Initial text]

Additions:

Setting up your Remote Control



Deletions:

Setting up the ATI video driver





Oldest known version of this page was edited on 2006-03-05 14:13:06 by LexNL [Initial text]
Page view:

Setting up the ATI video driver

Back to Adding or Upgrading your Hardware

Work in progress.


CategoryHardware
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by Wikka Wakka Wiki 1.1.6.2
Page was generated in 0.2441 seconds