-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lirc_rpi got replaced by gpio-ir and gpio-ir-tx, how do I upgrade? #2993
Comments
That's a good question. I've had no reason to use IR remotes with a Pi except for testing, and although I did some work with the LIRC driver once I've not played with the replacement - gpio-ir. I managed to find this LibreElec IR guide which may help: https://wiki.libreelec.tv/infrared_remotes#ir_remote_configuration I also think that if you read that and come back with more questions then @HiassofT may be able to give you a few pointers. |
both gpio-ir and gpio-ir-tx will provide a /dev/lircX device so if you like you can use lircd as before - but you'll need to add udev rules to create symlinks for the receive/transmit device nodes if you enable both at the same time as the /dev/lircX numbers aren't guaranteed to be fixed (0 could be receive and 1 transmit, or the other way round). You'll also need to run 2 lircd instances (one for receive, one for transmit/blast). For receiving I'd recommend to drop lircd and switch to in-kernel decoding / ir-keytable configuration. The majority of consumer remotes are supported and you only need to use lircd for a few non-standard remotes. You can also use ir-ctl to transmit/blast IR codes instead of using lircd/irsend Search the RPi forums for more details, I posted some info there |
Thank you! I want to keep using lircd, because I already configured a few remotes with it. In /boot/config.txt remove the lirc-rpi line and add gpio-ir for the receiver and gpio-ir-tx or pwm-ir-tx for the transmitter:
I exchanged the gpio_pin numbers (and the wires of the transmitter and receiver), because pwm-ir-tx doesn't work with gpio pin 17. See /boot/overlays/README for the details. Remove the lirc_rpi module from /etc/modules. Add these rules in /etc/udev/rules.d/71-lirc.rules to get stable /dev/lirc-rx and /dev/lirc-tx device names:
Change the device and listening address in /etc/lirc/lirc_options.conf:
Copy lirc_options.conf to lirc_tx_options.conf and edit these lines:
Create /etc/systemd/system/lircd-tx.service (from the output of
Create /etc/systemd/system/lircd-tx.socket (from the output of
Start lircd-tx:
Create /usr/local/bin/irsend and make it executable:
|
Hello. I'm also here with the same problem for receiving IR signal. After a week of banging my head against the wall I've noticed that:
So I'd rather look for the reason here and it doesn't make sense to go further with any configuration. @elmicha, I suppose the problem is still there, can you please try the same with For now I need to revert back my kernel to previous stable (4.14.y) with lircd working and I'm waiting for stable solution in new kernel release. You can downgrade your kernel using following command: |
Thank you for this Elmicha! |
This forum thread summarizes everything very well: https://www.raspberrypi.org/forums/viewtopic.php?t=235256 Had to patch and rebuild the 4.19 kernel to get my AC control working again because of the #define LIRCBUF_SIZE limitation. Sounds like this is going to be fixed in future kernel versions but that is probably going to take a long while. Not really happy about this surprise. |
I found that lirc-rpi has been replaced by gpio-ir and gpio-ir-tx, and I found that I have to use "dtoverlay=gpio-ir-tx,gpio_pin=17" in /boot/config.txt to get the transmitter working like before. But I can't figure out how the receiver is supposed to work now.
I tried various values for the gpio_pull and rc-map-name options, but none worked.
Describe the bug
I rebooted. All IR transmission and receiving broke. I googled and found how to replace the transmission capability with gpio-ir-tx and it worked. I googled again for the receiving part and nothing worked.
To reproduce
Upgrade from a kernel before 4.19 to 4.19.x when you were happily using LIRC to send and receive IR codes.
Expected behaviour
Everything works like before, maybe after a bit of googling and replacing some module names and options.
Actual behaviour
Both transmitting and receiving broke without warning. No useful documentation to be found anywhere.
System
pi@rpi ~ $ raspinfo
raspinfo: command not found
pi@rpi ~ $ apt search raspinfo
Sortierung... Fertig
Volltextsuche... Fertig
The text was updated successfully, but these errors were encountered: