Re: LIRC on Raspberry Pi 4B
Torsten Mohr <[email protected]> Fri, 24 Sep 2021 23:16:42 +0200
| Newsgroups | gmane.comp.hardware.lirc |
|---|---|
| Message-ID | <[email protected]> |
Hi Sean, Thanks for your hints so far! Am Freitag, den 24.09.2021, 15:00 +0100 schrieb Sean Young: > 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? No, I installed NOOBS-lite_v3_7 and then installed a standard Raspberry Pi OS from that one. From the subdirectories in /lib/modules and from "uname -a" it is "5.10.60-v7l+". > > 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. Thanks for that hint. I was unsure if this is necessary. In a Howto I found it said I need to "mount -o remount,rw /boot", but I skipped that and my editing in /boot/config.txt were persistent, so I guess that is fine? The only thing I edited there is add a line at the end saying: dtoverlay gpio-ir-recv Here I noticed my first mistake, it should be dtoverlay=... And after some googling I noticed my second mistake, though there is a file gpio-ir-recv.ko, the dtoverlay line should read: dtoverlay=gpio-ir Then in /proc/device-tree I see: ir-receiver@12 And also, there is a /dev/lirc0 now !! I have then learned my new remote control with irreceive, rebooted and see that it is used when typing "/etc/init.d/lircd status". Thanks !!! Best regards Torsten > > 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