detach issue with updated rpi


#1

had to start from scratch again when my perl died. i know this issue is associated with the newer rpi os dropping its own sdr tv driver, but the googled solutions don’t seem to work.


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

Using device 0: Generic RTL2832U OEM
Detached kernel driver
Found Rafael Micro R820T tuner
Supported gain values (29): 0.0 0.9 1.4 2.7 3.7 7.7 8.7 12.5 14.4 15.7 16.6 19.7 20.7 22.9 25.4 28.0 29.7 32.8 33.8 36.4 37.2 38.6 40.2 42.1 43.4 43.9 44.5 48.0 49.6 
Sampling at 2048000 S/s.
No E4000 tuner found, aborting.
Reattaching kernel driver failed!

i know i want the generic driver not the ones it’s loading but i’m not sure where i missed a step to disable the os driver. what’s the trick?


#2

Create a file named /etc/modprobe.d/rtlsdr-blacklist.conf containing:



blacklist dvb_usb_rtl28xxu


and reboot.

FWIW the “no E4000 tuner found” is normal - stock rtl_test -t only works with E4k tuners, your dongle has a R820T.


#3

did the blacklist and it’s still showing the stock driver


#4

What are you seeing that makes you think it’s using the stock (I assume you mean in-kernel?) driver?


#5

dump1090 doesn’t start and rtl_test -t says failed to detach


#6

Your quoted rtl_test output looks fairly normal to me - it is talking to the dongle just fine.
If there was an interfering kernel driver, it would not get as far as it did.
You can doublecheck by looking at “lsmod” output and seeing if the dvb_usb_rtl28xxu kernel module is loaded or not.

What fails when you try to start dump1090 - what is the error you see?


#7

normally i’m expecting to see :
Found 1 device(s):

0: Generic RTL2832U OEM

Using device 0: Generic RTL2832U OEM

but it’s giving me the other one and i’m getting the attach/detach error

edit

also doing --interactive i can see it load but no data is being retrieved/outputted.


#8

What’s “the other one”? Can you paste the exact output that you think is showing a problem?

edit

also doing --interactive i can see it load but no data is being retrieved/outputted.

If you’re not getting a fatal error on startup then it’s talking to the dongle OK.
If you are getting the spinning thing in the corner of the interactive display then it’s getting samples from the dongle.
If you had a driver conflict then you would not be able to talk to the dongle at all.

I don’t think you are having a driver conflict at all here - there is a problem elsewhere.
Did you try “lsmod” to confirm?

You could try “rtl_test -p” and check that you get periodic output like this:



Reporting PPM error measurement every 10 seconds...
Press ^C after a few minutes.
Reading samples in async mode...
real sample rate: 2048175 current PPM: 86 cumulative PPM: 86
real sample rate: 2048129 current PPM: 63 cumulative PPM: 74
real sample rate: 2048124 current PPM: 61 cumulative PPM: 70
real sample rate: 2048100 current PPM: 49 cumulative PPM: 65
real sample rate: 2048180 current PPM: 88 cumulative PPM: 69


If that works, but you still can’t get anything from dump1090, then it is probably a dongle or antenna fault.

If you run dump1090 with no command-line arguments at all you should see output for every mode-S message that it hears. Do you get anything at all if you do this?
(I get plenty of output in this mode even with just the standard whip antenna connected)

Or you could check the dongle connected to a PC - check you can receive FM, or look at a waterfall display around 1090MHz.


#9

-p gives me this


root@raspberrypi:~# rtl_test -p
Found 1 device(s):
  0:  Realtek, RTL2838UHIDIR, SN: 00000001

Using device 0: Generic RTL2832U OEM
Detached kernel driver
Found Rafael Micro R820T tuner
Supported gain values (29): 0.0 0.9 1.4 2.7 3.7 7.7 8.7 12.5 14.4 15.7 16.6 19.7 20.7 22.9 25.4 28.0 29.7 32.8 33.8 36.4 37.2 38.6 40.2 42.1 43.4 43.9 44.5 48.0 49.6 
Sampling at 2048000 S/s.
Reporting PPM error measurement every 10 seconds...
Press ^C after a few minutes.
Reading samples in async mode...
lost at least 6702242 bytes
lost at least 6700949 bytes


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

Using device 0: Generic RTL2832U OEM
this is the driver i’ve never seen before. i’ve gotten the setup to work twice from scratch on the same instruction set


#10

OK - looks like you have a USB problem - the dongle is not transferring samples properly.
Do you have a USB cable between the dongle and the Pi? Can you try it without?

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

Using device 0: Generic RTL2832U OEM
this is the driver i’ve never seen before. i’ve gotten the setup to work twice from scratch on the same instruction set

OK, I see where some of the confusion is. That’s not a driver identification at all - it is information read from the dongle’s EEPROM.
For example I get this (I’ve manually set the serial number on this one):



Found 1 device(s):
0: Realtek, RTL2838UHIDIR, SN: 00030056 (currently selected)


You could possibly try resetting the EEPROM to see if that helps:



$ rtl_eeprom -g realtek 


(or realtek_oem)

and then unplug/replug the dongle.