Page 1 of 1

LIRC mode2: device configuration option must contain an '='

Posted: Fri Jan 25, 2019 1:42 am
by ^rooker
[PROBLEM]
Trying to setup an infrared remote receiver with LIRC, using an FTDI (FT232RL) USB adapter.

Initial test throws a weird error message:
mode2 --driver ftdi --device /dev/ttyUSB0
mode2: Initializing FTDI: /dev/ttyUSB0
mode2: device configuration option must contain an '=': '/dev/ttyUSB0'
Hm... Seems like the serial number of the FTDI chip is a required parameter. Here's a quote from the infamous "Albert's FTDI IR receiver/transmitter" page:
[...] example, for Adam's hardware (Receiver on RI pin)
lircd -Hftdi -dserial=A4001doI,input=7

The 'serial' argument is needed to uniquely address the FTDI chip in use, so please supply at least this argument. The serial number of your FTDI chip can be found by looking at the systemlog (dmesg) while plugging-in the chip.
[SOLUTION]

Found it! :D
It was the missing SerialNumber.

So, here's what I did:

1) Find the serial number:

Code: Select all

$ dmesg | grep SerialNumber
Returned:
[1042721.047577] usb 2-1.5: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[1063618.105490] usb 2-1.5: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[1083241.298748] usb 2-1.7: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[1083241.298753] usb 2-1.7: SerialNumber: A6028XXX
2) Use it instead of /dev/ttyUSB0:

Code: Select all

$ mode2 -H ftdi -d serial=A6028XXX
Returns something that looks way better:
mode2: Initializing FTDI: serial=A6028BJE
mode2: opened FTDI device 'serial=A6028XXX' OK
pulse 3
space 1792760
pulse 188
...
:D

Links:

mode2: unable to open FTDI device

Posted: Fri Jan 25, 2019 2:14 am
by ^rooker
If you get the following error message when trying to connect mode2 to the USB/FTDI device (by serial number):
mode2: unable to open FTDI device (device not found)
This means the serial number is wrong. Check for typos or copy/paste errors.
btw: The serial number is case sensitive.

If you get the following error message though, even with a correct serial number:
mode2: unable to open FTDI device (unable to fetch serial number)
You might have insufficient rights to access the device. Try sudo.