1

I've sunk about a week into trying to receive infrared on RPi v4. I've worked through the LIRC docs and a number of tutorials.

I am using the VS1838 IR receiver. I actually have 2 which I've been using to make sure that the fault is not with the receiver itself.

My wiring seems to be correct and I've verified that by connecting other devices with the same breadboard/wiring. I have data sent to GPIO 18, power to 3.3V, and ground to ground. I also experimented with temporarily higher voltage.

LIRC is installed. I've tried turning the service on, off, restarting it, rebooting, etc.

sudo ir-keytable -c -p all -t never detects any events. I have verified that the remote is working and have tried 2 alternate remotes. mode2 -m -d /dev/lirc0 also returns nothing.

In my /boot/config.txt I have:

dtoverlay=gpio-ir,gpio_pin=18

with help from Dmitry's answer below I ran modinfo on the driver which shows me this:

filename:       /lib/modules/5.10.63-v7l+/kernel/drivers/media/rc/gpio-ir-recv.ko
license:        GPL v2
description:    GPIO IR Receiver driver
srcversion:     5DDEB234BED17634DA37C0C
alias:          of:N*T*Cgpio-ir-receiverC*
alias:          of:N*T*Cgpio-ir-receiver
depends:
intree:         Y
name:           gpio_ir_recv
vermagic:       5.10.63-v7l+ SMP mod_unload modversions ARMv7 p2v8
2

I would start by checking that /dev/lirc0 is actually working. Look up its major/minor numbers with ls -l /dev/lirc0 and then do a

readlink /sys/dev/char/<X>\:<Y>/device/driver

where <X> and <Y> are the numbers given by ls. That should tell you which driver is associated with that device (gpio-ir-recv?). You can then check if the driver is loaded and how it is configured using lsmod, modinfo <driver-name> etc.

2
  • ls /sys/dev/char/251\:0/device returns device input2 lirc0 power protocols subsystem uevent...... OK here we go... ls /sys/dev/char/251\:0/device/device/driver returns bind ir-receiver@12 module uevent unbind. So the driver is ir-receiver@12? I tried modinfo but it says modinfo: ERROR: Module ir-receiver@12 not found.
    – Hack-R
    Dec 2 '21 at 16:28
  • OK so if I do ls -l on the driver it says ../../../bus/platform/drivers/gpio_ir_recv. Then modinfo gives me filename: /lib/modules/5.10.63-v7l+/kernel/drivers/media/rc/gpio-ir-recv.ko license: GPL v2 description: GPIO IR Receiver driver srcversion: 5DDEB234BED17634DA37C0C alias: of:N*T*Cgpio-ir-receiverC* alias: of:N*T*Cgpio-ir-receiver depends: intree: Y name: gpio_ir_recv vermagic: 5.10.63-v7l+ SMP mod_unload modversions ARMv7 p2v8
    – Hack-R
    Dec 2 '21 at 16:32
0

You have not asked a question.

piscope will show if the VS1838 is working properly.

Depending on your needs IR Record and Playback may work.

1
  • Thanks. I added "how to troubleshoot?" to my question to make it more explicit.
    – Hack-R
    Nov 23 '21 at 21:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.