[LINUX] Asus Pundit P4-P5N9300 Media Center Remote Control and LIRC?

  Thread Rating:
  • 2 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
sutsan Offline
Junior Member
Posts: 4
Joined: Sep 2009
Reputation: 0
Post: #71
Hi Aslef I'm new to this forum and I have same HW, are using the exact same setup and are experiencing the exact same problem.
After reading the installation notes on lirc site http://www.lirc.org/html/install.html...
did you follow the post installation steps, ie
To allow other than root can connect to lircd
chmod 666 /var/run/lirc/lircd

and update /etc/conf.modules with:
alias char-major-61 lirc_it87
options lirc_it87 irq=11 io=0x310 or options lirc_it87 irq=0xb io=0x310
not sure if this can solve the problem, but I'm not able to test this myself since I'm not at home at the moment and I'm curious if this will solve the problem.
find quote
sutsan Offline
Junior Member
Posts: 4
Joined: Sep 2009
Reputation: 0
Post: #72
JS36 Wrote:Ok now i have reinstalled ubuntu jaunty again and haven't touched the synaptic lirc. I added this to /etc/modules
lirc_dev
lirc_it87

This gave me /etc/lirc0 now but still no /dev/lirc or /dev/lircd can i just link them from /usr/local/sbin where i found them?

dmesg |grep lirc
Code:
[  175.590388] lirc_dev: IR Remote Control driver registered, major 61
[  180.828797] lirc_dev: lirc_register_driver: sample_rate: 0
[  180.828862] lirc_it87: found IT8720.
[  180.828876] lirc_it87: set default io 0x310
[  180.828890] lirc_it87: set default irq 0x7
[  180.828922] lirc_it87: I/O port 0x0310, IRQ 7.

Can this be an issue ? In bios my CIR have IRQ11 and it's only possible to choose IRQ 11 or 5. Can i force it to choose IRQ 11 by adding
Code:
options lirc_it87 irq=11 io=0x0310
into /etc/modules?

Sorry for all questions.

Hi I'm experiencing the same problem with Pundit getting the wrong IRQ=7, did you resolve it and in that case how? or was it the "chmod 666 /dev/lircd" that resolved the problem?
I've got a Harmony 525 how did you set up your H555 remote since the shipped remote seems difficult to get working.
find quote
sutsan Offline
Junior Member
Posts: 4
Joined: Sep 2009
Reputation: 0
Smile  LIRC Remote on Pundit P4 Working Finally! Post: #73
I managed to get Lirc working Big Grin on my Pundit P4 by doing the steps described by JS36 post#27 in this forum and the following steps:

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 according to steps described by JS36 post#27.

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 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.
And it should work as it worked for me Big Grin

Thanks all for you input especially to darkattraction and JS36.
find quote
Hostis Offline
Junior Member
Posts: 1
Joined: Oct 2009
Reputation: 0
Post: #74
thx for the good job sutsan.

But it would be really nice for you to post a detailed step by step guide from the beginning.

I had my friend over here and he managed to do this for me. But we got stucked here

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

Nothing happens when we pressed buttons at this stage.
Don´t know what else i can do for now.

bra gjort btw Smile
find quote
kalimero Offline
Junior Member
Posts: 8
Joined: Aug 2009
Reputation: 0
Post: #75
Hostis Wrote:thx for the good job sutsan.

But it would be really nice for you to post a detailed step by step guide from the beginning.

I had my friend over here and he managed to do this for me. But we got stucked here

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

Nothing happens when we pressed buttons at this stage.
Don´t know what else i can do for now.

bra gjort btw Smile

If the mode2 is echoing the keystrokes on your remote, but you get no echo from irw, I guess you missed this step:

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

I am in the process of compiling a step-by-step instruction on how to get the remote working, just hang in there... I will post it on this forum soon.
find quote
kalimero Offline
Junior Member
Posts: 8
Joined: Aug 2009
Reputation: 0
Post: #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 .
find quote
km__ Offline
Junior Member
Posts: 8
Joined: Sep 2009
Reputation: 0
Smile  Great work Post: #77
Now my remote is working perfect, thank you all for your extensive work in getting a complete list of steps available Smile
find quote
aslef Offline
Junior Member
Posts: 8
Joined: Sep 2009
Reputation: 0
Post: #78
kalimero Wrote: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.

YES! Thank you!

Asle
find quote
MrDVD Offline
Senior Member
Posts: 264
Joined: Apr 2004
Reputation: 0
Post: #79
Hallo, is it possible to power on the pc with the remote ?
find quote
davebv Offline
Junior Member
Posts: 6
Joined: Sep 2009
Reputation: 0
Post: #80
YES!!! thanks a lot, really. It works now!!
find quote
Post Reply