# A Python RF spectrum analyser

* Takes digitised IQ samples from some source to give a live spectrum and spectrogram.
* All samples are used for the FFT. Providing detection of short bursting signals.
* Has a plugin architecture for sources and analysis of spectrums.
* Can snapshot IQ samples to file upon an event, currently a manual trigger.
* Has a web based UI that can be used to take measurements on the spectrum.
This was an exercise in writing some python which expanded into providing a web based UI.
The fft computations are done by libraries in Python, so not the fastest.
If you have an rtlsdr working with any of the other tools then this analyser should work as well
once the python rtlsdr support is installed in your environment.
Performance depends on your machine and how the supporting fft libraries were compiled.
I have certainly kept up with streams of data at over 3Msps.
All the input sources are provided by python modules with the different SDR platforms are supported by
corresponding Python libraries gleaned from Pypi.
## Input modules:
* audio - useful for testing
* file - wav and raw binary supported, all files must be in snapshot directory
* pluto (IP) - Analog devices pluto SDR on IP, 70Mhz to 6GHz but wide open
* rtlsdr - Direct connection via USB
* rtltcp - rtl over tcp
* socket - any stream of IQ samples
There is soapy support for sdrplay, but i have failed to get this working again after an initial success.
## Input data IQ types:
* 8bit offset binary
* 8bit 2's complement
* 16bit 2's complement little endian (x86)
* 16bit 2's complement big endian
* 32bit ieee float little endian
* 32bit ieee float big endian
## Problems
* Converting input data to complex float32 numpy arrays. This takes a lot of time, which would be a lot
simpler in C/C++.
* Soapy support is not really tested anymore (sdrplay support relies on soapy).
* if the programme exceptions immediately, check the dependencies are met.
## Tested with the following:
Windows: audio, file, pluto (IP), rtlsdr, rtltcp, socket
Linux : audio, file, pluto (IP), rtlsdr, rtltcp, socket
soapy(audio, rtlsdr, sdrplay)
On windows make sure to use the correct rlibrtlsdr.dll for your python 32bit/64bit
Since, once, getting soapy to work under Linux i have failed to replicate
this ever again - pity it was my only interface to an sdrplay device
## Examples
Some examples for running from command line
python ./SpectrumAnalyser.py - Then goto http://127.0.0.1:8080 and configure the source
python ./SpectrumAnalyser.py -h - help
python ./SpectrumAnalyser.py -i? - list input sources that are available
Some default input selections, normally select trhough web interface:
python ./SpectrumAnalyser.py -ipluto:192.168.2.1 -c433.92e6 -s600e3 - pluto at 433MHz and 600ksps
python ./SpectrumAnalyser.py -ipluto:192.168.2.1 -c433.92e6 -s1e6
--plugin analysis:peak:threshold:12
--plugin report:mqtt:broker:192.168.0.101 - detect and log signals
python ./SpectrumAnalyser.py -ifile:test.wav -c433.92e6 - a test wav file
python ./SpectrumAnalyser.py -iaudio:1 -s48e3 -iaudio:1 - audio input
python ./SpectrumAnalyser.py -irtlsdr:kk -c433.92e6 -s1e6 - rtlsdr
SOAPY may not work:
python ./src/SpectrumAnalyser.py -isoapy:audio -s48000 -c0 - soapy input
python ./src/SpectrumAnalyser.py -isoapy:sdrplay -s2e6 c433.92e6
## Dependencies
The following python modules should be installed. Optional ones provide specific capabilities.
Required:
numpy
websockets
Testing:
pytest
Optional:
scipy - another FFT library
pyfftw - another FFT library, faster above 8k size
pyadi-iio - pluto device
iio - pluto device
pyrtlsdr - rtlsdr devices
sounddevice - audio devices
soapysdr - soapy support
paho-mqtt - mqtt functionality (client)
```
pip3 install -r src/requirements.txt
```
没有合适的资源?快使用搜索试试~ 我知道了~
pyspectrum:具有Web UI的Python sdr频谱分析仪

共66个文件
py:39个
png:11个
js:5个

需积分: 50 29 下载量 103 浏览量
2021-04-02
05:23:59
上传
评论 1
收藏 2.15MB ZIP 举报
温馨提示
Python RF频谱分析仪 从某些来源获取数字化的IQ样本,以提供实时频谱和频谱图。 所有样本都用于FFT。 提供短突发信号的检测。 具有用于信号源和频谱分析的插件架构。 可以快照IQ样本以在事件(当前为手动触发)时归档。 具有基于Web的UI,可用于在频谱上进行测量。 这是编写一些Python的练习,该Python扩展为提供基于Web的UI。 fft计算是由Python中的库完成的,因此不是最快的。 如果您有使用其他工具的rtlsdr,则在您的环境中安装了python rtlsdr支持后,此分析器也应能正常工作。 性能取决于您的计算机以及支持的fft库的编译方式。 我当然跟上了超过3Msps的数据流。 所有输入源均由python模块提供,具有不同的SDR平台,并由Pypi收集的相应Python库支持。 输入模块: 音频-对测试有用 文件-支持WAV和原始二进制文件,
资源推荐
资源详情
资源评论




格式:pdf 资源大小:694.3KB 页数:12












格式:txt 资源大小:140.0B


格式:zip 资源大小:54.0KB










格式:pdf 资源大小:220.1KB 页数:3


收起资源包目录
















































































共 66 条
- 1
资源评论


少女壮士
- 粉丝: 40
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


最新资源
- 门窗幕墙工程招(投)标技术文件编写准则.doc
- 微信小程序上传图片到阿里云oss.zip
- 微信小程序前端模板——民宿(1).zip
- 小程序版带笔锋手写签名,支持微信_支付宝_钉钉_QQ小程序.zip
- 8.Boost之unordered-set.docx
- [广西]病险水库除险加固工程监理规划(土地整理).doc
- 钢结构识图培训讲义(图文并茂).doc
- 箱型基础工程质量技术交底卡.doc
- 微信小程序(2).zip
- 质量控制技术在农产品检测中的应用.ppt
- 南京某妇幼医院工程质量保证措施(创鲁班奖).doc
- [辽宁]环城大道绿化工程监理大纲161页.docx
- 红树园文明施工组织设计.doc
- 防雷及接地安装交底记录.doc
- 微信小程序商城,微信小程序demo.zip
- 2021安全月活动之安全知识竞赛活动实施方案.doc
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制
