USRP B210 运行gnuradio时 FPGA固件版本冲突错误解决方法

事情起源于昨天拿到USRP后开始调试,结果整了一个下午都没解决这个问题。
昨天晚上自己思考了一下,觉得还是版本问题。

首先,uhd_find_devices和uhd_usrp_probe均可以正常运行,没有报错,固件正常加载,序列号也可看到。

teray@teray-X550JK:~$ uhd_find_devices
[INFO] [UHD] linux; GNU C++ version 7.5.0; Boost_106501; UHD_3.15.0.HEAD-0-g4e06022c
--------------------------------------------------
-- UHD Device 0
--------------------------------------------------
Device Address:
    serial: 86680AA
    name: Zhixun-wireless_B210
    product: B210
    type: b200
teray@teray-X550JK:~$ uhd_usrp_probe
[INFO] [UHD] linux; GNU C++ version 7.5.0; Boost_106501; UHD_3.15.0.HEAD-0-g4e06022c
[INFO] [B200] Detected Device: B210
[INFO] [B200] Loading FPGA image: /usr/local/share/uhd/images/usrp_b210_fpga.bin...

可以看到固件加载完全正常,但是当我们使用apt安装的gnuradio-companion
出现报错如下:

RuntimeError: RuntimeError: Expected FPGA compatibility number 14, but got 16:
The FPGA build is not compatible with the host code build.
Please run:
 "/usr/lib/x86_64-linux-gnu/uhd/utils/uhd_images_downloader.py"

首先遇到这个不能慌张,不要按照上面所提示的运行固件下载器更新固件,因为那些下载的是最新版本的固件,对解决问题没有帮助。
到官方git上找一个比较古老的版本,比如on 17 May 2018发布的v3.11.1.0
解压后,在解压的目录使用sudo运行gnuradio

~/software/uhd_firm/uhd-images_3.11.1.0$ sudo gnuradio-companion

因为Gnuradio在运行UHD时,是从当前文件夹位置寻找固件上传给fpga使用的,这里也可能是因为没有映射好路径造成的,那么现在直接从这个文件夹运行,就可以找到固件,并且版本也与之对应
再次运行流程图

Generating: '/home/teray/\xe6\xa1\x8c\xe9\x9d\xa2/gnuradio projects/USRP/top_block.py'

Executing: /usr/bin/python -u /home/teray/桌面/gnuradio projects/USRP/top_block.py

linux; GNU C++ version 7.3.0; Boost_106501; UHD_003.010.003.000-0-unknown


(top_block.py:7109): IBUS-WARNING **: 11:47:52.488: The owner of /home/teray/.config/ibus/bus is not root!
-- Detected Device: B210
-- Loading FPGA image: /home/teray/software/uhd_firm/uhd-images_3.11.1.0/usrp_b210_fpga.bin... done
-- Operating over USB 3.
-- Detecting internal GPSDO.... No GPSDO found
-- Initialize CODEC control...
-- Initialize Radio control...
-- Performing register loopback test... pass
-- Performing register loopback test... pass
-- Performing CODEC loopback test... pass
-- Performing CODEC loopback test... pass
-- Setting master clock rate selection to 'automatic'.
-- Asking for clock rate 16.000000 MHz... 
-- Actually got clock rate 16.000000 MHz.
-- Performing timer loopback test... pass
-- Performing timer loopback test... pass
-- Asking for clock rate 40.000000 MHz... 
-- Actually got clock rate 40.000000 MHz.
-- Performing timer loopback test... pass
-- Performing timer loopback test... pass

成功。
以上。

你可能感兴趣的:(USRP B210 运行gnuradio时 FPGA固件版本冲突错误解决方法)