rtl_test error message

35,218 views
Skip to first unread message

gitte...@gmail.com

unread,
Aug 3, 2013, 1:08:05 PM8/3/13
to ultra-c...@googlegroups.com
Terratec USB on Linux 13.04

I don't think anything will work until I get past this error running  rtl_test -t, but I don't know how to fix it. Can anyone help?
(I don't know anything about blacklisting or detaching!)


$ lsusb
Bus 001 Device 003: ID 0ccd:00d7 TerraTec Electronic GmbH

$ dmesg | grep dvb
[   22.133566] usb 1-7: dvb_usb_v2: found a 'TerraTec Cinergy T Stick+' in warm state
[   22.133783] usbcore: registered new interface driver dvb_usb_rtl28xxu
[   22.204510] usb 1-7: dvb_usb_v2: will pass the complete MPEG2 transport stream to the software demuxer
[   22.515357] usb 1-7: dvb_usb_v2: schedule remote query interval to 400 msecs
[   22.527675] usb 1-7: dvb_usb_v2: 'TerraTec Cinergy T Stick+' successfully initialized and connected


$ rtl_test -t
Found 1 device(s):
  0:  Terratec T Stick PLUS

Using device 0: Terratec T Stick PLUS

Kernel driver is active, or device is claimed by second instance of librtlsdr.
In the first case, please either detach or blacklist the kernel module
(dvb_usb_rtl28xxu), or enable automatic detaching at compile time.

usb_claim_interface error -6
Failed to open rtlsdr device #0.




Adam Nielsen

unread,
Aug 3, 2013, 6:30:36 PM8/3/13
to ultra-c...@googlegroups.com
> (I don't know anything about blacklisting or detaching!)

The problem is the Linux kernel DVB driver is loaded, which means it is
making the device available for TV reception. Since the device is in
use by this driver, the SDR programs can't access it.

> *Kernel driver is active, or device is claimed by second instance of
> librtlsdr.
> In the first case, please either detach or blacklist the kernel module
> (dvb_usb_rtl28xxu), or enable automatic detaching at compile time.
> *

As the message suggests, there are two solutions. The quickest is to
simply unload the driver:

sudo rmmod dvb_usb_rtl28xxu rtl2832

Not sure whether "rtl2832" on the end there is required or not, but it
can't hurt. This is only a temporary solution, as the driver will be
loaded again the next time you unplug and replug the USB device, so
you'll have to run the command again.

If this works, and you don't want to use the device for TV reception,
you can stop the module from ever being loaded, solving the problem
permanently. The exact method depends on your Linux distribution, but
for me (running Arch Linux) I create a file in /etc/modprobe.d with
a .conf extension (I called it "no-rtl.conf") with these contents:

blacklist dvb_usb_rtl28xxu
blacklist rtl2832
blacklist rtl2830

Again not sure whether it's necessary to blacklist all three of these
or just the first, but I was erring on the side of caution and chose to
list everything to do with the Realtek DVB device.

Once you have created this blacklist file, you may need to unload the
driver one last time if it was already running - the blacklist
prevents it from loading but doesn't do anything if it's already
running.

The second solution is to recompile the rtl_test program, and include
support for asking the kernel driver to let go of the device, so it can
be accessed. This may not be ideal though, because you will still have
the problem of the device being in use if you use other programs that do
not support detaching of the kernel driver.

If you're only interested in SDR use, blacklisting is the way to go.
And you can always remove the blacklist if you do want to use it for
TV one day.

Cheers,
Adam.

gitte...@gmail.com

unread,
Aug 3, 2013, 9:38:38 PM8/3/13
to ultra-c...@googlegroups.com

gitte...@gmail.com

unread,
Aug 3, 2013, 10:00:58 PM8/3/13
to ultra-c...@googlegroups.com
Thanks!
Blacklisted everything I found and get:


~$ rtl_test -t

Found 1 device(s):
  0:  Terratec T Stick PLUS

Using device 0: Terratec T Stick PLUS
Found Elonics E4000 tuner
Supported gain values (14): -1.0 1.5 4.0 6.5 9.0 11.5 14.0 16.5 19.0 21.5 24.0 29.0 34.0 42.0
Benchmarking E4000 PLL...
[E4K] PLL not locked for 51000000 Hz!
[E4K] PLL not locked for 2224000000 Hz!
[E4K] PLL not locked for 1113000000 Hz!
[E4K] PLL not locked for 1246000000 Hz!
E4K range: 52 to 2223 MHz
E4K L-band gap: 1113 to 1246 MHz

and:

$ dmesg | grep dvb
[   20.557956] usb 1-7: dvb_usb_v2: found a 'TerraTec Cinergy T Stick+' in warm state
[   20.558058] usbcore: registered new interface driver dvb_usb_rtl28xxu
[   20.618109] usb 1-7: dvb_usb_v2: will pass the complete MPEG2 transport stream to the software demuxer
[   20.889562] usb 1-7: dvb_usb_v2: schedule remote query interval to 400 msecs
[   20.901148] usb 1-7: dvb_usb_v2: 'TerraTec Cinergy T Stick+' successfully initialized and connected
[  298.988138] usbcore: deregistering interface driver dvb_usb_rtl28xxu
[  299.009032] usb 1-7: dvb_usb_v2: 'TerraTec Cinergy T Stick+' successfully deinitialized and disconnected

Is this what I,m supposed to get?

Adam Nielsen

unread,
Aug 3, 2013, 10:34:07 PM8/3/13
to ultra-c...@googlegroups.com
> E4K range: 52 to 2223 MHz
> E4K L-band gap: 1113 to 1246 MHz
>
> Is this what I,m supposed to get?

Yes that looks pretty standard. You should be right to load something
like gqrx now (http://www.oz9aec.net/index.php/gnu-radio/gqrx-sdr)
since it's a bit of a pain to get any of the Windows apps to work under
Linux. SDR# seems good but doesn't work under recent versions of Mono
any more.

Cheers,
Adam.
Reply all
Reply to author
Forward
0 new messages