usrp-users@lists.ettus.com

Discussion and technical support related to USRP, UHD, RFNoC

View all threads

Python API Setting Sample Rate

S
seckinoncu8070@gmail.com
Fri, Apr 18, 2025 2:16 PM

Hello,

I am using the UHD Python API to stream live data from a USRP N320, and I need to adjust the sample rate on the fly without interrupting the stream. However, when I call set_rx_rate() during an active session, I encounter an error and the streaming stops.

In GNU Radio I can switch the N320’s sample rate very quickly during runtime, but I haven’t found an equivalent workflow in the Python API. Could you please advise:

  1. Is it possible to change the RX sample rate on a MultiUSRP instance while it is actively streaming?

  2. If so, what sequence of UHD commands or stream‑control calls are required to do this safely?

  3. Are there any hardware or driver limitations on the N320 that prevent sample‑rate changes mid‑stream?

Thank you for your guidance.

Best regards,
Seckin

Hello, I am using the UHD Python API to stream live data from a USRP N320, and I need to adjust the sample rate on the fly without interrupting the stream. However, when I call `set_rx_rate()` during an active session, I encounter an error and the streaming stops. In GNU Radio I can switch the N320’s sample rate very quickly during runtime, but I haven’t found an equivalent workflow in the Python API. Could you please advise: 1. Is it possible to change the RX sample rate on a MultiUSRP instance while it is actively streaming? 2. If so, what sequence of UHD commands or stream‑control calls are required to do this safely? 3. Are there any hardware or driver limitations on the N320 that prevent sample‑rate changes mid‑stream? Thank you for your guidance. Best regards,\ Seckin