Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 817
muilpp Avatar asked Jun 18 '16 14:06

muilpp


3 Answers

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!

like image 171
muilpp Avatar answered Sep 22 '22 09:09

muilpp


I had a similar problem and I solved it with this command:

sudo lircd --device /dev/lirc0

If you set the value of LIRCD_ARGS in /etc/lirc/hardware.conf to "--device /dev/lirc0", it should start lircd appropriately, when /etc/init.d/lirc is started at boot.

like image 27
Thomas Avatar answered Sep 23 '22 09:09

Thomas


you need to run lircd. It will create two files (lircd and lircd.pid) at /var/run/lirc/:

lircd
like image 27
Jeff Pal Avatar answered Sep 20 '22 09:09

Jeff Pal