Re: LIRC on Raspberry Pi 4B

Sean Young <[email protected]> Fri, 24 Sep 2021 15:00:19 +0100
Newsgroups gmane.comp.hardware.lirc
Message-ID <[email protected]>
Hi Torsten,

On Tue, Sep 21, 2021 at 11:51:01PM +0200, Torsten Mohr wrote:
> Hello,
> 
> I try to set up LIRC on a Raspberry Pi OS but doin't even have a
> /dev/lirc0.
> 
> I downloaded the Raspberry Pi OS last week, the kernel version is
> 5.10.60-v7l+.

Did you compile the kernel yourself?

> I located the IR related kernel modules in this directory:
> 
> /lib/modules/5.10.60-v7l+/kernel/drivers/media/rc
> In there are gpio-ir-recv.ko and gpio-ir-tx.ko (which I don't need).
> Also, there is no "gpio-ir.ko", but some more "ir-*.ko".
> 
> When I do "modprobe gpio-ir-recv" I see no fails in "journalctl -f".
> 
> But also when "ls -l /dev | grep lirc" shows no output at all.
> 
> "lsmod | grep gpio" shows:
> gpio_ir_recv    16384 0
> 
> To my understanding, the gpio-ir-recv is sufficient to provide a
> "/dev/lirc0", is that correct?

No, gpio-ir-recv needs devicetree to tell it where the the IR receiver
lives, that's how arm hardware discovery works. You'll need to either
enable the correct overlay or edit the devicetree file and compile a new
kernel.

> Also when I additionally do "modprobe ir-rc5-decoder" then there is no
> /dev/lirc*.
> 
> I tried numerous Howtos I found, most refer to "gpio-ir", not "gpio-ir-
> recv", I did not yet find out if this is the same.
> 
> Also, on the Raspi many Howtos describe changing /boot/config.txt to
> mention the kernel module in there.  I tried that, it makes no
> difference.

What changes did you make to /boot/config and what is the output of
ls /proc/device-tree/
?

> As a receiver I use the "RemotePi Board + 2015" which has the GPIO
> compatible IR receiver on GPIO18
> 
> To my understanding this fail seems to be very basic and already in the
> lowest layers (no userspace involved yet) and the points that could
> influence it are:
> - boot/config.txt
> - the used kernel module
> - the GPIO pin
> 
> To my understanding, the configuration in /etc/lirc is not yet
> important, am I correct?
> 
> Has anybody got a hint on what to try to make LIRC work on the
> Raspberry Pi 4B?

I don't think it should be any different from any other Raspberry Pi.

Thanks,
Sean