Leadtek DTV mini dongle on Linux

Here’s how you can use a Leadtek DTV dongle mini USB DVB-T (or any RTL2832 based) adapter under Linux.

1. download and unpack latest v4l-dvb snapshot from http://linuxtv.org/hg/v4l-dvb to /usr/src/v4l-dvb

2. download the RTL2832U driver and unpack it to /usr/src/v4l-dvb/linux/drivers/media/dvb/dvb-usb

3. edit the Makefile in this dir and insert this before the EXTRA_CFLAGS line:

dvb-usb-rtl2832u-OBJS = demod_rtl2832.o dvbt_demod_base.o dvbt_nim_base.o foundation.o math_mpi.o im_rtl2832_mxl5007t.o nim_rtl2832_fc2580.o nim_rtl2832_mt2266.o rtl2832u.o rtl2832u_fe.o rtl2832u_io.o tuner_mxl5007t.o tuner_fc2580.o tuner_mt2266.o tuner_tua9001.o nim_rtl2832_tua9001.o
obj-$ (CONFIG_DVB_USB_RTL2832U) + = dvb-usb-rtl2832u.o

4. edit Kconfig, insert this to the end of the file:

config DVB_USB_RTL2832U
  tristate "Realtek RTL2832U DVB-T USB2.0 support"
  depends on DVB_USB
  Realtek RTL2832U DVB-T driver.

5. edit rtl2832u.c, uncomment the line // DVB_DEFINE_MOD_OPT_ADAPTER_NR (adapter_nr); then edit line 61-63, add adapter_nr after the NULL parameter, like this:

if ((0 == dvb_usb_device_init (Lexicalized parenthesis, & rtl2832u_1st_properties, THIS_MODULE, NULL, adapter_nr)) ||
  (0 == dvb_usb_device_init (Lexicalized parenthesis, & rtl2832u_2nd_properties, THIS_MODULE, NULL, adapter_nr)) ||
  (0 == dvb_usb_device_init (Lexicalized parenthesis, & rtl2832u_3th_properties, THIS_MODULE, NULL, adapter_nr)))

6. edit tuner_tua9001.c, replace CRYSTAL_19.2_MHZ with CRYSTAL_19_2_MHZ and CRYSTAL_20.48_MHZ with CRYSTAL_20_48_MHZ everywhere

7. edit rtl2832u.h, edit USB_VID_GTEK and USB_PID_GTEK_WARM values according to your adapter’s USB id (you can get it using lsusb), my config for the Leadtek adapter is:

#define USB_VID_GTEK 0x0413
#define USB_PID_GTEK_WARM 0x6a03

8. cd /usr/src/v4l-dvb; make clean; make; make install

9. plug in your stick and you should see something like this in /var/log/syslog:

Aug 25 22:25:42 puttony-ng kernel: usb 1-1: new high speed USB device using ehci_hcd and address 24
Aug 25 22:25:42 puttony-ng kernel: usb 1-1: configuration #1 chosen from 1 choice
Aug 25 22:25:42 puttony-ng kernel: dvb-usb: found a 'RT DTV 2832U' in warm state.
Aug 25 22:25:42 puttony-ng kernel: dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
Aug 25 22:25:42 puttony-ng kernel: DVB: registering new adapter (RT DTV 2832U)
Aug 25 22:25:42 puttony-ng kernel: DVB: registering adapter 0 frontend 0 (Realtek RTL2832 DVB-T)...
Aug 25 22:25:42 puttony-ng kernel: dvb-usb: RT DTV 2832U successfully initialized and connected.
Aug 25 22:25:42 puttony-ng kernel: usbcore: registered new interface driver dvb_usb_rtl2832u

You can test the adapter using the utility called scan which is in the dvb-apps Debian package. I used the following parameters to generate a channels.conf file: scan /usr/share/dvb/dvb-t/hu-Gerecse > channels.conf

After that I tested signal quality with tzap -c channels.conf -r “RTL Klub”

Try to align your antenna until the “ber” (bit error rate) value is constantly zero.

I’m using mumudvb unicast HTTP streaming to stream channels from my Linux server.

Steve 2012-07-31 05:49:53

Could you please help me get a leadtek winfast DTV dongle GOLD going. I got help installing me-tv from source but me-tv -v says the StreamManager is with holding the image.it has done a chanel scan and everything seems to be working except the picture and i am about to get into a warm bath with an open arterie :) I have the dongle for 7 days before i cannot return it and got it 2 days ago. it is supported apparently.Im running ubuntu 12.04 LTS imprecise pangolin (the little bugger has curled up into a ball and refuses to me-tv right out. hunting season on pangolins soon pleas help if you can as i wiped my eisa partition so i cant go back to windows on purpose i must succeed on linux this time, thank you.

Nonoo 2012-07-31 10:11:03

You should search for a driver for the dongle’s chipset (mini dongle has RTL2832U) and merge that into v4l-dvb.

Name (required)
E-mail (required - never shown publicly)
Webpage URL
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> in your comment.

Trackback responses to this post

About me

I'm Nonoo. This is my blog about music, sounds, filmmaking, amateur radio, computers, programming, electronics and other things I'm obsessed with. ... »


Listening now

My favorite artists