使用树莓派+RTL-SDR+3.5显示屏构建一个便携式RTL-SDR频率扫描仪

先上成品

img

你需要

  • 一台树莓派
  • 一张3.5 inch的显示屏
  • 一块SDR接收器
  • 你聪明的大脑

需要 3.5 inch 屏幕镜像的可以找我,直接刷官网镜像开机后分辨率会怪怪的(大概)

img

正式开始

刷好后记得联网开启ssh(建议 systemctl enable ssh),这样方便我们操作

然后记得更新下软件源,这里建议代理官方源,当然使用国内的树莓派源也是可以的

img

这里放一个官方源,防走丢

1
2
3
deb http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi

首先安装依赖

1
sudo apt-get update sudo apt-get install git cmake build-essential python3-pip libusb-1.0-0-dev libsdl2-2.0-0 libatlas-base-dev librtlsdr0

然后安装一些 Python 模块

1
2
sudo pip3 install numpy pygame -i https://pypi.tuna.tsinghua.edu.cn/simple some-package
sudo pip install pyrtlsdr -i https://pypi.tuna.tsinghua.edu.cn/simple some-package

到仓库 https://github.com/adafruit/FreqShow,把它 clone 下来到树莓派里

1
2
3
cd ~
git clone https://github.com/adafruit/FreqShow.git
cd FreqShow

注意安装 rtlsdr 的驱动,否则会报一些奇奇怪怪的错误

1
2
3
4
5
6
7
8
9
apt-get install libusb-1.0-0-dev git cmake
git clone https://github.com/rtlsdrblog/rtl-sdr-kerberos.git
cd rtl-sdr-kerberos
mkdir build
cd build
cmake ../ -DINSTALL_UDEV_RULES=ON
make
make install
ldconfig

img

这里作者有个 tip

If using the official 7” Raspberry Pi Touchscreen instead of a PiTFT, edit the filefreqshow.pyand comment out the following lines as shown (starting around line 73). Do NOT do this if using a PiTFT!

1
2
3
4
#os.putenv('SDL_VIDEODRIVER', 'fbcon')
#os.putenv('SDL_FBDEV' , '/dev/fb1')
#os.putenv('SDL_MOUSEDRV' , 'TSLIB')
#os.putenv('SDL_MOUSEDEV' , '/dev/input/touchscreen')

大致意思就是,如果你不是使用PiTFT作为你的显示器的话,得把 freqshow.py 里边上面这几行代码给删掉

一切准备就绪后,直接运行 python freqshow.py 即可

img

演示视频



参考

使用树莓派+RTL-SDR+3.5显示屏构建一个便携式RTL-SDR频率扫描仪

https://iloli.moe/2023/02/04/使用树莓派-RTL-SDR-3-5显示屏构建一个便携式RTL-SDR频率扫描仪/

作者

IceCliffs

发布于

2023-02-04

更新于

2023-10-28

许可协议

评论