I cant get LIRC working on Raspberry Pi with Raspbian Stretch, tried several times with fresh OS installs but no luck, I get stuck when i run:
$ sudo /etc/init.d/lirc stop
I get "command not found" but it seems to work when i run:
$ sudo /etc/init.d/lircd stop
[....] Stopping lircd (via systemctl): lircd.serviceWarning: Stopping lircd.service, but it can still be activated by:
lircd.socket
. ok
When I run mode2 I always get "Partial read 8 bytes",
$ mode2 -d /dev/lirc0
Using driver devinput on device /dev/lirc0
Trying device: /dev/lirc0
Using device: /dev/lirc0
Partial read 8 bytes on /dev/lirc0
Any help would be appreciated, I've been stuck for a few days ^^
-
- Posts: 1
- Joined: Sun Sep 10, 2017 4:16 pm
Re: LIRC not working on Raspbian Stretch Raspberry Pi
I have exactly the same issue with a TSOP IR sensor.
I reinstalled jessie, now everything works fine. Seems to be a bug in stretch.
I reinstalled jessie, now everything works fine. Seems to be a bug in stretch.
Re: LIRC not working on Raspbian Stretch Raspberry Pi
Doesn't Stretch use systemd instead of the init stuff in Jessie?
https://gist.github.com/houtianze/59b89 ... 4bd86e6ee7
https://gist.github.com/houtianze/59b89 ... 4bd86e6ee7
Quis custodiet ipsos custodes?
Re: LIRC not working on Raspbian Stretch Raspberry Pi
When installing LIRC on stretch you get version 0.9.4 which has different services structure and configuration. Most documentation I found don't match this version. But to shut down the services you can use:
sudo systemctl stop lircd.socket
sudo systemctl stop lircd.service
I wasn't able to make my IR receiver work with this version.
When running sudo cat /sys/kernel/debug/gpio I don't see the GPIO allocation for IR in and out.
sudo systemctl stop lircd.socket
sudo systemctl stop lircd.service
I wasn't able to make my IR receiver work with this version.
When running sudo cat /sys/kernel/debug/gpio I don't see the GPIO allocation for IR in and out.
Re: LIRC not working on Raspbian Stretch Raspberry Pi
The service structure and configuration was changed in LIRC 0.9.4.
Use:
sudo systemctl stop lircd.socket
sudo systemctl stop lircd.service
Unfortunately I didn't manage to make it work yet but at least you get response when using mode2.
Use:
sudo systemctl stop lircd.socket
sudo systemctl stop lircd.service
Unfortunately I didn't manage to make it work yet but at least you get response when using mode2.
Re: LIRC not working on Raspbian Stretch Raspberry Pi
Where can I find the Jessie image?gspatzenegger wrote: ↑Sun Sep 10, 2017 4:19 pmI have exactly the same issue with a TSOP IR sensor.
I reinstalled jessie, now everything works fine. Seems to be a bug in stretch.
I can only see jessie as ISO file.
Thanks.
Re: LIRC not working on Raspbian Stretch Raspberry Pi
https://www.raspberrypi.org/downloads/raspbian/ has the image files for the Raspberry Pi, both Lite and full Desktop version.
The ISO file is for PCs.
-
- Posts: 1
- Joined: Mon Sep 18, 2017 6:48 pm
Re: LIRC not working on Raspbian Stretch Raspberry Pi
Hi,
according to the instruction located at "/usr/share/doc/lirc/README.Debian.gz":
after that you can reboot your pi order simply restart LIRC:
After that LIRC is running fine for me.
Marcel
according to the instruction located at "/usr/share/doc/lirc/README.Debian.gz":
There is script to "convert" the configuration:## 0.9.4 disruptive update
The configuration is so much changed that updating from 0.9.0 requires
manual intervention. This could be done using the update scripts or as
a completely manual process. Many users will always need some manual steps.
Code: Select all
sudo /usr/share/lirc/lirc-old2new.sh
Code: Select all
sudo killall lirc
systemctl start lidcd.socket lircd.service
Marcel
-
- Posts: 1
- Joined: Tue Oct 03, 2017 12:41 pm
Re: LIRC not working on Raspbian Stretch Raspberry Pi
Thank you Marcel, your solution worked for me, at least partially. After following your advice, I don't get the "partial read 8 bytes" error anymore. If I run irw to see what button I pressed however, I don't get any output. Instead, there is a warning in my syslog saying "Notice: repeat code without last_code received". Any ideas?
Re: LIRC not working on Raspbian Stretch Raspberry Pi
I also have stretch. I've gotten mode2 to work. But irw ignores all key presses. No error messages just no response. I tried bypassing irw with ncat -U (plus socket name) but ncat wasn't found. Looking forward to this being fixed.
-
- Posts: 1
- Joined: Mon Oct 16, 2017 1:55 pm
Re: LIRC not working on Raspbian Stretch Raspberry Pi
Hi,
how did you get mode2 to work? I'm still getting the Partial read 8 bytes on /dev/lirc0.
Greetings,
Philipp
edit: mode2 works! had to use my gpios right. followed http://raspberrypiguide.de/howtos/raspb ... io-how-to/ with wiringPi. but irw doesnt recognize anything
and how do I set-up another IR-transmitter? I'm totally lost there? another service?
how did you get mode2 to work? I'm still getting the Partial read 8 bytes on /dev/lirc0.
Greetings,
Philipp
edit: mode2 works! had to use my gpios right. followed http://raspberrypiguide.de/howtos/raspb ... io-how-to/ with wiringPi. but irw doesnt recognize anything

