- Gathering Our Ingredients
- Configuring WinLIRC
- Go Remote and Prosper
Configuring WinLIRC
After downloading the WinLIRC zip file from its web site, unzip the file into a directory on your hard drive. Then, double-click on the winlirc.exe icon in the folder you extracted your zip file into. The first time you do this you'll be presented with an error saying that WinLIRC failed to initialize, as seen in Figure 2. Go ahead and click OK, and get ready to change the configuration.
Figure 2 Launching WinLIRC for the first time will show an initialization error
In the subsequent WinLIRC Configuration window, first verify that the port that is listed refers to the serial port that your infrared receiver unit is plugged into. In my case, my serial port was COM1. Next, use the Browse... button to point to the configuration file that you saved earlier for the Packard Bell remote (for example, packard_bell.cf) Once there, click the Analyze button as shown in Figure 3.
Figure 3 Pointing to the Packard Bell Remote's configuration file
If the analysis of the configuration file is performed correctly, you should be presented with an "Analysis successful" message, as shown in Figure 4. This means that you have successfully taught WinLIRC how to interact with your Packard Bell remote control.
Figure 4. Successful analysis of the configuration file
Authors Note
The Packard Bell FastMedia Remote is particularly interesting because its infrared receiver unit is not bound to the Packard Bell FastMedia remote alone. In fact, you can use the infrared receiver unit with virtually any IR remote. lirc.org helps you out by offering pre-programmed configuration files usable by WinLIRC for a slew of infrared remote controls.
Go ahead and click OK, and then click OK again on the WinLIRC Configuration page. This will minimize the WinLIRC application to the system tray, where WinLIRC listens for your remote IR commands. (See Figure 5.) Notice the gray icon in your system tray. This indicates that WinLIRC is waiting for IR commands.
Figure 5 System Tray Icon indicating WinLIRC is waiting for commands
You should confirm that your desktop is able to successfully receive your remote control's commands by pressing a button on your remote control (for example, try the Mute button) while aiming at the infrared receiver unit. As you do this, you should see the color of your WinLIRC tray area icon turn to green, as shown in Figure 6, signifying that WinLIRC is receiving an infrared command from your remote control.
Figure 6. System Tray Icon indicating the receipt of remote control commands
Configuring the WinLIRC Plugin
Now that you are receiving your IR commands, you need to "teach" Winamp to interpret them and then react to different commands, such as Volume Up and Volume Down. This "teaching" is facilitated via the WinLIRC Plugin I mentioned previously. Unzip the WinLIRC Plugin file to a directory, and then find a file named Gen_ir.dll within the extracted files. You will need to copy this file to your Winamp installation directory's plugin directory, which, if you used the default installation direction directory, should be c:\program files\winamp\plugins.
Next, fire up Winamp and go to Options-->Preferences. In the subsequent Winamp Preferences screen's left-hand pane, choose General Purpose under the Plug-ins option and then WinLIRC Plugin 0.4 in the right hand pane as shown in Figure 7. Then click the "Configure selected plug-in" button.
Figure 7. Choosing to configure the WinLIRC plugin
In the WinLIRC Plugin button screen, assign your remote control buttons to Winamp actions. For example, to specify that you want the Volume Up button on your remote control to turn the volume of Winamp up, click the Add button as shown in Figure 8.
Figure 8. Choosing to add a button assignment
When you get to the Button Assignment window, you'll want to specify a Button ID of "VolUp" and an Action from the pull down menu of "Volume Up" as shown in Figure 9.
Figure 9 Creating a button assignment
You need to repeat this process for all of the remote buttons that you want to associate to the available Winamp actions. All of the different button IDs available to you are defined in the remote configuration file you had WinLIRC "learn" from earlier.
After you have assigned all the remote buttons that you wish to assign, click the Apply button. In Figure 10, I only assigned four of my remote buttons to various Winamp actions.
Figure 10. An example of four button assignments for Winamp actions
At this point, you should be able to use the remote control buttons that you mapped to Winamp actions—and enjoy the fruits of your labors. Pressing the buttons on your remote control should now invoke the action that you assigned to it.
Girding your capabilities with Girder
So, now you can control Winamp, but what about being able to control other programs, such as Windows Media Player or other popular DVD programs? For that, I found that a commercial program called Girder was particularly useful. Girder allows for pre-configured actions to occur based on triggers that you set. These triggers can include infrared events caught by WinLIRC and passed onto Girder via a plugin that bridges Girder with WinLIRC. You can download a trial edition good for 30 days of Girder from http://www.proximis.com. Girder is available for $19.99 and has pre-built "groups" that can save you from having to configure the interaction of various popular software applications on the market.