LIRC

Many media players and set-top boxes based on A1x SoCs features a built-in standard IrDA infra-red receiver for 38KHz based IR controllers that has LIRC software support which is compatible with most know media center remotes made for computers and media players.

LIRC (Linux Infrared Remote Control) supports this integrated infra-red receiver, and it acts as a middleware between the hardware and the software applications that supports LIRC, which most media player and media center applications does.

What is LIRC?
LIRC (Linux Infrared Remote Control) is an open source (GPL) package that allows users to receive and send infrared signals with a Linux-based computer system and applications.

With LIRC and an IR receiver the user can control their computer with almost any infrared remote control (e.g. a TV remote control). The user may for instance control video or music playback software with their remote control.

One GUI frontend is KDELirc, built on the KDE libraries.

irrecord to record remote control key
irrecord should do the job by recording your remote keys. http://linux.die.net/man/1/irrecord

For example, to teach LIRC about a Syabas Popcorn Hour A-100 Remote Control. Note that lircd can not be running;

Don't stop pressing buttons until two lines of dots (2x80) have been generated. Press RETURN now to start recording. ................................................................................ Found const length: 107344 Please keep on pressing buttons like described above. ................................................................................ Space/pulse encoded remote control found. Signal length is 67. Found possible header: 8977 4440 Found trail pulse: 591 Found repeat code: 8977 2201 Signals are space encoded. Signal length is 32 Now enter the names for the buttons. Please enter the name for the next button (press  to finish recording) KEY_PLAY Now hold down button "KEY_PLAY". [continue for all buttons]
 * 1) /etc/init.d/lirc stop     # or pkill lircd
 * 2) irrecord -d /dev/lirc0 a100.conf

Using existing remote definitions
A large repository of known remote controls are available at http://lirc.sourceforge.net/remotes/

In this example case we will pick Syabas A-100 Remote Control (which is used with Syabas Popcorn Hour series of media player and other Networked Media Tank clones).

REMOTE="None" REMOTE_MODULES="" REMOTE_DRIVER="" REMOTE_DEVICE="/dev/lirc0" REMOTE_SOCKET="/dev/lircd" REMOTE_LIRCD_CONF="" REMOTE_LIRCD_ARGS="" START_LIRCD="true"
 * 1) cd /etc/lirc/
 * 2) wget http://lirc.sourceforge.net/remotes/syabas/A-100
 * 3) cp A-100 lircd.conf
 * 4) vi hardware.conf

* Starting remote control daemon(s) : LIRC ...done.
 * 1) /etc/init.d/lirc start     # Or reboot

If you run something like; # tail -f /var/log/daemon.log &

You can see the messages from lircd. Test that your remote now works with:

# irw /dev/lircd Nov 1 02:48:26 a1x lircd-0.8.6[814]: accepted new client on /dev/lircd 0000000020d30af5 00 KEY_PLAY Syabas_A-100 0000000020d30af5 01 KEY_PLAY Syabas_A-100

Now when you start xbmc the remote control should work. You can check that it works by viewing the xbmc.log log file:

Nov 1 02:44:26 a1x lircd-0.8.6[814]: accepted new client on /dev/lircd 02:44:46 T:1100938672  DEBUG: LIRC: Update - NEW at 20549:0000000020d350af 00 KEY_DOWN Syabas_A-100 (KEY_DOWN) 02:44:46 T:1100938672  DEBUG: SDLKeyboard: scancode: 74, sym: 0112, unicode: 0000, modifier: 0 02:44:46 T:1100938672  DEBUG: OnKey: down (f081) pressed, action is Down
 * 1) tail -f /home/a1x/.xbmc/temp/xbmc.log

We still need to tell xbmc to use the remote inputs, the best way to do that is to copy the default, and modify as needed:


 * 1) cd /home/a1x/.xbmc/userdata
 * 2) cp /usr/local/share/xbmc/system/Lircmap.xml.
 * 3) vi Lircmap.xml

Change the remote name to that of what is in the lircd.conf you download/setup, (it is also printed in the xbmc.log output). Restart xbmc.

InfraRed Remote Controls tested with standard IrDA recievers for 38KHz based IR controllers
This only lists infra-red remote controls that are compatible with standard IrDA infra-red receiver for 38KHz based IR controllers.
 * 1) Syabas Popcorn Hour A-100 Remote Control works with LIRC 0.9.0 and Linux Kernel 2.6.32 on Ubuntu 10.04 or later.
 * 2) Example #1 (works with LIRC 0.9.0 and Linux Kernel 2.6.32 on Ubuntu 10.04)
 * 3) Example #2 (works with LIRC 0.9.0 and Linux Kernel 3.0 on Ubuntu 11.10)
 * 4) Example #?