1

I just installed the latest version of LIRC(0.10.1-5.2) on my Raspberry Pi 3, running Raspbian on Debian Buster.

I am trying to get my Pi to take input from an IR remote using lirc.

I have made the necessary changes to these files :

/etc/lirc/lirc_options.conf 

driver          = default
device          = /dev/lirc0

/boot/config.txt

dtoverlay=gpio-ir,gpio_in_pin=18,gpio_out_pin=17,gpio_in_pull=up 

//I set mine on up on GPIO pins 17 and 18 instead of 22 and 23

I have checked and cross-checked my circuit. Everything looks okay.

The challenge I'm facing right now is when I test my IR receiver using the following command,

mode2 -d /dev/lirc0

Nothing happens. There's no output at all. No pulses recorded.

Has anyone else experienced this issue?

Any help would be much appreciated.

2
  • FYI rPi questions should be posted to raspberrypi.stackexchange.com. Jul 30, 2019 at 7:02
  • Oh, thanks for letting me know. I didn't know that.
    – naffie
    Jul 30, 2019 at 7:04

3 Answers 3

3

After spending a great amount of time, trying to figure out how to solve this issue, I was finally able to resolve it. So hopefully my answer will help someone else.

First things first, it's important to note that infrared device has changed from lirc-rpi to gpio-ir

Although, I already had this change in my /boot/config.txt file,like below:

dtoverlay=gpio-ir,gpio_in_pin=18,gpio_out_pin=17,gpio_in_pull=up 
// in stead of dtoverlay=lirc-rpi

I just thought it was important to point out.

Since I am trying to get my Pi to take input from an IR remote using lirc, I decided to first test my IR sensor separately, to make sure it works.

To do that, I connected up the sensor like so:

  1. Pin 1 is the output so we wire this to a visible LED and resistor
  2. Pin 2 is ground
  3. Pin 3 is VCC, connect to 3v3

You can find more detailed step by step instructions from this tutorial here which also shows how to wire up your circuit as seen below.

Test up your IR Receiver During this test, my LED lit up each time I pointed a remote at the receiver, which gave me hope that it was working just fine.

The next step was to test the IR receiver on my raspberry pi, which is the challenge I had in the beginning.

I re-wired my circuit, this time:

  1. Pin 1 is DATA, goes to RPi pin 12 (GPIO 18)
  2. Pin 2 is GND, goes to RPI pin 6 (GROUND)
  3. Pin 3 is POWER, goes RPi pin 1 (3v3)

Then I ran this command sudo /etc/init.d/lirc stop to make sure that service wasn't running.

I then ran the initial command mode2 -d /dev/lirc0 and now pressed random buttons from my remote at the receiver and violá! I could see some pulses on the screen with each button press now. enter image description here

2
  • This was it, ur a saint. THey need to do a better job at updating the guides to update this fix. Oct 2, 2021 at 14:20
  • So what actually solved the problem? Like you, I already had the correct boot.txt entry. I see that you tested this first with an LED but I don't understand what actually solved the problem for you.Did you just need to stop the service? Mine is already stopped...
    – Hack-R
    Nov 18, 2021 at 18:57
0

Like you I managed to get all the way to receiving pulses/data on the RPI 3, seem to have a problem with the output.

I have the USB strip light and my RPI with the IRC receiver, this is so I can monitor what data captured corresponds with the button pressed on the remote keypad. Works just fine.

However? If I push the ON button - I get data, if I push the ON button again I get another set of data. The two set of data dont match? , in both cases mode2 or mode2 -r.

I get the feeling I'm missing a method to decode the output, I've noticed there's a huge amount of companies and they all have distinct code sets.

Here is one thread that exactly matches what I have (24-Key IR remote).

http://woodsgood.ca/projects/2015/02/13/rgb-led-strip-controllers-ir-codes/

However I dont see the same set codes ???

1
  • Some remote controls toggle when the power button is pressed. Basically they send an "ON" and the next time the key is pressed they send an "OFF". This is true of Sony. Other brands change the beginning (pre-amble) each time a key is pressed, Look up and learn about Pronto, it will help you a LOT. IR is not difficult, but it is NOT what most think it it. There is way too much to ever write here, so here is a link - remotecentral.com/features/irdisp1.htm.
    – Wendall
    Dec 27, 2019 at 16:42
0

Try to change the device to mode2 -d /dev/lirc1 I also faced this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.