and how do I set-up another IR-transmitter? I'm totally lost there? another service?
Re: LIRC not working on Raspbian Stretch Raspberry Pi
mode2 works but irsend always gives me
transmission failed
Error running command: Input/output error
Anyone has any idea whats wrong?
transmission failed
Error running command: Input/output error
Anyone has any idea whats wrong?
-
- Posts: 4
- Joined: Wed Nov 08, 2017 2:03 pm
Re: LIRC not working on Raspbian Stretch Raspberry Pi
Did anyone find a solution to getting LIRC working on stretch?
Best I can get is 'Partial read 8 bytes on /dev/lirc0'
cat /sys/kernel/debug/gpio doesn't show my pins
Best I can get is 'Partial read 8 bytes on /dev/lirc0'
cat /sys/kernel/debug/gpio doesn't show my pins

Re: LIRC not working on Raspbian Stretch Raspberry Pi
Hi Marcel,
after
sudo killall lirc
systemctl start lidcd.socket lircd.service
my pi give me this
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Autenticazione richiesta per avviare 'lidcd.socket'.
Multiple identities can be used for authentication:
1. ,,, (pi)
2. root
Choose identity to authenticate as (1-2):
and after 1 (pi) and password
==== AUTHENTICATION FAILED ===
Failed to start lidcd.socket: Access denied
See system logs and 'systemctl status lidcd.socket' for details.
Same thing with root.
Could you help me?
after
sudo killall lirc
systemctl start lidcd.socket lircd.service
my pi give me this
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Autenticazione richiesta per avviare 'lidcd.socket'.
Multiple identities can be used for authentication:
1. ,,, (pi)
2. root
Choose identity to authenticate as (1-2):
and after 1 (pi) and password
==== AUTHENTICATION FAILED ===
Failed to start lidcd.socket: Access denied
See system logs and 'systemctl status lidcd.socket' for details.
Same thing with root.
Could you help me?
Re: LIRC not working on Raspbian Stretch Raspberry Pi
followed this guide and it worked for me
https://gist.github.com/prasanthj/c15a5 ... 22c95378b
after sudo irrecord -d /dev/lirc0 ~/lircd.conf it placed the configured file in /home/pi/name_of_remote.lirc.conf
I had an already configured file from Jessie and after replacing /etc/lirc/lircd.conf + sudo /etc/init.d/lircd restart
it works like it should
https://gist.github.com/prasanthj/c15a5 ... 22c95378b
after sudo irrecord -d /dev/lirc0 ~/lircd.conf it placed the configured file in /home/pi/name_of_remote.lirc.conf
I had an already configured file from Jessie and after replacing /etc/lirc/lircd.conf + sudo /etc/init.d/lircd restart
it works like it should
Re: LIRC not working on Raspbian Stretch Raspberry Pi
The name of the script is sudo /usr/share/lirc/lirc-old2new
Re: LIRC not working on Raspbian Stretch Raspberry Pi
DropbearNinja,
Dude, checkout the below. I had the same problem than you, but with a couple of searchs in found a tutorial that help me:
http://www.instructables.com/id/Raspber ... al-Remote/
Dude, checkout the below. I had the same problem than you, but with a couple of searchs in found a tutorial that help me:
http://www.instructables.com/id/Raspber ... al-Remote/
Re: LIRC not working on Raspbian Stretch Raspberry Pi
For Raspbian Stretch NOT Raspbian Jessie, Wheezy or earlier
First, with lirc 0.9.4 ignore any reference to changing the files modules and hardware. A. they don't exist and B. 0.9.4 doesn't use them.
I am not having a lot of success,
All you should need to do is:
Undo all of the fiddling you have done following outdated tutorials.
make sure dtoverlay=lirc-rpi is in /boot/config.txt and is not commented out
install Lirc and ir-keytable with apt-get
edit /etc/lirc/lir_options.conf. driver=default, device=/dev/lirc0
either make your own Lircd.conf or get one from http://lirc-remotes.sourceforge.net/remotes-table.html
Place that lircd.conf file into /etc/lirc/lircd.conf.d
the name does not matter, any file ending in .conf will be loaded
reboot
You might need to do some fiddly stuff like rename the devinput.conf file in lircd.conf.d and edit the ~/.kodi/userdata/Lircmap.xml for Kodi.
Ignore any instructions you see about using init.d or systemd. Use systemctl instead.
You won't be wasting your time exploring /usr/share/lirc.
If you are uprading from Jessie try
First, with lirc 0.9.4 ignore any reference to changing the files modules and hardware. A. they don't exist and B. 0.9.4 doesn't use them.
I am not having a lot of success,
All you should need to do is:
Undo all of the fiddling you have done following outdated tutorials.
make sure dtoverlay=lirc-rpi is in /boot/config.txt and is not commented out
install Lirc and ir-keytable with apt-get
Code: Select all
sudo apt-get install lirc ir-keytable
either make your own Lircd.conf or get one from http://lirc-remotes.sourceforge.net/remotes-table.html
Place that lircd.conf file into /etc/lirc/lircd.conf.d
the name does not matter, any file ending in .conf will be loaded
reboot
You might need to do some fiddly stuff like rename the devinput.conf file in lircd.conf.d and edit the ~/.kodi/userdata/Lircmap.xml for Kodi.
Ignore any instructions you see about using init.d or systemd. Use systemctl instead.
You won't be wasting your time exploring /usr/share/lirc.
If you are uprading from Jessie try
Code: Select all
sudo bash /usr/share/lirc/lirc-old2new