Archived:How to install DVB device drivers: Difference between revisions

From LinuxTVWiki
Jump to navigation Jump to search
m (remove v4l installation and debian specific info)
(reworking)
Line 1: Line 1:
This page contains information to help an "end user" install a DVB device and its drivers in a GNU/Linux system.
This page contains information to help an "end user" install DVB device drivers in a GNU/Linux system.


'''Note''': This article assumes you have already physically installed or connected the hardware device into your system. (Refer to the manufacturer's instructions for details).
= Solution for new kernels (2.6) =

If you have a new Linux kernel and its compiled with many options on/modules installed (as normal Linux distros ship it), then chances are very good that you don't have to install any driver. Use
==Solution for new kernels (2.6)==
If you have a new Linux kernel and its compiled with many modules installed (as normal Linux distros ship it), then chances are good that a driver for your device has been included. In that case, upon boot up of Linux, your device should be detected and the driver modules loaded. Use
lsmod
lsmod
to see if the required modules are installed with your kernel. Which are the required ones? It depends on your DVB-card chip. See [[TwinhanDTV Digital Terrestrial TV Card Ter]] for an example.
to see if the required modules are installed with your kernel. Which are the required ones? That depends on the chipsets used by your device (See [[TwinhanDTV Digital Terrestrial TV Card Ter]] as an example).

If the drivers were loaded automagically, you should now have a non-empty directory
/dev/dvb/adapterN/
If you don't see such directory, then something has failed. (Note: this directory is created automatically by udev, so you do not need to create it yourself).


After you checked that they're all available you can load them with
If a module did not load, but you know you have it configured on your system, you can load it with the appropriate
modprobe
modprobe


If you have all the modules active (listed in lsmod) but no /dev/dvb/ directories to be found, check dmesg for any errors, ie:
You should now have some stuff in
dmesg | grep dvb
/dev/dvb/adapter0/


The problem may be as simple as the firmware for the device not being load. For example, for many TechnoTrend & Hauppauge (and other similar "premium" cards), if the dvb-ttpci firmware is not available you will observe an error such as:
If you don't see dvb-directory, then something has failed. You don't need to create it, it comes automatically. With Ubuntu 6.06.1 the problem was that dvb-ttpci was not in the firmware directory. If you have all the modules active (listed in lsmod) but no /dev's to be found, check dmesg for any errors, ie: grep dvb /var/log/dmesg
With Ubuntu 6.06.1 the problem was that dvb-ttpci was not in the firmware directory.
:dvb-ttpci: could not load firmware, file not found: dvb-ttpci-01.fw
:dvb-ttpci: could not load firmware, file not found: dvb-ttpci-01.fw
:dvb-ttpci: usually this should be in /usr/lib/hotplug/firmware or /lib/firmware
:dvb-ttpci: usually this should be in /usr/lib/hotplug/firmware or /lib/firmware
:dvb-ttpci: and can be downloaded from http://www.linuxtv.org/download/dvb/firmware/
:dvb-ttpci: and can be downloaded from http://www.linuxtv.org/download/dvb/firmware/
Resolving that missing firmware issue should then result in proper detection and configuration of your device.
will appear if you use the default *.rpm install for the Technotrend1.x/Hauppauge and similar premium (hardware-MPEG) DVB-S cards.


==The LinuxTV drivers==
See [[First steps with a DVB device]] for more tests and how to set up your frequency table.
The LinuxTV project hosts the latest set of drivers for v4l-dvb devices.


See http://linuxtv.org/repo


'''1. Acquire the necessary software'''
Please have also a look at http://linuxtv.org/repo.
Before you can start you need the following:

== Get required software ==
Before you can start you need the following software:
* mercurial: needed to download the latest source
* mercurial: needed to download the latest source
* kernel-headers, make, gcc: needed to compile the the driver
* kernel-headers, make, gcc: needed to compile the the driver


This guide does not include steps to install those software for all distributions.
The following provides examples of how to install those software packages for some distributions:


On Debian-based distributions you can use the following command to install all required software:
On Debian-based distributions you can use the following command to install all required software:
Line 40: Line 47:
$ [sudo] yum install mercurial
$ [sudo] yum install mercurial


== Obtain latest source code ==
'''2. Obtain latest v4l-dvb source code from LinuxTV'''
After we have installed all required software you should be able to download the latest source code with the following command:
After we have installed all required software you should be able to download the latest source code with the following command:
$ hg clone http://linuxtv.org/hg/v4l-dvb
$ hg clone http://linuxtv.org/hg/v4l-dvb
This should create a directory called v4l-dvb in the current working directory.
This should create a directory called v4l-dvb in the current working directory.


== Compile the source code ==
'''3. Compile the v4l-dvb source code'''
Let's go inside the directory that contains the previously downloaded source:
Let's go inside the directory that contains the previously downloaded source:
$ cd v4l-dvb
$ cd v4l-dvb
Then we have just to compile the source:
Then compile the source:
$ [sudo] make
$ make
If you run into any problems here, you should contact the developers via irc.freenode.net on #linuxtv or on #dvb.
If you run into any problems here, you should contact the developers via irc.freenode.net on #linuxtv or on #dvb.


== Install the driver and reboot ==
'''4. Install the drivers'''
The next step is to install the driver. To install the driver (note that the v4l modules are also installed) you have to execute:
The next step is to install the driver by executing:
$ [sudo] make install
$ sudo make install
Then connect the device (if external) and reboot.
$ [sudo] reboot
After that start your preferred program for watching DVB (e.g. [[Kaffeine]]).


'''5.
== Obtain the firmware ==
Perhaps the most straight forward thing to do at this point for the newbie would be just to restart your system.
Some devices need firmware. To obtain the correct firmware you need to know what card you're using.

More experienced users might appreciate using "sudo make unload" (which essentially will remove all modules (rmmod) for the device that might be currently loaded in memory from the running kernel) and then "modprobe" the appropriate driver modules for your device.

Either way, the end result should be the same.

'''6. A note on firmware'''
Some devices also need a firmware. To obtain the correct firmware you need to know what card you're using.
Normally the device name and model are written on the device, on the box or in the manual.
Normally the device name and model are written on the device, on the box or in the manual.

Look at [[DVB-S devices]] / [[DVB-C devices]] / [[DVB-T devices]] / [[ATSC devices]].<br>
The output of the following tools may be helpful, too. For PCI devices use
The output of the following tools may be helpful, too. For PCI devices use
$ lspci -v
$ lspci -v
Line 78: Line 89:
/usr/lib/hotplug/firmware
/usr/lib/hotplug/firmware


= Further documentation =
==Further documentation==
* See [[First steps with a DVB device|first steps with a DVB device]] for instructions on testing and initial configuration up your newly installed device
Further steps can be found here:
* [[First steps with a DVB device]]

Revision as of 01:55, 27 April 2007

This page contains information to help an "end user" install DVB device drivers in a GNU/Linux system.

Note: This article assumes you have already physically installed or connected the hardware device into your system. (Refer to the manufacturer's instructions for details).

Solution for new kernels (2.6)

If you have a new Linux kernel and its compiled with many modules installed (as normal Linux distros ship it), then chances are good that a driver for your device has been included. In that case, upon boot up of Linux, your device should be detected and the driver modules loaded. Use

 lsmod

to see if the required modules are installed with your kernel. Which are the required ones? That depends on the chipsets used by your device (See TwinhanDTV Digital Terrestrial TV Card Ter as an example).

If the drivers were loaded automagically, you should now have a non-empty directory

 /dev/dvb/adapterN/

If you don't see such directory, then something has failed. (Note: this directory is created automatically by udev, so you do not need to create it yourself).

If a module did not load, but you know you have it configured on your system, you can load it with the appropriate

 modprobe

If you have all the modules active (listed in lsmod) but no /dev/dvb/ directories to be found, check dmesg for any errors, ie:

dmesg | grep dvb  

The problem may be as simple as the firmware for the device not being load. For example, for many TechnoTrend & Hauppauge (and other similar "premium" cards), if the dvb-ttpci firmware is not available you will observe an error such as: With Ubuntu 6.06.1 the problem was that dvb-ttpci was not in the firmware directory.

dvb-ttpci: could not load firmware, file not found: dvb-ttpci-01.fw
dvb-ttpci: usually this should be in /usr/lib/hotplug/firmware or /lib/firmware
dvb-ttpci: and can be downloaded from http://www.linuxtv.org/download/dvb/firmware/

Resolving that missing firmware issue should then result in proper detection and configuration of your device.

The LinuxTV drivers

The LinuxTV project hosts the latest set of drivers for v4l-dvb devices.

See http://linuxtv.org/repo

1. Acquire the necessary software Before you can start you need the following:

  • mercurial: needed to download the latest source
  • kernel-headers, make, gcc: needed to compile the the driver

The following provides examples of how to install those software packages for some distributions:

On Debian-based distributions you can use the following command to install all required software:

 $ [sudo] apt-get install mercurial linux-headers-$(uname -r) build-essential

Note: [sudo] means that you only have to specify "sudo" if you aren't root, otherwise omit it.

On Gentoo-based distributions you can use the following command to install mercurial. Other dependancies are installed in main system tree.

 $ [sudo] emerge mercurial

Fedora is just as easy:

 $ [sudo] yum install mercurial

2. Obtain latest v4l-dvb source code from LinuxTV After we have installed all required software you should be able to download the latest source code with the following command:

 $ hg clone http://linuxtv.org/hg/v4l-dvb

This should create a directory called v4l-dvb in the current working directory.

3. Compile the v4l-dvb source code Let's go inside the directory that contains the previously downloaded source:

 $ cd v4l-dvb

Then compile the source:

 $ make

If you run into any problems here, you should contact the developers via irc.freenode.net on #linuxtv or on #dvb.

4. Install the drivers The next step is to install the driver by executing:

 $ sudo make install

5. Perhaps the most straight forward thing to do at this point for the newbie would be just to restart your system.

More experienced users might appreciate using "sudo make unload" (which essentially will remove all modules (rmmod) for the device that might be currently loaded in memory from the running kernel) and then "modprobe" the appropriate driver modules for your device.

Either way, the end result should be the same.

6. A note on firmware Some devices also need a firmware. To obtain the correct firmware you need to know what card you're using. Normally the device name and model are written on the device, on the box or in the manual.

The output of the following tools may be helpful, too. For PCI devices use

 $ lspci -v

For USB devices use

 $ lsusb -v

Most firmware (if needed) can be found on one of these links:


However, not all supported-card firmware is available (eg Hauppauge HVR 1100 & 1300). Firmware for such cards could be loaded via temporary installation in an MS Windows System with the Manufacturer supplied drivers.

You have to download it and copy it into the right directory (used by hotplug). The location of this directory depends on your distribution, but normally it's one of those:

 /lib/firmware
 /usr/lib/hotplug/firmware

Further documentation