[mythtv-users] LIRC: sending the same IR code multiple times (repeated, but not repeating) results in receiving device seeing only one instance

Tom Metro tmetro+mythtv-users at gmail.com
Fri Apr 13 19:06:38 UTC 2012

[I posted this to the LIRC list, but didn't receive a response. There
may actually be more LIRC users here than on that list.]

I'm using the IguanaWorks USB IR transceiver
(http://iguanaworks.net/products/usb-ir-transceiver/) in a send-only
application with lirc 0.8.6-0ubuntu3~ppa5~hardy1 and iguanair 1.0.1-1 on
Ubuntu 8.04, with the lirc.conf shown here:

if I run the command:

% irsend SEND_ONCE MotorolaDTA100-PaceDC50X KEY_3 KEY_3 KEY_ENTER

instead of the receiving device switching to ch 33, it goes to ch 3.

If the two digits are different, like:

% irsend SEND_ONCE MotorolaDTA100-PaceDC50X KEY_3 KEY_5 KEY_ENTER

it works fine.

I can get the correct response by doing:

% irsend SEND_ONCE MotorolaDTA100-PaceDC50X KEY_3
% irsend SEND_ONCE MotorolaDTA100-PaceDC50X KEY_3

and in fact that's what the MythTV channel change script that I ran
across originally did (it might even have had a 1 second sleep between
commands), but irsend is designed to handle chained codes, and should be
inserting appropriate delays between them, and with more precise timing
than you get from invoking irsend multiple times.

Similarly, sending a 3 digit code:

% irsend SEND_ONCE MotorolaDTA100-PaceDC50X KEY_2 KEY_1 KEY_7

results in the device only receiving the first two digits. While this:

% irsend SEND_ONCE MotorolaDTA100-PaceDC50X KEY_2; sleep 1; irsend
SEND_ONCE MotorolaDTA100-PaceDC50X KEY_1; sleep 1; irsend SEND_ONCE
MotorolaDTA100-PaceDC50X KEY_7;


I suspect this is probably a timing issue controlled by something in the
lirc.conf, and not related to the IguanaIR hardware or software, though
I have filed a bug with IguanaWorks:

As in this thread:

I have a Thompson DTA, and it sounds like they experienced the same
problem. They solved it by increasing the distance between the IR LED
and the DTA. I'm guessing the timing in that config is optimized for the
other DTA models. I don't see a relevant config at

If you can suggest what to change in the config, I'll submit the
modified file to LIRC.

[I've subsequently tried a bunch of experimental changes, such as
lengthening the 'gap' and 'ptrail' parameters, as documented in the
ticket above. It had no apparent effect.

An interesting observation: when I tried a 3-digit number, there was
slight, but noticeable delay between the 1st and 2nd number, then the
DTA immediately showed the call sign for the 2-digit station, as if the
enter key had been sent, even though it hadn't.

Similarly, when I send 33, I would expect to see the DTA show receipt of
a 3, then pause until its input timeout expires (if it is seeing both 3s
as part of one key press), then switch to ch 3. Instead it shows the 3
and pretty much immediately switches to ch 3 as if the enter key was
pressed. This seems to suggest that the problem isn't just a simple
timing issue. It's as if irsend or a lower layer is doing something
different to the signal when it sees repeated or 3 digits.]


More information about the mythtv-users mailing list