This tutorial will help you configure LIRC for use with Ira / Tira devices in a few steps.
You'll need to know the USB port address for your device. We recommend a command line tool to use which lists all attached usb Ira / Tira devices in your system. If you don't like to use this tool there is another way to get it. First, unplug your Ira/Tira device. Execute the following command to display all the usb serial ports:
Plug in your Ira/Tira device and wait a few seconds. Execute the above command again. Compare the two lists. The device that appears only in the second list corresponds to Tira 2.1.
Currently the LIRC version that has full support for Ira / Tira can be downloaded from the LIRC cvs repository. You also found information how to start LIRC configuration.
Start config script:
Select Driver configuration in the initial screen.
Select USB devices
Now you can choose from two different drivers,depending on usage. With the first driver which works in six bytes mode, LIRC can receive IR signals from far distance which can be used to remote control your PC. With this driver sending IR signals is also possible. The second driver which works in timing mode, has only one purpose, to record IR signals which you can transmit later. In this mode, Tira uses a short distance receiver which can receive IR signals from 4 inches (10cm).
In the next screen you have to set the usb port address of your device. Step 1 contains information how to determine this address.
Select Save configuration and run configure in the next screen.
Now you have installed LIRC.
Execute the command
to start LIRC daemon. Testing with tools included in LIRC: MODE2 - use this program to display the pulse and space times for your remote control. Available only in timing mode. It exits with an error message "This program does not work for this hardware yet" using 6 Bytes mode. Recording IR signals: IRRECORD You can use this program to record remote control signals for LIRC. To record signals, you need to know the names of the buttons that you can record. To list available button names, execute command
to list available buttons names for recording. You can record signals in both 6 Bytes or Timing mode. Start IRRECORD again with flag -f to force RAW mode.
"myremote" is the name of the config file where IRRECORD will store the remote control signals. Note:you will need to know this name for sending IR signals, as irrecord stores it in the config file as the remote control name. IRRECORD will give you instructions to do. First,it will analize the IR signals. For this reason in Timing mode: you will be asked to press as many buttons as possible and hold each of them down for about 1-2 seconds. It will draw dots on the screen. Hold down each button until it generates 3-5 dots. When IRRECORD received enough IR signals it will notify you about the gap signal,and asks you to enter the name of the button what you want to record with the following message: Please enter the name for the next button (press <ENTER> to finish recording) Use the names you listed before. (like KEY_0) You will be instructed to hold down the key,a few seconds later IRRECORD informs you if it was successful. When finished recording just leave the key name empty. in 6 Bytes mode: the difference is that initially you need to hold down the same button for a long time to generate the dots instead of pressing more buttons as in timing.
When finished recording, rename your file (myremote) to lircd.conf and copy it to /etc/lircd directory. To use the new config file, you need to restart lircd. To do this, find the pid of the process and kill it, then run it again. Execute
to get <processid>. Then execute
Transmit IR signals: IRSEND You can use this program to send recorded IR signals to control your TV, etc. Note: Transmitting signals is only available when your Ira/Tira device operates in six bytes mode, and only signals which were recorded in timing mode are available to transmit. Transmit example:
This example command will send the recorded KEY_0 button's IR signals.
Latest IR Tuner for ShowShifter (v1.0, Nov 20, 2003) can be downloaded from here.
Using TiraTuner you can setup ShowShifter to automatically switch channels on your cable box or a satellite receiver. This is very useful if you want to record programs while you are away.
Download and unpack the file into the following folder on your computer:
C:\Program Files\Home Media Networks Limited\ShowShifter\Config
(Assuming Windows is installed on a drive C:)
Now whenever you change to one of these channels in ShowShifter, the channel should change on your satellite box.
Latest Girder plugin (v1.10, updated Aug 11, 2004) can be downloaded from here.
Installing Girder is fairly straightforward, there are no options to choose. You only need to select where you want it to be installed. Every hardware that works with Girder requires plugin, and Tira is no exception. Copy the Tira.dll from the supplied CD to the directory Plugins, under Girder's directory. After that start the Girder. First you need to configure Girder to use Tira. Go File > Settings, and when dialog box opens up, click on "Plugins" tab.
Check the "Home Electronics Ira/Tira plugin", then click "Apply" and "Settings". Tira configuration dialog will come up.
In this dialog select COM port under which "USB Serial Port" was installed. Now close all dialogs by clicking "OK", and now you can activate Tira. Press "F9" on you keyboard. The status box should now read "Input Device Enabled". Tira is activated, and you can test by sending some IR codes to it.
Sending IR codes with Tira
Let's create an action what will, for instance, turn your TV on. First, create blank action (Edit > Add Command ). You can rename it, if you'd like. By default all new commands will have the same name. To rename it, press "F2", then enter new name.
Now, click on the "Plugins" tab (marked with the red box).
You will see the list of available plugins. Click on "Home Electronics Ira/Tira", then click "Settings". That will bring up Tira Transmit Dialog box.
In order to capture IR code click on "Learn Code" button. The button text will change to
"Stop Learning". Now point a remote control at Tira, push and hold the "Power" button until
the code is learned.
(In case of Tira-2 capture procedure uses different IR sensor, which is very directional and works over very short range. This allows to avoid all problems related to interference from other IR sources. But during capture the remote must be located very close to Tira-2, not farther than 2cm (1 inch). The IR transmiter on the remote must point directly into the center of Tira's front window.)
There are two parameters that are essential for proper recognition of the code by your equipment, such as TV. Those are Frequency and Repeat. Repeat "4" should usually work. But it won't be a problem if you select larger value. The equipment might refuse to react to the code if you select value that is to small. So always try larger values first.
As for the frequency, you will have to try different values until you find the one that work with your equipment. There are only eight values to try, so it won't take long. Once you have found the working frequency, for one button, the same value will work for all IR codes used by this equipment. (This does not apply to Tira-2, which does detect frequency.)
Let's see how that works.
Point Tira in the direction of your TV and click "Test". If TV does not react, select another frequency and try again, until the working one is found. Now click OK. The IR code is successfully learned and we can close the dialog. You will need to create separate command for every button on your remote. After that you can start combining those commands to do something useful, for example, switch channels on you satellite receiver at particular time. You will have to familiarize yourself with Girder and different plugin it has in order to do that. You can always find help in the Girders forum.
If you have a Tira, by connecting Ira-2 to your PC you can create remote control extender.
In this example, Ira-2 is located in one room, while PC and Tira-1 are in another room. When you push buttons on a remote, signals received by Ira-2 are forwarded by a PC to Tira, and transmitted to the target equipment. This allows you to control your video, audio and other equipment from another room. You can also control applications on your PC from both rooms.
Feb 8, 2003 If you are thinking about buying a universal remote control for your Home Theater equipment, may we suggest you to take a look at the JP1 project. In two words, JP1 is a set of hardware and software tools that allows you to take a regular remote control (RadioShack and One for All are two most common brands that work with JP1) and completely customize it. The customization includes adding IR codes for new and unsupported devices, assigning keys the way you want, etc. If that is not enough for you, they have also developed so called "extenders", essentially brand new firmware for remotes, making it possible to introduce new features and operation modes. This is by no means a complete description of JP1, so please do visit their web site and newsgroup.
When we first learned about JP1 project, we were so impressesd and amazed by what these guys have achieved that we decided to contribute something to this community. This page explains how Ira can be used along with JP1.
Imagine that you have a JP1-compatible remote, and you want to use it to control your air conditioner. The remote does not support this equipment, unless you upgrade it. You need to create a code for the remote, that will enable it to send signals equivalent to those of the original remote control. You can do that using JP1, but you need to know the exact protocol used by the air conditioner. Until now the only way to get that information was to use a learning remote. Of course, if you already have a learning remote, you are lucky. But learning remotes are expensive.
Ira provides an alternative way to obtain this information. Our Protocol Analyzer will process data from Ira and will produce EFC and OBC codes ready for entering into KeyMaster. (KeyMaster is one of the JP1 tools). The Protocol Analyzer is still at the beta stage, and currently decodes limited number of IR protocols. Over the next few weeks we'll continue to work on it adding more protocols. But Ira is not limited to particular IR protocols. However, the sensor will only work with remotes using modulation frequency in the range of 32-42kHz. The best sensitivity is achieved at 38kHz. Ira cannot detect the carrier frequency. Fortunately, in most cases it can be derived from the timing information of the signal. For example, if the timing matches the RC5 protocol, the frequency most likey is 36kHz. Sometimes you will have to try a couple of frequency values to determine the one that gives the greatest transmission distance.
Below we provide a little tutorial on how to build new device code using Ira. In this example we will create a device code for Yamaha mini component system GX-500.
First, let's start Protocol Analyzer and push buttons "1", "2", and "3" on the original remote control:
IR Protocol Analyzer, ver. 0a (c) 2003 Home Electronics Protocol: NEC Device Word 1: 0x78 120 (8 bits) Command Word: 0x11 17 (8 bits) EFC: 121 Protocol: NEC Device Word 1: 0x78 120 (8 bits) Command Word: 0x12 18 (8 bits) EFC: 119 Protocol: NEC Device Word 1: 0x78 120 (8 bits) Command Word: 0x13 19 (8 bits) EFC: 123
Every time you push a button on a remote, Protocol Analyzer will print the following information:
1. Protocol. Name of the protocol used
2. Device Word. Value of the device word, in the hexadecimal and decimal systems. If the protocol uses more than one device word, they will be printed separately.
3. Command Word. Value of the command word. In JP1 tools this value is also referred to as OBC.
4. EFC. EFC is a special representation of the command word used by JP1-comaptible remote controls. This value is presented in the decimal system.
Now we have to open KeyMaster and enter data received from Protocol Analyzer into the table. This is how the first page of KeyMaster looks:
Remote. This field is a drop-down list where you select the type of the remote control unit you are using.
Device Type. Select the device most closely describing the one for which you are creating a new code. In our case, since we create a code for an audio system, we have selected Misc. Audio
Setup Code. Enter the number that will correspond to our new code. You can pick any number, provided it is not yet assigned to some other code.
Button Codes. Data assigned to buttons can be represented in either OBC or EFC form. Since Protocol Analyzer produces both values, either one can be used. In this example we have selected the EFC encoding.
Protocol. Select the same protocol as the one reported by Protocol Analyzer.
Main Device. Enter the device word reported by Protocol Analyzer.
In this example we do not need to edit other fields. Let's go to the next step and switch to the "Functions" table.
As you can see, we simply assign EFC codes reported by Protocol Analyzer to functions. OBC field is computed by KeyMaster and the one reported by Protocol Analyzer. Continue this procedure for all buttons on the original remote. You might want to edit the function description in the first column, if you can't find the right one.
When finished, switch to the "Buttons" page and assign the defined functions to the buttons on your JP1 remote. This is the part there you will have to employ your imagination: in many cases the original remote has buttons with functions that are not present on a universal remote control. After that we are done! Switch to the main page of KeyMaster and transfer the generated upgrade code to another JP1 tool, IR which in turn will upload the upgrade code to the remote control.
Does it sound complicated? Well, the fun way is not always the easy one! The reward for learning all these JP1 tools is that finally you can have a single remote control working all your equipment, the way you want.
As of Feb 8, 2003 Protocol Analyzer supports the following protocols: NEC (one and two device word versions), RC5, JVC, and JVC1. For unsupported protocols it prints uprocessed timing of the signal. All times are in microseconds, odd fields are duration of bursts, even fields are duration of pauses. Download Protocol Analyzer