Another remote double keypress (RPi 3B + TSOP4838 + Avermedia RM-HV remote)

  • Hi, everybody!

    I'm new here, after reading for some weeks while trying to solve the (obvious?) remote double keypress.

    Hardware description: Raspberry Pi 3B + TSOP4838 IR chip + Avermedia RM-HV remote (taken from an internal Speedy Avermedia TDT card) + new remote batteries

    Every piece of hardware checked working itself.

    Note: the TSOP4838 is powered at 5V. and also has the recommended RC power filter, and its output voltage level is translated to 3.3V and attached to the Raspberry pin #18.

    Software description: LibreELEC 8.2.4 in a SD card, new installation, not from update.

    CEC disabled

    Lirc disabled

    Special files:

    ----------------------------------------------------------------

    /storage/.config/autostart.sh:

    ir-keytable -a /storage/.config/rc_maps.cfg

    ----------------------------------------------------------------

    /flash/config.txt:

    dtoverlay=gpio-ir

    dtoverlay=pi3-disable-wifi

    ----------------------------------------------------------------

    /storage/.config/rc_maps.cfg:

    * * avermedia_remote

    ----------------------------------------------------------------

    /storage/.config/rc_keymaps/avermedia_remote:

    # table avermedia_remote, type: NEC

    0x200 KEY_POWER

    0x222 KEY_SLEEP

    0x203 KEY_TEXT

    0x203 KEY_RED

    0x226 KEY_GREEN

    0x227 KEY_YELLOW

    0x22B KEY_BLUE

    0x205 KEY_1

    0x206 KEY_2

    0x207 KEY_3

    0x209 KEY_4

    0x20A KEY_5

    0x20B KEY_6

    0x20D KEY_7

    0x20E KEY_8

    0x20F KEY_9

    0x22E KEY_DOT

    0x211 KEY_0

    0x233 KEY_CLEAR

    0x22A KEY_BACK

    0x236 KEY_UP

    0x237 KEY_HOME

    0x232 KEY_LEFT

    0x23E KEY_OK

    0x23F KEY_RIGHT

    0x212 KEY_INFO

    0x22C KEY_DOWN

    0x228 KEY_SELECT

    0x204 KEY_EPG

    0x303 KEY_CHANNELUP

    0x21F KEY_VOLUMEUP

    0x214 KEY_MUTE

    0x302 KEY_CHANNELDOWN

    0x21E KEY_VOLUMEDOWN

    0x208 KEY_AUDIO

    0x235 KEY_TV

    0x239 KEY_VIDEO

    0x218 KEY_PLAYPAUSE

    0x219 KEY_RECORD

    0x21B KEY_STOP

    0x21D KEY_FASTREVERSE

    0x21C KEY_FASTFORWARD

    0x300 KEY_NEXT

    0x301 KEY_PREVIOUS

    ----------------------------------------------------------------

    Symptom:

    Double keypress

    Something that may help:

    In my first installation, trying everything, I could see that enabling and disabling Lirc under LibreELEC config seemed to solve the problem,

    so I used this /storage/.config/autostart.sh:

    ir-keytable -a /storage/.config/rc_maps.cfg

    lircd start

    killall lircd


    but this "solution" was not good, because then the remote was hard to use, I had to point directly to the TSOP4838 to be sure it would work, and sometimes it did not work. Well, at least I could continue the installation, but suddenly the remote failed almost every time, so I decided to reinstall again and try to solve the problem, but without success.

    My question is:

    Everything seems to be OK, but the double keypress is here. May someone help me to do a good configuration?

    Now I doubt if it's possible to make it work ok, with my hardware and using the kernel. Should I use the old lirc? :dodgy:

    Sorry for my long message and thank you in advance

  • Connect the TSOP4838 to 3.3V and drop the voltage translation circuit - TSOP4838 can be powered from 2.5 to 5.5V (see the datasheet tsop48.pdf ).

    Also drop all modifications to autostart.sh - you only need to set up rc_maps.cfg and put the keytable in rc_keymaps. This config will be automatically picked up.

    If you still have problems post the output of ir-keytable. If you have another ir receiver (eg on a DVB USB dongle) you could get double keypresses as the signal will be received by 2 receivers.

    so long,

    Hias

  • Thank you both for your fast response.

    bublegum57: I've been playing with the ir-keytable -D 375 -P 100, and now I'm not sure if some change has been permanent or all changes are volatile. If not, Do you know if I can reset its configuration?

    HiassofT:

    My first trying was 3.3V of course. I agree the datasheet says 2.5 to 5.5V, but none of the tree TSOP4838 y bought some years ago works at

    V < 4V. so I used 5V. Maybe I bought the TSOP4838 and the store gave me another model, you know...

    I removed (in autostart.sh) the

    ir-keytable -a /storage/.config/rc_maps.cfg

    but wouldn't the

    ir-keytable -a /storage/.config/rc_maps.cfg

    line in autostart.sh be a security, or if rc_maps.cfg is present will be always loaded?

    and of course the
    lircd start

    killall lircd

    were removed some days ago.

    Finally the behaviour is the same: double keypress... UNTIL i READ CAREFULLY AGAIN YOUR MESSAGE: "If you have another ir receiver (eg on a DVB USB dongle)" , I looked at the USB tuner and saw it always had two small thinnies, to use the COMMANDER I NEVER BOUGHT. :cry:

    I checked it and it was also receiving the commander, unplugged it and the commander worked perfect. Well, the aluminium tape will solve it.

    Now I've two new questions (maybe I should begin two new threads?)

    I'm not happy using the Avermedia commander, because it's beeing also used with the computer and I'd prefer a commander specialy designed for kodi, like the one that comes with the A95x TV Box, but I'd like to buy only the commander. Do you know any commander (good and cheap) like this one?

    Also I choose the hand-made IR receiver because I added a led to signal the infrared reception, and it works, but after so many days reading almost everything in internet, I found that the Raspberry pin #17 is sometimes used in lirc systems as output so I thought: Would it be possible to use this or another Raspberry pin to signal the infrared reception? I mean like the kodi sound every time a key is pressed. Maybe an addon is needed?

    Thank you both again and I'm sorry for my mistake :angel:

  • With 2 IR receivers the configuration is a bit tricky.

    Your "* * avermedia_remote" rc_maps.cfg will configure both the gpio-ir receiver and the receiver on your DVB dongle to decode the signals of your remote. One possibility is to change the file so that only the gpio-ir receiver is configured:

    Code
    gpio-rc-recv * avermedia_remote

    Another thing to keep in mind is that it's not guaranteed that the gpio ir receiver will always be the first IR device (check the output of "ir-keytable"). If you manually run ir-keytable to change the config it'll apply the settings to the first rc device (rc0) unless you explicitly change that with the "-s" option.

    The automatic configuration run by the udev rules take care of that, ir-keytable -a will be run for all your IR receivers with -s set appropriately - so that rc_maps.cfg is applied to all IR receivers on your system.

    So, better remove the ir-keytable call from your autostart.sh.

    Instead of covering the IR receiver with black or aluminium tape it'd be better to blacklist the the driver for the IR receiver in your DVB dongle - or just use the IR receiver in your DVB and not add gpio-ir. With only one receiver life's a lot easier :)

    so long,

    Hias

  • Thank you again, HiassofT:

    So if I understood well, to use the only the gpio receiver having the dvb dongle inserted and avoid the need of aluminium tape, I remove all the lines I added to autostart.sh and

    use this rc_maps.cfg:

    # driver table file

    gpio-rc-recv rc-rc6-mce avermedia_remote


    And the line ir-keytable -a /storage/.config/rc_maps.cfg will be not needed not even in first installation, right? :cool:

    I thank you your interest, this is a little nightmare for me.

  • Yes, this setup will work.

    One thing to keep in mind is that the IR receiver of your DVB dongle will still be setup with the kernel driver's default config (in most cases to decode the manufacturer's remote, eg hauppauge remotes on hauppauge dongles - ir-keytable will tell you which table is active). If that causes issues (eg when you also use such a remote in the same room) you'll still need aluminium tape or blacklist the IR receiver driver module.

    The only case when you might want to run "ir-keytable -a ..." manually is when testing a new setup, to check if it works and eg find out if you have typos in your files. This is why I mentioned it in the wiki Infrared Remotes [LibreELEC.wiki]. If you are sure everything's correct you could also just reboot so the config is automatically applied.

    so long,

    Hias