USB-UIRT

From MythTV Official Wiki
Jump to: navigation, search
Usbuirtdetail.jpg

The USB UIRT allows any USB-equipped PC to transmit and receive infrared signals. LIRC 0.8.1 supports the USB-UIRT natively. LIRC 0.7.1 does not support the USB-UIRT natively, but the patch listed below can be used.

Links

Manufacturers Website: http://www.usbuirt.com

LIRC 0.7.1: http://prdownloads.sourceforge.net/lirc/lirc-0.7.1.tar.bz2

Patch for LIRC 0.7.1: http://www.gemair.com/~neveld/usb-uirt/lirc-0.7.1-usb_uirt.patch.bz2

Utility

The manufacturer produces a (Windows) helper utility for this remote. It allows the user to set the usb wake-from-standby key. This means you can suspend your machine to S3 (Suspend to RAM), then wake it up with a button on your remote control (NOTE: this feature doesn't appear to function properly under linux). Also, it has several other features, including turning off the blinking response to IR signals. The current verstion is at: http://www.usbuirt.com/lrnhelper_0_0_5.zip

LIRC 0.7.1 Installation

# tar xvfj lirc-0.7.1.tar.bz2
# cd lirc-0.7.1
# bzcat ../lirc-0.7.1-usb_uirt.patch.bz2 | patch -p1
# ./setup.sh

Choose Driver Configuration, USB Devices, USB-UIRT2(receive and transmit)

Save Configuration & Exit

Edit configure.sh

#!/bin/bash

./configure \
--with-moduledir=/lib/modules/2.6.15-gentoo-r1/misc \
--with-tty=/dev/ttyUSB0 \
--with-x \
--with-syslog \
--with-driver=usb-uirt2_raw \
--with-major=61 \
--with-port=none \
--with-irq=none \
--prefix=/usr \
"$@" 

Compile

# sh ./configure.sh && make && make install

Gentoo Installation

In Gentoo, /etc/make.conf should contain

LIRC_DEVICES="usb_uirt_raw"

Emerge the lirc package

emerge -av lirc

Configure lirc, /etc/conf.d/lircd should contain

LIRCD_OPTS="-H usb_uirt_raw -d /dev/ttyUSB0"

Connect the USB-UIRT and start lircd

/etc/init.d/lircd start
rc-update add lircd default

Kernel Driver Issue

Description of bug

The USB-UIRT uses a USB-to-serial adapter chip, and the Linux driver for this was broken after kernel 2.6.20 when changes to the parameters passed into the quirk functions resulted in a NULL pointer causing a kernel oops.

Partial Fix

A number of distributions are using a patched FTDI driver that solves the kernel oops, but is missing a critical fix to allow the USB-UIRT to work.

In /usr/src/linux/drivers/usb/serial/ftdi_sio.c locate the function ftdi_tiocmget and add "case FT232RL:" just after "case FT223C:". Then rebuild and install your modules.

Without this fix you will get an error from lircd about not being able to set DTR.

Resolution

This bug is confirmed fixed at some point prior to Ubuntu 10.10.