Watch TV with VLC and a Freecom DVB-T Stick

One of the things I need my Aspire One to do is watch TV. When you’re away, it’s nice to be able to watch a little TV. I bought a Freecom DVB-T USB stick years ago and have always had success under Linux. It’s small, sensitive and selective.

I was surprised, especially on Ubuntu, how easy it was to setup.

My netbook runs Arch, so I installed it on that and my Dell 1545 running Ubuntu 9.04.

Hardware

In Ubuntu the firmware was added to linux-restricted-modules 2.6.24, so it’s picked up straight away. Under Arch the firmware is missing but there’s a copy here which needs to be put in /lib/firmware before plugging in. Once plugged in checking dmesg shows the device is recognised, don’t worry about the error message:

I had to transpose the VOL_DOWN / CH_DOWN and VOL_UP / CH_UP in /usr/share/lirc/remotes/freecom/lircd.conf.freeconf, your mileage may vary as there appears to be two remote layouts.

Now if you run irw in a terminal and press the buttons on the remote, you should see output like:

0000000080010071 00 MUTE Freecom_DVB-T_USB

Now we’re nearly there, just need to tell applications (in this case VLC) what to do. This is done by editing ~/.lircrc.

Configuration is not particularly well documented but centres around ~/.lircrc. Each button has a configuration block, starting with begin and ending with end. You need to stipulate the program to receive (in our case VLC), the button (which we know from irw) and what it does in the receiving program. For example, assigning the volume up button to increase the volume in VLC.

Sadly, I couldn’t get it to work on Arch. The remote is recognised without lirc, detecting some of the keypresses – power, mute, volume and the numbers but checking sendkey and xev shows there is no keycode generated.

With lirc, irw doesn’t see input and yet the /etc/input/event does. I’m reasonably sure that a module is overriding lirc and tried removing the obvious but to no avail.

After spending the better part of a day farting about with it, I realise that on a small screen the chances of me needing a remote negate the effort. Bugs me that I haven’t got it though, so I guess I’ll revist it when I’ve more time.

8 Replies to “Watch TV with VLC and a Freecom DVB-T Stick”

This is a perfect example of something that could, and should “just work” as soon as the dongle is plugged it; if a sequence can be performed manually, it can be codified and performed automagically based on the USB hardware IDs.

…Or at the very least a meta-package that Depends on the appropriate packages.

Please could you file two bug reports, and include a link to the list of items above:

I’m not sure why I should file a bug, as lirc works by following it’s own install guide. As said, from what I’ve read it appears most people have the volume and channel buttons where lirc thinks they are. If I was triaging it (which I might be) then it’d be “Low” at best as only a small number are affected.

I wouldn’t say this is VLC’s issue either, as they do support lirc – which is correct, they shouldn’t be attempting to directly support every remote (remember lirc polls the hardware directly not hal). Although supporting remotes by default might be an idea.

With kaffeine you simply plug in your dvb-t stick and click on “scan” and – i just works. no installing of packages, no tinkering with the command line, no searching for the right settings for your location…. thats how it should be done 😉

HAL automatically configures the X11 server with all connected keyboards.
This includes the remote controls, so LIRC is unable to get exclusive access to the remote control.
Ubuntu’s lirc supplies a HAL configuration file that tells HAL to ignore keyboards that are known to be remote controls.
You may need to copy this file from Ubuntu to Arch.