Quantcast
Viewing all articles
Browse latest Browse all 14

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:

dvb-usb: found a 'WideView WT-220U PenType Receiver (based on ZL353)' in warm state.
dvb-usb: will use the device's hardware PID filter (table count: 15).
DVB: registering new adapter (WideView WT-220U PenType Receiver (based on ZL353))
DVB: registering adapter 0 frontend 0 (WideView USB DVB-T)...
input: IR-receiver inside an USB DVB receiver as /devices/pci0000:00/0000:00:1d.7/usb1/1-3/input/input11
dvb-usb: schedule remote query interval to 300 msecs.
dvb-usb: WideView WT-220U PenType Receiver (based on ZL353) successfully initialized and connected.
dvb-usb: recv bulk message failed: -110

Notice that the IR receiver is also initialised, more on that later.

Software

I’m using VLC but need a couple of other utilities too:

sudo apt-get install dvb-apps dvb-utils vlc for Ubuntu.

sudo pacman -S linuxtv-dvb-apps vlc for Arch.

Now scan for channels.  You need to know your transmitter, which you can find out from Ofcom (in the UK) and replace “Sudbury” with it:

scan /usr/share/dvb/dvb-t/uk-Sudbury -o zap|tee /home/dougie/channel-list.conf

Opening this file in VLC will now give you TV playback:

vlc /home/$USER/channel-list.conf

Create a launcher and you’re done.  Well unless you want to use the remote of course.

Remote

It’s relatively straight forward in Ubuntu, install lirc:

sudo apt-get install lirc

When the menu appears, choose Freecom DVB-T USB Stick and click OK.  Next select None and click OK.  Lastly choose /dev/input/by-path/pci-2-3-event-ir and click OK.

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.

begin
prog = vlc
button = VOL_UP
config = key-vol-up
repeat = 1
end

Open VLC and click Tools -> Preferences, then under “Show settings” click “Advanced”.  Under “Interfaces/Control Interfaces” tick “Infrared remote control interface”.  Click “Save” to close.

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.


Viewing all articles
Browse latest Browse all 14

Trending Articles