LIRC & FTDI: irrecord error "Something went wrong."

Linux howto's, compile information, information on whatever we learned on working with linux, MACOs and - of course - Products of the big evil....
Post Reply
User avatar
^rooker
Site Admin
Posts: 1483
Joined: Fri Aug 29, 2003 8:39 pm

LIRC & FTDI: irrecord error "Something went wrong."

Post by ^rooker »

Disclaimer: NOT SOLVED YET!

[PROBLEM]
Trying to set up an FTDI based (FT232RL) USB-to-UART adapter with a TSOP 4838 as infrared remote control receiver with LIRC.
(Xubuntu 16.04, LIRC v0.9)

The 4838 is talking to me, receiving IR signals, and LIRC's "mode2" shows reasonable output.
But when I try to read the remote using "irrecord", it throws the following error message:
Now hold down button "KEY_1".
Something went wrong. irrecord: Initializing FTDI: serial=A6028XXX
Please try again. (9 retries left)
It tries to reconnect, but keeps on failing.

Well, seems I'm not the only one with this behavior.
This post here sounds exactly like my problem:
"LIRC & FTDI receiver - constantly disconnecting" (ubuntuforums.org)
But is a few years old and has not a single reply :(

When I restart irrecord, it can connect to the device again.
So literally "Something went wrong." :?

[SOLUTION]
What's interesting to note is that "mode2" can still connect and read IR pulse/space information properly, while /dev/ttyUSB0 being gone...
But that's another issue (and maybe it's normal when LIRC takes over the FTDI device?).

Maybe this issue is solved in v0.10.x?
Here's a very promising Changelog entry:
2016-08-01 William Manley

ftdi: Fix retry logic
...by closing the ftdi device before attempting to reopen it. Otherwise
you get stuck in an infinite loop as `ftdi_usb_open_desc` will fail as the
device is already open. I can't understand how this retry logic ever could
have worked for any errors apart from:

* Open failing
* Unplugging and replugging the ftdi device
So I will try updating LIRC.

To be continued...
Jumping out of an airplane is not a basic instinct. Neither is breathing underwater. But put the two together and you're traveling through space!
User avatar
^rooker
Site Admin
Posts: 1483
Joined: Fri Aug 29, 2003 8:39 pm

Doesn't work with v0.10.x

Post by ^rooker »

I've tried it with LIRC v0.10.x:
Still does NOT work :cry:

The retry logic behaves better now, but it can't find patterns of any remote...

I've now used the same IR receiver chip (TSOP4838) on a Raspberry Pi (1 model B) - and reading and using the same remotes work fine there.
So I assume that this FTDI USB adapter I'm using has issues with timing?

Putting it on hold for now. Sorry.
Jumping out of an airplane is not a basic instinct. Neither is breathing underwater. But put the two together and you're traveling through space!
Post Reply