Quantcast
Viewing all articles
Browse latest Browse all 4950

Troubleshooting • LIRC and IR-KEYTABLE behavior issue

I use VS1838 38Khz IR receiver currently on Pi3 and unknown 38Khz IR receiver on Pi4 . They are connected on GPIO17, 5V and G.

Remote key presses are detected, however every now and again my python code would trigger the last pressed key instead of the actual key that i would press.

For example i would press KEY_UP and leave the remote, then i would press any other key, however python would report KEY_UP once, and then any subsequent press would be fine. This would happen sometimes while i am pressing up/down/left/right keys in quick succession and it would also happen sometimes after i have not touched the remote for a long while.

This got me questioning the code, so i tried LIRC or EVDEV library, however result was same.

Next step was to try looking at output of "mode2" or "ir-keytable -t" and both would report correct keys 95% of the time approximately, but I would still get this issue 5% of the time, where previous key press would be recognized.

I tried changing few settings in lirc_options.conf, 'like repeat-max", "repeat-timeout" and at times it would still get previous key triggered for some reason.

While looking at mode2 and ir-keytable -t output i did notice that if i press and hold any button i would get continuous output showing me the NEC code of the key that i pressed, however if i continue holding the key, then cover the IR transmitter on the remote with my hand, release the key i was holding, press and hold some other key and remove my hand from IR transmitter, both mode2 and ir-keytable -t would continue reporting previous key until i would release the last button held, then press the same one again, after what they would register and report the correct NEC code for the last key.

I would assume that because some header part (or some other part) is missing from received signal, lirc or ir-keytable consider whatever was triggered last and report that, instead of the actual one.

What i would like to achieve is behavior same or similar to devices like Apple TV, where if complete IR signal is not received, device just ignores it, until you would release the button held and press it again.

On a google drive link below i placed a video named "IR Remote behavior.mp4" showing mode2 output, as well as Apple TV behavior that i would like to achieve.

https://drive.google.com/drive/folders/ ... OhMnYAx_6o

Any help, or explanation would be appreciated.

Statistics: Posted by zvonimir256 — Thu Dec 12, 2024 8:10 am — Replies 0 — Views 23



Viewing all articles
Browse latest Browse all 4950

Trending Articles