1

I'm trying to set up lirc on a Pi2 B+ running the latest Raspbian buster and latest kernel / firmware set by rpi-update.

I've started from this HOW-TO.

All I get from

sudo modprobe lirc_rpi

is:

modprobe: FATAL: Module lirc_rpi not found in directory /lib/modules/4.19.79-v7+

How do I get lirc to work?

Thanks in advance for your help!

tlfong01
  • 4,665
  • 3
  • 10
  • 24
sba923
  • 127
  • 1
  • 3
  • Try find something more recent than 5 years old for an ancient OS. – Milliways Oct 13 '19 at 10:39
  • 1
    You should never use rpi-update except you was asked by a developer to do it. It installs unstable kernel and firmware and will potentially increase trouble instead of fixing things. – Ingo Oct 13 '19 at 15:01
  • 2
  • You're 200% right, I should've paid attention to the date in that tutorial (and in a few others I'd found). I know about the warnings for rpi-update, but already had to use it on another Pi where CIFS connectivity had gotten broken because a user-mode update was depending on something not present in my old kernel. – sba923 Oct 17 '19 at 19:05

2 Answers2

2

It really doesn't help using a tutorial from five years ago on a modern system. Too much has changed.

lirc_rpi has been replaced by dtoverlay=gpio-ir and dtoverlay=gpio-ir-tx in /boot/config.txt. See https://raspberrypi.org/forums/viewtopic.php?t=243583 for more details.

Dougie
  • 5,301
  • 10
  • 19
  • 28
-1

Question

(1) How come LIRC stuff so old, any new tutorials and drivers out there?

(2) How to get LIRC to work in Rpi2B+ buster?


Answer

(1) You might find some updated stuff and some get around in Ref 1 below.

(2) The most updated tutorial on LIRC setup is dated 2019aug. I tried it and found it good (Ref 2, Appendix A).

/ to continue, ...


References

(1) Problem with LIRC on Raspberry Pi 3

(2) Setup LIRC on Rpi - StackfOverlow user1200233, 2019aug

/ to continue, ...


Appendices

Appendix A - LIRC Mode 2 Command Testing Record

I installed LIRC and tested remote controller OK (Ref 2). Mode 2 command display the pulse space data OK:

$ sudo mode2 -d /dev/lirc0

Using driver default on device /dev/lirc0

Trying device: /dev/lirc0 Using device: /dev/lirc0

Running as regular user pi

space 16777215

pulse 8936

space 4383

pulse 600 ...

End of answer

tlfong01
  • 4,665
  • 3
  • 10
  • 24
  • Thanks for the pointers. I'd actually discovered the lirc_rpi -> gpio-ir change (introduced in Stretch? this is where I'd started, and switched to Buster in the hope that it would fix my problem... of course it didn't). Then I'd come across https://www.raspberrypi.org/forums/viewtopic.php?p=1475738 so I applied that patch. But now I'm facing the issue described at http://shallowsky.com/blog/hardware/raspberry-pi-ir-remote-stretch.html and I'm stuck... – sba923 Oct 17 '19 at 19:09
  • @sba, Another post on IRrecord might be useful to you: https://raspberrypi.stackexchange.com/questions/104008/lirc-irrecord-wont-record-buster-mode2-works. And as you read in my answers, I found the IRrecord thing messy, tedious. I guess it was developed more that 10 years ago, and not regularly maintained these couple of years. So I gave up LIRC altogether and switched to UART control IR transceiver modules, which are cheap and newbie friendly (no newbie scary daemons! :), ... – tlfong01 Oct 18 '19 at 01:52
  • Note that my current situation is not that irrecord won't record (IOW generates a file with only 0x0's) but that the file it generates isn't usable. I understand modules such as https://www.amazon.fr/Willwin-Infrarouge-Transceiver-Communication-T%C3%A9l%C3%A9commande/dp/B0784LSJVL are friendlier to use but they might be restricted to particular IR encodings, and I have no idea if the remote I want to reuse uses NEC codes. FWIW, the goal is to control Kodi with that remote. – sba923 Oct 19 '19 at 06:23
  • @sba, Ah, so your goal is to control Kodi, with a remote. You might like to let me know the remote you are using. It is very likely using NEC codes. – tlfong01 Oct 19 '19 at 06:30
  • @sba, you might like to let me know which remote you are using, or give me a link to it: (1) Kodi Remote: The 10 Best Ways to Control Kodi From Your Couch - Christian Cawley 2019aug19 https://www.makeuseof.com/tag/kodi-remote-control/ – tlfong01 Oct 19 '19 at 06:37
  • The remote is the one supplied with Terratec's original Noxon device. It's not in the LIRC remote database on GH.

    I will install a Jessie Dev Pi and try what I get there. That post seems to say one can use a file generated with iirecord on Jessie with Buster.

    – sba923 Oct 20 '19 at 08:40
  • @sba, yes, when I first tried the LIRC thing, I very soon discovered that my air conditioner remote is not in the database, which has not been updated for more that two years. So I tried to use IRrecord to record data to compile a config file myself. But the IR record utility seems not updated to new raspbian version and need some twists (one ole timer tole me so). So I gave up and use the UART IR transceiver, ... :( – tlfong01 Oct 20 '19 at 09:04