So I got lirc working, both for receive and for transmit, and it's pretty reliable.
But... every time I reboot, lirc does not work, irsend gives a timeout and irw does not show anything when IR buttons are pressed, basically nothing do do with infra-red works after a reboot.
But if, after boot, I login to the pi and do "sudo /etc/init.d/lirc restart" (which, looking at the script, calls itself with "stop" and then "start"), it all works perfectly.
`runlevel` reports "N 2", and /etc/rc2.d contains a symbolic link:
S16lirc -> ../init.d/lirc
I cannot find anything helpful in the logs (under /var/log, grepping for "lirc") which shows anything going wrong on boot, but evidently it is!
As a *hack* I tried adding a line in /etc/rc.local before the "exit 0" as follows:
but it did not help.
I then tried this instead
"sudo /etc/init.d/lirc restart"
and it worked (I rebooted twice and each time there was no need to manually restart).
So naturally, my first questions are:
Why do I need the "sudo" here?
Which user/group id are the /etc/rc2.d SxxCommand links run as? Presumably not root.
What permissions do I need to tweak or chmod do I need to change, so that I can remove the horrible hack?
Sorry if this is off-topic, since it may be more of a general Linux/Debian question.
I posted it here because it is spoiling my automation/sensing user-experience on my Raspberry Pi!