0

I set up a Ubuntu server with 2x USRP B200 connected to it via USB. I can find both devices and am able to receive samples fine (without dropped samples) using the following command in my SSH shell:

./rx_samples_to_file --gain 55 --freq 1234e6 --rate 50e6 --ant "RX2" --ref "external" --wirefmt sc12 --file /recordings/test_1.iq --duration 60 --stats --progress --args num_recv_frames=1900,serial=0000001 (redacted the real SN)

^This results in solid streaming and recording as expected.

While the above runs, I want to also start recording with the 2nd USRP, so I run a 2nd shell in parallel and the following command:

./rx_samples_to_file --gain 55 --freq 1234e6 --rate 50e6 --ant "RX2" --ref "external" --wirefmt sc12 --file /recordings/test_2.iq --duration 60 --stats --progress --args num_recv_frames=1900,serial=0000002 (redacted the real SN)

^Once I run this command however, the following errors occur, and even the existing stream in shell 1 is stopped:

Error in shell 1:

    [...]
    50.0002 Msps
    49.9999 Msps

terminate called after throwing an instance of 'uhd::usb_error'
  what():  RuntimeError: USBError -11: usb rx6 submit failed: LIBUSB_ERROR_NO_MEM
Aborted (core dumped)

Error in shell 2 (in which we just tried to start the 2nd USRP stream):

Creating the usrp device with: num_recv_frames=1900,serial=0000002...
[INFO] [UHD] linux; GNU C++ version 12.4.0; Boost_108600; UHD_4.7.0.HEAD-release
[INFO] [B200] Detected Device: B200
[INFO] [B200] Operating over USB 3.
[INFO] [B200] Detected bad USB state; resetting.
[INFO] [B200] Detected Device: B200
[INFO] [B200] Operating over USB 3.
Error: RuntimeError: USBError -11: usb rx6 submit failed: LIBUSB_ERROR_NO_MEM

Any idea what I am doing wrong here? How can I make both streams run in parallel?

UPDATE: Interesting discovery: If I run both streams at default num_recv_frames it works fine. If I run one stream at my custom num_recv_frames=1900 and the 2nd stream at default num_recv_frames it ALSO works. But, if I run both with a custom num_recv_frames it breaks! (unfortunately I need the high custom num_recv_frames to get reliable streaming at this high sample rates to not have overflows) any ideas?

10
  • is this really a Ubuntu machine or is this Ubuntu running in WSL? Commented Oct 8, 2024 at 19:02
  • ubuntu-24.04.1-live-server-amd64 running as a VM on a xcp-ng host. I have a USB PCIe card passed via PCIe passthrough into it Commented Oct 8, 2024 at 19:04
  • btw, just noticed there is a possible interesting warning when starting up the stream on the 2nd USRP "Detected bad USB state; resetting" (can see it also in the error I copy-pasted in the original post) Commented Oct 8, 2024 at 19:12
  • Another idea: I did not replug the USRPs after I set the udev device rules, could that cause this issue potentially? Commented Oct 8, 2024 at 19:26
  • Interesting discovery: If I run both streams at default num_recv_frames it works fine. If I run one stream at my custom num_recv_frames=1900 and the 2nd stream at default num_recv_frames it ALSO works. But, if I run both with a custom num_recv_frames it breaks! (unfortunately I need the high custom num_recv_frames to get reliable streaming at this high sample rates to not have overflows) Commented Oct 8, 2024 at 20:46

1 Answer 1

0

may be you can try increasing the memory in /sys/module/usbcore/parameters/usbfs_memory_mb

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for the idea. Thats currently set to 16. What value do you suggest to change this to ? 32MB? (any impact changing this could have on the system/other devices?)
Not sure on the impact, but atleast it helped me to run multiple B210 on the same machine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.