Kodi Community Forum

Full Version: Lirc: Need to press every button twice
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have XBCM Live 10.0 setup with a Toshiba PX1246E-1ETC remote. I believe the remote is working fine: irw shows immediate responses on every key press. One thing that makes me a little worried is that each button press results in two output lines, for example:

0000001477a20000 00 down Toshiba_X10
0000001477a20000 01 down Toshiba_X10

This happens with any button press. (If I hold the button longer, the second number keeps running (02, 03 etc) until I release it; at the next press it starts at 00 again, which seems fine to me.)

Question: Is this normal behaviour?

Now, when I press the buttons with XBMC running, XBMC responds exactly to *every other button press*. If I want to move down, I need to press down twice before it will go don one item; if I select something, I need to press ok twice, etc.

Question: How do I get rid of this? Obviously I want XBMC to respond to every button press.
Wait - that was not accurate. As it turns out, the button press issue appears in irw as well. Apparently it has nothing to do with XBMC.

So the problem is: LIRC only registers every second button press. How can I solve this?
Updating this personal blog ;-) as I found this on the LIRC website:

Quote:Most of the time I have to push a button twice for LIRC to recognize it. What's wrong?

The remote control probably uses the RC-5, RC-6 or RECS80 protocol, but irrecord wasn't able to recognize this correctly.

Try running irrecord remotes/generic/RC-5.conf, irrecord remotes/generic/RC-6.conf or irrecord remotes/generic/RECS80.conf. You will find these template config files inside the LIRC source package. If this won't work read this.

So I suspect the remote uses RC-5/RC-6/RECS80. Unfortunately, the lircd.conf that I have seems to be fine as it was part of the LIRC package (found it in lircd.atiusb.conf) and has in fact functioned without a problem on Ubuntu 8.04 (I believe, could be different version).

Could it have anything to do with the remote drivers being compiled into the kernel these days? I really have no idea what I just said, I'm just trying to interpret what I read about the subject.
AHHH - I think I found it! Apparently, the remote sends two different codes for each button :S For instance, when pressing "Down", the first time I press it it sends code 00000014f7220000, and the second time it sends 0000001477a20000. I have no idea why.

Anyway, when I add a second line for each button with its second code in it, the remote is working fine.
It seems I'm having exactly the same problem. How did you figure out the second code which the remote sends?

And, out of curiosity, which remote do you have? I have a Harmony One, configured as MCE. And reading your blog Wink here I wonder if the issue would be gone if I just configured the Harmony as a different remote.
Hammi Wrote:It seems I'm having exactly the same problem. How did you figure out the second code which the remote sends?

By accident, really. I remembered that I used to have an almost perfectly working setup a few years back when I last tried the remote with Linux/Lirc, and that I needed to configure it as a SnapStream Firefly back then. When carefully esxamining the SnapStream lircd.conf file, I noticed the double entries.

The weird thing is that there is a "valid" lircd.conf file available for my exact brand & type of remote. It's not working - at least, not without the double presses.

Quote:And, out of curiosity, which remote do you have? I have a Harmony One, configured as MCE. And reading your blod Wink here I wonder if the issue would be gone if I just configured the Harmony as a different remote.

The remote I have is a Toshiba PX1246E-1ETC, which is supposed to be a Windows MCE compatible remote. It didn't work at all with lirc_mceusb though. I had to choose lirc_atiusb instead. If your remote works with lirc_atiusb as well, you could try to use the supplied lircd.conf.atiusb and see what the irw command tells you. In my case, the codes sent out by my remote were all displayed - because for every button, each of the two codes happened to be used by at least one other remote as well, and as such included in the conf file.
I did some further research, and it seems that missing or wrong "toggle_bit" or "toggle_bit_mask" settings cause this behavior. Since I'm unsure how to figure out the right values for a Harmony One remote pretending to be an MCE, but connected via a serial port IR receiver, I guess I'll rather try to configure the Harmony as a different remote and then restart my lirc config.
Ok, I setup my Harmony One as described here. That's working good for me, and I have no issues anymore with just every second keystroke working.