Drivers

In Ubuntu 13.10 the 3.11 kernel is available with the dvb-usb-rtl28xxu driver out of the box. Another user has tested the stick with Ubuntu and OpenELEC distributions with kernel 3.14 and the device works out of the box ok.

For earlier kernel versions follow the instructions below.

For the Zazz ezcap DVB-T FM DAB and Twintech UT30 the following driver works :

Remote Control

Devices using this chip support infrared remote controls, but unlike other cases, the infrared signal is captured and passed to the kernel without any processing, delegating the detection and decoding of the protocol to the kernel. This means that no default remote control is configured and the user must configure the mapping of the commands to keyboard events manually.

Here we can see the different steps in the detection and initialization of the hardware, from the USB discovery, to the DVB driver being loaded, and the different IR protocol decoders.

Checking the remote: now that we know the system knows about the hardware, we need to check if the remote control subsystem is up and running, for this we need to invoque the utility ir-keytable as root:

Make sure all protocols available are enabled, also check the remote control deice (rc0), the event device (event12) and the driver name (dvb_usb_rtl28xxu). This values may differ between systems but just in the number at the end of the devices names.
To check the reception of remote control codes, run the same utility in test mode, modify the device name if neccesary:

These events lines should appear when pressing keys in the remote control. If they do not appear check you have all the IR protocol decoders loaded and active, and the remote has batteries (Trick: most digital cameras see the infrared, just point it to your mobile phone, or webcam and see if the led blinks when pressing a key). There is a small chance your remote is using a not yet supported protocol, try with other remote controls in your home just in case.

Configure the keymap: knowing the remote control commands are detected, we need to convert then to keyboard events, for this we need to load a keymap to translate them. If you are using the remote control supplied with the device, there is a high chance you already have a file with this mapping, if not you can always write your own. First we will try if we already have the mapping file. Choose a key in yor remote control and write down the scancode reported by ir-keytable. In this case i will use the scan code 2bd15 wich appears when pressin the OK key in my remote control.

Bingo!, not only one but two keymaps match both the scancode and the expected key. To see which would be a better choice make a diff of both files and check the differences. In my case the key for "POWER" is different in each file, and with the help of ir-keytable -t I can see the configuration file matching the scancode in my remote is "/etc/rc_keymaps/terratec_slim". Now loading the file is as easy as ir-keytable -s rc0 -w /etc/rc_keymaps/terratec_slim:

See the space and extra '1' and '7' leading the key up lines? those are keypress from the remote!!, also the name of the key press is printed next to the scan codes.

No matching keymap file: if you are using a remote control not listed among the suplied keymaps, you will need to write your own, for this write a file in /etc/rc_keymaps with this structure:

# table TTTT, type: UUUU
0xAAAAAA KEY_XXXXX

Where TTTT is the name of the table you choose to use, UUUU is the protocol, for this load only one protocol at a time with ir-keytable -p UUUU until you get scancodes during the test mode again. Then one per line, add the scancode you got from the test mode of ir-keytable ,preceded by '0x', and separated by a tab or spaces the name of the key you want to emulate. For a list of theys vist Remote_Controllers or [4]. Save the file and load it as shown before.

Loading the keymap automatically: to load the keymap automatcally, you need to edit the file /etc/rc_maps.cfg adding the line:

dvb_usb_rtl28xxu * terratec_slim

The values are: the driver name, the tabke name (* for any) and the keymap filename.

All this information is not but an adaptation of the one privded here[5].