Page 1 of 1

LIRCD can't detect remote

Posted: Sun Feb 26, 2017 10:45 pm
by coreywi
I've got a RPi3 that I am trying to get to recognize signals from a RC-6/Windows media center remote with a TSOP38238 receiver. There are lots of HOWTO's scattered all over but they either refer to the old /etc/modules-based configuration, or they just did not work for me.

I keeping getting hung on the setup step getting the 'mode2 -d /dev/lirc0' command to detect anything (of course lircd is not running when I try this).

I have the IR receiver power pins wired to 3.3V and GND pins. The data pin is wired to GPIO physical pin 18 (BCM 24). I have an oscilloscope between GND and the data pin and I see pulses when I press a remote button. In idle state, the scope is reading about 1.98V. When I press a button, the pulses go from 1.98V to near 0V.

I verified the following line in my /boot/config.txt:

Code: Select all

# Uncomment this to enable the lirc-rpi module
dtoverlay=lirc-rpi
And dmesg seems to be happy (with the exception of the first line):

Code: Select all

pi@raspberrypi:~ $ dmesg | grep -i lirc
[    1.959740] systemd[1]: Cannot add dependency job for unit lircd-setup.service, ignoring: Unit lircd-setup.service failed to load: No such file or directory.
[    2.873137] lirc_dev: IR Remote Control driver registered, major 243
[    2.881714] lirc_rpi: module is from the staging directory, the quality is unknown, you have been warned.
[    3.934935] lirc_rpi: auto-detected active high receiver on GPIO pin 18
[    3.935269] lirc_rpi lirc_rpi: lirc_dev: driver lirc_rpi registered at minor = 0
[    3.935274] lirc_rpi: driver registered!
The modules appears to be loaded:

Code: Select all

pi@raspberrypi:/etc/lirc $ lsmod | grep lirc
lirc_dev               10583  1 lirc_rpi
lirc_rpi                9032  0
I thought the problem might be that perhaps the TSOP38238 is active low, not active high as the dmesg logs show, so I tried both of these (one at a time) in config.txt:

Code: Select all

dtoverlay=lirc-rpi,gpio_in_pin=18,gpio_in_pull=up
dtoverlay=lirc-rpi,gpio_in_pin=18,gpio_in_pull=down
But it did not appear to make any difference in 'mode2' showing something. Any help would be appreciated.

Re: LIRCD can't detect remote

Posted: Mon Feb 27, 2017 12:40 am
by Texas-Mark
coreywi wrote: The data pin is wired to GPIO physical pin 18 (BCM 24)..
I think this is your problem as you are using GPIO (BCM) pin 18 in your config.txt Try using physical pin 12 for your data or change your config.txt to 24.

Re: LIRCD can't detect remote

Posted: Mon Feb 27, 2017 3:54 am
by coreywi
Nice simple solution...thanks!

Darn differing pin numbering schemes!

Re: LIRCD can't detect remote

Posted: Mon Feb 27, 2017 8:10 am
by DougieLawson
coreywi wrote:Nice simple solution...thanks!

Darn differing pin numbering schemes!
https://pinout.xyz fixes that nonsense.

Image