USB IR Toy: Configure WinLIRC

From DP

Jump to: navigation , search


WinLIRC is the classic PC remote control program. It's open source, and it's been around forever. The project was idle for a long time, but recently Dukey started development and gave it new life.

WinLIRC supports the Infrared Toy thanks to a plugin also developed by Dukey. Thanks for the fantastic support!


Stuff you'll need

WinLIRC just decodes remote control signals. A separate program interfaces with WinLIRC and automates actions on your computer. We like EventGhost.

Other programs that can interface with WinLIRC are listed at the bottom of the WinLIRC homepage (software which supports WinLIRC).

Install WinLIRC

Download the latest WinLIRC.

  • Extract WinLIRC to a folder. There's no setup program to run.
  • You can move the WinLIRC folder to \program files\ or anywhere you like.

Install IR Toy plugin


Download the latest WinLIRC IR Toy plugin.

  • Extract IRToy.dll to the WinLIRC \plugins\ folder.

Configure WinLIRC

These steps describe how to setup and configure WinLIRC the first time you run it.

Start for the first time


  • Click winlirc.exe to start the program.
  • WinLIRC will give an error and ask to create a new configuration file. Click OK.

Select IR Toy plugin


  • Change Input Plugin type to IRToy.dll
  • Click Plugin Setup

Setup IR Toy plugin


Be sure you opened the IR setup menu by clicking Plugin Setup in the previous step.

You will also need to know the COM port number assigned to the IR Toy. Check this in the Windows control panel under Start-> settings-> control panel-> system-> device manager (hardware tab)-> ports. If there are multiple ports you can unplug the IR Toy USB cable and note which port disappears.

  • Change the COM Port to the number assigned to your IR Toy.
  • Click OK on the IR Toy Setup window.
  • Click OK on the Plugin Setup window.

Finish configuration


WinLIRC should be able to detect the IR Toy and receive signals.

  • Now setup a remote control using one of the two methods below.

Setup a remote control


WinLIRC needs a configuration file to do anything useful with remote control input. You can download a config file, or generate your own.

Remote control configurations used by LIRC also work with WinLIRC. Browse the existing configuration files.

  1. If an existing configuration matches your remote control, download it and put a copy in the WinLIRC folder.
  2. Click Reconfigure on the main WinLIRC menu.
  3. Click Browse next to Config, select the configuration file for your remote control.
  4. Click OK, and OK again.

The remote box should list one or more remote controls found in the configuration file.

Record a remote control configuration


You can record your own remote configuration files with the IRRecord utility included in the WinLIRC download.

Setup WinLIRC

  • First setup WinLIRC, IRRecord.exe uses the settings from WinLIRC.
IRRecord.exe -d IRToy.dll ..\remote.cfg
  • Next, run IRRecord.exe from the command prompt or a batch file. Note the syntax above and the file path to remote.cfg.

Protocol detection

Now start pressing buttons on your remote control.

It is very important that you press many different buttons and hold them
down for approximately one second. Each button should generate at least one
dot but in no case more than ten dots of output.
Don't stop pressing buttons until two lines of dots (2x80) have been

Press RETURN now to start recording.

  • IRRecord will ask you to press lots of buttons so it can determine the remote control protocol.

Found const length: 113489
Please keep on pressing buttons like described above.
RC-5 remote control found.
Found possible header: 916 833
Header is not being repeated.
No repeat code found.
Signals are biphase encoded.
Removed header.
Signal length is 12

  • After a lot of button presses IRRecord will determine the protocol and create a .cfg file.

Record each button

Now enter the names for the buttons.
Please enter the name for the next button (press <ENTER> to finish recording)
Now hold down button "1".

  • Next, IRRecord will learn each button on the remote.
  • Type a name and then press a button. Repeat for each button.
  • When all buttons are recorded, press enter to continue.

Toggle bit detection

Checking for toggle bit mask.
Please press an arbitrary button repeatedly as fast as possible.
Make sure you keep pressing the SAME button and that you DON'T HOLD
the button down!.
If you can't see any dots appear, then wait a bit between button presses.

Press RETURN to continue.

No toggle bit mask found.
Successfully written config file.

Press any key to continue . . .

  • Finally, IRRecord determines if there is a toggle bit by reading the same key repeated.
  • Load the generated remote control configuration according to the instructions above.
Check your firmware version if IRRecord fails with a message about timeout and gap.

Automating actions

WinLIRC just decodes remote control signals. A separate program interfaces with WinLIRC and automates actions on your computer. We like EventGhost.

Other programs that can interface with WinLIRC are listed at the bottom of the WinLIRC homepage (software which supports WinLIRC).

Infrared signal visualizer

Download the infrared visualizer tool.

The WinLIRC project has an infrared signal visualizer tool. It graphs the infrared signal timing data returned by the IR Toy. It does "live updates" - each button press refreshes the display.

Install irGraph

The visualizer relies on WinLIRC, and WinLIRC must be installed and the IR Toy plugin properly configured.

  • Download irGraph from the WinLIRC tools section.
  • Extract irGraph.exe to the same folder as WinLIRC.

Run irGraph

RC5 TV 1 (first press)


RC5 TV 1 (second press)


  • Start irGraph.exe to open the visualizer.
The visualizer relies on WinLIRC.
WinLIRC must be installed and the IR Toy plugin properly configured.

WinLIRC commands (manual control & create file based 'macros'.)

Commands - that can be sent to WinLIRC - eg via terminal software such as Hercules.

   LIST remoteName
   SEND_ONCE remoteName buttonName
   SEND_ONCE remoteName buttonName repeats


  • Sometimes wants a space at end of line, sometimes seem to fail no reason!
  • SEND_ONCE - has to be set in the registry - see below:
Add the password registry entry: WinLIRC_password.reg
Windows Registry Editor Version 5.00

Also note that

  • JUST sending "SEND_ONCE ", or "SEND_ONCE remote" - also sends IR. I guess this just sends LAST data, but I have not checked.
  • "SEND_ONCE remote INVALID_text_for_non_existent_button" also works!!!!

Example commands

SEND_ONCE onkyo power
SEND_ONCE onkyo dvd
SEND_ONCE Topfield_PVR_5000 power
SEND_ONCE DGTEC_KTC-666_AVSelector power

Commands can also be saved in a file and sent to make simple "macro" list of commands. If doing this make sure you put the space at the end of EVERY LINE!!

Here are some example screenshots using Hercules:
List, Version Remote commands Send file "macro'
Hercules - version & list.png
Hercules - remote commands.png
Hercules - commands from a file.png