Getting IR to work

  • Hi all,

    I am trying to get an IR receiver in combination with my Apple remote to work with my Pi3, running LibreELEC. The IR receiver is connected via GPIO. I never did something like this, so please excuse my questions.

    I disabled CEC (as I read this might cause some trouble), extended the config.txt as follows

    Code
    dtoverlay=lirc-rpi
    dtparam=gpio_out_pin=14
    dtparam=gpio_in_pin=16
    dtparam=gpio_in_pull=down


    and rebooted. However, the remote doesn't work and I am trying to figure out a good way to debug my setup.

    I checked dmesg for any lirc related entries:

    Code
    pi:~ # dmesg | grep lirc
    [    5.800012] lirc_dev: IR Remote Control driver registered, major 244
    [    5.897989] lirc_rpi: module is from the staging directory, the quality is unknown, you have been warned.
    [    6.790694] lirc_rpi: auto-detected active high receiver on GPIO pin 16
    [    6.792322] lirc_rpi lirc_rpi: lirc_dev: driver lirc_rpi registered at minor = 0
    [    6.792351] lirc_rpi: driver registered!
    [    7.222330] input: lircd as /devices/virtual/input/input3

    To me this looks like the IR receiver has been connected successfully, or am I misunderstanding the output?

    From what I understood, irw should printout the input whenever lirc registered a keypress on the remote, regardless if Kodi understands the keypress (e.g. a wrong keymap) or not. But irw just doesn't output anything, so I think the keypresses on my remote are not recognized.

    The IR receiver is new works on the same frequency / wavelength as the Apple remote, the remote works fine (just tested it on an Mac Mini).

    Any ideas was I did wrong and how I can debug my solution?

    Thanks a lot!

  • You will probably have to make your own lircd.conf

    you can use irrecord to do that.

    Otherwise just google lircd apple remote and find a lircd.conf
    Then you can place the lircd.conf in /storage/.config/

    like this one I found here

    External Content gist.github.com
    Content embedded from external sources will not be displayed without your consent.
    Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.

    Code
    wget -O /storage/.config/lircd.conf https://gist.githubusercontent.com/pda/8252117/raw/56fb05f3fba8d2bdcaec2245bb9942644d4218e1/lircd.conf


    then reboot

    there is also more here
    Index of /remotes/apple

  • Thanks for the reply.

    I tried to create my own lircd.conf using irrecord like so:

    Code
    pi:~ # irrecord /storage/.config/lircd.conf

    Whenever I try to record a new key irrecord complains

    Code
    irrecord: no data for 10 secs, aborting

    so I guess something is wrong with my wirering / the way I tried to make the Pi aware of the IR receiver.

    Is there any way to check if the IR receiver was registered successfully?

    Thanks!