Search code examples
dockergnuradiognuradio-companionusrpuhd

Run GNU Radio flowgraph from Docker with Ettus B200 USRP with UHD


I am trying to run GNU Radio flowgraphs (no GUI) from within a Docker container. The OS on both the host and docker image is Ubuntu 18.04. I am running GNU Radio v3.7.13.4 and UHD v3.14.0.0.

On the host I can run grcc -e flowgraph.grc and it executes as expected. When I try and run it in the Docker container it reports

Validation failed:

Block - blocks_tagged_stream_multiply_length_0 - Tagged Stream Multiply Length Tag(blocks_tagged_stream_multiply_length):
        Source - out(0):
                Port is not connected.
Error during file compilation.

On both the host and in the Docker container uhd_find_devices returns:

[INFO] [UHD] linux; GNU C++ version 7.5.0; Boost_106501; UHD_3.14.0.HEAD-0-g6875d061
--------------------------------------------------
-- UHD Device 0
--------------------------------------------------
Device Address:
    serial: 30CF9B7
    name: MyB210
    product: B210
    type: b200

So it appears I am sharing the USB devices between the host and the container correctly (although I suspect the problem is some finer detail to do with this).

I am running the container with: docker run -it -v /dev/bus/usb:/dev/bus/usb --privileged csradio:latest

Does anyone know what the problem could be?

Edit 1: added OS, GNU and UHD version details.


Solution

  • Looking at your Dockerfile the most probable reason for the above error is that UHD blocks are missing because you have installed uhd after you installed gnuradio.

    The solution is to first build and install uhd and then build gnuradio.