dknute
Posts: 57
Joined: Thu Nov 08, 2012 9:05 pm

RTL2832 / RTL2838 DVB-T

Wed Nov 21, 2012 11:28 pm

This is a continuation of http://www.raspberrypi.org/phpBB3/viewt ... =63&t=3050 - since this particular chip is also used by software defined radio enthusiasts I figured a new topic with proper subject is in order.

I finally got my dongle to work in Raspbian. Previous attempts failed due to distro kernel files being much newer than what's in header/source packages. So, forget the packages. Grab kernel sources directly from git and compile it yourself:

Code: Select all

cd ~
mkdir src
cd src
git clone --depth 1 git://github.com/raspberrypi/linux.git
cd linux
zcat /proc/config.gz > .config
make
make modules
This took well over 7 hours on my RPi and I've overclocked it (arm_freq=900 core_freq=450 sdram_freq=450). You will need patience and considerable amount of disk space for this:

Code: Select all

pi@raspberrypi ~/src $ du -sh linux
930M    linux
The "make modules" seems optional now as modules were compiled along with the kernel proper but run it anyway, it's just a couple more minutes. You might also consider screen or tmux session if you're mostly using SSH like me, or nice if you want some CPU power for other tasks. By the way, compiling kernel is a great way of testing OC stability and I'm happy to say my Pi passed :)

Now get the dongle driver sources:

Code: Select all

cd ~/src
git clone https://github.com/tmair/DVB-Realtek-RTL2832U-2.2.2-10tuner-mod_kernel-3.0.0.git rtl2832
Modify the top Makefile like this:

Code: Select all

# Choose here wich include file to use: from kernel 3.0.0 (good for 3.1.0) or from kernel 3.2.0

# kernel 3.0.0 / 3.1.0
#INCLUDE_EXTRA_DVB := include-300

# kernel 3.2.0
INCLUDE_EXTRA_DVB := include-320

# kernel 3.3.0
#INCLUDE_EXTRA_DVB := include-330

(...)
# current dir
SOURCEDIR := /home/pi/src/rtl2832/RTL2832-2.2.2_kernel-3.0.0
(...)
KDIR = /home/pi/src/linux
Compile and install the module, it takes just a few minutes:

Code: Select all

make
sudo make install
And that's it. The dvb-usb-rtl2832u.ko file has a sane size now by the way, around 420kB. Plug in your dongle and make sure the module got loaded with lsmod. You should see it on the list, next to dvb-usb, along with some IR receiver drivers (but that depends on your particular model). Also, tail -20 /var/log/syslog should return something like this:

Code: Select all

usb 1-1.3: new high-speed USB device number 6 using dwc_otg
usb 1-1.3: New USB device found, idVendor=0bda, idProduct=2838
usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-1.3: Product: RTL2838UHIDIR
usb 1-1.3: Manufacturer: Realtek
dvb-usb: found a 'RTL2832U DVB-T USB DEVICE' in warm state.
dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
DVB: registering new adapter (RTL2832U DVB-T USB DEVICE)
RTL2832U usb_init_bulk_setting : USB2.0 HIGH SPEED (480Mb/s)
RTL2832U check_tuner_type : E4000 tuner on board...
DVB: registering adapter 0 frontend 0 (Realtek DVB-T RTL2832)...
input: IR-receiver inside an USB DVB receiver as /devices/platform/bcm2708_usb/usb1/1-1/1-1.3/input/input0
dvb-usb: schedule remote query interval to 287 msecs.
dvb-usb: RTL2832U DVB-T USB DEVICE successfully initialized and connected.
usbcore: registered new interface driver dvb_usb_rtl2832u
Tada! I'm still in the process of running scan for tzap but it did find some TV channels so it's good. I very much doubt even well overclocked Pi could run gnuradio but perhaps it could be used as a remote sampling node, with Ethernet link.

This approach does have a serious limitation though. You can no longer just grab a newer kernel via apt-get / aptitude - it will work as long as the changes were small but should there be a version bump you'll have to pull a fresh copy from git and recompile everything again. Such is hobbyist life. As long as there is ongoing work on the kernel on the github the headers package will be out of sync with it. Though perhaps someone could make sure it's at least 3.2.27 and not 3.2.22 there (hint, hint)?

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5749
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: RTL2832 / RTL2838 DVB-T

