Python使用rtlsdr

1.打开命令行

 

 也可以在Spyder中的控制台中

2.安装rtlsdr

pip install pyrtlsdr
如果报错:ValueError: check_hostname requires server_hostname,把梯子的代理关掉即可

3.下载驱动动态库

https://ftp.osmocom.org/binaries/windows/rtl-sdr/

因为python是64位的,所以驱动也要下载64位的

 

下载最新的即可

4.这三个就是我们需要的驱动

 

 5.将三个驱动复制到rtlsdr模块中

 

 6.修改rtlsdr模块中的librtlsdr.py文件,让它能找到驱动

    driver_files +=['D:\\Soft\\Anaconda\\Lib\\site-packages\\rtlsdr\\librtlsdr.dll']
    driver_files +=['D:\\Soft\\Anaconda\\Lib\\site-packages\\rtlsdr\\libusb-1.0.dll']    
    driver_files +=['D:\\Soft\\Anaconda\\Lib\\site-packages\\rtlsdr\\libwinpthread-1.dll']

 

也可以将三个驱动的路径放入系统环境变量中;

注意:顺序必须按照此顺序,不然会报错:AttributeError: function 'rtlsdr_get_device_count' not found

 

7.测试

 

 没有报错。

如果没有修改源码,就会报错:

Error loading librtlsdr. Make sure librtlsdr (and all of its dependencies) are in your path

 8.测试代码

https://github.com/daskals/RTL-SDR-Python-Signal-Processing

posted @   朱小勇  阅读(448)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
历史上的今天:
2021-04-02 QPainter学习
2021-04-02 好看的一些RGB
2021-04-02 清理C盘
2020-04-02 python使用statsmodel
2020-04-02 python指数平滑预测
2017-04-02 常用指令
点击右上角即可分享
微信分享提示