1.介绍
Pybombs相当于工具箱直接处理好依赖,以Pybombs install进行程序安装
2.主要问题
网络问题导致下载失败,具体报错见文章末尾
3.解决方案
利用清华源进行GNU Radio安装
4.操作系统
虚拟机下Ubuntu 20.04
4.安装过程
4.1 安装pyboms
pip3 install pybombs
rm -rf ~/.pybombs
添加清华源
pybombs recipes add gr-recipes git+https://mirrors.tuna.tsinghua.edu.cn/pybombs/recipes/gr-recipes.git
pybombs recipes add gr-etcetera git+https://mirrors.tuna.tsinghua.edu.cn/pybombs/recipes/gr-etcetera.git
4.2 安装GNU Radio
mkdir gnuradio-prefix
cd gnuradio-prefix
pybombs prefix init pybombs install gnuradio
. ./setup_env.sh
4.3 环境变量永久生效
source ~/gnuradio38/setup_env.sh
gnuradio-config-info --version 应当会显示版本
gnuradio-companion 出现GUI界面
另:
sudo cp ~/gnuradio38/lib/uhd/utils/uhd-usrp.rules /etc/udev/rules.d/
sudo udevadm control --reload-rule
sudo udevadm trigger
这三条命令是让别的非root用户也可以access to USB devices
4.4 识别设备
使用pybombs安装完UHD(USRP Hardware Driver)后还需下载固件镜像以及FPGA镜像,执行:python /usr/local/lib/uhd/utils/uhd_images_downloader.py
插入USRP后可执行:uhd_find_devices
或者 uhd_usrp_probe 来查看设备信息
4.5 问题汇总
-
fatal: 无法访问 GitHub - gnuradio/volk: The Vector Optimized Library of Kernels
-
单独clone volk使用指令
git clone git://github.com/gnuradio/volk.git/
-
再次执行
pybombs install gnuradio
-
单独clone uhd 使用指令
git clone git://github.com/EttusResearch/uhd.git/
-
再次执行
pybombs install gnuradio
-
pybombs install libvolk
-
cd到libvolk的路径下,执行cd /home/wu/gnuradio-prefix/src/libvolk之后执行git submodule update --init 之后回到gnuradio-prefix文件夹下执行pybombs install libvolk
-
cd到uhd文件夹下执行
git submodule update --init
,再回到gnuradio-prefix文件夹下执行pybombs install uhd
可以解决uhd的相同问题 -
在使用
pybombs install gnuradio
就可以完成全部安装