Wed Nov 21, 2012 11:33 pm

The "next" firmware branch contains this:
/lib/modules/3.6.7+/kernel/drivers/media/dvb/frontends/rtl2832.ko

Perhaps you can test if that makes your dongle work. Some info here:
http://www.raspberrypi.org/phpBB3/viewt ... 00#p218734

dknute
Posts: 57
Joined: Thu Nov 08, 2012 9:05 pm

Re: RTL2832 / RTL2838 DVB-T

Thu Nov 22, 2012 12:15 am

Sure! It might take a day or two though - I don't want to mess up my current SD card so I'll prepare another one for testing 3.6.x.

By the way, the DVB-T path works with 3.2.27+ and external module just fine. Once scan is finished and tzap started you can just do this:

Code: Select all

pi@raspberrypi ~ $ omxplayer /dev/dvb/adapter0/dvr0
file : /dev/dvb/adapter0/dvr0 result 0 format mpegts audio streams 1 video streams 1 chapters 0 subtitles 0
Aspect : num 1 den 1 aspect 1.777778 display aspect 1.500000
Video codec omx-h264 width 1920 height 1080 profile 100 fps 25.000000
Audio codec mp2 channels 2 samplerate 48000 bitspersample 16
Subtitle count : 0 state off : index 0
It takes a few seconds to start but runs without problems. I'll try to arrange a longer test to see if it's stable.

dknute
Posts: 57
Joined: Thu Nov 08, 2012 9:05 pm

Re: RTL2832 / RTL2838 DVB-T

Thu Nov 22, 2012 8:02 pm

Close but no cigar.

First of all, the rpi-update ended with some fatal error, something about //root/boot.git not being a git repository. Kinda forgot to copy & paste the exact text it spit out. Still, the upgrade did went through:

Code: Select all

pi@raspberrypi ~ $ uname -a
Linux raspberrypi 3.6.7+ #295 PREEMPT Wed Nov 21 14:45:04 GMT 2012 armv6l GNU/Linux
I also got some funny entries in the syslog, but I did as it suggested and it went away:

Code: Select all

INFO: task VCHIQka-0:28 blocked for more than 120 seconds.
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
VCHIQka-0       D c03951c0     0    28      2 0x00000000
[<c03951c0>] (__schedule+0x2c4/0x5b0) from [<c003a5cc>] (kthread+0x6c/0x94)
[<c003a5cc>] (kthread+0x6c/0x94) from [<c000e9fc>] (kernel_thread_exit+0x0/0x8)
Back to the topic at hand, the driver in 3.6.7 does support some of the RTL283x chips but not mine. Quick search in /lib/modules/3.6.7+/modules.alias revealed this:

Code: Select all

alias usb:v0CCDp00B3d*dc*dsc*dp*ic*isc*ip*in* dvb_usb_rtl28xxu
alias usb:v1F4DpB803d*dc*dsc*dp*ic*isc*ip*in* dvb_usb_rtl28xxu
alias usb:v0CCDp00A9d*dc*dsc*dp*ic*isc*ip*in* dvb_usb_rtl28xxu
alias usb:v14AAp0161d*dc*dsc*dp*ic*isc*ip*in* dvb_usb_rtl28xxu
alias usb:v14AAp0160d*dc*dsc*dp*ic*isc*ip*in* dvb_usb_rtl28xxu
alias usb:v0BDAp2831d*dc*dsc*dp*ic*isc*ip*in* dvb_usb_rtl28xxu
There is no 0BDA:2838 entry :( Adding one to /lib/modprobe.d/aliases.conf or trying to load the module by hand with modprobe doesn't do much. It loads, sure, but simply sits there doing nothing.

To be sure I downloaded 3.6.7 and 3.7-rc6 sources and compared rtl28xxu.c. The important bits:

Code: Select all

static struct usb_device_id rtl28xxu_table[] = {
	/* RTL2831U */
	[RTL2831U_0BDA_2831] = {
		USB_DEVICE(USB_VID_REALTEK, USB_PID_REALTEK_RTL2831U)},
	[RTL2831U_14AA_0160] = {
		USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_FREECOM_DVBT)},
	[RTL2831U_14AA_0161] = {
		USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_FREECOM_DVBT_2)},

	/* RTL2832U */
	[RTL2832U_0CCD_00A9] = {
		USB_DEVICE(USB_VID_TERRATEC, USB_PID_TERRATEC_CINERGY_T_STICK_BLACK_REV1)},
	[RTL2832U_1F4D_B803] = {
		USB_DEVICE(USB_VID_GTEK, USB_PID_DELOCK_USB2_DVBT)},
	[RTL2832U_0CCD_00B3] = {
		USB_DEVICE(USB_VID_TERRATEC, USB_PID_NOXON_DAB_STICK)},
	{} /* terminating entry */
};

