[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:
It tries to reconnect, but keeps on failing.Now hold down button "KEY_1".
Something went wrong. irrecord: Initializing FTDI: serial=A6028XXX
Please try again. (9 retries left)
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:
So I will try updating LIRC.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
To be continued...