trouble with irrecord on Raspberry Pi

Kevin Schwartzenberg <[email protected]> Mon, 28 May 2018 16:06:56 -0500
Newsgroups gmane.comp.hardware.lirc
Message-ID <CAKhdhy2RvGfK5L=B3jav0Gd_Jmc_8B_T5RhbNbhX4RG-5=jn7g@mail.gmail.com>
I am attempting to use LIRC along with a Raspberry Pi to remotely control
some window air conditioning units. I can get some functions to work, but
am having difficulty creating a configuration file for my remote. For
reference, I am attempting to follow the instructable found here:
http://www.instructables.com/id/Raspberry-Pi-Zero-Universal-Remote/. Below
are the input/output from my attempts. I have done a lot of searching
online and found several people experiencing the same issue, but none of
them have successfully resolved it. I think it may be a permission problem,
but I don't have enough experience with Linux to resolve it myself. Any
help would be greatly appreciated.

Linux Version: Linux raspberrypi 4.14.30+ #1102 Mon Mar 26 16:20:05 BST
2018 armv6l GNU/Linux
LIRC version



*Attempting to create a new config file and read the buttons from my
remote:*

pi@raspberrypi:/etc/lirc/lircd.conf.d $ irrecord --disable-namespace
Using driver default on device auto
Could not open new config file irrecord.lircd.conf
Could not init hardware (lircd running ? --> close it, check permissions)

*At this point, I try to stop lircd and attempt again.*

pi@raspberrypi:/etc/lirc/lircd.conf.d $ sudo systemctl stop lircd
Warning: Stopping lircd.service, but it can still be activated by:
  lircd.socket
pi@raspberrypi:/etc/lirc/lircd.conf.d $ irrecord --disable-namespace
Using driver default on device auto
Could not open new config file irrecord.lircd.conf
Could not init hardware (lircd running ? --> close it, check permissions)

*Still no luck. Now I'm wondering whether I have a hardware issue, so I
double back and confirm that LIRC is able to talk to my LED and IR
receiver. I download an example config file for a random Samsung device and
run a command.*

pi@raspberrypi:/etc/lirc/lircd.conf.d $ sudo wget -O test.conf
https://sourceforge.net/p/lirc-remotes/code/ci/master/tree/remotes/samsung/00056A.lircd.conf?format=raw
--2018-05-28 20:40:38--
https://sourceforge.net/p/lirc-remotes/code/ci/master/tree/remotes/samsung/00056A.lircd.conf?format=raw
Resolving sourceforge.net (sourceforge.net)... 216.105.38.13
Connecting to sourceforge.net (sourceforge.net)|216.105.38.13|:443...
connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/plain]
Saving to: ‘test.conf’

test.conf               [ <=>                ]   3.24K  --.-KB/s    in
0.001s

2018-05-28 20:40:39 (4.18 MB/s) - ‘test.conf’ saved [3319]

pi@raspberrypi:/etc/lirc/lircd.conf.d $ sudo systemctl stop lircd
Warning: Stopping lircd.service, but it can still be activated by:
  lircd.socket
pi@raspberrypi:/etc/lirc/lircd.conf.d $ sudo systemctl start lircd
pi@raspberrypi:/etc/lirc/lircd.conf.d $ irsend SEND_ONCE Samsung_00056A
KEY_POWER

*This appears to work. The LED lights up when viewed through a digital
camera. Now I try running mode2 to make sure the receiver is responding.*

pi@raspberrypi:/etc/lirc/lircd.conf.d $ sudo systemctl stop lircd
Warning: Stopping lircd.service, but it can still be activated by:
  lircd.socket
pi@raspberrypi:/etc/lirc/lircd.conf.d $ mode2 -d /dev/lirc0
Using driver default on device /dev/lirc0
Trying device: /dev/lirc0
Using device: /dev/lirc0
space 16777215
pulse 8975
space 4479
pulse 572
space 572
pulse 545... and on and on

*it is. *

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot