Afa Technologies 9005 DVB-T USB Stick on Linux

Released and last updated on 12th of March 2008.

This article describes how to make a DVB-T USB stick that is based on an Afa Technologies 9005 chipset work on Linux.

Introduction

This article describes the installation and configuration of any DVB-T device that based is on the Afa Technologies 9005 chipset on Linux.

The whole process is basically based on a few quite simple steps:

  • enable kernel support
  • install firmware
  • install software
  • scan for channels
  • watch TV

My system

Operating system Debian lenny (testing, last upgraded on 8th of March 2008)
Kernel version self-compiled 2.6.24.3
Version of scan The one that was in the testing repository on the 8th of March.
Version of kaffeine 0.8.6
Version of xine 0.99.6cvs

Kernel support

First you should ensure that your kernel supports the chipset. If your kernel provides a config file, you can check if the modules CONFIG_DVB_USB_AF9005 and CONFIG_DVB_USB_AF9005_REMOTE are compiled:

$ cat /boot/config-2.6.24.3-pc-anton-3 | grep 9005

The output should be something like the following (or empty):

  CONFIG_DVB_USB_AF9005=m
  CONFIG_DVB_USB_AF9005_REMOTE=m

At least CONFIG_DVB_USB_AF9005 should be set to y or m. If it is n or not set (then the cat command does not show any output), then you have to compile a new kernel, which is not a big deal with Debian. Here is the path to the option:

  Device Drivers ->
  Multimedia Devices ->
  DVB for Linux ->
  DVB/ATSC adapters ->
  Support for various USB DVB devices ->
  <M> Afatech AF9005 DVB-T USB 1.1 support
  <M> Afatech AF9005 default remote control support

Firmware

You have to download the firmware from http://ventoso.org/luca/af9005/ or just google for "af9005 firmware".

Once downloaded, you place the firmware in the /usr/lib/hotplug/firmware/ directory.

Software

In order to be able to scan for channels you should install the package dvb-utils. As a player xine is a good choice (install xine-ui), but also kaffeine, which provides own scanning functionality (but does not understand the output of the scan command).

aptitude install dvb-utils xine-ui kaffeine

Plug it in

Now plug in the USB Stick and see if the right things happen. First of all the modules should be loaded:

$ lsmod | grep 9005

The following two modules must appear:

  dvb_usb_af9005_remote
  dvb_usb_af9005

In case they do not, try to unplug again, load them manually (modprobe dvb_usb_af9005) and then plug in again.

Finally, after plugging the device in, the command dmesg should show an output similar to this:

  dvb-usb: found a 'Afatech DVB-T USB1.1 stick' in cold state, will try to load a firmware
  dvb-usb: found a 'Afatech DVB-T USB1.1 stick' in warm state.
  DVB: registering new adapter (Afatech DVB-T USB1.1 stick)
  dvb-usb: Afatech DVB-T USB1.1 stick successfully initialized and connected

In case it does not, there is most probably something wrong.

Scanning for channels

Finally you can scan for channels. The easiest way is it to run kaffeine with its nice user interface and see if it can find enough channels. A sometimes more powerful way (and an obligatory one if you want to watch DVB-T with xine) is it to run scan.

There is another downside, kaffeine supports scanning all frequencies, whereas scan does not. There are files providing some starting information about available channels and frequencies in your region, placed in /usr/share/doc/dvb-utils/examples/scan/dvb-t/. Take a look at the files there. Since I live near Frankfurt, my choice is /usr/share/doc/dvb-utils/examples/scan/dvb-t/de-Frankfurt.

A little bit more information on scan. The following command will scan for channels, produce some output to the console that serves as information for you and creates a channels-file that can be used for xine:

scan -n -v -5 -o zap /usr/share/doc/dvb-utils/examples/scan/dvb-t/de-Frankfurt > ~/.xine/channels.conf

In case you want to use scan for scanning, but want to watch with kaffeine, there is an online converter you can use: http://lab.infodatei.de/conf2dvb/.

Conclusion

As a conclusion, the af9005 chipset is well supported on Linux and is not very hard to install. The hardest part is the scanning, which is not the scope of this article. For further information http://www.linuxtv.org/ is a very good starting point!

12. March 2008, http://www.pussep.de/anton/en/projects/af9005/index.html