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.
The Universal Software Radio Peripheral (USRP) products are commonly used with the GNU Radio software suite to create complex SDR systems. GNU Radio is a toolkit where digital signal processing blocks are written in C++, and connected to each other with Python.
The USRP Source Block is used to stream samples from a USRP device (i.e. act as the receiver). There is no need to use a Throttle block when a hardware source like a USRP Source is used, because the USRP acts as the throttle. There are two methods of setting parameters and adjusting them while running.
This is the GNU Radio UHD package. It is the interface to the UHD library to connect to and send and receive data between the Ettus Research, LLC product line. To use the UHD blocks, the Python namespaces is in gnuradio.uhd, which would be normally imported as: from gnuradio import uhd.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With