0

I made a node which contains a USRP_UHD and a GPP (and make sure the ip_address is correct for USRP_UHD). I launched the domain based on this node. However, I got the following error:

UHD Error:
    Device discovery error: AssertionError: libusb_init(&_context) == 0
      in libusb_session_impl::libusb_session_impl()
      at /builddir/build/BUILD/uhd-release_003_005_003/host/lib/transport/libusb1_base.cpp:37

UHD Error:
    Device discovery error: AssertionError: libusb_init(&_context) == 0
      in libusb_session_impl::libusb_session_impl()
      at /builddir/build/BUILD/uhd-release_003_005_003/host/lib/transport/libusb1_base.cpp:37
...
-- Opening a USRP2/N-Series device...
-- Current recv frame size: 1472 bytes
-- Current send frame size: 1472 bytes

UHD Warning:
    Unable to set the thread priority. Performance may be negatively affected.
    Please see the general application notes in the manual for instructions.
    EnvironmentError: OSError: error in pthread_setschedparam

I did get two unallocated (TX/RX for each) tuners, but it is not easy to allocate these two tuners for use for any parameters.

Besides, if I just launch the domain and launch the single device USRP_UHD, or simply run the discover USRP_UHD command via the command line window, I got the same error:

UHD Error:
    Device discovery error: AssertionError: libusb_init(&_context) == 0
      in libusb_session_impl::libusb_session_impl()
      at /builddir/build/BUILD/uhd-release_003_005_003/host/lib/transport/libusb1_base.cpp:37
2016-02-01 16:59:20 WARN  USRP_UHD_i:943 - WARNING: NO UHD (USRP) DEVICES FOUND!

Could anybody figure out where this problem is? Thanks in advance!

Marcus Müller
  • 34,677
  • 4
  • 53
  • 94
Cindy
  • 489
  • 1
  • 4
  • 11

2 Answers2

0

So, first of all, the good news is that this is happening during autodetection of USB devices, so your N2xx is not inherently affected, but:

UHD 3.5.3 is not only old, it's ancient. You should really uninstall it (If you've got Debian or a derived one [Ubuntu], it'd be sudo apt-get remove uhd-host libuhd003 libuhd-dev), install a new version directly from Ettus (can help you with that, if necessary) and rebuild Redhawk against that version.

Really, really do that. There's been so much improvement in behaviour like failure handling that fixing this without updating isn't really worth it.

Now, if you explicitly specify a device address that allows you to cancel USB-based USRP detection completely, you should be fine. As device address, use type=usrp2 for USRP2, N200 and N210.

Marcus Müller
  • 34,677
  • 4
  • 53
  • 94
  • There are both binary installation and installation from source. Which one should I pick up? Are there any detailed steps that I could follow easily? – Cindy Feb 03 '16 at 13:45
  • I'm no Redhawk expert, but I'd recommend you build UHD using the excellent [pyBombs](https://github.com/gnuradio/pybombs/), which automates download, installation of UHD dependencies and compilation. – Marcus Müller Feb 04 '16 at 09:01
0

I ran into this issue trying to install UHD v3.9.3 in a CentOS 7 Docker container - the error message points to a usb issue, not related to Redhawk. The Redhawk Device, USRP_UHD, is just an abstraction layer on top of the Ettus UHD drivers, so the easiest way to tell whether the problem is Redhawk or something else is to try one of the UHD commands directly from a terminal to generate the same error, like uhd_usrp_probe.

To check if the problem is directly related to the usb drivers try the command lsusb. This should list all usb devices connected to your OS. These are good debug tips to isolate where the problem is.

If you happen to be doing this using Linux containers or Docker you have to give the proper privileges, see docker-any-way-to-give-access-to-host-usb-or-serial-device. Otherwise, assuming you built UHD from source, check the output of make test step - if all the tests passed there shouldn't be anything wrong with the UHD library.

Edit: Also if you're running this inside a VM you have to make sure your host has given network/USB/etc privileges to the hypervisor (ex. VirtualBox) during installation, or that you've attached the correct virtual hardware in the VM configuration.

Community
  • 1
  • 1