Raspbmc + LIRC GPIO Driver + XBMC

By | August 6, 2012

Hi all!


On my Raspberry Pi I am using Raspbmc. I want to connect my TV remote control to the Raspberry. I am using Raspbmc Release Candidate 3. This version alredy has LIRC GPIO driver createdy by aron, so I skip part with compiling linux kernel and lirc with aron patches.

I am using TSOP 4843. Connection:

Vs ---> Pin 1
GND --> Pin 6
OUT --> Pin 12 (GPIO18)

Add in /etc/modules:


Run in bash:

sudo modprobe lirc_rpi

Test GPIO driver:

mode2 -d /dev/lirc0

You should see:

space 4960669
pulse 2697
space 880
pulse 477
space 816
pulse 499
space 379
pulse 472
space 439

You should create lirc config file:

sudo kill `cat /var/run/lircd`
irrecord -d /dev/lirc0 ~/lircd.conf

Copy config file:

sudo mv /etc/lirc/lircd.conf /etc/lirc/lircd.conf.bak
sudo cp ~/lircd.conf /etc/lirc/lircd.conf

Afret reboot you can check LIRC:


Now you can configure XBMC. See manual

P.S. Thanks aron for his LIRC GPIO driver 🙂

Translation: ru

5 thoughts on “Raspbmc + LIRC GPIO Driver + XBMC

  1. Pingback: Raspbmc + LIRC GPIO драйвер + XBMC | Druss blog

  2. Erik


    I get “Device or resource” busy when tryin mode2 -d /dev/lirc0. After some research I found a thread that said that lircd is using the device. I am STUCK. Do you have a suggestion?


    1. druss Post author

      try to kill lircd process.
      ‘kill <pid>’
      to find pid use ‘ps waux | grep lircd’

      1. Erik

        Thanx! That stopped the process anyway. I will try if it runs after I resoldered my ir reciever. It broke.


Leave a Reply

Your email address will not be published. Required fields are marked *