[USRP-users] Switching the antenna ports at runtime
Marcus D. Leech
mleech at ripnet.com
Fri Nov 24 10:56:32 EST 2017
On 11/24/2017 10:35 AM, Janos Buttgereit via USRP-users wrote:
> While developing a X300/WBX based DOA application that should run stable for some longer time, we found out that there is the need to periodically re-synchronize the signals most likely due to slightly drifting pll output-frequencies across all independent frontends (this is phase drift noticeable by just watching a sine signal split to all receivers on a scope in GNU radio over a longer period).
> Now we plan to do a training-sequence that calculates phase-correction coefficients each five seconds with a reference signal generator connected to RX2 while the rest of the time TX/RX should be active and process the real-world antenna input.
> How do I manage to do this through the C++ API. There are two points I’m not sure about:
> 1. Is it possible to switch rx antennas while continuous streaming is running? If yes, is it safe to call set_rx_antenna from a different thread than rxStream->recv at any time?
That should be just fine--it's conceptually like set_rx_frequency, which
you can do at any time.
> 2. If this is possible, do I have to clear all buffers in the signal chain that could contain past samples that still originate from the other antenna port or will the antenna switching clear all buffers automatically? If I have to clear those buffers by myself, how do I do it?
You'll have to determine how much "dead time" there is after a switch,
and ignore that many samples. The hardware doesn't drop samples after
an antenna switch.
> Thanks for your replies in advance!
> USRP-users mailing list
> USRP-users at lists.ettus.com
More information about the USRP-users