FTDI USB IR Blaster / Transmitter using LIRC
May IR blasters (transmitters) are controlled by PC serial ports. As serial ports become harder to find on newer hardware, USB solutions are needed. This will describe using a USB transmitter from http://www.irblaster.info/usb_blaster.html. Despite what the web page says, the unit I received was NOT an FTDI FT232 based transmitter, but it was based on the better FTDI FT230 chip. It was found that the FT230 chip worked better than the FT232. And despite what the irblaster.info page says, you do not need to compile LIRC to use with Ubuntu 20.04. This page will describe using this transmitter in Ubuntu 20.04, and will also describe using the transmitter in a system that also uses a mceusb LIRC receiver.
- mceusb IR receiver plugged into USB port
- FTDI FT230 based IR blaster plugged into USB port
- Ubuntu 20.04
- LIRC version 0.10.1. Install these standard packages in Ubuntu (sudo apt install <packagename>): liblirc-client0, liblirc0, lirc, libftdi1-2, lirc-compat-remotes
- Both IR receiver and transmitter will be handled by LIRC. This means that two instances of lircd will be created by the configuration (reference https://www.lirc.org/html/configuration-guide.html#appendix-9).
Essentially, for two different LIRC devices, you need two separate configuration files to describe the hardware and driver part.
The MCEUSB receivers are handled in the kernel, so the default driver is used. Edit /etc/lirc/lirc_options.conf as below:
[lircd] nodaemon = False driver = default driver = default device = /dev/lirc0 output = /var/run/lirc/lircd pidfile = /var/run/lirc/lircd.pid plugindir = /usr/lib/x86_64-linux-gnu/lirc/plugins permission = 666 allow-simulate = No repeat-max = 600
[lircmd] uinput = False nodaemon = False
NOTES: the linux user that runs may need to be part of the linux group that is the lirc dev is part of. So after a reboot, do a
ls -la /dev/lirc* to see the group that the lirc device belongs to, and add the running user to the group that the lirc device is part of. Also, the device may or may not be /dev/lirc0. Look at
ls -la /dev/lirc* and
dmesg to identify your MCEUSB receiver. Also, you may need to create the folder /var/run/lirc, but I am not 100% this was necessary.
Now, you need to copy /usr/share/lirc/remotes/mceusb/lircd.conf.mceusb to /etc/lirc/lircd.conf.d/ AND make sure the file name ends in a .conf (like mceusb.conf). By default, Ubuntu lirc will only load files in the /etc/lirc/lircd.conf.d directory that end in .conf. Also, rename the file /etc/lirc/lircd.conf.d/devinput.lirc.conf to devinput.lirc.conf.disable to disable this file (it is not used.)
FTDI USB Blaster / Transmitter
So, now that MCEUSB receiver has been configured, we need to configure the blaster. This will create a second lircd instance. The big thing is to identify the serial number and output of the blaster device. Look at
dmesg for the serial number. And you may have to just guess at the output number (mine was 2). For Ubuntu 20.04, create a file /lib/systemd/system/lircd-blaster.service :
[Unit] Description=IR remote output Transmitter blaster After=network.target [Service] Type=simple ExecStart=/usr/sbin/lircd --driver=ftdix --device=serial=DN0563Z3,output=2 --output=/var/run/lirc/lircd-blaster --pidfile=/var/run/lirc/l> [Install] WantedBy=multi-user.target