Code: Select all

static const struct usb_device_id rtl28xxu_id_table[] = {
	{ DVB_USB_DEVICE(USB_VID_REALTEK, USB_PID_REALTEK_RTL2831U,
		&rtl2831u_props, "Realtek RTL2831U reference design", NULL) },
	{ DVB_USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_FREECOM_DVBT,
		&rtl2831u_props, "Freecom USB2.0 DVB-T", NULL) },
	{ DVB_USB_DEVICE(USB_VID_WIDEVIEW, USB_PID_FREECOM_DVBT_2,
		&rtl2831u_props, "Freecom USB2.0 DVB-T", NULL) },

	{ DVB_USB_DEVICE(USB_VID_REALTEK, 0x2832,
		&rtl2832u_props, "Realtek RTL2832U reference design", NULL) },
	{ DVB_USB_DEVICE(USB_VID_REALTEK, 0x2838,
		&rtl2832u_props, "Realtek RTL2832U reference design", NULL) },
	{ DVB_USB_DEVICE(USB_VID_TERRATEC, USB_PID_TERRATEC_CINERGY_T_STICK_BLACK_REV1,
		&rtl2832u_props, "Terratec Cinergy T Stick Black", NULL) },
	{ DVB_USB_DEVICE(USB_VID_GTEK, USB_PID_DELOCK_USB2_DVBT,
		&rtl2832u_props, "G-Tek Electronics Group Lifeview LV5TDLX DVB-T", NULL) },
	{ DVB_USB_DEVICE(USB_VID_TERRATEC, USB_PID_NOXON_DAB_STICK,
		&rtl2832u_props, "NOXON DAB/DAB+ USB dongle", NULL) },
	{ DVB_USB_DEVICE(USB_VID_GTEK, USB_PID_TREKSTOR_TERRES_2_0,
		&rtl2832u_props, "Trekstor DVB-T Stick Terres 2.0", NULL) },
	{ DVB_USB_DEVICE(USB_VID_DEXATEK, 0x1101,
		&rtl2832u_props, "Dexatek DK DVB-T Dongle", NULL) },
	{ DVB_USB_DEVICE(USB_VID_LEADTEK, 0x6680,
		&rtl2832u_props, "DigitalNow Quad DVB-T Receiver", NULL) },
	{ DVB_USB_DEVICE(USB_VID_TERRATEC, 0x00d3,
		&rtl2832u_props, "TerraTec Cinergy T Stick RC (Rev. 3)", NULL) },
	{ }
};
In other words, 3.6.7 supports 2831 and 2832 but only FC0012 and FC0013 tuners. So, no DVB-T for me and SDR will also suffer. The 3.7 kernel adds support for 2838, along with E4000, FC2580 and other tuners. Unfortunately the USB DVB-T stuff in 3.7-rc6 has been split into two directories, one called "-v2", so I'd say it's pretty volatile code right now. Once it does settle maybe we could try back-porting this driver to 3.6.7 or even switching over to stable 3.7?

Still, 3.6.7 is not all bad. The ITE chip is now fully supported (as long as one has the firmware, which can be obtained in several ways, for example by cutting it out of Windows drivers with dd):

Code: Select all

