User avatar
coreywi
Posts: 17
Joined: Thu Dec 31, 2015 6:56 pm
Location: Calgary, Canada

LIRCD can't detect remote

Sun Feb 26, 2017 10:45 pm

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.

Texas-Mark
Posts: 100
Joined: Wed Dec 28, 2016 3:30 pm

Re: LIRCD can't detect remote

Mon Feb 27, 2017 12:40 am

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.

User avatar
coreywi
Posts: 17
Joined: Thu Dec 31, 2015 6:56 pm
Location: Calgary, Canada

Re: LIRCD can't detect remote

Mon Feb 27, 2017 3:54 am

Nice simple solution...thanks!

Darn differing pin numbering schemes!

User avatar
DougieLawson
Posts: 39121
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: LIRCD can't detect remote

Mon Feb 27, 2017 8:10 am

coreywi wrote:Nice simple solution...thanks!

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

Image
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Return to “Troubleshooting”