Forum
TSOP4838 on GPIO, mode2 works, irw not working. - Printable Version

+- Forum (http://forum.xbian.org)
+-- Forum: Hardware (/forum-7.html)
+--- Forum: Remotes and CEC support (/forum-26.html)
+--- Thread: TSOP4838 on GPIO, mode2 works, irw not working. (/thread-701.html)



TSOP4838 on GPIO, mode2 works, irw not working. - valurgud - 28th Mar, 2013 11:36 PM

Hi

I have a TSOP4838 connected to the GPIO and would really appreciate any help with this problem.

When I run mode2 I get alot of data, as expected. When I start lircd and run irw.. I get nothing.

I'm kinda running out of ideas to try to fix this.. any suggestions?

Thanks in advance from Iceland
Valurg


RE: TSOP4838 on GPIO, mode2 works, irw not working. - CurlyMo - 28th Mar, 2013 11:41 PM

Just follow the guide on our wiki


RE: TSOP4838 on GPIO, mode2 works, irw not working. - valurgud - 29th Mar, 2013 04:23 AM

Hi again, thanks for the quick reply Smile

I had read that tutorial, thought irw needed to work so I could run irrecord.. but apparently that was wrong.
However, when I run the irrecord and press buttons.. nothing happens. Is there something obvious I'm overlooking?

Thanks again
Valurg


RE: TSOP4838 on GPIO, mode2 works, irw not working. - CurlyMo - 29th Mar, 2013 04:31 AM

If mode2 works, irrecord must work as well just try and check your settings.


RE: TSOP4838 on GPIO, mode2 works, irw not working. - valurgud - 6th Apr, 2013 11:08 AM

Hi again
Well you had it right, irrecord should have worked. Instead of tearing my hair out I reinstalled xbian, followed the remote guide on the wiki and had it working like a charm. Big Grin
Then.. all of the sudden.. I started getting remote key presses recognized twice. I enabled debug mode and looked at the log:

Terminal

00:59:03 T:3042217984 DEBUG: Keyboard: scancode: 6c, sym: 0112, unicode: 0000, modifier: 0
00:59:03 T:3042217984 DEBUG: OnKey: down (f081) pressed, action is Down
00:59:03 T:3042217984 DEBUG: LIRC: Update - NEW at 197445:000000037ff07be0 00 KEY_DOWN logitech-harmony-650 $
00:59:03 T:3042217984 DEBUG: OnKey: 167 (a7) pressed, action is Down
00:59:04 T:3042217984 DEBUG: Keyboard: scancode: 67, sym: 0111, unicode: 0000, modifier: 0
00:59:04 T:3042217984 DEBUG: OnKey: up (f080) pressed, action is Up
00:59:04 T:3042217984 DEBUG: LIRC: Update - NEW at 198199:000000037ff07be1 00 KEY_UP logitech-harmony-650 (K$
00:59:04 T:3042217984 DEBUG: OnKey: 166 (a6) pressed, action is Up

Obviously every remote key press is being recognized as a keyboard press aswell.. I have no idea why. Googleing hasn't helped much yet.. am I missing something obvious?

Thanks again for all your help Smile


RE: TSOP4838 on GPIO, mode2 works, irw not working. - CurlyMo - 6th Apr, 2013 05:54 PM

Just remove all keys from your map that are also recognized by XBMC


RE: TSOP4838 on GPIO, mode2 works, irw not working. - valurgud - 6th Apr, 2013 07:07 PM

I just moved the keyboard.xml file and everything seems to be working fine now Smile


RE: TSOP4838 on GPIO, mode2 works, irw not working. - CurlyMo - 6th Apr, 2013 07:09 PM

Just notice that the keyboard file will be restored after each update


RE: TSOP4838 on GPIO, mode2 works, irw not working. - aarosmith1234 - 22nd Oct, 2013 07:18 AM

I'm having this exact same problem, but am not able to find the keyboard.xml file. Where is it located? Thanks for the help!!


RE: TSOP4838 on GPIO, mode2 works, irw not working. - CurlyMo - 22nd Oct, 2013 07:53 AM

Code:
find /usr -name keyboard.xml



RE: TSOP4838 on GPIO, mode2 works, irw not working. - jamesmallen - 2nd Dec, 2013 06:42 AM

I just started using a Radioshack IR receiver module (part # 276-640) plugged into the GPIO pins on my Raspberry Pi, and I was having the same issue as valurgud, with remote key presses appearing multiple times. Rather than remove the keyboard.xml file (which will likely get replaced by updates to XBMC), I decided to look further into the cause of the issue.

I noticed in the file /etc/lirc/hardware/lirc_rpi.conf there is the line below:
Code:
LIRCD_ARGS="-u"

This option causes LIRC to generate Linux input events, which appear to be keyboard-type events. Since XBMC is able to connect directly to LIRC, these seem unnecessary, so I commented out that line. Now button presses on my remote only register once!

I don't know enough about where that file came from to contribute the change back into the Xbian source code, but it seems like that might be a good bug to fix. Does anyone else more knowledgeable have any thoughts about that?


RE: TSOP4838 on GPIO, mode2 works, irw not working. - mk01 - 2nd Dec, 2013 07:08 AM

there was a small discussion about this recently - without final decision. I just checked Alpha5, Beta1X setups and it is there for all those XBian releases.

if we are speaking about "-u" causing issue, it is always about repeating keys twice. but what I miss is the other side of story - what could be the consequences of removing it.


RE: TSOP4838 on GPIO, mode2 works, irw not working. - jamesmallen - 2nd Dec, 2013 07:21 AM

(2nd Dec, 2013 07:08 AM)mk01 Wrote:  if we are speaking about "-u" causing issue, it is always about repeating keys twice. but what I miss is the other side of story - what could be the consequences of removing it.

That's the thing - I don't know what else might depend on that. I think that everything "inside" XBMC should be fine, since XBMC seems to be understanding the presses natively, but any launched apps won't.


RE: TSOP4838 on GPIO, mode2 works, irw not working. - CurlyMo - 2nd Dec, 2013 07:52 AM

As i already told earlier, XBMC has an internal lirc (alike) implementation. That's why some remotes work even when lirc is not running. The problem of repeated key presses happens when the native Lirc and the XBMC Lirc both react on the same key. To fix this, you need to remove the specific key in either XBMC of Lirc. The -u parameter didn't change anything in my TSOP4838 setup.