usb 1-1.3: USB disconnect, device number 7
usb 1-1.3: new high-speed USB device number 8 using dwc_otg
usb 1-1.3: New USB device found, idVendor=048d, idProduct=9006
usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-1.3: Product: USB Deivce
usb 1-1.3: Manufacturer: ITE Technologies, Inc.
it913x: Chip Version=01 Chip Type=9135
it913x: Remote HID mode NOT SUPPORTED
it913x: Dual mode=0 Tuner Type=0
dvb-usb: found a 'ITE 9135(9006) Generic' in cold state, will try to load a firmware
dvb-usb: downloading firmware from file 'dvb-usb-it9135-01.fw'
it913x: FRM Starting Firmware Download
it913x: FRM Firmware Download Completed - Resetting Device
it913x: Chip Version=01 Chip Type=9135
it913x: Firmware Version 204869120
dvb-usb: found a 'ITE 9135(9006) Generic' in warm state.
dvb-usb: will use the device's hardware PID filter (table count: 31).
DVB: registering new adapter (ITE 9135(9006) Generic)
it913x-fe: ADF table value   :00
it913x-fe: Crystal Frequency :12000000 Adc Frequency :20250000 ADC X2: 01
it913x-fe: Tuner LNA type :38
DVB: registering adapter 0 frontend 0 (ITE 9135(9006) Generic_1)...
dvb-usb: ITE 9135(9006) Generic successfully initialized and connected.
it913x: DEV registering device driver
input: ITE Technologies, Inc. USB Deivce as /devices/platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3:1.1/input/input2
hid-generic 0003:048D:9006.0003: input: USB HID v1.01 Keyboard [ITE Technologies, Inc. USB Deivce] on usb-bcm2708_usb-1.3/input1
The pros: DVB-T works (IT9135 is really popular chip used in many dongles). The cons: No SDR, this requires Realtek-based receiver with direct sampling ability. I'm all for newer kernel though, we get more drivers and I could still just compile the Realtek one out of tree for now.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5749
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: RTL2832 / RTL2838 DVB-T

Fri Nov 23, 2012 3:50 pm

dknute wrote: In other words, 3.6.7 supports 2831 and 2832 but only FC0012 and FC0013 tuners. So, no DVB-T for me and SDR will also suffer. The 3.7 kernel adds support for 2838, along with E4000, FC2580 and other tuners. Unfortunately the USB DVB-T stuff in 3.7-rc6 has been split into two directories, one called "-v2", so I'd say it's pretty volatile code right now. Once it does settle maybe we could try back-porting this driver to 3.6.7 or even switching over to stable 3.7?
Okay. I will move to newer upstream kernel in time, (possibly 3.8 rather than 3.7 as it will have longer term support) so you will get it eventually.
Back porting before then is possible if there's a lot of demand for it.

dknute
Posts: 57
Joined: Thu Nov 08, 2012 9:05 pm

Re: RTL2832 / RTL2838 DVB-T

Fri Nov 23, 2012 7:09 pm

Are we getting 3.6.7 anytime soon or is it strictly a test branch? And more importantly what constitutes "a lot of demand" because as popular as SDR is nowdays I just don't see that kind of crowd here, on the forums :)

If "backporting" would be just something that Pi gets via git or custom package - as opposed to trying to get the changes accepted to official Linux kernel tree - then I might as well volunteer for the job. So far I'm the only interested party anyway. So, if the 3.6 is here to stay for a while I'll just get a fresh git copy and start hacking.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5749
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: RTL2832 / RTL2838 DVB-T

Fri Nov 23, 2012 7:31 pm

We will definitely move to "next" trees as default (first through rpi-update, then later though apt-get upgrade and official images).

I'm trying to encourage testers to try it, but haven't had a lot of feedback.
I believe OpenELEC and Raspbmc are switching to it, so that will provide a good test.

The backporting means it will live in our raspberrypi/linux github tree (and so R-Pi users will get it when updating).
I don't want too many patches from upstream linux as it makes merging/rebasing to newer kernels more difficult, and it could introduce stability issues.

We made an exception for the rtl8188cu wifi driver due to a thread with 1000 posts showing it was very popular.

dknute
Posts: 57
Joined: Thu Nov 08, 2012 9:05 pm

Re: RTL2832 / RTL2838 DVB-T

Fri Nov 23, 2012 11:12 pm

Fair enough. It's not like I need it in the kernel tree, just thought it might be useful for other people. But you're right, I can't guarantee it's not going to break anything.

