[Howto] mceusb driver with lirc protocol instead of rc-6/devinput
|
12th Jan, 2014, 11:25 PM
Post: #1
|
|||
|
|||
[Howto] mceusb driver with lirc protocol instead of rc-6/devinput
Hi,
I'm brand new to XBian - really good work, guys. I migrated XBMC from my zaphod headed main box to a RPi (in order to get rid of the HDMI cable across the living room doorstep) One thing that bugged me on the main box already back when I set it up was the fact that the LIRC devinput driver caused some laggyness with my mceusb receiver. Hardware used: - USB Formosa21 eHome Infrared Transceiver - Logitech Harmony 650 Symptoms with devinput: - first button press is ignored very often when the remote hasn't been used for some minutes/hours - huge lags on key repeats every now and then Solution: Use mceusb driver with the lirc protocol instead of rc-6 via the input event layer. This also fixes (see comments below): - Microsoft MCE 1039 remote unmapped keys These are the steps needed: 1. Edit /etc/lirc/hardware/custom.conf (this gets sourced by the main hardware.conf and takes precedence if at least one of the variables in there is uncommented and not empty) Code: #DRIVER="" # do _not_ set devinput here 2. Edit /etc/lirc/lircd.conf and add at the top: Code: include "/etc/lirc/remotes/mceusb.conf" 3. Restart lirc and xbmc Terminal # service lirc restart # service xbmc restart Took me about an hour to find out how this needs to be set up in XBian. Dead simple, actually. My remote feels a lot snappier now. Hope it helps others with USB MCE receivers, too. |
|||
22nd Jan, 2014, 08:01 AM
Post: #2
|
|||
|
|||
RE: [Howto] mceusb driver with lirc protocol instead of rc-6/devinput
Thank you!
After quite a bit of searching, this is exactly what I needed to get my Microsoft MCE 1039 remote to work with Xbian. There were a few other posts on the forums about this particular remote, but not many clear solutions (though this post looks equivalent). It worked OOTB with Xbmcbuntu, so I assumed it would here too. Although the key mapping is a little different (I may still look into modifying it), it now works flawlessly! Until now only arrows and enter worked. |
|||
23rd Jan, 2014, 05:45 AM
Post: #3
|
|||
|
|||
RE: [Howto] mceusb driver with lirc protocol instead of rc-6/devinput
Glad it helped you!
The keymapping was a little different here too, compared to my Arch main box. But as I was using a custom Lircmap.xml anyway, I just copied it over and edited the few changed keys in there. Another way would be to copy over the lircd.conf file from your Xbmcbuntu install to /etc/lirc/remotes/ under a new name, and either include it in the main lircd.conf or specify it in hardware/custom.conf. Oh, and I realized that this setup somehow doesn't survive a reboot, so I have to restart lirc and xbmc services manually after boot. But I have no idea why that happens. |
|||
25th Jan, 2014, 05:33 PM
Post: #4
|
|||
|
|||
RE: [Howto] mceusb driver with lirc protocol instead of rc-6/devinput
Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here |
|||
25th Jan, 2014, 06:53 PM
Post: #5
|
|||
|
|||
RE: [Howto] mceusb driver with lirc protocol instead of rc-6/devinput
@mk01: no, it's more like: lircd does start, but the hardware/custom.conf isn't sourced from main hardware.conf at boot.
/sys/class/rc/rc0/protocols shows rc-6 as active, and the lircd process has --driver=devinput. Manually restarting lirc afterwards works fine. |
|||
26th Jan, 2014, 12:49 AM
Post: #6
|
|||
|
|||
RE: [Howto] mceusb driver with lirc protocol instead of rc-6/devinput
so maybe ir-keytable taking care ?
put the keytable module into blacklist. ir-keytable will show you which module it is. then edit any file in /etc/modprobe.d/ having line "blacklist my_rc_6_module" Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here |
|||
28th Jan, 2014, 05:28 AM
Post: #7
|
|||
|
|||
RE: [Howto] mceusb driver with lirc protocol instead of rc-6/devinput
Not sure I'm quite following. The ir-keytable command returns:
Terminal xbian@xbian ~ $ ir-keytable Found /sys/class/rc/rc0/ (/dev/input/event0) with: Driver mceusb, table rc-rc6-mce Supported protocols: NEC RC-5 RC-6 JVC SONY SANYO LIRC other Enabled protocols: RC-6 Repeat delay = 500 ms, repeat period = 125 ms I tried adding "blacklist mceusb" to /etc/modprobe.d/xbian.conf then rebooting and now the remote doesn't work at all Terminal xbian@xbian ~ $ ir-keytable /sys/class/rc/: No such file or directory I also tried blacklisting rc-rc6-mce without any effect. What exactly is the module to blacklist? |
|||
28th Jan, 2014, 05:55 AM
Post: #8
|
|||
|
|||
RE: [Howto] mceusb driver with lirc protocol instead of rc-6/devinput
Blacklisting anything codec/decoder whise but ir_lirc_codec does the trick here. Thanks @mk01.
@sievo: don't blacklist the mceusb driver, as that is the main driver for the device. Just blacklist all the ir_rc*_decoder etc like: Code: # cat /etc/modprobe.d/lirc.conf |
|||
3rd Feb, 2014, 06:22 PM
Post: #9
|
|||
|
|||
RE: [Howto] mceusb driver with lirc protocol instead of rc-6/devinput
@teekay
ok, as we have a solution, would you be so kind and create new post, small how-to with short step-by-step summary of all this being told? I will make the post sticky and lock. would you? thanks! Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here |
|||
3rd Feb, 2014, 08:06 PM
Post: #10
|
|||
|
|||
RE: [Howto] mceusb driver with lirc protocol instead of rc-6/devinput
I'm not sure yet if the solution is valid. I rebootet the box a few times, and it seems that blacklisting sometimes works, sometimes not.
I mean all ir protocol/codec modules are loaded despite the blacklist config. No idea were to look at in te module-init tools/upstart corner. What seems to be working constantly is moving the Code: echo lirc > /sys/class/rc/rc0/protocols Maybe someone could confirm this before we turn it into a locked sticky thread. Also, wouldn't the wiki be a better place for something like this? |
|||
4th Feb, 2014, 02:06 AM
Post: #11
|
|||
|
|||
RE: [Howto] mceusb driver with lirc protocol instead of rc-6/devinput
look also at
/etc/rc_maps.cfg it is association list - so if a module X is loaded - keymaps are loaded automaticaly. (and this is not happening via modprobe but ir-keytable). you have to disable module or delete mapping. Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here |
|||
3rd Apr, 2014, 07:00 PM
Post: #12
|
|||
|
|||
RE: [Howto] mceusb driver with lirc protocol instead of rc-6/devinput
Same issue here. Some keys on the remote work, some don't and some take multiple presses before something happens. (HP MediaCenter IR receiver with generic MCE remote) It stopped working somewhere in the process of upgrading from Beta 2 to RC1 and all updates after. No idea when. Followed most items in this thread to fix it but with a couple of changes:
This did nothing for me: Code: # cat /etc/modprobe.d/lirc.conf This did nothing for me (in rc.local) Code: echo lirc > /sys/class/rc/rc0/protocols This worked for me (add to /etc/udev/rules.d/99-input.rules. Adapted from http://forum.xbmc.org/showthread.php?tid=141868 ) Code: ACTION=="add|change", SUBSYSTEM=="rc", RUN+="/usr/bin/ir-keytable -s $name -c -p LIRC" JJ |
|||
3rd Apr, 2014, 07:37 PM
Post: #13
|
|||
|
|||
RE: [Howto] mceusb driver with lirc protocol instead of rc-6/devinput
@_JJ_
so using kernel mapper to emulate LIRC interface on IR receiver and then use of default lirc service ? Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here |
|||
9th Jul, 2014, 06:38 PM
Post: #14
|
|||
|
|||
RE: [Howto] mceusb driver with lirc protocol instead of rc-6/devinput
Thanks, with the guide from post#1 I got my MCE remote working.
I still these Problems are left: - After every reboot the remote receiver is not available (and echo lirc > /sys/class/rc/rc0/protocols fails because /sys/class/rc/rc0/protocols doesn't exists) - I have to unplug and replug the USB on my PI after every boot to make the ir being recognized - I have to enter the echo ... command manually after I replugged the IR Receiver - rc-6 is set as default every time How can i set lirc as default service for ir? or How to automatically execute the echo when IR is connected? - "ir-keytable -t" isn't showing any events regardless if lirc or rc-6 is selected. ir-keytable output shows that remote is recognized: Code: $ ir-keytable |
|||
9th Jul, 2014, 11:03 PM
Post: #15
|
|||
|
|||
RE: [Howto] mceusb driver with lirc protocol instead of rc-6/devinput
I have been struggling with this for several days as well.
Firstly I have very limited Linux knowledge so I not sure exactly what is going on. I do not have a usb receiver but I have a TSOP34838 receiver wired to the GPIO pins of the Raspberry Pi. To get that to work I first had to add lirc_rpi gpio_in_pin=18 to “/etc/modules” Then I followed the opening post. This made my remote work. However it stopped working after a reboot. Then I edited “/etc/default/xbmc” and added WAITFOR="lircd" Now after a reboot it survives. (I have rebooted several times today) As mentioned I have limited Linux experience so I cannot tell you exactly what I did. I think xbmc now waits until lirc is started before it continues to start??? Also when I do not use the: echo lirc > /sys/class/rc/rc0/protocols line, it still works fine for me. |
|||
« Next Oldest | Next Newest »
|
Possibly Related Threads... | |||||
Thread: | Author | Replies | Views: | Last Post | |
[PROBLEM] lirc, mceusb and generic HP USB IR receiver | dharmabm | 6 | 26,544 |
19th Apr, 2014 01:23 PM Last Post: mk01 |