0
点赞
收藏
分享

微信扫一扫

linux下rtlsdr测试

MaxWen 2022-03-17 阅读 63

依赖库安装

sudo apt-get install libusb-1.0-0-dev

下载源码

git clone git://git.osmocom.org/rtl-sdr.git

编译、安装

cd rtl-sdr/
mkdir build
cd build
cmake ../
make
sudo make install
sudo ldconfig

测试

#查看硬件信息
rtl_test -t
#收听调频广播
rtl_fm -f 96.3e6 -M wbfm -s 2048000 -r 8000 - | aplay
#记录IQ数据(To tune to 392.0 MHz, and set the sample-rate to 1.8 MS/s)
rtl_sdr /tmp/capture.bin -s 1.8e6 -f 392e6

问题解决

如果运行 rtl_test -t 时出现如下错误:

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

执行如下操作后重启

cd /etc/modprobe.d
touch rtlsdr.conf
sudo gedit ./rtlsdr.conf
#打开后的文件中添加 blacklist dvb_usb_rtl28xxu 后保存
sudo reboot

 

举报

相关推荐

0 条评论