When trying to execute a GNU Radio program that uses a USRP, I get an error backtrace, which (in Python) typically ends with:
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 ----->
The USRP is running.
You should always test raw UHD functionality first with the uhd_find_devices
tool first:
uhd_find_devices
If it doesn't find your device, though it is booted, my experience is that you have a high chance of simply not being able to communicate with the device:
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.
/etc/udev/rules.d/
contains something like uhd-usrp.rules
.build-gnuradio.sh
or pybombs
), there might have been USB libraries missing. Make sure your UHD cmake logs contain "Enabling USB".192.168.10.XXX
range (XXX=2
in factory settings). Make sure your computer has an IP address from the same range, but not the same address. 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.
wireshark
(that's a network packet sniffer software), have a dedicated network interface connect to the (powered off USRP), start the capture on that interface, and power on the USRP.cd <install-path>/lib/uhd/utils ; ./usrp_burn_mb_eeprom --args=addr=<current IP address> --values="ip-addr0=<new ip address>"
cd <install-path>/lib/uhd/utils ; ./usrp_burn_mb_eeprom --args=<optional device args> --values="ip-addr=192.168.10.3"
iptables
command typically does the trick¹: sudo iptables -A INPUT -p udp --sport 49152 -j ACCEPT
. Notice that this does punch a hole in your firewall. Your institution's security policies might apply.As a quick test whether your PC, USRP and cabling and device IP configuration are correct, download the current GNU Radio Live DVD² (which, by the way, also contains copious amounts of cool examples), boot it, and try uhd_find_devices
there.
¹ your mileage might vary, as each distribution has its own idea of how to manage the firewall
² Please use the torrent files, if possible -- Amazon AWS traffic isn't free for the maintainers of the GNU Radio project. The torrent file also uses the AWS servers as source, but tries to get a part of the image from other users.