Pironman5 Infrared Receiver

I couldn’t get the IR receiver to work. After much searching the Internet and a bit of trail & error, below is a proven procedure to get the Pironman5 IR Receiver working.

  1. Edit config.txt and assign the GPIO pin used to receive IR codes

    sudo nano /boot/firmware/config.txt

    Add - dtoverlay=gpio-ir,gpio_pin=13

  2. Install lirc (Linux Infrared Remote Control) package

    $ sudo apt-get update
    $ sudo apt-get upgrade
    $ sudo apt-get install lirc

  3. Edit the lirc options file

    $ sudo nano /etc/lirc/lirc_options.conf

    [lircd]
    driver = default
    device = /dev/lirc0

  4. Reboot the system

    $ sudo reboot

  5. Initial function testing

    $ mode2 -d /dev/lirc0
    Using driver default on device /dev/lirc0
    Trying device: /dev/lirc0
    Using device: /dev/lirc0
    Press any key on a remote control
    pulse 8912
    space 4353

    pulse 8915
    space 2185
    pulse 582
    timeout 132090

  6. Create lirc config file for a remote control

    $ irrecord

    Using driver default on device /dev/lirc0

    Press RETURN to continue.

    Checking for ambient light creating too much disturbances.
    Please don’t press any buttons, just wait a few seconds…

    No significant noise (received 0 bytes)

    Enter name of remote (only ascii, no spaces) :little-black
    Using little-black.lircd.conf as output filename

    Press RETURN now to start recording.
    (for each button on your remote control, press 5 times, then move to the next button)

    Got gap (39425 us)}

    Please keep on pressing buttons like described above.
    (same as above, press each button on the remote control 5 teams each)

    Please enter the name for the next button (press to finish recording)
    KEY_1

    Now hold down button “KEY_1”.

    Please enter the name for the next button (press to finish recording)
    KEY_2

    Now hold down button “KEY_2”.
    Please enter the name for the next button (press to finish recording)
    (press when all buttons assigned)

    Checking for toggle bit mask.
    Please press an arbitrary button repeatedly as fast as possible.
    Make sure you keep pressing the SAME button and that you DON’T HOLD
    the button down!.
    If you can’t see any dots appear, wait a bit between button presses.

    Press RETURN to continue.

    Successfully written config file little-black.lircd.conf

  7. Edit the new lircd.conf file

    irrecord adds more hex code than necessary, the second hex
    codes for each button causes errors without any error message

    KEY_DOWN 0x00FFA25D 0x00000001

    After deleting the second hex code

    KEY_DOWN 0x00FFA25D

    irw works fine:

    $ nano little-black.lircd.conf

    Copy of the conf file I created (comments removed):

begin remote

name little-black
bits 32
flags SPACE_ENC
eps 30
aeps 100

header 9222 4477
one 606 1640
zero 606 562
ptrail 611
repeat 9235 2205
gap 39399
repeat_gap 135996
toggle_bit_mask 0x0
frequency 38000

  begin codes

      KEY_1                    0x00FFA25D
      KEY_2                    0x00FF629D
      KEY_3                    0x00FFE21D
      KEY_4                    0x00FF22DD
      KEY_5                    0x00FF02FD
      KEY_6                    0x00FFC23D
      KEY_7                    0x00FFE01F
      KEY_8                    0x00FFA857
      KEY_9                    0x00FF906F
      KEY_0                    0x00FF9867
      KEY_MENU                 0x00FF6897
      KEY_INFO                 0x00FFB04F
      KEY_UP                   0x00FF18E7
      KEY_DOWN                 0x00FF4AB5
      KEY_LEFT                 0x00FF10EF
      KEY_RIGHT                0x00FF5AA5 0xFFFFFFFF
      KEY_OK                   0x00FF38C7 0xFFFFFFFF

  end codes

end remote

  1. Copy the lircd.conf file into the required folder

    sudo cp little-black.lircd.conf /etc/lirc/lircd.conf.d/

  2. Restart the lircd service

    $ sudo systemctl restart lircd

  3. Run irw to confirm

    $ irw (start pressing keys on the remote)
    0000000000ffa25d 00 KEY_1 little-black
    0000000000ff629d 01 KEY_2 little-black

Thank you for sharing your solution with us. We’ll be sure to recommend your approach to other users who may encounter similar issues with the infrared receiver in the future.

We truly appreciate you taking the time to provide this helpful information.