On the subject of testing: is there an official forum thread for this? I didn't see one and forum won't even let me search for the word "kernel". Too common apparently. Maybe we should start using it backwards. Anyway, so far my Pi is good. I did get some weird error running omxplayer, something about glibc and broken chain lists. I was running DVB-T tests and had tmux with 3 terminals spawned. The one with omxplayer stopped working properly - bash would no longer show any typed or recalled commands but would still execute them, and eventually (after running omxplayer one more time) I would not get prompt at all after CTRL+C. Weird. But I can't really attribute it to new kernel. Other terminals kept working. I rebooted my Pi and haven't had that issue again. In fact I've just now completed a 24h non-stop test where I had DVB-T dongle plugged in, streaming data to omxplayer, and there was a USB keyboard connected to the other port. You know, for a mix of high and low-speed devices. Don't have a full-speed device though. I've also started a ping -s 1024 to my Linux router and that was running along about 16 hours. No problems so far, not a single packet dropped.

I don't see git repository with 3.6.7 sources so I'm going to try my luck with vanilla ones. I don't even need the kernel I'm going to build, just to have the same version on the modules.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5749
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: RTL2832 / RTL2838 DVB-T

Sat Nov 24, 2012 12:47 pm

dknute wrote:I don't see git repository with 3.6.7 sources so I'm going to try my luck with vanilla ones. I don't even need the kernel I'm going to build, just to have the same version on the modules.
https://github.com/raspberrypi/linux/tree/rpi-3.6.y
has 3.6.7 for R-Pi.

davyde84
Posts: 2
Joined: Thu Jan 03, 2013 10:28 pm

Re: RTL2832 / RTL2838 DVB-T

Sat Jan 12, 2013 7:59 pm

Hi i have a trekstor dvb stick terres 2.0
is there a way to have it work on raspberry?
now I'm using openelec
i've read on palosaari.fi/linux that should be supported from kernel 3.7

thanks!!

KoenV
Posts: 4
Joined: Sun Jan 20, 2013 2:31 pm

Re: RTL2832 / RTL2838 DVB-T

Sun Jan 20, 2013 2:57 pm

Hi, dknute,

followed your instructions to build the kernel from the source. All went well, until I tried to compile the patch for the RTL2832 dvb tuner. Then I got a compiler error:

Code: Select all

