转自网络 http://blog.sina.com.cn/s/blog_a2a6dd380102wsra.html
在Ubuntu 14.04上完成安装 librtlsdr 库后,运行 "sudo rtl_test -t" 测试是否能正常识别RTL-SDR 软件无线电设备时,出现如下错误:
root@ubuntu:/home/tom/rtl-sdr# rtl_test -t
Found 1 device(s):
0: Realtek, RTL2838UHIDIR, SN: 00000001
Using device 0: Generic RTL2832U OEM
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.
解决方法:按照提示移除 "dvb_usb_rtl128xxu" 内核驱动模块,再次执行 "rtl_test -t",发现上述问题已经解决了。
root@ubuntu:/home/tom/rtl-sdr# rmmod dvb_usb_rtl28xxu rtl2832
root@ubuntu:/home/tom/rtl-sdr# rtl_test -t
Found 1 device(s):
0: Realtek, RTL2838UHIDIR, SN: 00000001
Using device 0: Generic RTL2832U OEM
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
[R82XX] PLL not locked!
Sampling at 2048000 S/s.
No E4000 tuner found, aborting.
卸载了 dvb_usb_rtl28xxu 内核驱动之后,在Ubuntu 14.04上重新运行由GNU Radio创建的信号源是 RTL-SDR Source 的 flow graph 时,之前出现的FFT Sink中没有显示任何频谱的问题消失了。原来这个问题的产生也与内核驱动dvb_usb_rtl28xxu 没有卸载有关,在未卸载该驱动时 RTL-SDR 被内核驱动抢占了,导致GNU Radio一直不能成功捕获 RTL-SDR软件无线电设备,所以也就无法在 FFT Sink中显示任何的频谱了。Oh My God!
参考: