Difference between revisions of "FTDI USB IR Blaster / Transmitter using LIRC"

From MythTV Official Wiki
Jump to: navigation, search
Line 6: Line 6:
 
* FTDI FT230 based IR blaster plugged into USB port
 
* FTDI FT230 based IR blaster plugged into USB port
 
* Ubuntu 20.04
 
* Ubuntu 20.04
* LIRC version 0.10.1
+
* 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 https://www.lirc.org/html/configuration-guide.html#appendix-9]).
 
* 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 https://www.lirc.org/html/configuration-guide.html#appendix-9]).
  
 
==LIRC Configuration==
 
==LIRC Configuration==
 +
Essentially, for two different LIRC devices, you need two separate configuration files to describe the hardware and driver part. 
 +
===MCEUSB receiver===
 +
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
 +
 +
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 <code>ls -la /dev/lirc*</code> 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.

Revision as of 13:52, 31 May 2020

Introduction

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.

Setup

  • 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).

LIRC Configuration

Essentially, for two different LIRC devices, you need two separate configuration files to describe the hardware and driver part.

MCEUSB receiver

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

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.