Kworld UB499-2T: Difference between revisions

From LinuxTVWiki
Jump to navigation Jump to search
(Add instructions and helper script to get the module working in kernels >= 2.6.36)
m (formatting)
 
(18 intermediate revisions by 5 users not shown)
Line 7: Line 7:
}}
}}
}}
}}
== '''V4L Version''' ==


The KWorld UB499-2T series are dual DVB-T tuners USB 2.0 device. It contains the Afatech/ITE IT9135 or IT9137 hardware.
It is supported directly by V4L through the following modules.

'''dvb-usb-it913x'''

'''it913x-fe'''

==='''Firmware Instructions'''===

Locate file get_dvb_firmware in Documentation/dvb of Kernel 3.2 and above.

Run the perl script.

./get_dvb_firmware it9135

Manual extraction of firmware from [http://kworld.server261.com/kworld/CD/ITE_TiVme/V1.00/Driver_V10.323.1.0412.100412.zip Driver_V10.323.1.0412.100412.zip]

in path

Driver_V10.323.1.0412.100412/Data/x86/

extract IT9135BDA.sys Dated Mon 22 Mar 2010 10:20
dd if=IT9135BDA.sys ibs=1 skip=69632 count=5731 of=dvb-usb-it9137-01.fw

This will produce the dvb-usb-it9137-01.fw file, copy this to your default firmware location. Usually /lib/firmware.

==='''Installation Instructions'''===

'''Kernels 2.6.31 to 3.1 and updates'''

Go to the [http://linuxtv.org/wiki/index.php/How_to_Obtain,_Build_and_Install_V4L-DVB_Device_Drivers How to Obtain, Build and Install V4L-DVB Device Drivers] page and download and build the lastest media_build.

Changes in 3.3 for IT9135 Devices only
[[ITE IT9135]]

=== Other Issues ===
'''IT9135 Dual Partial/Not confirmed'''

Dual IT9135(id 048d:9135) devices are not confirmed as working with this driver. Single Devices with this id are working.

'''Remote Control'''

Only the 32 button remote control supplied with UB499 2T T09 works.


'''Limitation'''

Does not pass the full MPEG2 transport stream to the software demuxer: has a hardware PID filter with a table count of 31. MythTV backend log shows error messages (failed to open demux device) about once a second while recording from BBC ONE. The recordings play OK and Project-X reports only a small proportion of packets out of order. Can make simultaneous recordings on two different muxes.

PID Filter can be turned off with module option

dvb-usb-it913x pid=1

Observations made using Scientific Linux 6 i686 and modules from the media_build script.

dmesg extract to identify version:

<pre>it913x: Chip Version=01 Chip Type=9135
it913x: Dual mode=3 Remote=5 Tuner Type=38
IR JVC protocol handler initialized
IR Sony protocol handler initialized
IR SANYO protocol handler initialized
IR MCE Keyboard/mouse protocol handler initialized
lirc_dev: IR Remote Control driver registered, major 248
IR LIRC bridge handler initialized
it913x: Chip Version=01 Chip Type=9135
dvb-usb: found a 'Kworld UB499-2T T09(IT9137)' in cold state, will try to load a firmware
usb 1-4: firmware: requesting dvb-usb-it9137-01.fw
dvb-usb: downloading firmware from file 'dvb-usb-it9137-01.fw'
it913x: FRM Starting Firmware Download
it913x: FRM Firmware Download Completed - Resetting Device
it913x: Chip Version=01 Chip Type=9135
it913x: Firmware Version 204147968
dvb-usb: found a 'Kworld UB499-2T T09(IT9137)' in warm state.
dvb-usb: will use the device's hardware PID filter (table count: 31).
DVB: registering new adapter (Kworld UB499-2T T09(IT9137))
DVB: registering adapter 0 frontend 0 (Kworld UB499-2T T09(IT9137)_1)...
dvb-usb: will use the device's hardware PID filter (table count: 31).
DVB: registering new adapter (Kworld UB499-2T T09(IT9137))
DVB: registering adapter 1 frontend 0 (Kworld UB499-2T T09(IT9137)_2)...
Registered IR keymap rc-kworld-315u
input: IR-receiver inside an USB DVB receiver as /devices/pci0000:00/0000:00:1d.7/usb1/1-4/rc/rc0/input8
rc0: IR-receiver inside an USB DVB receiver as /devices/pci0000:00/0000:00:1d.7/usb1/1-4/rc/rc0
dvb-usb: schedule remote query interval to 250 msecs.
dvb-usb: Kworld UB499-2T T09(IT9137) successfully initialized and connected.
it913x: DEV registering device driver
usbcore: registered new interface driver it913x</pre>

== '''Non V4L Version''' ==


The KWorld UB499-2T is a USB dual tuner. It contains the Afatech/ITE IT9135 hardware. It is not supported directly by V4L, however, a driver is available along with instructions for installation from http://wasietsmet.nl/linux/zolid-usb-dvb-t-tuner-van-de-aldi-linux-drivers/. This page is in Dutch, however English installation instructions for Ubuntu are provided below.
The KWorld UB499-2T is a USB dual tuner. It contains the Afatech/ITE IT9135 hardware. It is not supported directly by V4L, however, a driver is available along with instructions for installation from http://wasietsmet.nl/linux/zolid-usb-dvb-t-tuner-van-de-aldi-linux-drivers/. This page is in Dutch, however English installation instructions for Ubuntu are provided below.
Line 15: Line 105:
The IT9137 version (packaged as KWorld UB499-2T) tested and both tuners working with the 9135 driver above with Mythtv 0.23 on Ubuntu 10.04 kernel 2.6.32-24-generic.
The IT9137 version (packaged as KWorld UB499-2T) tested and both tuners working with the 9135 driver above with Mythtv 0.23 on Ubuntu 10.04 kernel 2.6.32-24-generic.


== lsusb dump ==
=== Installation Instructions ===

Bus 001 Device 009: ID 048d:9135 Integrated Technology Express, Inc.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x048d Integrated Technology Express, Inc.
idProduct 0x9135
bcdDevice 2.00
iManufacturer 0
iProduct 0
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 46
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 4
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x84 EP 4 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x85 EP 5 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0000
(Bus Powered)

== Installation Instructions ==
These instructions have been written after my work colleague Axel pointed me to the Dutch page http://wasietsmet.nl/linux/zolid-usb-dvb-t-tuner-van-de-aldi-linux-drivers/ which contains a link to the drivers and installation instructions in Dutch. Although it is relatively easy to translate the page using an online translator I thought it sensible to add a section here in the v4l wiki in English for completeness.
These instructions have been written after my work colleague Axel pointed me to the Dutch page http://wasietsmet.nl/linux/zolid-usb-dvb-t-tuner-van-de-aldi-linux-drivers/ which contains a link to the drivers and installation instructions in Dutch. Although it is relatively easy to translate the page using an online translator I thought it sensible to add a section here in the v4l wiki in English for completeness.


Line 131: Line 131:
to the file.
to the file.


== Supporting Newer Kernels ==
=== Supporting Newer Kernels ===
Currently the driver provided only supports kernels up to 2.6.33. However I have tested the driver on my 2.6.35 kernel by modifying the source code following instructions from the following ubuntu forums:
The driver linked above only supports kernels up to 2.6.33. For newer kernels please follow the instructions below.
[http://ubuntuforums.org/showpost.php?p=10102634&postcount=20 Updating usb2impl.c]
[http://ubuntuforums.org/showpost.php?p=8564257&postcount=4 Updating Make Files]


=== Updating for the 2.6.35 kernel ===
=== Updating for the 2.6.34 & 2.6.35 kernels ===
just use the new driver that was recently posted on the same dutch forum (http://wasietsmet.nl/linux/zolid-usb-dvb-t-tuner-van-de-aldi-linux-drivers/)


http://wasietsmet.nl/wp-content/uploads/2010/07/V10.12.30.1.zip
* Download the kernel source for your kernel (2.6.35 for this example)

* Unpack the IT9135_SRC_i686_patch.tar.gz driver source code patch
just read the read me in the file and follow it's instructions.
* Create the directory IT9135_SRC/v4l/kernel 2.6.35 inside your unpacked driver source

* Find the following files in your kernel source, and copy them into IT9135_SRC/v4l/kernel 2.6.35
'''Note:''' I could not make this driver (10.12.30.1) or the old one (10.04.19.1) work in Fedora 14. Fedora 14 uses kernel 2.6.35. I had to upgrade the kernel to 2.6.37 and it worked following the procedures described below for kernel 2.6.37, but I had to use version 10.12.30.1, the earlier version (10.04.19.1) didn't work for me on kernel 2.6.37.
dvb_frontend.h

dmxdev.h
=== Updating for the 2.6.36, 2.6.37, 2.6.38 and 2.6.29 kernels ===
dvb_ringbuffer.h

dvb_demux.h
I have created two 10.12.30.1 versions (i686 and x64) that work up to kernel 2.6.39 following the procedure below.
dvb-pll.h

dvb-usb.h
You can download them here:
dvb_net.h

dvbdev.h
http://www.omcentre.com.au/fileadmin/user_upload/kworld_UB499-2T/IT9135-10.12.30.1_i686.tar.bz2
demux.h

dvb-usb-ids.h
http://www.omcentre.com.au/fileadmin/user_upload/kworld_UB499-2T/IT9135-10.12.30.1_x64.tar.bz2
* edit the first line of IT9135_SRC/src/usb2impl.c:

#include <linux/autoconf.h>
To install the i686 as root:
to

#include <generated/autoconf.h>
<pre>
* Edit IT9135_SRC/Makefile
wget http://www.omcentre.com.au/fileadmin/user_upload/kworld_UB499-2T/IT9135-10.12.30.1_i686.tar.bz2
after
tar xvfj IT9135-10.12.30.1_i686.tar.bz2
ifneq (,$(findstring 2.6.33,$(CURRENT)))
cd IT9135_SRC
@cp -f v4l/kernel-2.6.33/* ./
make
endif
make install
add
</pre>
ifneq (,$(findstring 2.6.35,$(CURRENT)))

@cp -f v4l/kernel-2.6.35/* ./
To install the x64 one follow the same procedure replacing i686 with x64.
endif
* Run the installer.


=== Updating for the 2.6.36 & 2.6.37 kernel ===
The 2.6.36 kernel introduced a big change towards removing the Big Kernel Lock, which was finally removed in 2.6.37. As a result the module mentioned above wouldn't build.
The 2.6.36 kernel introduced a big change towards removing the Big Kernel Lock, which was finally removed in 2.6.37. As a result the module mentioned above wouldn't build.


Line 247: Line 244:
done
done
</pre>
</pre>

=== Updating for the 2.6.38 and Beyond ===

Ugh, this is pain, but will probably need to be done each time there is a new kernel version.

* Download V10.12.30.1.zip and extract it
* Run the installer based on your system (i686 or x64)
* When it's asking you to install / remove the driver fire up another terminal, and copy folder /tmp/ite-install somewhere (I copy it to my home folder)
* quit the installer (it won't work any way)
* go to ite-install/installer/IT9135_SRC/
* You'll have to manually patch Makefile to add support for your new kernel (replace xx with your installed kernel version)
<pre>
ifneq (,$(findstring 2.6.xx,$(CURRENT)))
@cp -f v4l/kernel-2.6.xx/* ./
endif
</pre>
* You'll have to manually patch src/it9135-core.c and change the line:
<pre>
.ioctl = it9135_usb_ioctl,
</pre>
to
<pre>
.unlocked_ioctl = it9135_usb_ioctl,
</pre>
* download your kernel sources and extract it somewhere. Make sure it has the file /drivers/media/dvb/dvb-usb/dvb-usb.h
<pre>
for ubuntu/mythbuntu type the following (for the tar command, make sure the file name matches what you downloaded):
sudo apt-get source linux-image-$(uname -r)
tar -jxvf linux-source-2.6.38.tar.bz2
</pre>
* run the script posted for v2.6.36/37 but make sure you edit it so it points to where you extracted the kernel source
* run make, if it generates any errors, they should be easy to fix (I had to rename v4l/kernel-2.6.38-8-generic to v4l/kernel-2.6.38)
* run make install
* it _should_ work.

==== Common problems ====
* make fails due to missing files.
** You need to edit the script posted for v2.6.36/37 to point to where you extracted the kernel source. If you run the script without editing it, it won't copy the files properly and the build will fail.

* make works fine, but when I plug in the capture card it doesn't work, I get messages like "dvb_usb_it9135: disagrees about version of symbol ..." in the kernel logs.
** You have downloaded or copied the wrong kernel sources when building your driver. Make sure the kernel source you downloaded matches your actual running kernel.

* the module fails to install, with a message explaining that a symbol is missing - dmesg gives "dvb_usb_it9135: Unknown symbol mcount"
** "mcount" is a symbol provided by an optional function which is not configured in the kernel you are using. This seems to be the case with many standard kernels. If mcount is not defined, you need to recompile the kernel with the correct option set to Y.

The instructions below are for debian squeeze and kernel 2.6.32 on amd - you may find you have to change a view things on a different system.

1. Check if mcount is actually defined in your kernel, do

<pre>
grep mcount /lib/modules/$(uname -r)/build/Module.symvers
</pre>

If something like "0xb4390f9a mcount vmlinux EXPORT_SYMBOL" appears, mcount IS defined and you don't have to recompile (at least, not for this reason).

2. If mcount is not defined, you need to recompile the kernel with the correct option set to Y.

First, get hold of a copy of the kernel source, AND I STRONGLY SUGGEST you copy your existing kernel configuration rather than starting from the beginning. There are many guides on how to do this - for debian squeeze, try http://newbiedoc.sourceforge.net/system/kernel-pkg.html#EXISTING-KERNEL-PKG.

mcount is defined in /usr/src/linux-source-2.6.32/arch/x86/kernel/x8664_ksyms_64.c
<pre>
#ifdef CONFIG_FUNCTION_TRACER
/* mcount is defined in assembly */
EXPORT_SYMBOL(mcount);
#endif
</pre>

It depends on a kernel option called "CONFIG_FUNCTION_TRACER". This is the switch you need to have set on BEFORE you recompile the kernel.To set the option, you will need to use the kernel configuration tool to set this to Y. If you are using xconfig, the quickest thing to do is to use the search function to find it. Once you have, set it to Y.

Once the configuration change is made, follow the instructions to compile, but as a final check BEFORE you run "make-kpkg", use grep to check the option IS correctly set.

<pre>
grep CONFIG_FUNCTION_TRACER .config
</pre>

If "CONFIG_FUNCTION_TRACER=y" appears, it is fine.

Now you can continue with compiling and installing your kernel and headers. Once you have done so, go back and follow the instructions to install the module, including recompiling etc. You should now find that the module loads successsfully.

Huge thanks to http://www.iecn.u-nancy.fr/~garet/linux/notes_installation_av830_debian.php, for providing the basis for these notes.

== '''lsusb dump''' ==

Bus 001 Device 009: ID 048d:9135 Integrated Technology Express, Inc.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x048d Integrated Technology Express, Inc.
idProduct 0x9135
bcdDevice 2.00
iManufacturer 0
iProduct 0
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 46
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 4
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x84 EP 4 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x85 EP 5 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0000
(Bus Powered)

Latest revision as of 10:55, 23 June 2012

Vendor
Device/Model
Supported ID on
Interface
Hardware Firmware Comment / Pictures URL E
KWorld UB499-2T See Device page. IT9135 Yes from Kernel 3.2 048d:9135 USB2.0 ITE IT9135 dvb-usb-it9135-01.fw Jump to the place where you can edit this entry
KWorld UB499-2T T09 Yes, in kernel since 3.2 1b80:e409 USB2.0 IT9137 dvb-usb-it9137-01.fw Jump to the place where you can edit this entry

V4L Version

The KWorld UB499-2T series are dual DVB-T tuners USB 2.0 device. It contains the Afatech/ITE IT9135 or IT9137 hardware. It is supported directly by V4L through the following modules.

dvb-usb-it913x

it913x-fe

Firmware Instructions

Locate file get_dvb_firmware in Documentation/dvb of Kernel 3.2 and above.

Run the perl script.

./get_dvb_firmware it9135 

Manual extraction of firmware from Driver_V10.323.1.0412.100412.zip

in path

Driver_V10.323.1.0412.100412/Data/x86/

extract IT9135BDA.sys Dated Mon 22 Mar 2010 10:20

dd if=IT9135BDA.sys ibs=1 skip=69632 count=5731 of=dvb-usb-it9137-01.fw

This will produce the dvb-usb-it9137-01.fw file, copy this to your default firmware location. Usually /lib/firmware.

Installation Instructions

Kernels 2.6.31 to 3.1 and updates

Go to the How to Obtain, Build and Install V4L-DVB Device Drivers page and download and build the lastest media_build.

Changes in 3.3 for IT9135 Devices only ITE IT9135

Other Issues

IT9135 Dual Partial/Not confirmed

Dual IT9135(id 048d:9135) devices are not confirmed as working with this driver. Single Devices with this id are working.

Remote Control

Only the 32 button remote control supplied with UB499 2T T09 works.


Limitation

Does not pass the full MPEG2 transport stream to the software demuxer: has a hardware PID filter with a table count of 31. MythTV backend log shows error messages (failed to open demux device) about once a second while recording from BBC ONE. The recordings play OK and Project-X reports only a small proportion of packets out of order. Can make simultaneous recordings on two different muxes.

PID Filter can be turned off with module option

dvb-usb-it913x pid=1

Observations made using Scientific Linux 6 i686 and modules from the media_build script.

dmesg extract to identify version:

it913x: Chip Version=01 Chip Type=9135
it913x: Dual mode=3 Remote=5 Tuner Type=38
IR JVC protocol handler initialized
IR Sony protocol handler initialized
IR SANYO protocol handler initialized
IR MCE Keyboard/mouse protocol handler initialized
lirc_dev: IR Remote Control driver registered, major 248 
IR LIRC bridge handler initialized
it913x: Chip Version=01 Chip Type=9135
dvb-usb: found a 'Kworld UB499-2T T09(IT9137)' in cold state, will try to load a firmware
usb 1-4: firmware: requesting dvb-usb-it9137-01.fw
dvb-usb: downloading firmware from file 'dvb-usb-it9137-01.fw'
it913x: FRM Starting Firmware Download
it913x: FRM Firmware Download Completed - Resetting Device
it913x: Chip Version=01 Chip Type=9135
it913x: Firmware Version 204147968
dvb-usb: found a 'Kworld UB499-2T T09(IT9137)' in warm state.
dvb-usb: will use the device's hardware PID filter (table count: 31).
DVB: registering new adapter (Kworld UB499-2T T09(IT9137))
DVB: registering adapter 0 frontend 0 (Kworld UB499-2T T09(IT9137)_1)...
dvb-usb: will use the device's hardware PID filter (table count: 31).
DVB: registering new adapter (Kworld UB499-2T T09(IT9137))
DVB: registering adapter 1 frontend 0 (Kworld UB499-2T T09(IT9137)_2)...
Registered IR keymap rc-kworld-315u
input: IR-receiver inside an USB DVB receiver as /devices/pci0000:00/0000:00:1d.7/usb1/1-4/rc/rc0/input8
rc0: IR-receiver inside an USB DVB receiver as /devices/pci0000:00/0000:00:1d.7/usb1/1-4/rc/rc0
dvb-usb: schedule remote query interval to 250 msecs.
dvb-usb: Kworld UB499-2T T09(IT9137) successfully initialized and connected.
it913x: DEV registering device driver
usbcore: registered new interface driver it913x

Non V4L Version

The KWorld UB499-2T is a USB dual tuner. It contains the Afatech/ITE IT9135 hardware. It is not supported directly by V4L, however, a driver is available along with instructions for installation from http://wasietsmet.nl/linux/zolid-usb-dvb-t-tuner-van-de-aldi-linux-drivers/. This page is in Dutch, however English installation instructions for Ubuntu are provided below.

I have tested the driver on Mythbuntu 10.04 with kerner version 2.6.32. The dual tunar appears to function perfectly, however, I have not made any attept to get the included IR receiver and remote working.

The IT9137 version (packaged as KWorld UB499-2T) tested and both tuners working with the 9135 driver above with Mythtv 0.23 on Ubuntu 10.04 kernel 2.6.32-24-generic.

Installation Instructions

These instructions have been written after my work colleague Axel pointed me to the Dutch page http://wasietsmet.nl/linux/zolid-usb-dvb-t-tuner-van-de-aldi-linux-drivers/ which contains a link to the drivers and installation instructions in Dutch. Although it is relatively easy to translate the page using an online translator I thought it sensible to add a section here in the v4l wiki in English for completeness.

Again thanks to those mentioned above.

If you don't allready have them install linux headers for your kernel and gcc

 sudo apt-get install linux-headers-$(uname -r) gcc

Create a folder for the source code (for example in your Documents folder) and cd into it.

 mkdir IT9135_SRC_i686_patch
 cd IT9135_SRC_i686_patch

Download the driver source code from http://wasietsmet.nl/wp-content/uploads/2010/07/IT9135_SRC_i686_patch.tar.gz to your new folder either using your browser or using

 wget http://wasietsmet.nl/wp-content/uploads/2010/07/IT9135_SRC_i686_patch.tar.gz

Unpack the sourcecode and run the install script. Follow the onscreen instructions entering option 1 to install the module

 tar xvzf IT9135_SRC_i686_patch.tar.gz
 ./installer.sh

Load the module

 sudo modprobe dvb-usb-it9135

Test the tuner is working by scanning for channels. First find the correct file for your transmitter then scan. The example below lists all files for uk transmitters then uses uk-EmleyMoor. Modify the ls command to list all transmitters or those in your country and replace uk-EmleyMoor with the file for the transmitter you use. If the scan succeeds you have successfully installed the tuner.

 ls /usr/share/dvb/dvb-t | grep uk-
 scan /usr/share/dvb/dvb-t/uk-EmleyMoor

Ensure that the module is loaded on reboot by adding it to your /etc/modules file using your favourite text editor, eg to use nano

 sudo nano /etc/modules

then add the line

 dvb-usb-it9135

to the file.

Supporting Newer Kernels

The driver linked above only supports kernels up to 2.6.33. For newer kernels please follow the instructions below.

Updating for the 2.6.34 & 2.6.35 kernels

just use the new driver that was recently posted on the same dutch forum (http://wasietsmet.nl/linux/zolid-usb-dvb-t-tuner-van-de-aldi-linux-drivers/)

http://wasietsmet.nl/wp-content/uploads/2010/07/V10.12.30.1.zip

just read the read me in the file and follow it's instructions.

Note: I could not make this driver (10.12.30.1) or the old one (10.04.19.1) work in Fedora 14. Fedora 14 uses kernel 2.6.35. I had to upgrade the kernel to 2.6.37 and it worked following the procedures described below for kernel 2.6.37, but I had to use version 10.12.30.1, the earlier version (10.04.19.1) didn't work for me on kernel 2.6.37.

Updating for the 2.6.36, 2.6.37, 2.6.38 and 2.6.29 kernels

I have created two 10.12.30.1 versions (i686 and x64) that work up to kernel 2.6.39 following the procedure below.

You can download them here:

http://www.omcentre.com.au/fileadmin/user_upload/kworld_UB499-2T/IT9135-10.12.30.1_i686.tar.bz2

http://www.omcentre.com.au/fileadmin/user_upload/kworld_UB499-2T/IT9135-10.12.30.1_x64.tar.bz2

To install the i686 as root:

wget http://www.omcentre.com.au/fileadmin/user_upload/kworld_UB499-2T/IT9135-10.12.30.1_i686.tar.bz2
tar xvfj IT9135-10.12.30.1_i686.tar.bz2
cd IT9135_SRC
make
make install

To install the x64 one follow the same procedure replacing i686 with x64.

The 2.6.36 kernel introduced a big change towards removing the Big Kernel Lock, which was finally removed in 2.6.37. As a result the module mentioned above wouldn't build.

At the bottom of the Cellie's post there is a link to an updated source package that is supposed to work with the 2.6.36 kernel, however I wasn't able to make this work. The Release Notes indicate an updated firmware in that package, but a cmp between the firmware in the initially posted v10.04.19.1 and the updated v10.12.30.1 for x86 & amd64 appear to be identical. The notes also indicate better support for PIP so I'd like to get this going at some point.

I'm no C programmer, and much less a kernel hacker, but I found enough info to be able to patch the v10.04.19.1 module to build and fully function on these kernels. The following patch includes the necessary ioctl change for kernels >= 2.6.36, along with the other changes for kernels > 2.6.33.

To use the patch

  • Enter the unpacked source folder for the IT9135_SRC_i686_patch.tar.gz package
  • Save the following patch to patch_file
  • Use "patch -p0 < patch_file" to apply the changes to the source
  • Run the helper script below to populate the necessary sources from the kernel tree
  • Use the installer as instructed in the source to build & install the module
--- IT9135_SRC/Makefile	2011-02-05 23:26:01.000000000 +0000
+++ IT9135_SRC.orig/Makefile	2010-04-19 01:11:40.000000000 +0100
@@ -106,6 +106,9 @@
 ifneq (,$(findstring 2.6.33,$(CURRENT)))
 	@cp -f v4l/kernel-2.6.33/* ./
 endif
+ifneq (,$(findstring 2.6.36,$(CURRENT)))
+	@cp -f v4l/kernel-2.6.36/* ./
+endif
 
 	@(cp DemodAPI/*.* ./; cp src/*.* ./)
 #make -C $(KSRC) SUBDIRS=$(PWD) modules
--- IT9135_SRC/src/it9135-core.c	2011-02-05 23:26:23.000000000 +0000
+++ IT9135_SRC.orig/src/it9135-core.c	2010-04-19 01:11:40.000000000 +0100
@@ -63,7 +63,7 @@
 	.owner =		THIS_MODULE,
 	.open =		it9135_usb_open,
 	.release =	it9135_usb_release,
-	.ioctl =		it9135_usb_ioctl,
+	.unlocked_ioctl =		it9135_usb_ioctl,
 };
 
 /*
--- IT9135_SRC/src/usb2impl.c	2011-02-05 23:26:32.000000000 +0000
+++ IT9135_SRC.orig/src/usb2impl.c	2010-04-19 01:11:40.000000000 +0100
@@ -1,6 +1,6 @@
 /*#define __USB2IMPL_C__ for Linux  */
 // all for Linux
-#include <linux/autoconf.h>
+#include <generated/autoconf.h>
 #include <linux/kernel.h>
 #include <linux/errno.h>
 #include <linux/init.h>

The following script will create the necessary headers folder in the unpacked source so you can compile the module. This script assumes you have the kernel sources unpacked to /usr/src/linux

 #!/bin/bash

KERNEL_VERSION=$(uname -r | cut -d. -f1-3)

if [ -d "IT9135_SRC/v4l/kernel-${KERNEL_VERSION}" ]; then
	echo "Looks like this kernel has already been configured.  Exiting."
	exit 1
else
	mkdir IT9135_SRC/v4l/kernel-${KERNEL_VERSION}
fi

REQD="dvb_frontend.h
dmxdev.h
dvb_ringbuffer.h
dvb_demux.h
dvb-pll.h
dvb-usb.h
dvb_net.h
dvbdev.h
demux.h
dvb-usb-ids.h"

for x in $REQD; do
	echo -n "Processing $x: "
	find /usr/src/linux/drivers/media/dvb/ -name "$x" -print0 -exec cp "{}" IT9135_SRC/v4l/kernel-${KERNEL_VERSION} \;
	echo
done

Updating for the 2.6.38 and Beyond

Ugh, this is pain, but will probably need to be done each time there is a new kernel version.

  • Download V10.12.30.1.zip and extract it
  • Run the installer based on your system (i686 or x64)
  • When it's asking you to install / remove the driver fire up another terminal, and copy folder /tmp/ite-install somewhere (I copy it to my home folder)
  • quit the installer (it won't work any way)
  • go to ite-install/installer/IT9135_SRC/
  • You'll have to manually patch Makefile to add support for your new kernel (replace xx with your installed kernel version)
ifneq (,$(findstring 2.6.xx,$(CURRENT)))
	@cp -f v4l/kernel-2.6.xx/* ./
endif
  • You'll have to manually patch src/it9135-core.c and change the line:
.ioctl = it9135_usb_ioctl,

to

.unlocked_ioctl = it9135_usb_ioctl,
  • download your kernel sources and extract it somewhere. Make sure it has the file /drivers/media/dvb/dvb-usb/dvb-usb.h
for ubuntu/mythbuntu type the following (for the tar command, make sure the file name matches what you downloaded):
sudo apt-get source linux-image-$(uname -r)
tar -jxvf linux-source-2.6.38.tar.bz2
  • run the script posted for v2.6.36/37 but make sure you edit it so it points to where you extracted the kernel source
  • run make, if it generates any errors, they should be easy to fix (I had to rename v4l/kernel-2.6.38-8-generic to v4l/kernel-2.6.38)
  • run make install
  • it _should_ work.

Common problems

  • make fails due to missing files.
    • You need to edit the script posted for v2.6.36/37 to point to where you extracted the kernel source. If you run the script without editing it, it won't copy the files properly and the build will fail.
  • make works fine, but when I plug in the capture card it doesn't work, I get messages like "dvb_usb_it9135: disagrees about version of symbol ..." in the kernel logs.
    • You have downloaded or copied the wrong kernel sources when building your driver. Make sure the kernel source you downloaded matches your actual running kernel.
  • the module fails to install, with a message explaining that a symbol is missing - dmesg gives "dvb_usb_it9135: Unknown symbol mcount"
    • "mcount" is a symbol provided by an optional function which is not configured in the kernel you are using. This seems to be the case with many standard kernels. If mcount is not defined, you need to recompile the kernel with the correct option set to Y.

The instructions below are for debian squeeze and kernel 2.6.32 on amd - you may find you have to change a view things on a different system.

1. Check if mcount is actually defined in your kernel, do

grep mcount /lib/modules/$(uname -r)/build/Module.symvers

If something like "0xb4390f9a mcount vmlinux EXPORT_SYMBOL" appears, mcount IS defined and you don't have to recompile (at least, not for this reason).

2. If mcount is not defined, you need to recompile the kernel with the correct option set to Y.

First, get hold of a copy of the kernel source, AND I STRONGLY SUGGEST you copy your existing kernel configuration rather than starting from the beginning. There are many guides on how to do this - for debian squeeze, try http://newbiedoc.sourceforge.net/system/kernel-pkg.html#EXISTING-KERNEL-PKG.

mcount is defined in /usr/src/linux-source-2.6.32/arch/x86/kernel/x8664_ksyms_64.c

	#ifdef CONFIG_FUNCTION_TRACER
	/* mcount is defined in assembly */
	EXPORT_SYMBOL(mcount);
	#endif

It depends on a kernel option called "CONFIG_FUNCTION_TRACER". This is the switch you need to have set on BEFORE you recompile the kernel.To set the option, you will need to use the kernel configuration tool to set this to Y. If you are using xconfig, the quickest thing to do is to use the search function to find it. Once you have, set it to Y.

Once the configuration change is made, follow the instructions to compile, but as a final check BEFORE you run "make-kpkg", use grep to check the option IS correctly set.

	grep CONFIG_FUNCTION_TRACER .config

If "CONFIG_FUNCTION_TRACER=y" appears, it is fine.

Now you can continue with compiling and installing your kernel and headers. Once you have done so, go back and follow the instructions to install the module, including recompiling etc. You should now find that the module loads successsfully.

Huge thanks to http://www.iecn.u-nancy.fr/~garet/linux/notes_installation_av830_debian.php, for providing the basis for these notes.

lsusb dump

Bus 001 Device 009: ID 048d:9135 Integrated Technology Express, Inc. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x048d Integrated Technology Express, Inc.
  idProduct          0x9135 
  bcdDevice            2.00
  iManufacturer           0 
  iProduct                0 
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           46
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           4
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x85  EP 5 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0000
  (Bus Powered)