WinLIRC stuff

Yes, it means I’m hacking around on a MythTV setup again. LIRC is Linux Infrared Remote Control, a program for receiving keypresses from a remote control (TVs, etc.) on the computer, and/or blasting out simulated remote-control keypresses. WinLIRC is the same thing, for a Windows box*. Its documentation is a bit lacking however, so this is just a post to save the time of people who Google the error messages and wind up here.

In short: Upon first run, the program expects “Learn” to be the first and only option you ever think about touching (not “OK”, which you, like me, probably thought was the logical choice). And it is expecting a “.cf” file for its config file, not a .cfg or .rc or any of the others suggested in the Config ‘Browse…’ dialog. On first run, type a fresh new (not yet existing) file name (ending in .cf) in the Config box and press Learn, and the resulting steps will create this file. Do not select ‘winlirc.rc’ as the config file, even if this is one of the two logical choices. (You can select ‘sample.cf’ as the config file, but it probably won’t do anything useful with your remote.)

Also beware that the initial configuration screen defaults to “COM2” as your initial port for some stupid reason. This does not mean that your COM1 or connected device are broken, or that COM1 was in use by another program, etc. It’s just a braindead default (and does not necessarily mean that COM2 is the best choice, or that your machine actually has a COM2 for that matter).

Error message: “WinLIRC failed to initialize. Would you like to change the configuration and try again?”

Solution: This occurs on the first run of the program, since no config file has yet been specified. If you already know you’re going this route, it might be worthwhile to look at the “sample.cf” file in a text editor to see what’s in there. If you’re just trying it out and want to see if your hardware works, just enter any old filename in the ‘Config’ box and press LEARN. (Again, not ‘OK’.)

Error message: “Could not create dialog boxes.” (In a dialog box…)

Solution: This unclear message means any kind of generic failure to read info about your remote from a config file, probably because the config file doesn’t exist or hasn’t been specified yet. It could also occur if the config file exists, but is in the wrong format, or corrupted, or otherwise does not contain the info WinLIRC is looking for (for example, if you chose ‘winlirc.rc’ as the config file).

*Heresy, I know. The Myth box is a real Linux system, honest. I’m trying the untested IR receiver hardware on my Windows box first since running it there is a double-click rather than dicking around with why the LIRC kernel driver is barfing errors, and that machine actually has a free serial port vs. the uncertainty of whether all this timing-based stuff has any hope of working over a USB-to-serial converter.

Tags:

2 Responses to “WinLIRC stuff”

  1. Jim says:

    It’s very unlikely that this will work over a USB-serial adapter.

  2. Tim says:

    Thanks for the reply; I was afraid that was the case. I do have LIRC running successfully on the mythbuntu box now, after some aforementioned fiddling. The cable box (Motorola DCT-2224) was moved to the USB-serial adapter, freeing COM1 for the IR receiver.

Leave a Reply