-
-
Save prasanthj/c15a5298eb682bde34961c322c95378b to your computer and use it in GitHub Desktop.
Notes to make IR shield (made by LinkSprite) work in Raspberry Pi 3 (bought from Amazon [1]). | |
The vendor has some documentation [2] but that is not complete and sufficient for Raspbian Stretch. | |
Following are the changes that I made to make it work. | |
$ sudo apt-get update | |
$ sudo apt-get install lirc | |
# Add the following lines to /etc/modules file | |
lirc_dev | |
lirc_rpi gpio_in_pin=18 gpio_out_pin=17 | |
# Add the following lines to /etc/lirc/hardware.conf file | |
LIRCD_ARGS="--uinput --listen" | |
LOAD_MODULES=true | |
DRIVER="default" | |
DEVICE="/dev/lirc0" | |
MODULES="lirc_rpi" | |
# Update the following line in /boot/config.txt | |
dtoverlay=lirc-rpi,gpio_in_pin=18,gpio_out_pin=17 | |
# Update the following lines in /etc/lirc/lirc_options.conf | |
driver = default | |
device = /dev/lirc0 | |
$ sudo /etc/init.d/lircd stop | |
$ sudo /etc/init.d/lircd start | |
# Check status to make lirc is running | |
$ sudo /etc/init.d/lircd status | |
# Reboot before testing | |
$ reboot | |
# To test if lirc driver is working | |
$ sudo /etc/init.d/lircd stop | |
$ mode2 -d /dev/lirc0 | |
<press a key in remote and you should see multple lines like below> | |
pulse 560 | |
space 1706 | |
pulse 535 | |
# to record a custom remote/register a remote device | |
$ sudo /etc/init.d/lircd stop | |
$ sudo irrecord -d /dev/lirc0 ~/lircd.conf | |
# follow the instruction prompted by the above command carefully | |
# at the end ~/lircd.conf file will be generated | |
# backup the original lircd.conf | |
$ sudo mv /etc/lirc/lircd.conf /etc/lirc/lircd_original.conf | |
$ sudo cp ~/lircd.conf /etc/lirc/lircd.conf | |
$ sudo /etc/init.d/lircd start | |
# you can test if the recorded remote works by | |
$ irsend SEND_ONCE <device-name> KEY_POWER | |
$ irsend SEND_ONCE <device-name> KEY_VOLUMEUP | |
[1] https://www.amazon.com/Infrared-Shield-for-Raspberry-Pi/dp/B00K2IICKK/ref=pd_sbs_328_1?_encoding=UTF8&psc=1&refRID=1QPY33VFCGETBJ17K8QE | |
[2] http://learn.linksprite.com/raspberry-pi/shield/infrared-transceiver-on-raspberry-pi-lirc-software-installation-and-configuration/ |
hello, my kernel is 4.19.58 on raspbian 10 buster.
I have some troubles with irrecord.
I have tried it with 2 remotes, but both do not work, the following problems occure:
-
After hit the remote until 2 lines are filled with dots, the message appears:
"Got gap (121879)}"
and furthermore: "Cannot find any gap, using an arbitrary 50 ms one" ... and so one -
Then I create my names for the keys. This works well.
-
Then the toogle mask creating failes: "Cannot find any toggle mask"
The created configuration file has except for the name, gap and frequency everywhere 0 or 0x0. For the created key-codes as well, so it is useless.
Does somebody have a glue?
Thanks a lot
I'm having the exact same issue as you @mst94. Any luck with finding a solution?
I'm having the exact same issue as you @mst94. Any luck with finding a solution?
Hi, unfortunately I am still searching for a solution to this problem... I will post a solution here when I am lucky!
I'm having the exact same issue as you @mst94. Any luck with finding a solution?
Removing LIRC and reinstalling it with this guide made it working! https://github.com/AnaviTechnology/anavi-docs/blob/master/anavi-infrared-phat/anavi-infrared-phat.md#setting-up-lirc
I hope it will work for you as well.
Thanks @mst94. I was able to get it working as well..
I have the same issue. Which raspberry pi Version and which Kernel Version do you use? I tried to Set it up with the tutorial. Maybe the ir receiver is the Problem? Which ir receiver do you use?
I have the same issue. Which raspberry pi Version and which Kernel Version do you use? I tried to Set it up with the tutorial. Maybe the ir receiver is the Problem? Which ir receiver do you use?
Hi, take a look above: "Kernel is 4.19.58 on raspbian 10 buster".
I am using "TSOP31238 Integrated IR receiver 38kHz 45° VISHAY TELEFUNKEN", ordered from Amazon.
for anyone on buster who was, like me, struggling and failing with this, see: https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=235256
tl;dr, lirc_dev isn't included in kernel 4.19, so it's recommended to use gpio-ir... but then irrecord (among others) doesn't work, so there's a patch that this absolute lifesaver has provided (linked in the above), which you can roll into your own patched, compiled & installed version of lirc.
I am getting an error when trying to execute the command:
irsend SEND_ONCE vanLights KEY_POWER.
I get this output:
transmission failed
Error running command: Input/output error
######### For users using kernel version 4.19+ ###########
This code does not work for higher kernel version. (Mine : kernel version : 4.19.58, lirc version : 0.10.1-5.2)
as "m1r05l4v" commented above, for users who has higher kernel versions, please refer the other doc