[LINUX] Asus Pundit P4-P5N9300 Media Center Remote Control and LIRC?
#76
For all of you out there who bought a Pundit P4 and want use the built in IR receiver and shipped remote (or other generic MCEUSB remote) in Linux. The following solution has been tested and verified on Ubuntu 9.04 32-bit.

Thanks to Sutsan and other friends for finding and testing the solution!

Most of the commands in the following instructions must be run with root privileges.
Therefore, remember to do one of the following:
1) sudo su - will run all following commands in the terminal window as root (the prompt will look like: root@[computerName]:~#)
2) use sudo before each command you run that requires root privileges.

------------Pre-installation steps -----------
Enable your IR in BIOS:
Advanced → Onboard Device Configuration → CIR Port Adress=[310], CIR Port ICQ =[11]

link to the kernel you use
Make sure /usr/src/linux is linked to the kernel you are using, the following command gives the kernel you use:
uname -r

list linux which should be linked to the kernel you use:
ls -l /usr/src/linux

1) if it is linked to wrong kernel you need to remove the link and recreate it by:
cd /usr/src
rm linux
ln -s /usr/src/[the kernel you use] linux


2) or if linux link does not exist you need to create it by:
cd /usr/src
ln -s /usr/src/[the kernel you use] linux
(example if kernel you use is 2.6.28-15-generic: ln -s /usr/src/linux-headers-2.6.28-15-generic/ linux)

Now the link should exist and should be correct.

-----------------------Installation of LIRC-----------------

apt-get install lirc (configure with the remote you want to use, i choose Windows Media Center / MCEUSB new Philips et al and emulated it with my logitech harmony 555) The remote that comes with the Asus Pundit is a MCEUSB compatible remote too.

-------------Lirc upgrade/installation to latest version of LIRC---------------

apt-get install dialog
cd /usr/src
wget http://lirc.org/software/snapshots/lirc-...e2.tar.bz2
tar xvfj lirc-0.8.6pre2.tar.bz2
cd lirc-0.8.6pre2
sh setup.sh


Driver configuration(1) > IrDa/CIR hardware(6) > ITE IT8712/IT8705/IT8720 CIR port (5) and "save configuration & run configure" in first menu

make
make install
nano /etc/lirc/hardware.conf
change to REMOTE_MODULES="lirc_dev lirc_it87" and REMOTE_LIRCD_CONF="mceusb/lircd.conf.mceusb". (Exit with ctrl-x)

hardware.conf should look like this:
# /etc/lirc/hardware.conf
#
#Chosen Remote Control
REMOTE="Windows Media Center Remotes (new version Philips et al.)"
REMOTE_MODULES="lirc_dev lirc_it87"
REMOTE_DRIVER=""
REMOTE_DEVICE="/dev/lirc0"
REMOTE_LIRCD_CONF="mceusb/lircd.conf.mceusb"
REMOTE_LIRCD_ARGS=""

#Chosen IR Transmitter
TRANSMITTER="None"
TRANSMITTER_MODULES=""
TRANSMITTER_DRIVER=""
TRANSMITTER_DEVICE=""
TRANSMITTER_LIRCD_CONF=""
TRANSMITTER_LIRCD_ARGS=""

#Enable lircd
START_LIRCD="true"

#Don't start lircmd even if there seems to be a good config file
#START_LIRCMD="false"

#Try to load appropriate kernel modules
LOAD_MODULES="true"

# Default configuration files for your hardware if any
LIRCMD_CONF=""

#Forcing noninteractive reconfiguration
#If lirc is to be reconfigured by an external application
#that doesn't have a debconf frontend available, the noninteractive
#frontend can be invoked and set to parse REMOTE and TRANSMITTER
#It will then populate all other variables without any user input
#If you would like to configure lirc via standard methods, be sure
#to leave this set to "false"
FORCE_NONINTERACTIVE_RECONFIGURATION="false"
START_LIRCMD=""


Choose the right remote control by creating the /etc/lirc/lircd.conf file:
sudo cp /usr/src/lirc-0.8.6pre2/remotes/mceusb/lircd.conf.mceusb /etc/lirc/lircd.conf

Test if /etc/lircd.conf exist and is linked to /etc/lirc/lircd.conf
If not, create a link to /etc/lirc/lircd.conf :
sudo ln -s /etc/lirc/lircd.conf /etc/lircd.conf

----------Post installation steps--------------------

Move/link the new modules to the right location:
For some reason ubuntu 9.04 is shipped with the modules lirc_dev and lirc_it87 and these old modules need to be replaced by the new/freshly complied ones that we created above, do this:

make sure correct modules are loaded by:
find /lib/modules/ -iname 'lirc*.ko'
check the output: if the modules lirc_dev and lirc_it87 are listed twice for the same kernel you are using then you need to replace the old module with the new ones; you can check the path by doing: modprobe -v lirc_dev and modprobe -v lirc_it87, replace with new modules

