1

I am using a raspberry pi 4 with raspian. uname -a yields:
Linux raspi 5.15.32-v8+ #1538 SMP PREEMPT Thu Mar 31 19:40:39 BST 2022 aarch64 GNU/Linux
I am trying to get an IR-receiver working (model OS-1838B) with a remote control. It's from this kit.
I have tried several current tutorials, among others the tutorial coming from the vendor of the kit and this recent one.

Here are the instructions and the output from the later one ("$" indicates cli, without "$" indicates editing of config files or output):

$ sudo nano /boot/config.txt

Enter and save:

dtoverlay=gpio-ir,gpio_pin=17

Reboot

$ sudo reboot

After reboot install further software:

$ sudo apt-get install ir-keytable
$ sudo apt-get install python3-pip
$ sudo pip3 install evdev
$ sudo apt-get install evtest

Look for the IR device:

$ sudo ir-keytable

Output:

Found /sys/class/rc/rc0/ with:
        Name: gpio_ir_recv
        Driver: gpio_ir_recv
        Default keymap: rc-rc6-mce
        Input device: /dev/input/event0
        LIRC device: /dev/lirc0
        Attached BPF protocols: xbox_dvd
        Supported kernel protocols: lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp imon 
        Enabled kernel protocols: lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp imon 
        bus: 25, vendor/product: 0001:0001, version: 0x0100
        Repeat delay = 500 ms, repeat period = 125 ms

Enable all protocols

$ sudo ir-keytable -p all

Output:

Protocols changed to unknown other lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp cec imon rc-mm 
Loaded BPF protocol xbox-dvd

Then run evtest to receive signals

$ sudo evtest

Output:

No device specified, trying to scan all of /dev/input/event*
Available devices:
/dev/input/event0:  gpio_ir_recv
/dev/input/event1:  vc4
/dev/input/event2:  vc4
Select the device event number [0-2]: 0
Input driver version is 1.0.1
Input device ID: bus 0x19 vendor 0x1 product 0x1 version 0x100
Input device name: "gpio_ir_recv"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 28 (KEY_ENTER)
    Event code 103 (KEY_UP)
    Event code 105 (KEY_LEFT)
    Event code 106 (KEY_RIGHT)
    Event code 108 (KEY_DOWN)
    Event code 111 (KEY_DELETE)
    Event code 113 (KEY_MUTE)
    Event code 114 (KEY_VOLUMEDOWN)
    Event code 115 (KEY_VOLUMEUP)
    Event code 119 (KEY_PAUSE)
    Event code 128 (KEY_STOP)
    Event code 142 (KEY_SLEEP)
    Event code 161 (KEY_EJECTCD)
    Event code 164 (KEY_PLAYPAUSE)
    Event code 167 (KEY_RECORD)
    Event code 168 (KEY_REWIND)
    Event code 174 (KEY_EXIT)
    Event code 207 (KEY_PLAY)
    Event code 208 (KEY_FASTFORWARD)
    Event code 210 (KEY_PRINT)
    Event code 212 (KEY_CAMERA)
    Event code 224 (KEY_BRIGHTNESSDOWN)
    Event code 225 (KEY_BRIGHTNESSUP)
    Event code 226 (KEY_MEDIA)
    Event code 352 (KEY_OK)
    Event code 356 (KEY_POWER2)
    Event code 358 (KEY_INFO)
    Event code 365 (KEY_EPG)
    Event code 366 (KEY_PVR)
    Event code 368 (KEY_LANGUAGE)
    Event code 369 (KEY_TITLE)
    Event code 370 (KEY_SUBTITLE)
    Event code 372 (KEY_ZOOM)
    Event code 373 (KEY_MODE)
    Event code 377 (KEY_TV)
    Event code 385 (KEY_RADIO)
    Event code 386 (KEY_TUNER)
    Event code 387 (KEY_PLAYER)
    Event code 389 (KEY_DVD)
    Event code 392 (KEY_AUDIO)
    Event code 393 (KEY_VIDEO)
    Event code 398 (KEY_RED)
    Event code 399 (KEY_GREEN)
    Event code 400 (KEY_YELLOW)
    Event code 401 (KEY_BLUE)
    Event code 402 (KEY_CHANNELUP)
    Event code 403 (KEY_CHANNELDOWN)
    Event code 407 (KEY_NEXT)
    Event code 412 (KEY_PREVIOUS)
    Event code 425 (KEY_PRESENTATION)
    Event code 430 (KEY_MESSENGER)
    Event code 512 (KEY_NUMERIC_0)
    Event code 513 (KEY_NUMERIC_1)
    Event code 514 (KEY_NUMERIC_2)
    Event code 515 (KEY_NUMERIC_3)
    Event code 516 (KEY_NUMERIC_4)
    Event code 517 (KEY_NUMERIC_5)
    Event code 518 (KEY_NUMERIC_6)
    Event code 519 (KEY_NUMERIC_7)
    Event code 520 (KEY_NUMERIC_8)
    Event code 521 (KEY_NUMERIC_9)
    Event code 522 (KEY_NUMERIC_STAR)
    Event code 523 (KEY_NUMERIC_POUND)
  Event type 2 (EV_REL)
    Event code 0 (REL_X)
    Event code 1 (REL_Y)
  Event type 4 (EV_MSC)
    Event code 4 (MSC_SCAN)
