Hoppa till innehåll

Sökresultat Sökningen pågår Sökresultaten dyker upp här efterhand. Du kan fortsätta skriva om du vill begränsa sökningen.
Söker efter användare
Söker efter gallerier
Sök forumtrådar
Stäng

Asus Pundit IR fjärrkontroll i LIRC

3 svar till detta ämne
  • Vänligen logga in för att kunna svara

#1

Postad 06 oktober 2009 - 09:57

Unregistereda861dd7f
  • Unregistereda861dd7f
  • Wannabe

  • 38 inlägg
  • 0
Jag postar lösningen jag lade ut på xbmc.org forumet här på minhembio också då jag sett att flera på forumet har haft problem med att få den inbyggda IR mottagaren och fjärren att fungera.



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/soft...8.6pre2.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 .

Redigerat av Unregistereda861dd7f, 06 oktober 2009 - 10:14.


#2

Postad 07 oktober 2009 - 03:40

Hostis
  • Hostis
  • Användare

  • 140 inlägg
  • 0
Helt underbart :D

Detta kommer många och få nytta av :D

#3

Postad 17 oktober 2009 - 12:41

rohed
  • rohed
  • Wannabe

  • 36 inlägg
  • 0
Funkar kanon! Till och med jag lyckades. Bra jobbat!

#4

Postad 15 februari 2011 - 19:10

Diddleydoo
  • Diddleydoo
  • Rookie

  • 3 inlägg
  • 0
Hej. Denna gude har varit mycket hjälpsam!!
Tyvärr stöter jag på problem när jag skulle prova xbmc live dharma.
När jag kommer till steget apt-get install dialog så blir det problem och detta kommer upp
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package dialog is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package dialog has no installation candidate

Hoppas nån kan hjälpa mig eller har någon lösning.
Tack på förhand.
Diddleydoo



0 användare läser detta ämne

0 medlemmar, 0 gäster, 0 anonyma medlemmar

  • Nya duken i emballage
    DPC
    2024-04-28 10:12:49
  • tnorlund
    2024-04-22 20:00:21
  • Nya hyllor. 2670 DVD+Blu-Ray
    tnorlund
    2024-04-22 19:58:56
  • UPDATE 2024
    jacoby
    2024-04-15 17:17:29
  • UPDATE 2024
    jacoby
    2024-04-15 17:09:47
  • Fler  |  Vilka bilder visas här?
Trendande produkter
Prisjakt © 2000 - 2024 Prisjakt   Cookiepolicy.   Våra regler.   Personuppgiftspolicy.  Hantera cookie-inställningar.