|
From: Alec L. <lea...@gm...> - 2015-07-28 10:55:20
|
On 27/07/15 19:59, Dan Lawrence wrote: > Hello, Hi! > I've been trying unsuccesfully to send control my TV for the command > line for the past week and have exhausted other avenues of help. LIRC > seems to be one of the great mysteries of the internet. Well, well, well... you are new to Linux, are you? There are more and greater mysteries out there, for sure ;) > From what I can divine from years old forum threads and my own repeated > poking at it, the version of LIRC that ships with Raspbian is too old to > have native support for the irtoy driver Indeed, this is the situation. See [1]. > As such I had a go at getting the latest > version of LIRC from Git and make/installing it via the somewhat spare > instructions on the LIRC webpage. It all _seemed_ to work. Great! > However, I'm not entirely convinced that the 'from source' installed > lirc is fully 'bedded in' in the same way as the old version I tried out > from apt-get but there we are. No, it's not. In particular, the hardware.conf file used by the debian package is not used at all by the upstream version. > What works now (that didn't appear to on the apt-get version of LIRC) is this command: > > mode2 --driver irtoy > > straight after a reboot. However just this: > > mode2 > > on it's own tries to connect to /dev/lirc0 and achieves nothing and > afterwards whatever it did seems to break 'mode2 -driver irtoy' until I > reboot, which isn't that promising. What you need here is the logs. As shipped, the upstream version uses systemd and journalctl, and you should get the logs by using something like 'journalctl -b0 /usr/sbin/lircd' (the path to lircd depends on how you built your package). > irw > > reports: > > connect: No such file or directory > > Trying: > > irsend LIST AA59-00741A "" > > reports: > > do_connect: could not connect to socket > connect: No such file or directory > irsend: could not open socket: No such file or directory > > What is a socket in this context? This is described in [2]. You should probably try to read this, the socket is a basic lirc design issue. The short story is that the socket is the lircd output channel read by applications and determined by the lircd --output option. Also, [2] contains a note on how to run multiple lircd instances. You might need to do this (one for decoding remote(s), one for sending IR data i. e., blasting) > errors because there is no /var/run/lirc directory. I have to mkdir it > first each time I reboot which doesn't seem right. It's certainly not. In your case you should probably just drop a file in /etc/tmpfiles.d, like this: # echo "d /var/run/lirc 0755 root root 10d" \ > /etc/tmpfiles.d/lirc.conf This will create the /var/run/lirc directory on each reboot, and you will be using the default paths. Another way is to edit /etc/lirc/lirc_options.conf. This file contains the paths to the output socket, the pid file and other things. You could just point them to some other existing directory e. g., /var/tmp/lirc. The config file also lets you increase the loglevel to get more output, and possibly use a logfile instead of journalctl to handle the logs. 'man lircd' has the hairy details. > Apologies if my formatting is awful I'm not a regular user of mailing lists. There is absolutely no problem with your formatting :) Cheers! --alec [1] https://bugs.launchpad.net/ubuntu/+source/lirc/+bug/1443590 [2] http://www.lirc.org/html/configuration-guide.html |