IguanaIR
The IguanaIR is a serial- or USB-based IR Transceiver by Iguanaworks that works with LIRC.
The vendor maintains a wiki documentation site.
The IguanaIR requires a specific driver (at least for USB model). LIRC must also have support for that driver compiled-in, as noted on the vendor support site.
This entry (so far) only really addresses the install of USB iguanair in order to send signals to STBs.
Contents |
Which USB Libs on Ubuntu to Compile?
dpkg -l | grep -i libusb
libusb-0.1-4 2:0.1.12-13 userspace USB programming library libusb-1.0-0 2:1.0.1-1 userspace USB programming library libusb-1.0-0-dev 2:1.0.1-1 userspace USB programming library developmen libusb-dev 2:0.1.12-13 userspace USB programming library developmen
Important Vendor notes on Re-Compiling LIRC from Source Package on Ubuntu/Deb
http://iguanaworks.net/downloads.php?distro=deb
Be sure to hold back LIRC from further package updates
REMEMBER to use apt or dpkg or wajig to "hold" back the several lirc related libs/packages to prevent them from being re-installed by your package manager (WITHOUT the IguanaIR support you just compiled in!):
You want your 'apt-get dist-upgrade' to report
The following packages have been kept back: liblircclient-dev liblircclient0 lirc lirc-modules-source
Some Configuration Files
Example files from a working Mythbuntu 9.10 / Myth 0.23 / iguanaIR 4-channel USB
/etc/lirc/hardware.conf
# /etc/lirc/hardware.conf # #Chosen Remote Control REMOTE="None" REMOTE_MODULES="" REMOTE_DRIVER="" REMOTE_DEVICE="" REMOTE_SOCKET="" REMOTE_LIRCD_CONF="" REMOTE_LIRCD_ARGS="" DRIVER="iguanaIR" DEVICE="/dev/iguanaIR/0" #Chosen IR Transmitter TRANSMITTER="My IguanaIR custom config" TRANSMITTER_MODULES="" TRANSMITTER_DRIVER="iguanaIR" TRANSMITTER_DEVICE="/dev/iguanaIR/0" TRANSMITTER_SOCKET="" TRANSMITTER_LIRCD_CONF="pace/dct50x.conf" TRANSMITTER_LIRCD_ARGS="" #Enable lircd START_LIRCD="true" #Don't start lircmd even if there seems to be a good config file #START_LIRCMD="false" #Try to load appropriate kernel modules LOAD_MODULES="true" # Default configuration files for your hardware if any LIRCMD_CONF="" #Forcing noninteractive reconfiguration #If lirc is to be reconfigured by an external application #that doesn't have a debconf frontend available, the noninteractive #frontend can be invoked and set to parse REMOTE and TRANSMITTER #It will then populate all other variables without any user input #If you would like to configure lirc via standard methods, be sure #to leave this set to "false" FORCE_NONINTERACTIVE_RECONFIGURATION="false" START_LIRCMD=""
/etc/lirc/lircd.conf
include "/usr/share/lirc/extras/transmitters/pace/dc50xv2.conf" include "/usr/share/lirc/extras/transmitters/motorola/dct2244.conf"
/usr/share/lirc/extras/transmitters/pace/dc50xv2.conf (don't worry about the "v2" in the filename, that's local to my machine to keep some differences whilst I was testing)
# Please make this file available to others # # this config file was automatically generated # using lirc-0.8.6-CVS(default) on Mon Jan 11 21:34:36 2010 # # contributed by Kirk Bocek # # brand: Comcast Branded Motorola DTA100 and Pace DC50X # model no. of remote control: Unknown, Comcast Label # devices being controlled by this remote: Motorola DTA100 & Pace DC50X # # These are a couple of the cheap digital converters being provided by # Comcast as part of their analog shutdown. DTA100 information here: # # http://www.motorola.com/Business/US-EN/Business+Product+and+Services/TV+Video+Distribution/Customer+Premises+Equipment+%28Set-tops%29/All-Digital+QAM+Set-tops/DTA100_US-EN # # This remote also has power and volume buttons. You can program these # to control your TV. But these DTAs *do* have internal volume and mute # controls. The power button, however, is only for your TV and has no # effect on the DTA. # # Because this remote use the XMP protocol, this config requires # lirc 0.8.6 or later. # # Generated by starting with the generic XMP protocol configuration: # http://lirc.sourceforge.net/remotes/generic/XMP # and then using irrecord to add the keys. # # V.2 - Added Volume Up and Volume Down # V.3 - Confirmed operation with Pace DC50X. Changed strings to # conform with standard strings used in lirc 0.8.6. # begin remote # name MotorolaDTA100-PaceDC50X name dc50x bits 24 flags XMP eps 20 aeps 300 # one 0 137 zero 250 710 ptrail 250 pre_data_bits 32 pre_data 0x170F443E post_data_bits 8 post_data 0x0 pre 250 12921 gap 81698 toggle_bit_mask 0x0 # begin codes 1 0x1E0001 2 0x1D0002 3 0x1C0003 4 0x1B0004 5 0x1A0005 6 0x190006 7 0x180007 8 0x170008 9 0x160009 0 0x1F0000 KEY_CHANNELDOWN 0x11000E KEY_CHANNELUP 0x12000D KEY_MUTE 0x13000C KEY_VOLUMEDOWN 0x14000B KEY_VOLUMEUP 0x15000A KEY_LANGUAGE 0x150082 KEY_INFO 0x170026 KEY_ENTER 0x180025 KEY_LAST 0x190051 end codes # end remote
/usr/share/lirc/extras/transmitters/motorola/dct2244.conf
(copy of dctxxxx.conf as supplied with LIRC on Ubuntu)
#
# this config file was automatically generated
# using lirc-0.6.6(serial) on Fri Mar 28 22:46:44 2003
#
# contributed by shane bradley
#
#
#
# brand: Motorola
# model no. of remote control: DCT2000
# devices being controlled by this remote:
#
begin remote
name DCT2244
bits 16
flags SPACE_ENC|CONST_LENGTH
eps 30
aeps 100
#
header 9036 4424
one 556 2185
zero 556 4424
ptrail 556
gap 100025
toggle_bit 0
#
begin codes
HELP 0x000000000000B3F2
POWER 0x000000000000AFF9
MUTE 0x0000000000000FF7
PAGE+ 0x000000000000A3F3
PAGE- 0x00000000000023FB
LOCK 0x00000000000097F6
EXIT 0x000000000000B7F4
AUP 0x000000000000D3F6
ADOWN 0x00000000000053FE
ALEFT 0x00000000000093F1
ARIGHT 0x00000000000013F9
OK 0x00000000000077F8
GUIDE 0x000000000000F3F4
MENU 0x00000000000067F9
VOL+ 0x0000000000004FF3
VOL- 0x0000000000008FFB
LAST 0x00000000000037FC
FAV 0x00000000000057FA
CH+ 0x0000000000002FF5
CH- 0x000000000000CFFD
A 0x00000000000017FE
B 0x0000000000001BF1
C 0x000000000000EBF9
1 0x0000000000007FF0
2 0x000000000000BFF8
3 0x0000000000003FF4
4 0x000000000000DFFC
5 0x0000000000005FF2
6 0x0000000000009FFA
7 0x0000000000001FF6
8 0x000000000000EFFE
9 0x0000000000006FF1
0 0x000000000000FFFF
BYPASS 0x000000000000D7F2
MUSIC 0x000000000000F7F0
STOP 0x00000000000063FD
PAUSE 0x00000000000007FF
PLAY 0x000000000000E3F5
REW 0x00000000000087F7
REC 0x00000000000073FC
FFWD 0x00000000000047FB
end codes
#
end remote
See Lirc Channel Change script for a feature complete script that handles multiple IR channels and other more complex situations.
My channel change script for the dc50x /usr/local/bin/change-channel-lirc-dc50x_transmitter_1.pl
#!/usr/bin/perl
# make sure to set this string to
# the corresponding remote in /etc/lircd.conf
$remote_name = "dc50x";
sub change_channel {
my($channel_digit) = @_;
system ("irsend SEND_ONCE $remote_name $channel_digit");
sleep .3;
}
system ("irsend set_transmitters 1");
$channel=$ARGV[0];
sleep .3;
if (length($channel) > 2) {
change_channel(substr($channel,0,1));
change_channel(substr($channel,1,1));
change_channel(substr($channel,2,1));
} elsif (length($channel) > 1) {
change_channel(substr($channel,0,1));
change_channel(substr($channel,1,1));
} else {
change_channel(substr($channel,0,1));
}
system ("rc SEND_ONCE $remote_name KEY_ENTER");
My channel change script for the DCT2244
/usr/local/bin/change-channel-lirc-dct2244_transmitter_2.pl
#!/usr/bin/perl
# make sure to set this string to
# the corresponding remote in /etc/lircd.conf
$remote_name = "dct2244";
sub change_channel {
my($channel_digit) = @_;
# print "$channel_digit";
system ("irsend SEND_ONCE $remote_name $channel_digit");
sleep 1;
}
system ("irsend set_transmitters 2");
$channel=$ARGV[0];
sleep .3;
if (length($channel) > 2) {
change_channel(substr($channel,0,1));
change_channel(substr($channel,1,1));
change_channel(substr($channel,2,1));
} elsif (length($channel) > 1) {
change_channel("0");
change_channel(substr($channel,0,1));
change_channel(substr($channel,1,1));
} else {
change_channel("0");
change_channel("0");
change_channel(substr($channel,0,1));
}
sleep .2;
# system ("rc SEND_ONCE $remote_name ENTER");
What does process list look like?
root 1327 0.0 0.0 22184 484 ? Ss Jun28 0:00 /usr/sbin/lircd --output=/var/run/lirc/lircd --driver=iguanaIR --device=/dev/iguanaIR/0 iguanair 2145 0.0 0.0 41140 524 ? Ssl Jun28 0:21 /usr/bin/igdaemon --log-level=0 --send-timeout=1000 --receive-timeout=1000 --driver-dir=/usr/lib64/iguanaIR --driver=libusb -l /var/log/iguanaIR.log