当尝试执行使用 USRP 的 GNU Radio 程序时,我收到错误回溯,该错误(在 Python 中)通常以以下内容结尾:
self.u = uhd.usrp_source(device_addr=args, stream_args=uhd.stream_args('fc32'))
File "/home/marcus/.usrlocal/lib64/python2.7/site-packages/gnuradio/uhd/__init__.py", line 122, in constructor_interceptor
return old_constructor(*args)
File "/home/marcus/.usrlocal/lib64/python2.7/site-packages/gnuradio/uhd/uhd_swig.py", line 2351, in make
return _uhd_swig.usrp_source_make(*args)
RuntimeError: LookupError: KeyError: No devices found for ----->
USRP 正在运行。
您应该始终首先使用以下命令测试原始 UHD 功能uhd_find_devices
首先是工具:
uhd_find_devices
如果它没有找到您的设备,尽管它已启动,我的经验是您很有可能根本无法与设备通信:
- If you're not using a UHD version from Ettus' own repositories http://files.ettus.com/manual/page_install.html#install_linux_ourbins, especially on not-brand-new Ubuntus, your UHD might simply be older than the device and can't talk to it. The first line of output of
uhd_find_devices
will contain info on the version. At the time of writing (Oct 2014), 3.9 is the latest release. If possible, always use the latest release.
- B200/B210 至少需要 3.6.0,但 3.8.4 后功能显着改进
- X300/X310 至少需要 3.7.0
- B200mini需要3.9
- USRP1/2/B100/N200/N210 应该直接支持,但您会在野外找到最旧的版本。并非所有子板都可以与它们一起使用 - 如前所述,请尝试使用最新版本。
- If you're using an USB connected device (USRP B200, B210, B200mini, B100, USRP1), chances are that you either
- 在 Linux 上:没有安装了 udev 规则 http://files.ettus.com/manual/page_transport.html#transport_usb_udev允许“普通”用户与 USRP 进行通信所必需的;检查是否
/etc/udev/rules.d/
包含类似的东西uhd-usrp.rules
.
- 在 Windows 上:您可能没有Windows USB 驱动程序已安装 http://files.ettus.com/manual/page_transport.html#transport_usb_installwin.
- 如果您自己构建了 UHD(另外,如果您通过安装了 GNU Radio)
build-gnuradio.sh
or pybombs http://pybombs.info),可能缺少 USB 库。确保您的 UHD cmake 日志包含“启用 USB”。
- USB3:某些 USB3 主控制器的行为不符合标准,因此无法实现连接。如果您的 USRP 在插入 USB2 端口(通常是非蓝色端口)时被检测到,那么应该没问题。
- If you're on a networked device (USRP X300/X310 with 1Gbit/10Gbit Ethernet, USRP N200/N210, USRP2)
- make sure your network interface is
- 1Gbit 能力(或 10GE,如果适用); “快速以太网”(10/100Mbit) NIC不工作与USRP。
- 不是 Intel 82579LM 网络控制器(唯一已知偶尔会在不通知操作系统的情况下丢弃数据包的 PCIe 网络控制器 IC)
- 不是 USB3 至千兆位适配器(这些适配器往往会对数据包进行有趣的重新排序,使它们不适合高速率实时采样)
- 确保您的计算机位于同一 IP 网络中。默认情况下,USRP 的地址来自
192.168.10.XXX
range (XXX=2
在出厂设置中)。确保您的计算机具有同一范围内的 IP 地址,但是不一样地址。
- make sure basic communication works (by
ping <ip address of USRP>
). If not, re-check your own IP address, and try to make sure the USRP is configured to the right address.
- 要找出 USRP 当前的 IP 地址,通常最简单的方法是正确安装
wireshark
(这是一个网络数据包嗅探器软件),有一个专用网络接口连接到(关闭USRP),在该接口上开始捕获,然后打开USRP。
- 如果地址错误,可以重新设置IP地址USRP X300/X310 http://files.ettus.com/manual/page_usrp_x3x0.html#x3x0_setup_change_ip:
cd <install-path>/lib/uhd/utils ; ./usrp_burn_mb_eeprom --args=addr=<current IP address> --values="ip-addr0=<new ip address>"
- 如果地址错误,可以重新设置IP地址USRP N200/N210/USRP2 http://files.ettus.com/manual/page_usrp2.html#usrp2_network_changeip:
cd <install-path>/lib/uhd/utils ; ./usrp_burn_mb_eeprom --args=<optional device args> --values="ip-addr=192.168.10.3"
- 确保你有你的配置为允许流量的防火墙 http://files.ettus.com/manual/page_usrp2.html#usrp2_commprob_firewall来自 USRP 的端口 49152。在 Linux 上,以下内容
iptables
命令通常可以解决问题:sudo iptables -A INPUT -p udp --sport 49152 -j ACCEPT
。请注意,这does在你的防火墙上打个洞。您所在机构的安全策略可能适用。
- If you're trying to use a USRP E100, E110, E310 or E312 connected to your PC:
- E系列设备是独立的嵌入式Linux SDR设备;它们不作为外围设备连接到 PC。您必须使用以下命令来编译您的软件(如果适用)交叉编译器 http://files.ettus.com/manual/page_usrp_e3x0.html#e3x0_sdk并在E系列设备上运行该软件itself,不在您的主机上。
为了快速测试您的 PC、USRP 以及布线和设备 IP 配置是否正确,请下载当前的GNU 广播电台现场 DVD https://gnuradio.org/redmine/projects/gnuradio/wiki/GNURadioLiveDVD²(顺便说一句,其中还包含大量很酷的示例),启动它并尝试uhd_find_devices
there.
¹ 您的情况可能会有所不同,因为每个发行版对于如何管理防火墙都有自己的想法
² 如果可能,请使用 torrent 文件 - Amazon AWS 流量对于 GNU Radio 项目的维护者来说不是免费的。 torrent 文件也使用 AWS 服务器作为源,但尝试从其他用户获取部分图像。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)