raspberry-piraspberry-pi2lirc

LIRC irsend: could not connect to socket irsend: No such file or directory


I am trying to configure LIRC to work with my Raspberry 2B and a circuit I build with a transistor and a IR transmitter as explained in this tutorial

After the installation of LIRC, I followed all the steps and I added these two lines in /etc/modules

lirc_dev
lirc_rpi gpio_out_pin=36

Then I typed this in /etc/lirc/hardware.conf

LIRCD_ARGS="--uinput"
LOAD_MODULES=true
DRIVER="default"
DEVICE="/dev/lirc0"
MODULES="lirc_rpi"
LIRCD_CONF=""
LIRCMD_CONF=""

After rebooting, I added the configuration of my Samsung remote (BN59-00516A) to /etc/lirc/lircd.conf

Then I restarted LIRC again but when I run a command to send a IR frequency

irsend SEND_ONCE Samsung_BN59-00865A KEY_POWER

it complains with the following error:

irsend: could not connect to socket

irsend: No such file or directory

I am guessing this is a problem with my device socket, because in the hardware.conf file I set

DEVICE = "/dev/lirc0"

(just because the tutorial states it), but lirc0 file isn't within the folder. I couldn't find any other question related to this problem and google didn't help me much either. Does anyone have any hint on this?


Solution

  • After googling a lot, I found out an update is needed to have everything working properly. In my case I did:

    apt-get update, apt-get upgrade, rpi-update
    

    Also, as pointed out in this other tutorial, depending on the Raspberry firmware, you might need to add this to /boot/config.txt

    dtoverlay=lirc-rpi,gpio_in_pin=XX,gpio_out_pin=YY
    

    Substitute X and Y for whatever pins you're using!