Key repeat handling:
  Repeat type 20 (EV_REP)
    Repeat code 0 (REP_DELAY)
      Value    500
    Repeat code 1 (REP_PERIOD)
      Value    125
Properties:
  Property type 5 (INPUT_PROP_POINTING_STICK)
Testing ... (interrupt to exit)

Installing all the drivers and configuration seemed to work flawlessly and setting up the hardware on a breadboard also, I double checked several times. However when it came to testing it seemed that the raspi did not receive any signals. Neither on command sudo evtest nor on sudo ir-keytable -p all -v -t -s rc1 did I get any output of received IR signals (I also double checked several times that I specified the right device). I used the IR remote control from the kit for tests as well as a TV-remote.
I tested the various connections from the gpio: voltage worked and when I connected a button to the pin that should collect the signal instead of the IR-receiver it worked. I also bought a replacement IR-receiver for a few bucks: same behavior.
After installing piscope I checked whether GPIO17 received signals. When connecting it to GND you see spikes - see image below.

Does anybody have any idea what the issue is and point me into resolving this? What additional info on my setup would help in solving this question?

Update: foto of the setup
black: 5V to right-most pin
green: GND to middle pin
yellow: GPIO17 to left pin

schematics of the IR receiver as in the data sheet Here's the schematics of the IR receiver as in the data sheet

schematic of connection between raspi and IR Receiver

simulate this circuit – Schematic created using CircuitLab Here are the schematics of the connections from the IR receiver to the raspberry pi.

piscope when manually connecting GPIO17 to GND When manually connecting GPIO17 to GND piscope shows spikes for that pin. So in principle GPI17 receives signals.

7
  • "What additional info on my setup would help in solving this question" details of WHAT YOU DID and results of testing. Don't expect people to read links and guess what you did.
    – Milliways
    Aug 19, 2022 at 22:46
  • We'd love to help, but for a question such as yours a schematic should be provided. It would (for example) allow you to eliminate the ambiguity of referring to pins as left & right. There's a schematic editor available here in RPi SE, or you can use another editor, screenshot the schematic & paste here as a graphic.
    – Seamus
    Aug 20, 2022 at 10:26
  • @joan I istalled piscope. I included fotos of the setup and a screenshot of piscope showing GPIO17 connecting to ground. Aug 20, 2022 at 14:20
  • @Milliways I copied the commands from the links and inserted them into my question. I also provided the output where it seemed relevant to me. If I missed something let me know and I'll provide it. Aug 20, 2022 at 14:21
  • @Seamus I tried to provide schematics to the best of my efforts. I did not find an element IR receiver in the editor nor an element for the GPIO of the raspi therefore I improvised. I hope this not completely different from what you meant. Aug 20, 2022 at 14:23

1 Answer 1

0

After a year I gave it another try. I discovered this tutorial that described how to test the IRReceiver. I actually had two IRReceivers and both tested faulty. So it was a hardware issue with both OS-1838B devices.

I ordered this kit and the IRReceiver now works. The printed manual it came with was outdated (e.g. it still referred to writing "dtoverlay=lirc-rpi" into /boot/config.txt etc.), but the online version (in German) seems to be up to date. I also found this tutorial up to date and helpful.

For those still struggling. Tutorials that still suggest to write the following line (or something like that) into /boot/config.txt are outdated:

dtoverlay=lirc-rpi,gpio_in_pin=17

The following works for me in 2023.

dtoverlay=gpio-ir,gpio_pin=17

The rest can be found in the linked tutorials.

Your Answer

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

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