Hifiberry digi+ IR sensor for remote without any response

  • Hello,

    Can somebody help me to solve my issue?

    I got Raspberry Pi 3 with installed hifiberry digi + and it works ok.

    Have problems with hdmi CEC to my projector and passthrough video signal through Onkyo HTX 22HDX, but that would be probably caused by lenght of hdmi cable,

    which is more than 12m and the older Benq projector with poor support for CEC. And that brings us to my real issue.

    I want to use universal remote to control all devices (projector, Onkyo speaker set and of course Raspberry pi with LibreElec).

    But Im unable to make it work with Libreelec. So far I bought IR sensor TSOP31236, connected it to hifiberry board on GPIOs according to datasheet. Used 3,3V, Ground and GPIO4.
    Set these lines to config file :

    dtoverlay=hifiberry-digi (for hifiberry, which works just fine)

    dtoverlay=lirc-rpi

    dtparam=gpio_in_pin=04

    Then i try to follow many guides to make the IR works, but without any succes. Tryed turn on lirc and use keymap editor addon to verify communication - no response. Tryied Irrecord to map buttons directly from remote, but irrecord doesnt work for me on Libreelec. Tryed add several conf files to configuration folder - no response.

    Im not experienced in linux, but Im able to look up for some guides and forums but nothing helped me.

    Can you please give me some advice, how to make this work or how to find a source of a problem (sensor, Libreelec, config files, ...)

    Now Im going to install debian on anothe sd card to verify if the sensor and lirc is working...

    Thx for any answer.

  • First check with "mode2" that your IR receiver is hooked up correctly and the GPIO pin setting in config.txt is correct. You should get a bunch of "pulse" and "space" messages when you press a button on your remote.

    I'm currently writing a new guide on IR remotes in LibreELEC, until that's finished here are some additional hints and pointers.

    Instead of "dtoverlay=lirc-rpi" better use "dtoverlay=gpio-ir". To configure the latter for GPIO 4 add this line to config.txt:

    Code
    dtoverlay=gpio-ir,gpio_pin=4

    With gpio-ir you can use the new (and IMO easier to use) "ir-keytable" method to configure remotes and don't need to enable lirc.

    Have a look at this thread for detailled infos on how to setup a custom configuration using ir-keytable:

    WD TV Live remote

    so long,

    Hias

  • Hello Hias,

    Thx for reply. Still confused...

    Edited config.file , but how can I try mode2, while it is not supported by libreelec?

    Then i Try ir-keytable command and get the same output as Jimmysmith from the topic you linked.

    Not sure If i should add this to config: gpio_pull=1,rc-map-name=rc-rc6-mce or with rc-samsung like Jimmy did.

    But tried several protocols and stil no response.

    Actually I still dont understand, how could ir-keytable get any info from controller if im not pushing button, so the sensor gets no data and therefore ir-keytable cant read any protocol....

    And things about kernell stuff, thats a bit above my linux knowledge.

  • Now i tryed mode2 with this result:

    Code
    LibreELEC:~ # systemctl stop system-lircd.slice
    LibreELEC:~ # mode2
    Warning: cannot open /etc/lirc/lirc_options.conf
    Warning: cannot open /etc/lirc/lirc_options.conf
    Using driver default on device /dev/lirc0
    Trying device: /dev/lirc0
    Using device: /dev/lirc0
    Warning: Running as root.

    pushed many buttons on every remote i have on me, but nothing happened.

    Might be a faulty IR sensor If i done it properly. (config file contains this lines:

    Code
    dtoverlay=hifiberry-digi
    
    dtoverlay=gpio-ir,gpio_pin4

    And this is ir-keytable output:

    Code
    LibreELEC:~ # ir-keytable
    Found /sys/class/rc/rc0/ (/dev/input/event1) with:
            Driver gpio-rc-recv, table rc-rc6-mce
            Supported protocols: unknown other lirc rc-5 rc-5-sz jvc sony nec sanyo mce-kbd rc-6 sharp xmp
            Enabled protocols: lirc
            Name: gpio_ir_recv
            bus: 25, vendor/product: 0001:0001, version: 0x0100
            Repeat delay = 500 ms, repeat period = 125 ms
  • There's a typo in config.txt:

    Code
    dtoverlay=gpio-ir,gpio_pin4

    you need to have a "=" between gpio_pin and 4. Also triple-check you are really using GPIO 4, which is pin 7 on the GPIO header.

    so long,

    Hias

  • What a noob i am :)

    Now i have mode2 codes via remote.

    Followed your instructions via ir-keymaps and everything works.

    Just KEY_OK doesnt work for me, had to use KEY_ENTER.

    Still cant believe a typo was source of a problem, cause checked it several times.... aparently wrong.

    Thanks for great support.

  • Could you give 8.1.0 beta a try? KEY_OK should work there, but make sure Lirc is disabled in LibreELEC settings.

    There was a bug reported of KEY_OK not working in 8.0.x, eventlircd somehow didn't seem to pick up the remote events as it should. I couldn't reproduce it myself but we got reports that it works in 8.1.0

    so long,

    Hias

  • Hi...in my case after getting a TSOP 4838 IR receiver and many hours of reading tutorials, entering commands, getting error messages, installing, de-installing, returning to backup images of earlier Volumio versions and starting over again, I'm ready to give up. I would really love to pause, play and skip tracks with my remote as on a real playback device, without having to reach for my tablet or laptop, but I don't know what more I could try.

    china pcb assembly

    Edited once, last by NealXu (February 5, 2018 at 9:10 PM).