USRP Software Radio

cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to detect X310 in Docker

Hello everyone,

 

I have an X310 SDR connected to my system via a MOLEX cable over a PCIe card.

I need to run a Docker container that interacts with this SDR, but I have trouble passing the X310 into the container.

 

Specifically, the container seems to require network_mode: "host" for proper functionality.

However, I can't use this because I need a custom network configuration with specific subnets etc, and network_mode: "host" conflicts with that.

 

Here are two Docker Compose configurations illustrating the problem:

 

1. With network_mode: "host" (works but not usable in my case):

 

version: '3.8'

services:
ettus-uhd:
image: openverso/ettus-uhd:3.15.0
container_name: ettus_uhd_container
privileged: true
devices:
- "/dev/bus/usb:/dev/bus/usb"
volumes:
- /usr/share/uhd/images:/usr/share/uhd/images
network_mode: "host" # Using host networking mode
command: uhd_find_devices
restart: unless-stopped

 

When the container is started, uhd_find_devices lists the X310 just fine:

Screenshot from 2025-01-14 13-06-57.png

 

2. Without network_mode: host, attempting to mount /dev and /proc:

 

version: '3.8'

services:
ettus-uhd:
image: openverso/ettus-uhd:3.15.0
container_name: ettus_uhd_container
privileged: true
devices:
- "/dev/bus/usb:/dev/bus/usb"
volumes:
- /usr/share/uhd/images:/usr/share/uhd/images
- /dev:/dev
- /proc:/proc
command: uhd_find_devices
restart: unless-stopped

 

 

When the container is started, uhd_find_devices says no devices found:

 

Screenshot from 2025-01-14 13-06-43.png

 

My question: How can I make the SDR accessible to the Docker container without using network_mode: host?

What parameters do I have to set, what do I have to mount into the container?

I need a solution that allows me to use a custom network while still accessing the PCIe-connected SDR.

 

0 Kudos
Message 1 of 2
(514 Views)

Hi sdrhda,

 

Assuming your containers are identical except for the network_mode=host option, your issue implies that the uhd driver communicates with the USRP over the network stack.

 

Can you check whether a new network interface is created when the device is plugged in? Keep in mind the USRP is not hot swappable when connected via PCIe (USRP Hardware Driver and USRP Manual: USRP X3x0 Series)

 

If a new network interface is created, then UHD might require the interface to be mapped into the container to work properly. (see How to Pass-through Physical NIC to Docker Container? - Stack Overflow)

 

Let me know if you have any further questions, or progress on your issue!

 

Best regards

Leonard

0 Kudos
Message 2 of 2
(314 Views)