|
From: Dan L. <da...@my...> - 2015-07-27 19:54:14
|
Hello, 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. As the subject indicates I'm trying to do something that (I think) is fairly straightforward but I'm probably missing an obvious step due to me unfamiliarity with linux. I managed to get the USB irdroid Transciever working in about an hour on Windows using WinLirc but Raspbian has defeated me. 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 which, I believe, is the latest version of the linux driver (formerly known as irman) that works with the irdroid Transciever. 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. 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. 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. Trying: sudo lircd --device /dev/ttyACM0 --driver irtoy errors because there is no /var/run/lirc directory. I have to mkdir it first each time I reboot which doesn't seem right. After I make the 'lirc' directory and run the above command again it seems to be accepted (at least no console errors are reported) but trying: 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? Any ideas what I have failed to install correctly to make this work? Should I just abandon all hope? Apologies if my formatting is awful I'm not a regular user of mailing lists. Cheers, Dan |
|
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 |
|
From: Bengt M. <bu...@be...> - 2015-08-17 14:56:05
|
On 07/27/15 19:59, Dan Lawrence wrote: > Hello, > > 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. As the subject > indicates I'm trying to do something that (I think) is fairly > straightforward but I'm probably missing an obvious step due to me > unfamiliarity with linux. I managed to get the USB irdroid Transciever > working in about an hour on Windows using WinLirc but Raspbian has > defeated me. > > 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 which, I believe, is the latest > version of the linux driver (formerly known as irman) that works with > the irdroid Transciever. No, this description is about as wrong as it could be. There exists a very old piece of receive-only IR hardware, called IrMan (http://www.intolect.com/irmandetail.htm) The IrToy comes with, in addition to its own communication protocol, an emulation of the decoder in IrMan, http://dangerousprototypes.com/docs/USB_IR_Toy:_IRman_decoder_mode. This is the one that Lirc < 0.9.2 used, repeat, receive only. Since around a year, there exists a driver for the native IrToy (by Peter Koiman, and to some extent hacked by myself). This does not work work with IrDroid. The Lirc IrMan driver (irman_drv.c) does not support sending. How (if?) it works in WinLirc, I have no idea. [Yes, this was some weeks ago. Better late than never... I bought one such gadget just of interest.] Greetz, Bengt |
|
From: Dan L. <da...@my...> - 2015-08-19 10:24:31
|
So you are saying that there is no driver that will support IR sending/blasting using the irrDroid Transciever on linux? It definitely does work on windows via WinLIRC by the way. I haven't had much time to work on this unfortunately. I got derailed once I realised that I would need to update the Raspberry Pi's OS to properly switch to using systemd so I could follow alec's information on debugging because Raspbian's version of debian is pretty old. Got as far as upgrading the OS and switching to systemd last time I had some free brain time. I was thinking I probably needed to recompile LIRC on the new OS as the difference in OSes might explain some of the bugs I was seeing.... However if the driver itself just won't work with hardware on Linux I probably should just abandon the whole thing as a bad job. On the offchance, does anyone know of any purchasable USB IR sending hardware that is supported by LIRC? cheers Dan On 17/08/2015 15:55, Bengt Martensson wrote: > On 07/27/15 19:59, Dan Lawrence wrote: >> Hello, >> >> 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. As the subject >> indicates I'm trying to do something that (I think) is fairly >> straightforward but I'm probably missing an obvious step due to me >> unfamiliarity with linux. I managed to get the USB irdroid Transciever >> working in about an hour on Windows using WinLirc but Raspbian has >> defeated me. >> >> 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 which, I believe, is the latest >> version of the linux driver (formerly known as irman) that works with >> the irdroid Transciever. > No, this description is about as wrong as it could be. There exists a > very old piece of receive-only IR hardware, called IrMan > (http://www.intolect.com/irmandetail.htm) The IrToy comes with, in > addition to its own communication protocol, an emulation of the decoder > in IrMan, > http://dangerousprototypes.com/docs/USB_IR_Toy:_IRman_decoder_mode. This > is the one that Lirc < 0.9.2 used, repeat, receive only. Since around a > year, there exists a driver for the native IrToy (by Peter Koiman, and > to some extent hacked by myself). This does not work work with IrDroid. > > The Lirc IrMan driver (irman_drv.c) does not support sending. How (if?) > it works in WinLirc, I have no idea. > > [Yes, this was some weeks ago. Better late than never... I bought one > such gadget just of interest.] > > Greetz, > > Bengt > > > ------------------------------------------------------------------------------ > |
|
From: Alec L. <lea...@gm...> - 2015-08-19 13:49:05
|
On 19/08/15 12:24, Dan Lawrence wrote: > On the offchance, does anyone know of any purchasable USB IR sending > hardware that is supported by LIRC? I'm personally happy with iguanaIR [1], and they are certainly not expensive. These are supported since long. The new irtoy driver also seems to work well. This is 0.9.2+, though. Cheers! --alec [1] http://iguanaworks.net/ir [2] http://dangerousprototypes.com/docs/USB_Infrared_Toy |
|
From: Bengt M. <bu...@be...> - 2015-08-19 14:23:45
|
On 08/19/15 12:24, Dan Lawrence wrote: > So you are saying that there is no driver that will support IR > sending/blasting using the irrDroid Transciever on linux? It definitely > does work on windows via WinLIRC by the way. I took a second look at the thing. First I opened it with IrScrutinizer, and it turned out that it reported as IrToy, firmware version 2.0!! (The supported FW version both for Lirc and for IrScrutinizer is 2.2, so that is why it does not work. Probably W*Lirc uses an older driver that "likes" 2.0.) Looking closer at the hardware shows that it is really nothing else than a stripped down IrToy!! The PCB has holes for the non-demodulating sensor QSE159, but is not present. Compare the irdroid schema: http://www.irdroid.com/wp-content/uploads/2013/11/Irdroid_USB_Schematic.pdf with the original: http://dangerousprototypes.com/docs/images/6/6c/Cct-USB-IRToy-vii.png It is "open hardware", but just putting your name on someone elses work??!! So what you get from the Bulgarians is less than the original, for a considerably higher price... I am right now examining if I can reflash it with the 2.2 firmware, and solder a QSE159 to it. It looks like also the bootloader was stripped, so it may require a programmer. Will report. >> On the offchance, does anyone know of any purchasable USB IR sending >> hardware that is supported by LIRC? >I'm personally happy with iguanaIR [1], and they are certainly not >expensive. These are supported since long. Running an extra daemon, rite? Bengt |
|
From: Alec L. <lea...@gm...> - 2015-08-19 14:45:41
|
On 19/08/15 16:23, Bengt Martensson wrote: >> I'm personally happy with iguanaIR [1], and they are certainly not >> expensive. These are supported since long. > Running an extra daemon, rite? Or not. There's a built-in kernel module which seems to work for some folks. But I stick to the daemon, partly since I'm used to it, partly since I maintain the Fedora package. --alec |
|
From: Bengt M. <bu...@be...> - 2015-08-19 16:42:54
|
On 08/19/15 16:23, Bengt Martensson wrote: > On 08/19/15 12:24, Dan Lawrence wrote: >> So you are saying that there is no driver that will support IR >> sending/blasting using the irrDroid Transciever on linux? It definitely >> does work on windows via WinLIRC by the way. > > I took a second look at the thing. First I opened it with IrScrutinizer, > and it turned out that it reported as IrToy, firmware version 2.0!! (The > supported FW version both for Lirc and for IrScrutinizer is 2.2, so that > is why it does not work. Probably W*Lirc uses an older driver that > "likes" 2.0.) Looking closer at the hardware shows that it is really > nothing else than a stripped down IrToy!! The PCB has holes for the > non-demodulating sensor QSE159, but is not present. > > Compare the irdroid schema: > http://www.irdroid.com/wp-content/uploads/2013/11/Irdroid_USB_Schematic.pdf > > with the original: > http://dangerousprototypes.com/docs/images/6/6c/Cct-USB-IRToy-vii.png > > It is "open hardware", but just putting your name on someone elses work??!! > > So what you get from the Bulgarians is less than the original, for a > considerably higher price... > > I am right now examining if I can reflash it with the 2.2 firmware, and > solder a QSE159 to it. It looks like also the bootloader was stripped, > so it may require a programmer. Will report. So, it worked! There is really no bootloader as I described above, so it is necessary to solder 5 pins to the holes that are provided, thus allowing programming over ICSP. Pin1 of the ICSP-connector is the side close to the center of the PCB. I flashed 2.2 + bootloader using a PICkit 3, and added a QSE159 as described above (oriented the same way as the TSOP). And everythings works, even the frequency measurement (not in Lirc though, only in IrScrutinizer...) Problem solved. At lease for those of us who own a PIC-programmer... >> Running an extra daemon, rite? >Or not. There's a built-in kernel module which seems to work for some >folks. But I stick to the daemon, Thanx. |