RPi 3B -- LIRC won't setup device: could not get file information for /dev/lirc0

3

Very new to this low-level driver stuff, so many places to make mistakes. Basically I'm trying to get an IR transmitter with lirc. I have a IR led to pin 23 with a transistor, however there's nothing in /dev/lirc or /dev/lirc0

I installed lirc with apt-get install lirc,

then added dtoverlay=lirc-rpi,gpio_out_pin=23,gpio_in_pin=22 to config.txt and changed lirc_options.conf to

driver          = default
device          = /dev/lirc0

However, there's nothing in /dev, and if I try to send with irsend I get hardware does not support sending. The system status for lircd shows this error:

Error: could not get file information for /dev/lirc0

I'm using a RPi 3B running Raspbian Stretch with Linux raspberrypi 4.19.42-v7+ #1219 firmware.

I don't know what other command dump you might need so just comment and I'll add to the question

NOTE: I was reading about gpio-ir however that seems to be receiver only. Any link to any library with IR transmission would be appreciated too.

Lorenzo

Posted 2019-05-26T15:25:02.547

Reputation: 135

Answers

5

It seems in newer Kernel lirc-rpi doesnt exist anymore in /boot/overlays/. I found in /boot/overlays/README that we have to use gpio-ir (Receiver) or/ and gpio-ir-tx (Transmitter) instead of lirc-rpi

For me it helped to change:

dtoverlay=lirc-rpi,gpio_out_pin=23,gpio_in_pin=22

to:

dtoverlay=gpio-ir,gpio_pin=22       #(without: in)
dtoverlay=gpio-ir-tx,gpio_pin=23    #(without: out)

At the moment, i have to comment out one of them, because it works either gpio-ir OR gpio-ir-tx, not both at the same time (for me).

J

Jot

Posted 2019-05-26T15:25:02.547

Reputation: 64

Can I then use normal LIRC with it? Or do I need some other software? – Lorenzo – 2019-05-28T10:45:25.250

Just tried, works like a charm with the normal lirc binary – Lorenzo – 2019-05-28T12:53:54.787

0

I have uname -a that gives Linux Hostname 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l GNU/Linux

and after adding this line to /boot/config.txt and rebooting

dtoverlay=lirc-rpi,gpio_in_pin=22,gpio_out_pin=23

I finally got a /dev/lirc0

Rho Phi

Posted 2019-05-26T15:25:02.547

Reputation: 131

-1

I use Lirc for my Smarthome with "fhem" to send signals to TV and to recieve signals from tv-remote to switch some lights. At the moment I only can send signals. My way on fresh and updated STRETCH:

apt-get install lirc ir-keytable

Update the following line in /boot/config.txt:

(#dtoverlay=gpio-ir,gpio_pin=27)

dtoverlay=gpio-ir-tx,gpio_pin=23

Update the following lines in /etc/lirc/lirc_options.conf:

driver = default

device = /dev/lirc0

install LircClient:

perl -MCPAN -e shell

install Lirc::Client

I am able to use my old recorded lircd.config to send signals to my tv. But I cant use ".lircrc" in the old way, to recieve signals. Perhaps there is someone who knows how to do? Hope it helps! J

Jot

Posted 2019-05-26T15:25:02.547

Reputation: 64