IR Not Working After October Update

After the update I can no longer send IR commands with my self-built transmitter via Lirc. The command that worked flawlessly before was irsend -d /var/run/lirc/lircd-lirc0 SEND_ONCE <device> <command>. After some googling I found that the IR entries in /boot/config.txt changed from:

dtoverlay=lirc-rpi
dtparam=gpio_in_pin=24
dtparam=gpio_out_pin=22

to:

dtoverlay=gpio-ir,gpio_pin=24

I added the line dtoverlay=gpio-ir-tx,gpio_pin=22 in the hopes to enable sending again, without success. The irsend command above gives me the error hardware does not support sending. Looking at the dmesg output confirms that transmit is still not enabled (rc rc0: lirc_dev: driver gpio_ir_recv registered at minor = 0, raw IR receiver, no transmitter).

I hope someone can help me with this issue.

Moved to its own thread for better visibility.

Shouldn’t that be

dtoverlay=gpio-ir-tx,gpio_pin=22
dtoverlay=gpio-ir,gpio_pin=24

CC @DBMandrake

Well, yes, but it was not configured like that after the update. As I said above, I tried exactly that configuration, but irsend still fails.

The automatic overlay migration process does not migrate settings for IR sending, (only receiving) as IR sending has not been tested with the new split gpio-ir receive and tx drivers.

The reason is pretty simple - none of the OSMC devs have access to a Pi with IR blaster hardware attached so it could not be tested, and we do not like to release changes that cannot be tested and thus will probably not work.

If someone with the necessary IR blaster hardware to test is able to figure out what the issue with the gpio-ir-tx driver is we’re happy to incorporate the changes.

One thing you could check is to see whether the new split driver approach results in two seperate lirc devices. What does ls -al /dev/lirc* and ls -al /var/run/lirc/lircd* show ? You might be trying to use the receive only lirc device to send. If you see another lirc device try using that.

1 Like

Executing ls -al /dev/lirc* shows:

crw-rw---- 1 root video 243, 0 Nov 1 20:51 /dev/lirc0

ls -al /var/run/lirc/lircd* shows:

srw-rw-rw- 1 root root 0 Nov 1 20:51 /var/run/lirc/lircd
srw-rw-rw- 1 root root 0 Nov 1 20:51 /var/run/lirc/lircd-lirc0
-rw-r–r-- 1 root root 4 Nov 1 20:51 /var/run/lirc/lircd-lirc0.pid
-rwxr-xr-x 1 root root 158 Nov 1 20:51 /var/run/lirc/lircd-lirc0.sh

Since dmesg tells me that there’s no transmitter (rc rc0: lirc_dev: driver gpio_ir_recv registered at minor = 0, raw IR receiver, no transmitter) I suspect the problem on a lower level, i.e. there’s no need for an actual IR blaster to test this.

Nevertheless, I tried sending with all devices listed above.
Sending on /var/run/lirc/lircd returns with:

irsend: timeout

Sending on /var/run/lirc/lircd-lirc0 returns with:

irsend: hardware does not support sending

Sending on /dev/lirc0 returns with:

irsend: could not connect to socket
irsend: Connection refused

I have the same problem with the same symptoms. I only have a transmitter (which used to work perfectly). Now since the ‘upgrade’, I have no lirc devices created under /dev. I only use the tx line in my /boot/config.txt file ‘dtoverlay=gpio-ir-tx,gpio_pin=24’. And yes, this could have easily been checked without the need for hardware.

Where would one begin debugging at this device creation level? Happy to help if it’s a better solution than rolling-back to the previous version…although what I really want is a shortcut to have it working just the way it used to :confused:

Hi guys

This problem reared it’s ugly head for me as well this weekend. A quick bit of backtracking has led me to the conclusion that the IR transmitter module was not included in this build.

From other places I’ve read that I need to use this in config.txt now.

dtoverlay=gpio-ir-tx,gpio_pin=17

Which still does not work and lsmod shows only the receiver kernel module loaded.

lsmod | grep gpio
bcm2835_gpiomem        16384  0
gpio_ir_recv           16384  0
rc_core                49152  3 gpio_ir_recv

Checking on a pi4 I have here running buster…

find /lib/modules/4.19.75-v8+/ -name "gpio-ir*"
/lib/modules/4.19.75-v8+/kernel/drivers/media/rc/gpio-ir-recv.ko
/lib/modules/4.19.75-v8+/kernel/drivers/media/rc/gpio-ir-tx.ko

while on my osmc instance gpio-ir-tx.ko is not found.

find /lib/modules/4.19.55-3-osmc/ -name "gpio-ir*"
/lib/modules/4.19.55-3-osmc/kernel/drivers/media/rc/gpio-ir-recv.ko

Happy to test the module if you can include it.

Thanks in advance!

Do you know which CONFIG_ option needs to be enabled? I can then add this for you
Edit: looks like CONFIG_IR_GPIO_TX

1 Like

I’ve added this for you.

1 Like

My system said there was an update available and I got all excited… but sadly it’s still the same.

osmc@bluebmc:~$ sudo modprobe gpio-ir-tx
modprobe: FATAL: Module gpio-ir-tx not found in directory /lib/modules/4.19.55-5-osmc

and if should be in kernel/drivers/media/rc/…

osmc@bluebmc:~$ ls -la /lib/modules/4.19.55-5-osmc/kernel/drivers/media/rc/gpio-ir-*
-rw-r--r-- 1 root root 8628 Nov  3 13:57 /lib/modules/4.19.55-5-osmc/kernel/drivers/media/rc/gpio-ir-recv.ko

Still no tx module found.

That’s not the latest version. Please try checking again.

Will do!

6th time was the charm! 4.19.55-6-osmc did the trick.

lsmod | grep gpio
bcm2835_gpiomem        16384  0
gpio_ir_tx             16384  0
gpio_ir_recv           16384  0
rc_core                49152  6 gpio_ir_tx,gpio_ir_recv

Thanks Sam. You da man!

1 Like

I’m glad this is now resolved.

1 Like

I was having the same issue after the update but getting the latest kernel and adding ‘dtoverlay=gpio-ir-tx,gpio_pin=17’ to config.txt has sorted things on my 3 Pi2/3 systems, however i’m still having problems with my Pi zero. Not getting any errors with latest kernel, everything acts like the IR command has been sent but the transmitter does nothing. I’ve reverted to the older version (July?) of OSMC on that pi for now to get functionality back. Anyone got any ideas?

Is the Pi 0 definitely on the latest kernel?

Sam

I think so. Output of uname -r :
4.19.55-6-osmc

Edit: I’ve done a fresh install on another SD card and fully updated. Same as before.

Hi, sorry for not replying for so long. I was hassling around with this problem for quite some time now.
After the first update Sam mentioned above the transmitter device was indeed back again in /var/run/lirc and transmitting was possible without any error messages. Unfortunately, I’m having the same result as Quonith. irsend does not complain anymore, but the actual transmission is VERY unreliable. Say, 1 out of 20 times a transmission may be successful. So I suspect something must have changed in LIRC or the drivers. I’m sure it can’t be an issue with my IR blaster because I made a fresh install of OSMC on another Pi with the July version and the transmission worked instantly and reliable again.