Remeber which kernel version you are using and replace 2.6.28-11-generic below with the kernel version you are using.
uname -r gives you the kernel version you are using.

the new modules are installed in /lib/modules/2.6.28-11-generic/misc/

Rename old modules:
mv /lib/modules/2.6.28-11-generic/kernel/ubuntu/lirc/lirc_it87/lirc_it87.ko /lib/modules/2.6.28-11-generic/kernel/ubuntu/lirc/lirc_it87/lirc_it87.ko.old
mv /lib/modules/2.6.28-11-generic/kernel/ubuntu/lirc/lirc_dev/lirc_dev.ko /lib/modules/2.6.28-11-generic/kernel/ubuntu/lirc/lirc_dev/lirc_dev.ko.old


Create symbolic links to the new modules:
ln -s /lib/modules/2.6.28-11-generic/misc/lirc_dev.ko /lib/modules/2.6.28-11-generic/kernel/ubuntu/lirc/lirc_dev/lirc_dev.ko
ln -s /lib/modules/2.6.28-11-generic/misc/lirc_it87.ko /lib/modules/2.6.28-11-generic/kernel/ubuntu/lirc/lirc_it87/lirc_it87.ko


Create file lirc.conf
nano /etc/modprobe.d/lirc.conf
copy and paste the following 2 rows below:
alias char-major-61 lirc_dev
options lirc_it87 irq=11 io=0x310

Ctrl+X - Save and exit

Reboot system

----------Test installation--------------------

dmesg | grep lirc

you should get the following output:
root@htpc:~$ dmesg | grep lirc
[ 10.646498] lirc_dev: IR Remote Control driver registered, major 61
[ 10.652555] lirc_dev: lirc_register_driver: sample_rate: 0
[ 10.652615] lirc_it87: found IT8720.
[ 10.652629] lirc_it87: set default io 0x310
[ 10.652643] lirc_it87: set default irq 0xb
[ 10.652674] lirc_it87: I/O port 0x0310, IRQ 11.
[ 10.652686] lirc_it87: Installed.

if you are not getting the above output lirc_it87:installed on correct port and irq, then you need to debug why the module is not loaded successfully. (Did I really follow all steps above?)

If modules are loaded successfully then test remote by:
mode2 -d /dev/lirc0 and press buttons on remote (shipped Asus remote works perfectly)
you should get an output similar to the following in the terminal window when pressing the buttons on the remote:
space 34
pulse 174
space 42834
pulse 174
space 40786
pulse 174
space 42834
pulse 254
space 42754
pulse 182
space 42826
pulse 174
space 40786
pulse 2414
space 802
pulse 438
space 386
pulse 374


Ctrl+c to end test

Test irw - are the signals decoded correctly by lircd
irw /dev/lircd and start pressing buttons on the remote

you should get an output similar to the following:
000000037ff07bf2 00 Home mceusb
000000037ff07bf2 00 Home mceusb
000000037ff07bde 00 Right mceusb
000000037ff07bde 01 Right mceusb
000000037ff07bdf 00 Left mceusb
000000037ff07bdf 01 Left mceusb


Ctrl+c to end test

Start xbmc and test the remote control.


A known issue is if you press suspend you will loose the remote's connection. Workaround is to restart the computer.

If for some reason you are upgrading your kernel you need to recompile and reinstall your modules again.

----------Customize the remote for XBMC--------------------
Copy the keymap and lircmap xml files for customization

cp /usr/share/xbmc/system/Lircmap.xml ~/.xbmc/userdata
cp /usr/share/xbmc/system/Keymap.xml ~/.xbmc/userdata

Edit the files if you want to customize the keymappings in XBMC .
Reply


