RPi2 + IR Remote + Lirc + Kodi = Failure?

Raspberry Pi 2

RPi2 + IR Remote + Lirc + Kodi = Failure?

Postby azur3orion » Tue Apr 05, 2016 7:26 pm

Hi all,

I recently bought a TSOP38238 IR Receiver Module and a Toshiba RC6 MCE remote control to control Kodi through IR remote. For reference, I've used Adafruit's tutorial: https://learn.adafruit.com/using-an-ir-remote-with-a-raspberry-pi-media-center/overview. The remote module is connected to the specified GPIO pins, Kodi installed already, installed Lirc, lirc_rpi module was modprobed. Now I had to test some keypresses from the remote with:
$this->bbcode_second_pass_code('', 'mode2 -d /dev/lirc0')
The response was:
$this->bbcode_second_pass_quote('', 'U')sing device: /dev/lirc0
Using device: /dev/lirc0
space 16777215
pulse 0
space 6342
space 955
pulse 873
space 36
pulse 189
space 51
pulse 19354

so I think the remote signal was captured properly. Now the lircd was started.
$this->bbcode_second_pass_code('', '
sudo systemctl enable lircd
sudo systemctl start lircd
')
My remotes config file was made with irrecord properly, and using the official Arch user guide, I created the Lircmap.xml for Kodi, and copied the remote.xml too. I thought it is the time for test the remote in Kodi, so I restarted the kodi service, but nothing happened if I pressed any key on the remote. I wanted to restart the Pi, but before that I've created some files for automatic module loading:
into: /etc/modprobe.d/lirc.conf
$this->bbcode_second_pass_code('', '
options lirc_rpi gpio_in_pin=18 gpio_out_pin=23
')
into: /etc/modules-load.d/lirc_rpi.conf
$this->bbcode_second_pass_code('', '
irc_rpi
ir-lirc-codec
gpio-ir-recv
')
and put this line to /boot/config.txt:
$this->bbcode_second_pass_code('', 'dtoverlay=lirc-rpi,gpio_in_pin=18')

I restarted the pi, and checked dmesg | grep lirc.
$this->bbcode_second_pass_quote('', '
')[ 8.410282] lirc_dev: IR Remote Control driver registered, major 245
[ 8.441151] lirc_rpi: module is from the staging directory, the quality is unknown, you have been warned.
[ 9.436461] lirc_rpi: auto-detected active low receiver on GPIO pin 18
[ 9.447898] lirc_rpi lirc_rpi: lirc_dev: driver lirc_rpi registered at minor = 0
[ 9.459616] lirc_rpi: driver registered!

Okay, the module is loaded, lircd started, kodi service is running too, but remote still no works.
The cat /sys/kernel/debug/gpio command shows this output:
$this->bbcode_second_pass_quote('', 'G')PIOs 0-53, platform/3f200000.gpio, pinctrl-bcm2835:
gpio-35 (? ) in hi
gpio-47 (? ) out lo

The irw command responses to every keypress:$this->bbcode_second_pass_quote('', '
')000000037ff07be8 00 KEY_RECORD Toshiba
000000037ff07be9 00 KEY_PLAY Toshiba
000000037ff07be5 00 KEY_NEXT Toshiba
000000037ff07be0 00 KEY_DOWN Toshiba
000000037ff07bdf 00 KEY_LEFT Toshiba
000000037ff07bef 01 KEY_VOLUMEUP Toshiba
000000037ff07bee 00 KEY_VOLUMEDOWN Toshiba
000000037ff07bf2 00 KEY_MENU Toshiba
000000037ff07bf1 00 KEY_MUTE Toshiba
000000037ff07bde 00 KEY_RIGHT Toshiba

so the lirc config is okay, and correctly identifies keypresses. Systemctl shows these statuses for lircd and kodi service:
$this->bbcode_second_pass_quote('', '') lircd.service - LIRC Infrared Signal Decoder
Loaded: loaded (/usr/lib/systemd/system/lircd.service; enabled; vendor preset: disabled)
Active: active (running) since k 2016-04-05 21:18:10 CEST; 4s ago
Main PID: 568 (lircd)
CGroup: /system.slice/lircd.service
└─568 /usr/sbin/lircd --nodaemon

ápr 05 21:18:10 pi systemd[1]: Started LIRC Infrared Signal Decoder.
ápr 05 21:18:10 pi lircd-0.9.3a[568]: Info: Initial device: /dev/lirc0
ápr 05 21:18:10 pi lircd-0.9.3a[568]: Info: Initial device: /dev/lirc0
ápr 05 21:18:10 pi lircd[568]: lircd-0.9.3a[568]: Warning: Running as root
ápr 05 21:18:10 pi lircd[568]: lircd-0.9.3a[568]: Info: Using remote: Toshiba.
ápr 05 21:18:10 pi lircd[568]: lircd-0.9.3a[568]: Notice: lircd(default) ready, using /var/run/lirc/lircd
ápr 05 21:18:10 pi lircd-0.9.3a[568]: Warning: Running as root
ápr 05 21:18:10 pi lircd-0.9.3a[568]: Info: Using remote: Toshiba.
ápr 05 21:18:10 pi lircd-0.9.3a[568]: Notice: lircd(default) ready, using /var/run/lirc/lircd

$this->bbcode_second_pass_quote('', '') kodi.service - Starts an instance of Kodi
Loaded: loaded (/usr/lib/systemd/system/kodi.service; enabled; vendor preset: disabled)
Active: active (running) since k 2016-04-05 21:11:00 CEST; 8min ago
Main PID: 261 (kodi-standalone)
CGroup: /system.slice/kodi.service
├─261 /bin/sh /usr/bin/kodi-standalone -l /run/lirc/lircd
├─265 /bin/sh /usr/bin/kodi --standalone -l /run/lirc/lircd
└─274 /usr/lib/kodi/kodi.bin --standalone -l /run/lirc/lircd

ápr 05 21:11:00 pi systemd[1]: Started Starts an instance of Kodi.
ápr 05 21:11:38 pi kodi-standalone[261]: libpng warning: iCCP: known incorrect sRGB profile

The lircd is running as root, and the kodi service is running as kodi user. Could it be a problem? Had I missed any configuration? Is there any solution to get the remote work under Kodi too?
Thanks for any kind of help or answer.
ps: I've tested the module with OSMC distro too, and Kodi reacts there, but I didn't want to switch from arch.
azur3orion
 
Posts: 1
Joined: Tue Apr 05, 2016 6:44 pm
Top

Return to Broadcom

Who is online

Users browsing this forum: No registered users and 2 guests