Getting Started with the Iguanaworks USB IR Transceiver (Linux)
Unlike our serial version of this product, to use and communicate with the USB device, the igdaemon software must be installed and running. The igclient program (or libiguanaIR.so library) communicates with our device through the igdaemon.
This guide will help you install and configure the necessary software so use the USB IR Transceiver. If it does not, please submit a Support Ticket
- Installing the iguanaIR software (daemon and client).
- Testing iguanaIR using igclient.
- Installing LIRC and testing it with iguanaIR.
- Getting a valid lircd.conf.
- Using it all.
Step 1: Installing iguanaIR
Install the iguanair software package. You can get the software and installation instructions at downloads page. We provide rpm and deb software repositories in addition to direct links to the .deb and .rpm files. A source tarball is also available for none rpm and deb distributions. We recommend adding our repository to your list of source repositories. Then you can get the iguanair package installed by running (as root or with sudo) the command:
yum install iguanair
or for .deb-based distros
apt-get install iguanair
For the source tarball, you will need to compile our software with the commands:
tar -xjf iguanaIR-0.24.tar.bz2 cd iguanaIR-0.24 make make install
Our packages have only been tested on Fedora and Ubuntu systems, but should be compatible with most rpm or deb-based distributions. If you have to make changes for your specific distribution, please let us know and we'll include the details in our packages. Once the software is installed, connect the device (or reconnect it if you plugged it in before) and start the igdaemon. This should be as simple as running as root the command:
That's it. Now to test the daemon is running and communicating with the USB device, you can the following command (as a regular user, no need to run as root):
and you should see something close to:
get version: success: version=0x0306
If you see what version of the device you have, you have the daemon installed and working properly. Go one to step 2.
If, however, you have problems at this point or later and suspect the igdaemon, you can stop the daemon by running (as root):
And then running the daemon is debug mode with the command (again as root):
igdaemon -n -v -v -v
You should see something like:
DEBUG: Device list 0xbff41958: DEBUG: 0x804f018: usb:2.5 id=0 INFO: Worker 0 starting DEBUG2: o0x0000cd01 DEBUG2: i0x DEBUG: 0 length recv on 0. DEBUG2: i0x0000dc010300 DEBUG: Received ctl header: 0x1 INFO: Transaction: 0x1 (12808 microseconds) INFO: Found device version 3 DEBUG2: o0x0000cd0d ERROR: No response from device. ERROR: Failed to get id.
N.B. the error shown at the bottom of this output is perfectly normal, and merely means that the device has not yet been programmed with a label or id. This is the configuration of our devices when shipped. The id can be set to the string "fred" with the igclient command:
igclient --set-id fred
The reason the daemon looks for this id at startup is to create a symlink such that the device can be referred to as "fred" in commands. This provides users with multiple devices to distinguish between the physical devices regardless of their order in the USB bus, or some transient reordering.
Step 2: Testing iguanaIR
Well, I'm going to jump to the final test first, then work backwards. Try running:
igclient --receiver-on --sleep 100
This will cause the usb device to enable its receiver and start streaming data in the form of space and pulse timings to the client. The sleep tells the igclient to wait for 100 seconds before exiting, during which time it prints all received signals. The signals will not be translated in any way, and so should be an accurate description of what the igclient is seeing.
N.B. this is our equivalent to the mode2 program. The output is not as pretty, but is primarily used to ensure that the device is working and the basic configuration is correct.
When this igclient command is executed data will stream past in the terminal. It looks something like:
received 1 signal(s): space: 152917 received 1 signal(s): space: 152917 received 1 signal(s): space: 114688 received 4 signal(s): space: 6400 pulse: 3498 space: 1664 pulse: 426 received 7 signal(s): space: 384 pulse: 448 space: 1237 pulse: 426 space: 405 pulse: 426 space: 362 received 7 signal(s):
and so on. What we can see from this output is that the device was idle for around 0.4 seconds before a 6.4 millisecond header pulse was detected. All the numbers printed above are times in microseconds. This is not actually the raw data received from the USB device, but the daemon translates that rather odd format to microsecond pulses and spaces. If this command fails, please check for the error on the TroubleShooting page.
Step 3: Installing and Testing LIRC
I will not go into the details of installing LIRC. Please refer to http://lirc.org for such details. The one thing I will say about LIRC installation is that you must make sure that your version of LIRC supports the iguanaIR driver. Most linux distros include LIRC compiled without our driver installed. Take a look at here for rpm and here for deb for compiling LIRC with our driver the easy way. To check if you have our driver compiled into LIRC, run:
[jdunn@porkrind ~]$ lircd -H '?' Driver "?' not supported. Supported drivers: atilibusb bte bw6130 creative creative_infracd default dev/input dsp dvico ea65 iguanaIR livedrive_midi livedrive_seq logitech mp3anywhere mouseremote mouseremote_ps2 null pcmak pinsys pixelview silitek tira udp uirt2 uirt2_raw
Your output may be shorter or longer, but ensure it contains the iguanaIR line. When the lircd daemon is started, make sure it is passed the "-H iguanaIR" option. In Fedora Core 6 I did this by modifying a line in /etc/sysconfig/lirc to read:
Under Ubuntu LIRC, you can need to add the following lines to /etc/lirc/hardware.conf:
and if you want to specify which devices to use (if you have multiple), you will also need to add to hardware.conf:
REMOTE_DEVICE="0" or: REMOTE_DEVICE="fred"
where the remote device is the ID/label of the transceiver.
If your version of LIRC does not contain the iguanaIR driver which was introduced between versions 0.8.0 and 0.8.1 you may need to download and compile a newer version of LIRC. When configuring a supported version of LIRC you should find a "Iguanaworks USB IR transceiver" under Driver Configuration -> USB Devices. Make sure that driver is selected, either by selecting only it, or compiling with all drivers enabled, as is done by Linux distributions. From here on I'll assume you have a version of LIRC with many drivers enabled, and so require a -H iguanaIR option to some commands. At this point you'll need a /etc/lircd.conf. I'd suggest downloading one from http://lirc.sourceforge.net/remotes, but if you cannot find one for your device you may have to learn the signals using irrecord.
N.B. for now you just need a /etc/lircd.conf. It doesn't matter if it's the correct one for your hardware.
Now that the lircd daemon is passed the correct option we need to test it with irsend. I use:
[jdunn@porkrind ~]$ irsend set_transmitters 1 2 3 4 [jdunn@porkrind ~]$ irsend send_once panasonic power [jdunn@porkrind ~]$ irsend send_once panasonic power
This assumes that there's a remote defined in the /etc/lircd.conf named "panasonic" and it has a button defined in the same file called "power". Pick a remote and button from your own configuration file and use that. Also, that's not a typo, send the command twice. Success will be if there is no output from either command, however, if you have irsend compiled with debugging support it may print additional informational messages. If either command fails, please see the TroubleShooting page. After this test to make sure things are working sending a command twice is not necessary although you may find that LIRC will send commands multiple times due to the min_repeat option in the lircd.conf.
Note: We recommend that you only send on the channels that you are using. Particularly with mono IR blasters connected directly to our sockets (no stereo->mono adapter) using channels 2 and 4 can cause problems.
Once lircd is tested with irsend command we can be certain that the igdaemon and lircd daemon are both working, and properly communicating. Congratulations, the iguanaIR specific stuff is done.
Step 4: Getting a LIRC configuration
As stated above, I'd suggest downloading your lirc configuration from http://lirc.sourceforge.net/remotes. Even if you can start with a configuration where only a few buttons work that is far preferable to starting from scratch. But, assuming that you can't find such a configuration file check our page about lirc, and why I'm not real fond of it. But it's not like we have another option.
Step 5: Using it all
So most likely you want your remote to work with mplayer, or mythtv. This is not my department, but a little is said on the lirc page.
Something isn't working?
If you've read through these pages and haven't been able to get your hardware working please contact us.