Discussion and technical support related to USRP, UHD, RFNoC
View all threadsDear Marc,
My name is Mike Yang, and I’m currently using the USRP X310 for my research.
I have a few questions regarding the benchmark_rate.py script that was shared in the guide. I'm using Python for all my signal processing tasks.
First, I'd like to share some thoughts on the code, if you don't mind.
From what I understand, this script demonstrates simultaneous signal transmission and reception. The transmit signal is stored in the transmit_buffer , which repeatedly sends a value of 0.
The signal preparation seems to be handled in the benchmark_tx_rate function.
I'm interested in transmitting a sine wave signal, and I foresee two potential issues:
1.
How can I store a custom signal (like a sine wave) in the transmit_buffer ?
2.
If the signal is longer than max_samps_per_packet , I assume it needs to be divided into chunks that match the max buffer size, with each chunk sent in sequence. Could you please confirm the best way to do this?
On the reception side, I’m having trouble retrieving the received signal for analysis. I think the approach should be similar to the transmit side—collecting each sub-chunk of the received signal from recv_buffer in the benchmark_rx_rate function.
I’ve attached my current script (test1 in jupyter notebook) to this message. The simultaneous transmission part appears to be working correctly, but I’m not receiving the expected signal on the reception side. Could you kindly help me identify and fix the issue?
Thank you very much for the shared Python code and for your time and support.
Best regards,
Mike Yang
On Thu, May 8, 2025 at 9:23 AM ZIXIAO YANG zixiao.yang@univ-poitiers.fr
wrote:
Dear Marc,
My name is Mike Yang, and I’m currently using the USRP X310 for my
research.
I have a few questions regarding the benchmark_rate.py script that was
shared in the guide. I'm using Python for all my signal processing tasks.
First, I'd like to share some thoughts on the code, if you don't mind.
From what I understand, this script demonstrates simultaneous signal
transmission and reception. The transmit signal is stored in the
transmit_buffer, which repeatedly sends a value of 0.
To be clear, the reason it transmits zeros is because this example is for
the purpose of checking the throughput to your device. No actual
transmission is intended.
The signal preparation seems to be handled in the benchmark_tx_rate
function.
I'm interested in transmitting a sine wave signal, and I foresee two
potential issues:
1.
How can I store a custom signal (like a sine wave) in the
transmit_buffer?
Maybe tx_waveforms.py is the better example to see this done.
1.
If the signal is longer than max_samps_per_packet, I assume it needs
to be divided into chunks that match the max buffer size, with each chunk
sent in sequence. Could you please confirm the best way to do this?
UHD will do that for you. You can pass any size buffer to the send() call,
it will transmit until it's all out or an error occurs.
On the reception side, I’m having trouble retrieving the received signal
for analysis. I think the approach should be similar to the transmit
side—collecting each sub-chunk of the received signal from recv_buffer in
the benchmark_rx_rate function.
I’ve attached my current script (test1 in jupyter notebook) to this
message. The simultaneous transmission part appears to be working
correctly, but I’m not receiving the expected signal on the reception side.
Could you kindly help me identify and fix the issue?
Maybe rx_to_file.py is a good example for this.
--M