Messages In This Thread
A request.... - by SpearFish - 2009-04-07, 17:58
[No subject] - by MP3HiFi - 2009-04-07, 18:40
[No subject] - by MP3HiFi - 2009-04-13, 19:26
[No subject] - by decaturguy - 2009-04-17, 20:04
[No subject] - by MP3HiFi - 2009-04-17, 21:12
[No subject] - by koscica - 2009-06-10, 13:47
[No subject] - by nemo81 - 2009-07-16, 16:00
[No subject] - by darkattraction - 2009-07-26, 23:15
[No subject] - by darkattraction - 2009-07-27, 21:13
[No subject] - by preppie - 2009-07-31, 19:20
[No subject] - by JS36 - 2009-08-04, 01:15
[No subject] - by JS36 - 2009-08-04, 05:13
[No subject] - by TSlackM - 2009-08-04, 09:36
[No subject] - by JS36 - 2009-08-05, 00:33
[No subject] - by darkattraction - 2009-08-05, 12:05
n00b - by SmeagolL - 2009-08-05, 15:07
[No subject] - by JS36 - 2009-08-05, 17:49
[No subject] - by JS36 - 2009-08-05, 21:13
[No subject] - by JS36 - 2009-08-06, 00:16
[No subject] - by darkattraction - 2009-08-06, 00:23
[No subject] - by JS36 - 2009-08-06, 22:27
[No subject] - by SmeagolL - 2009-08-06, 22:46
[No subject] - by darkattraction - 2009-08-07, 07:19
[No subject] - by SmeagolL - 2009-08-07, 08:16
[No subject] - by SmeagolL - 2009-08-07, 10:30
[No subject] - by JS36 - 2009-08-07, 11:32
[No subject] - by SmeagolL - 2009-08-07, 15:05
[No subject] - by SmeagolL - 2009-08-07, 21:14
[No subject] - by JS36 - 2009-08-07, 23:56
[No subject] - by JS36 - 2009-08-08, 14:41
[No subject] - by SmeagolL - 2009-08-08, 23:01
[No subject] - by JS36 - 2009-08-09, 10:42
[No subject] - by SmeagolL - 2009-08-09, 20:27
[No subject] - by JS36 - 2009-08-10, 01:54
[No subject] - by SmeagolL - 2009-08-10, 22:22
[No subject] - by JS36 - 2009-08-11, 12:12
[No subject] - by SmeagolL - 2009-08-11, 21:58
[No subject] - by JS36 - 2009-08-12, 05:01
[No subject] - by bzkt - 2009-08-18, 20:44
[No subject] - by JS36 - 2009-08-19, 14:57
[No subject] - by bzkt - 2009-08-19, 18:15
[No subject] - by JS36 - 2009-08-19, 19:58
[No subject] - by MP3HiFi - 2009-08-19, 21:00
[No subject] - by MP3HiFi - 2009-08-20, 17:58
[No subject] - by JS36 - 2009-08-20, 23:35
[No subject] - by User 53076 - 2009-08-30, 22:24
[No subject] - by JS36 - 2009-08-30, 23:35
[No subject] - by User 53076 - 2009-09-04, 21:12
[No subject] - by JS36 - 2009-09-06, 22:32
[No subject] - by User 53076 - 2009-09-08, 21:28
[No subject] - by JS36 - 2009-09-09, 10:01
[No subject] - by User 53076 - 2009-09-09, 10:46
[No subject] - by aslef - 2009-09-09, 11:40
[No subject] - by darkattraction - 2009-09-09, 16:42
[No subject] - by JS36 - 2009-09-09, 17:24
[No subject] - by aslef - 2009-09-09, 21:34
[No subject] - by darkattraction - 2009-09-10, 11:22
[No subject] - by aslef - 2009-09-10, 12:27
[No subject] - by User 53076 - 2009-09-10, 19:01
[No subject] - by darkattraction - 2009-09-10, 19:50
[No subject] - by darkattraction - 2009-09-10, 19:55
[No subject] - by aslef - 2009-09-10, 21:12
[No subject] - by darkattraction - 2009-09-10, 23:53
[No subject] - by aslef - 2009-09-11, 12:59
[No subject] - by darkattraction - 2009-09-11, 17:12
[No subject] - by davebv - 2009-09-13, 16:13
[No subject] - by davebv - 2009-09-13, 17:06
Still no luck - by aslef - 2009-09-17, 11:30
[No subject] - by km__ - 2009-09-20, 13:36
[No subject] - by sutsan - 2009-09-25, 20:26
Same IRQ problem with Pundit - by sutsan - 2009-09-25, 21:07
[No subject] - by Hostis - 2009-10-06, 00:03
[No subject] - by User 53076 - 2009-10-06, 10:03
Guide for setting up the IR remote for Asus Pundit P4 on Ubuntu 9.04 32bit and XBMC - by User 53076 - 2009-10-06, 10:52
Great work - by km__ - 2009-10-11, 12:36
[No subject] - by aslef - 2009-10-12, 19:50
[No subject] - by MrDVD - 2009-10-31, 00:43
[No subject] - by davebv - 2009-10-31, 17:41
[No subject] - by Jefman - 2009-11-10, 11:02
[No subject] - by Sipowitz - 2009-11-13, 15:48
[No subject] - by [Knuckles] - 2009-11-30, 15:42
[No subject] - by [Knuckles] - 2009-11-30, 15:44
[No subject] - by MP3HiFi - 2009-12-19, 00:41
[No subject] - by kreischweide - 2010-01-18, 16:25
[No subject] - by [Knuckles] - 2010-01-23, 13:05
[No subject] - by kreischweide - 2010-01-25, 16:29
[No subject] - by anmo6 - 2010-01-27, 23:31
[No subject] - by call-151 - 2010-01-29, 00:06
[No subject] - by nu1mlock - 2010-04-28, 10:13
[No subject] - by [Knuckles] - 2010-04-28, 13:41
help - by koscica - 2010-10-24, 02:06
yaVDR 0.3 and no success - by aslef - 2010-12-08, 21:11
[No subject] - by MP3HiFi - 2011-01-07, 23:54
Logout Mark Read Team Forum Stats Members Help
[LINUX] Asus Pundit P4-P5N9300 Media Center Remote Control and LIRC?2