/home/pi/src/rtl2832/RTL2832-2.2.2_kernel-3.0.0/include-320/dvb_frontend.h:49:33: error: field ‘parameters’ has incomplete type
/home/pi/src/rtl2832/RTL2832-2.2.2_kernel-3.0.0/include-320/dvb_frontend.h:313:28: error: array type has incomplete element type
make[2]: *** [/home/pi/src/rtl2832/RTL2832-2.2.2_kernel-3.0.0/demod_rtl2832.o] Error 1
make[1]: *** [_module_/home/pi/src/rtl2832/RTL2832-2.2.2_kernel-3.0.0] Error 2
make[1]: Leaving directory `/home/pi/src/linux'
make: *** [default] Error 2
This is strange because I had to compile a similar patch on my Ubuntu laptop and all went well there. Any clue what went wrong here?

PetarS
Posts: 4
Joined: Mon Jan 21, 2013 9:05 am

Re: RTL2832 / RTL2838 DVB-T

Mon Jan 21, 2013 9:31 am

Hello and thank you for the detailed explanation. I followed you instructions and everything when fine (compiling the kernel and the drivers). Then I tried to scan this way

Code: Select all

 w_scan -ft -c BG
But I got this error:

Code: Select all

Info: using DVB adapter auto detection.
main:3220: FATAL: ***** NO USEABLE TERRESTRIAL CARD FOUND. *****
Please check wether dvb driver is loaded and
verify that no dvb application (i.e. vdr) is running.
I also tried running TVHeadend but the list of adapters was empty.
This is the device that lsusb reports

Code: Select all

Bus 001 Device 006: ID 0bda:2838 Realtek Semiconductor Corp. RTL2838 DVB-T
These are the dvb related entries in lsmod

Code: Select all

dvb_usb_rtl2832u      375639  0
dvb_usb                17773  1 dvb_usb_rtl2832u
dvb_core               97781  1 dvb_usb
rc_core                16540  1 dvb_usb
I was wandering if you can give me any clue what am doing wrong?

KoenV
Posts: 4
Joined: Sun Jan 20, 2013 2:31 pm

Re: RTL2832 / RTL2838 DVB-T

Mon Jan 21, 2013 12:37 pm

@PetarS:
I quickly scanned the source code of this kernel patch and I saw that your tuner - VID=0BDA, PID=2838 - should be supported. Try this, before you insert your tuner in the USB-port:

Code: Select all

tail -f /var/log/kern.log
Do you see that the tuner is properly recognized or do you get an error message?

The error message of w_scan says

Code: Select all

Please check wether dvb driver is loaded and
verify that no dvb application (i.e. vdr) is running
Was the TVHeadend daemon already running when you executed the w_scan command?

PetarS
Posts: 4
Joined: Mon Jan 21, 2013 9:05 am

Re: RTL2832 / RTL2838 DVB-T

Mon Jan 21, 2013 7:22 pm

@KoenV

Your response made me double check all the steps and I noticed that I have made a mistake. I have uncomment

Code: Select all

INCLUDE_EXTRA_DVB := include-330
instead of

Code: Select all

INCLUDE_EXTRA_DVB := include-320
and all compiled successfully. I have fixed that mistake and now I get the very same error as you do. Any ideas?

PetarS
Posts: 4
Joined: Mon Jan 21, 2013 9:05 am

Re: RTL2832 / RTL2838 DVB-T

Mon Jan 21, 2013 7:32 pm

@KoenV

This is what I'm getting from

Code: Select all

tail -f /var/log/kern.log
when I plug the tuner

Code: Select all

Jan 21 21:29:06 raspberrypi kernel: [  126.055658] usb 1-1.3: new high-speed USB device number 8 using dwc_otg
Jan 21 21:29:06 raspberrypi kernel: [  126.166220] usb 1-1.3: New USB device found, idVendor=0bda, idProduct=2838
Jan 21 21:29:06 raspberrypi kernel: [  126.166253] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
Jan 21 21:29:06 raspberrypi kernel: [  126.166304] usb 1-1.3: Product: RTL2838UHIDIR
Jan 21 21:29:06 raspberrypi kernel: [  126.166322] usb 1-1.3: Manufacturer: Realtek
Jan 21 21:29:06 raspberrypi kernel: [  126.364249] usbcore: registered new interface driver dvb_usb_rtl2832u

KoenV
Posts: 4
Joined: Sun Jan 20, 2013 2:31 pm

Re: RTL2832 / RTL2838 DVB-T

Tue Jan 22, 2013 1:55 pm

OK, so apparently your system recognizes your DVB-T tuner but somehow w_scan doesn't find anything. What do you see in /dev/dvb?
If you see anything different than adapter0 this may be the reason why you w_scan cannot find any device: the default is adapter0. What's inside that adapter<x> directory?
If you use scan (part of dvb-apps) instead of w_scan, you can specify a different adapter, demux and frontend instead of the default one.

PetarS
Posts: 4
Joined: Mon Jan 21, 2013 9:05 am

Re: RTL2832 / RTL2838 DVB-T

Tue Jan 22, 2013 4:11 pm

The thing is that there is no /dev/dvb directory at all. By the way, did you try to compile with the same Makefile as I did?

KoenV
Posts: 4
Joined: Sun Jan 20, 2013 2:31 pm

Re: RTL2832 / RTL2838 DVB-T

Tue Jan 22, 2013 6:54 pm

I've messed around a bit with the makefile and now it compiled without a problem. I plugged in the tuner stick and it got recognized by the kernel. But I don't get a /dev/dvb directory either. Is it because I did not modprobe the device?
When I try to do this

Code: Select all

sudo modprobe dvb_usb_rtl2832u
I get an error:

Code: Select all

ERROR: could not insert 'dvb_usb_rtl2832u': Exec format error
Does anyone have a clue why this is?

nowls
Posts: 1
Joined: Wed Jan 23, 2013 2:58 pm

Re: RTL2832 / RTL2838 DVB-T

Wed Jan 23, 2013 3:06 pm

I'm using Wheezy image and I compiled drivers from here: http://sdr.osmocom.org/trac/wiki/rtl-sdr

This seems to work fine without any kernel mods. I haven't done extensive testing, but I ran

Code: Select all

rtl_test -t
, which successfully told me the E4000's tuning range. I also ran

Code: Select all

rtl_test -s 1.0e6
to test how fast I could sample. I can't recall the exact number but I think I was getting 1.4 MHz or above before dropped USB frames.

User avatar
0xFF
Posts: 202
Joined: Tue Nov 20, 2012 7:52 pm
Location: Poland

Re: RTL2832 / RTL2838 DVB-T

Wed Jan 23, 2013 7:44 pm

Hello,
I have "Not only TV" DVBT dongle (model LV5TDLX DVB-T USB).

Code: Select all

lsusb:
Bus 001 Device 004: ID 1f4d:c803 G-Tek Electronics Group
Is this device supported by this driver?

It works with rtl_sdr:

Code: Select all

Found 1 device(s):
  0:  Realtek, RTL2838UHIDIR, SN: 000000001

Using device 0: Lifeview LV5TDeluxe
Found Fitipower FC0013 tuner
but is not discovered by rtl2832 driver.

Best regards,
piotr

sergeil
Posts: 4
Joined: Wed Feb 13, 2013 1:47 am

Re: RTL2832 / RTL2838 DVB-T

Wed Feb 13, 2013 2:36 am

0xFF wrote:Hello,
I have "Not only TV" DVBT dongle (model LV5TDLX DVB-T USB).

Code: Select all

lsusb:
Bus 001 Device 004: ID 1f4d:c803 G-Tek Electronics Group
Is this device supported by this driver?

It works with rtl_sdr:

but is not discovered by rtl2832 driver.

Best regards,
piotr

It will work with rtl-sdr, however for the OS native support you have to compile the kernel module/driver as described here:

http://www.dfragos.me/2012/11/installat ... stick.html

I believe RTL-SDR lacks the on-board IR support as well, which you may get by compiling the driver. But currently there's a problem with the above instructions as there's no way to easily get "linux headers", at least on raspbian. I show that aptitude offers only quite outdated headers release. You may be lucky with the staging raspbian release, as the author of the article above, as he seems to be using 3.7 kernel, which is not officially released yet in wheezy distro.

User avatar
0xFF
Posts: 202
Joined: Tue Nov 20, 2012 7:52 pm
Location: Poland

Re: RTL2832 / RTL2838 DVB-T

Wed Feb 13, 2013 7:50 am

There is useful rtl_eeprom tool in rtl_sdr package.
I changed id_product, id_vendor in eeprom to Terratec NOXON DAB Stick.
After reconnecting is recognized by rtl2832 driver ;-)

sergeil
Posts: 4
Joined: Wed Feb 13, 2013 1:47 am

Re: RTL2832 / RTL2838 DVB-T

Wed Feb 13, 2013 8:22 pm

0xFF wrote:There is useful rtl_eeprom tool in rtl_sdr package.
I changed id_product, id_vendor in eeprom to Terratec NOXON DAB Stick.
After reconnecting is recognized by rtl2832 driver ;-)
That's interesting.Which kernel version are you using? Does the remote control work?

User avatar
0xFF
Posts: 202
Joined: Tue Nov 20, 2012 7:52 pm
Location: Poland

Re: RTL2832 / RTL2838 DVB-T

Wed Feb 13, 2013 9:06 pm

I use

Code: Select all

3.6.11+ #3 PREEMPT Tue Jan 8 22:27:29 CET 2013 armv6l GNU/Linux
Since I use lirc_rpi module with hardwired IR receiver I never tested IR receiver inside DVB-T dongle.
At least is registered as rc0, but no idea how to test it.

Code: Select all

Registered IR keymap rc-empty
input: IR-receiver inside an USB DVB receiver as /devices/platform/bcm2708_usb/usb1/1-1/1-1.3/rc/rc0/input0
rc0: IR-receiver inside an USB DVB receiver as /devices/platform/bcm2708_usb/usb1/1-1/1-1.3/rc/rc0
dvb-usb: schedule remote query interval to 400 msecs.

sergeil
Posts: 4
Joined: Wed Feb 13, 2013 1:47 am

Re: RTL2832 / RTL2838 DVB-T

Thu Feb 14, 2013 4:58 am

That's quite a good find. Unfortunately, for those of us with R820T Rafael tuners, it still won't work, as the tuner is not supported by the 3.6.11 kernel at the moment.

Return to “General discussion”