Synchronizing N210 TX and RX channels

Hello,

I would like to synchronize the RX and TX channels on an N210 so that
the acquisition and transmission of data are triggered simultaneously.
I haven’t found documentation on how to do that. Can someone, please,
point me in the right direction?

Thanks! Cheers,
Daniele

On 07/22/2014 11:14 AM, Daniele N. wrote:


Discuss-gnuradio mailing list
[email protected]
Discuss-gnuradio Info Page

You should probably look at the UHD examples: rx_timed_samples and
tx_timed_samples


Marcus L.
Principal Investigator
Shirleys Bay Radio Astronomy Consortium

On 22/07/2014 17:18, Marcus D. Leech wrote:

You should probably look at the UHD examples: rx_timed_samples and
tx_timed_samples

Thanks Marcus,

but those examples use directly the UHD driver and I have an hard time
understanding how to translate them to use the GNURadio UHD source and
sink blocks.

Are you implying that what I want to do cannot be done with the standard
source and sync blocks and I would have to extend them for my purposes?

Thanks. Cheers,
Daniele

On 07/22/2014 11:29 AM, Daniele N. wrote:

Thanks. Cheers,
Daniele

The sink blocks do accept tags, including ‘tx_time’, which gives you
functionally equivalent capabilities.

I’ve never used those capabilities myself.

There’s a small demo app:

…/gr-uhd/examples/c++/tags_demo.cc

That shows how tags are used.


Marcus L.
Principal Investigator
Shirleys Bay Radio Astronomy Consortium

On 22/07/2014 18:18, Martin B. wrote:

On top of what Marcus’ has said,

the gr-radar toolbox might be helpful. It has a block that takes a
tagged stream, and outputs a signal it acquired synchronously to the
transmitted one.

Thanks Martin. This seems to imply that there is no way to actually
synchronize the hardware, and that the synchronization can only be done
in software aligning the timestamps of the two streams. Is that the
case?

Thanks. Cheers,
Daniele

Hey Daniele,

I have done the radar toolbox and implemented a synced USRP interface
(USRP Echotimer).

You are right, the USRP Echotimer does align the timestamps of the TX/RX
commands on both USRPs. But if you connect them by MIMO, the time and
clock are pretty good in sync. Therefore I think the Echotimer can
provide a sync with an accuracy of at least ± 1 sample. Check out [0]
for a video of the sync. There is also a sync setup for testing
(gr-radar/examples/usrp). Unfortunately the documentation is not
finished yet.

But care: The Echotimer bursts only a packet in sync, it does not stream
the whole time! The packet is defined by a tagged stream.

Greetings,
Stefan

[0]

Am 22.07.2014 18:40, schrieb Daniele N.:

On top of what Marcus’ has said,

the gr-radar toolbox might be helpful. It has a block that takes a
tagged stream, and outputs a signal it acquired synchronously to the
transmitted one.

[email protected]:kit-cel/gr-radar.git

M

Hi Daniele,

your problem is actually harder: The latency of digital signal
processing depends on your desired decimation, and analog signal latency
depends on a ton of factors like target RF frequency, adjustable filters
(if your daughterboard has something like this), antenna and cabling
delay, and so on.
The only real way to know is to measure the roundtrip for each
configuration, and that’s exactly what echotimer is for.

With best regards,
Marcus

Hello Stephan,

thank for your reply. What I would like to do is more simple than that:
I need to synchronize tx and rx of the same USRP, not of two different
devices. But I need continuous streaming and not burst.

Any help in this direction is much appreciated.

Thanks. Best,
Daniele

Hello Marcus,

I’m aware of that, what I want to achieve at the moment is simply to
have a predictable phase delay between the tx and rx channels. This is
prerequisite to measure the round-trip time and account for it.

Cheers,
Daniele

On 07/23/2014 10:43 AM, Stefan Wunsch wrote:

My approach: Read the system time on the USRP, set the stream command on
actual_time+some_offset and spawn two threads with a tx_streamer and a
rx_streamer. You can use both of them on the sampe USRP without any
problems (just dont use two of the same type on one USRP). This should
also work with streaming if you can push your data in the work function
continuously.

You could also do this inside your app, without having to write new
sources and sinks. If your N210s are connected via MIMO cable,
synchronizing them in time and frequency is pretty straightforward.

M

Hey,

If you use the Echotimer you can use the same IP vor TX and RX, this
should work.

Probably you can do your own USRP Sink/Source with UHD. You dont need
much code to implement this (Echotimer ~300 lines in the *impl.cc). Main
change should be an other stream command (most likely
STREAM_MODE_START_CONTINUOUS [0]). Good code examples are UHD
Sink/Source in gr-uhd and especially the examples from UHD itself (/host/examples). And the Echotimer of course!

My approach: Read the system time on the USRP, set the stream command on
actual_time+some_offset and spawn two threads with a tx_streamer and a
rx_streamer. You can use both of them on the sampe USRP without any
problems (just dont use two of the same type on one USRP). This should
also work with streaming if you can push your data in the work function
continuously.

Greetings,
Stefan

[0]
http://files.ettus.com/uhd_docs/doxygen/html/structuhd_1_1stream__cmd__t.html#a4df1f2e22148b7e09ace0eca0dfbf904

Am 22.07.2014 19:25, schrieb Daniele N.: