Using USRP UHD's "rx_timed_samples" and "tx_timed_samples" uhd utilities
4 views (last 30 days)
Show older comments
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 Comment
Hisham Alhulayyil
on 24 Jan 2021
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?
Accepted Answer
Jalex99
on 15 Feb 2021
1 Comment
Hisham Alhulayyil
on 6 Mar 2021
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
More Answers (0)
See Also
Categories
Find more on Communications Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!