Using USRP UHD's "rx_timed_samples" and "tx_timed_samples" uhd utilities

Hello, I was thinking of creating a simple TDMA radio using a USRP N210 in Matlab 2015a. One problem is that I don't think I can obtain deterministic and synchronized timing between two radios because of the asynchronous and non-realtime nature of USRPs. I did find that there is a compiled UHD utility written originally in C that appears to make some low level FPGA streaming calls with time-based triggers so that either Tx or Rx occurs precisely at some point in the future.
I have a couple questions about this utility:
1. It is available in the UHD utility directory. Is this a utility that Matlab supports?
2. Is it possible to pull the received data back from the "rx_timed_samples" call that I was able to successfully make through the call_uhd_apps('xxx') function.
3. If it isn't, and is more of a functional demo. Is it feasible for me to modify the original "rx_timed_samples" c code and then modify the call_uhd_apps function so that I can get data back into the workspace?
Thank you, Alex
Edit: I just read through the code for the rx_timed_samples.cc example on the Ettus website and it doesn't look like it returns the data anywhere - it is more of an example of how to connect to a streaming object. That said, I'm still interested in knowing if it is possible to compile new UHD utilities and/or MEX them and bring them into Matlab. I'm assuming that it is always possible to MEX, but I haven't tried it yet with UHD projects yet.
https://github.com/EttusResearch/uhd/blob/master/host/examples/rx_timed_samples.cpp

댓글 수: 1

Sorry for reviving such an old post however I am interested in the same thing. Did you find a way to set tx timestamps in Matlab?

댓글을 달려면 로그인하십시오.

 채택된 답변

Jalex99
Jalex99 2021년 2월 15일

0 개 추천

No, unfortunately I did not make progress on getting timed operations to work using Matlab's USRP support package. I was successful in writing a program in C that makes the appropriate calls to the UHD library. Another option is using tagged streams in gnuradio.

댓글 수: 1

Thank you for your answer.
I know that you propably have done what you wanted to do with the USRP a long time ago. However, I am hoping that you can answer this question as well.
Q: Did you wite your C code for "rx_timed_samples" in matlab to handle the synchronized timing between the radios part and used the other built-in functions for USRP that are ready to use in Matlab? Or you had to write the whole thing in C?
Thanks,
Hisham

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Communications Toolbox에 대해 자세히 알아보기

질문:

2016년 3월 26일

댓글:

2021년 3월 6일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by