[USRP-users] Switching the antenna ports at runtime

Janos Buttgereit janos.buttgereit at fh-muenster.de
Fri Nov 24 10:35:20 EST 2017


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?
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?

Thanks for your replies in advance!

More information about the USRP-users mailing list