Markdown source

# Appunti su LIRC

<abstract>
Appunti di uso sul ricevitore IR GPIO e LIRC (Linux Infrared Remote Control)
</abstract>


Per l'utilizzo di LIRC con un ricevitore TSOP e' necessario aggiungere/scommentare
il seguente codice nel file /boot/config.txt

<pre class="terminal">
#
# LIRC
#
# http://alexba.in/blog/2013/01/06/setting-up-lirc-on-the-raspberrypi/
#
dtoverlay=lirc-rpi,gpio_in_pin=23,gpio_out_pin=22,debug=1
</pre>

e fare il reboot del sistema.

Modalita' raw, richiede lo stop preventivo di tutti i demoni e socket di lirc.

<pre class="terminal">
	sudo systemctl stop lircd lircmd irexec lircd.socket
	mode2 --driver default --device /dev/lirc0
	Using driver default on device /dev/lirc0
	Trying device: /dev/lirc0
	Using device: /dev/lirc0
	space 2403981
	pulse 780
	space 901
	pulse 781
</pre>

Purtroppo lirc non funziona piu' nei kernel > 4.4 vedi il
<a HREF="https://bugzilla.redhat.com/show_bug.cgi?id=1412860"> bug </a>
segnalato (ma ignorato dai mantainers di Debian).

Compilando dai source lirc l'errore scompare, segno che il package Raspbian non è aggiornato:

<pre class="terminal">
git clone git://git.code.sf.net/p/lirc/git lirc
cd lirc
./autogen.sh
./configure
make
sudo make install
sudo ldconfig

sudo lircd --device /dev/lirc0 -n -D7 --driver=default &

irw /var/run/lirc/lircd 
ircd-0.11.0-devel[2676]: Notice: accepted new client on /var/run/lirc/lircd
lircd-0.11.0-devel[2676]: Info: Cannot configure the rc device for /dev/lirc0

0000000000001401 00 KEY_1 northstar
0000000000001401 01 KEY_1 northstar
0000000000001401 02 KEY_1 northstar
0000000000001401 03 KEY_1 northstar

</pre>


Link sull'argomento:

* [IR receiver data sheet](http://www.farnell.com/datasheets/30500.pdf)
* [Setting Up LIRC on the RaspberryPi](http://alexba.in/blog/2013/01/06/setting-up-lirc-on-the-raspberrypi/)
* [Raspberry PI pinout schematica](https://pinout.xyz/pinout/pin23_gpio11#)
* [Open Source Universal Remote](https://upverter.com/alexbain/f24516375cfae8b9/Open-Source-Universal-Remote/)
* [Open Source Universal Remote - Parts & Pictures](http://alexba.in/blog/2013/06/08/open-source-universal-remote-parts-and-pictures/)
* [Setting Up LIRC on the RaspberryPi](http://alexba.in/blog/2013/01/06/setting-up-lirc-on-the-raspberrypi/)
* [Raspberry Pi 2: LIRC with an active-low IR-receiver with raspbian Jessie](http://filter-failure.eu/2015/11/raspberry-pi-2-lirc-with-an-active-low-ir-receiver-with-raspbian-jessie/)
* [Lesson 23 IR Remote Control](https://www.sunfounder.com/learn/sensor-kit-v2-0-for-raspberry-pi-b-plus/lesson-23-ir-remote-control-sensor-kit-v2-0-for-b-plus.html)
* [Creating a Raspberry Pi Universal Remote With LIRC](https://www.hackster.io/austin-stanton/creating-a-raspberry-pi-universal-remote-with-lirc-2fd581)
* [How to Control the GPIO on a Raspberry Pi with an IR Remote](http://ozzmaker.com/how-to-control-the-gpio-on-a-raspberry-pi-with-an-ir-remote/)
* [IR-KEYTABLE without LIRC / LIRCD](https://forum.libreelec.tv/thread/4210-ir-keytable-without-lirc-lircd/)
* [Remote control media player without lirc using ir-keytable](https://madaboutbrighton.net/articles/2015/remote-control-media-player-without-lirc-using-ir-keymap)




@include='bio_andrea_montefusco'