IR: A program to control the IR-XP2(tm) device


JDS Technologies makes a device called the InfraRed Xpander(tm) IR-XP2(tm) that records infrared sequences from handheld remotes and can play them back under computer control.

IR is a simple Windows command line program to control the IR-XP2 device using a serial port. IR is available under the GNU General Public License (GPL).


This article
The GNU General Public License
JDS Technologies
The IR-XP2 User Manual
IR source code
Precompiled IR executable


When invoked without any parameters IR displays the following help text:

IR: A program to control the InfraRed Xpander(tm) IR-XP2 device.


C:\>ir r sample_name <carrier_frequency>      -- to record a sequence
C:\>ir p sample_name emitter_code             -- to play a sequence

The sample name cannot contain spaces or special characters.

The emitter codes are:

     Emitter Code
     ------- ----
        1      1
        2      2
        3      4
        4      8

Emitter codes can be added to play a sequence
on more than one emitter at a time.

You have five seconds to press the remote's button while recording a sequence.

The optional carrier frequency is in KHz. The default is 40.0.
Other frequencies are 20.0, 36.7, 38.0, 56.8, 85.0.

When IR records a sequence it immediately downloads the sequence data into a file called sample_name.txt where "sample_name" is the sample name given when IR is invoked.

When IR plays a sequence it first uploads the sequence data from sample_name.txt and then plays the sequence.

IR does not rely on the IR-XP2 device's facility for storing sequences.


C:\>ir r dvdpower

Records a sequence and saves the sequence data in file dvdpower.txt in the current directory.

C:\>ir p dvdpower 12

Plays back the sequence from file dvdpower.txt on emitters 3 and 4 (emitter codes 4 + 8).


IR compiles cleanly with no errors or warnings under the following compilers:


E-mail the author at:

Copyright © 2005 Richard Heurtley.

Verbatim copying and distribution of this entire article is permited in any medium, provided this notice is preserved.