# How to start with stream tags

**URL:** <https://www.ruby-forum.com/t/how-to-start-with-stream-tags/240595>\
**Category:** GNU Radio\
**Created:** [April 22, 2014, 12:30pm UTC](https://www.ruby-forum.com/t/how-to-start-with-stream-tags/240595 "2014-04-22T12:30:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![musicdenotation](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Post date:** [April 22, 2014, 12:30pm UTC](https://www.ruby-forum.com/t/how-to-start-with-stream-tags/240595/1 "2014-04-22T12:30:21Z")

</div>

Dear List,

I want to make time synchronization for implementation of two-way  
relaying  
network. Each node contain both RX chain and TX chain but they should  
not  
run simultaneously (half-duplex mode). Therefore, the TX chain is on  
when  
it is needed to transmit, and off when the transmission is over. I found  
that _stream tags_ is the key solution to perform that.

My question is, how should I start to learn about\* stream tags\*, where  
can  
I find tutorial of _stream tags_?

Thank you so much.

Best Regards,  
Hoang

–  
Ngo K. Hoang  
Faculty of Electronics and Telecommunications -  
University of Engineering and Technology (UET) - Vietnam National  
University, Hanoi (VNU)  
Vice-president of Student Association of UET  
Alternative email: removed\_email\_address@domain.invalid  
Mobilephone: +84.163.682.7874

---

<div class="post-metadata">

**Author:** ![Hoang\_Ngo\_K](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/97f17d/32.png) [@Hoang\_Ngo\_K](https://www.ruby-forum.com/u/Hoang_Ngo_K)\
**Post date:** [April 22, 2014, 4:28pm UTC](https://www.ruby-forum.com/t/how-to-start-with-stream-tags/240595/2 "2014-04-22T16:28:22Z")

</div>

Try:

[http://gnuradio.org/doc/doxygen-3.7/page\_stream\_tags.html](http://gnuradio.org/doc/doxygen-3.7/page_stream_tags.html)

or

[http://gnuradio.org/redmine/attachments/download/252/06-rondeau-stream\_tags.pdf](http://gnuradio.org/redmine/attachments/download/252/06-rondeau-stream_tags.pdf)

or even

> **[LMGTFY - Let Me Google That For You](https://lmgtfy.app/?q=gnuradio%2Bstream%2Btags)**
>
> For all those people who find it more convenient to bother you with their question rather than to Google it for themselves.

---

<div class="post-metadata">

**Author:** ![Hoang\_Ngo\_K](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/97f17d/32.png) [@Hoang\_Ngo\_K](https://www.ruby-forum.com/u/Hoang_Ngo_K)\
**Post date:** [April 23, 2014, 6:42am UTC](https://www.ruby-forum.com/t/how-to-start-with-stream-tags/240595/3 "2014-04-23T06:42:53Z")

</div>

Thank you Mr. Newman,

I’ve read (1) GNU Radio Manual on stream tags, (2) slides of Tom R.  
and (3) Block Coding Guide about stream tags in  
[http://gnuradio.org/redmine/projects/gnuradio/wiki/BlocksCodingGuide#Stream-Tags](http://gnuradio.org/redmine/projects/gnuradio/wiki/BlocksCodingGuide#Stream-Tags).  
They are general and I would like to find some specific example. Anyway,  
I  
have some questions.

1. In (3), they give the example codes for reading/writing stream tags.  
Where should these codes be inserted?

2. sob and eob are inserted to the data frame. Does the USRP Sink remove  
these redundant data before transmitting?

Best Regards,  
Hoang

On Tue, Apr 22, 2014 at 9:27 PM, Tim N. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> > should not run simultaneously (half-duplex mode). Therefore, the TX chain
> > 
> > Discuss-gnuradio mailing list  
> > [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> > [Discuss-gnuradio Info Page](https://lists.gnu.org/mailman/listinfo/discuss-gnuradio)

–  
Ngo K. Hoang  
Faculty of Electronics and Telecommunications -  
University of Engineering and Technology (UET) - Vietnam National  
University, Hanoi (VNU)  
Vice-president of Student Association of UET  
Alternative email: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Mobilephone: +84.163.682.7874

---

<div class="post-metadata">

**Author:** ![Hoang\_Ngo\_K](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/97f17d/32.png) [@Hoang\_Ngo\_K](https://www.ruby-forum.com/u/Hoang_Ngo_K)\
**Post date:** [April 23, 2014, 2:40pm UTC](https://www.ruby-forum.com/t/how-to-start-with-stream-tags/240595/4 "2014-04-23T14:40:42Z")

</div>

Hi Hoang,

aha! Now you’re mentioning USRPs, we know what platform type you refer  
to. What USRP are you using?

1. as you can see, these instructions belong into the work function of a  
block that you write. You’ll have to work through the GNU Radio guides  
on the [gnuradio.org](http://gnuradio.org) start page, after which you’ll be able to design  
your own functionality.
2. ?
3. The USRP sink only sends the samples to the device; there is no data  
in the sample stream (which I hope you understand, if you’ve understood  
Tom’s presentation – you can query if there are tags for a specific  
sample range, but there is no in-band data added).

All in all, it seems you’re at the very beginning of understanding GNU  
Radio, and you’ve picked up that stream tags might be a suitable tool  
for you. They are, but you need some experience writing basic GNU Radio  
applications before you can use them.  
Although that is currently work in progress, so far you can not instruct  
the USRP sink using stream tags – the USRP source just adds a rx\_time  
tag on certain events.

Hope that was a little insightful,  
Greetings,

Marcus

---

<div class="post-metadata">

**Author:** ![Hoang\_Ngo\_K](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/97f17d/32.png) [@Hoang\_Ngo\_K](https://www.ruby-forum.com/u/Hoang_Ngo_K)\
**Post date:** [April 23, 2014, 7:13pm UTC](https://www.ruby-forum.com/t/how-to-start-with-stream-tags/240595/5 "2014-04-23T19:13:59Z")

</div>

Dear Mr. Müller,

I have 3 USRP1s ([https://www.ettus.com/product/details/USRPPKG](https://www.ettus.com/product/details/USRPPKG)), each  
contains one RFX2400 daughter board and one VERT2450 antenna. I found  
that  
most people here use USRP N210 in their project.

I’ve installed GNU Radio 3.7.0 and made some flow graphs in GNU Radio  
with  
provided blocks by GNU Radio and coded blocks by other developer. These  
flow graphs run well. I’ve learn some basic about how to make new blocks  
by  
in out-of-tree modules (  
[http://gnuradio.org/redmine/projects/gnuradio/wiki/OutOfTreeModules](http://gnuradio.org/redmine/projects/gnuradio/wiki/OutOfTreeModules)).  
What  
I coded is just very simple: reverse a sequence, combine two sequences  
and  
separate one sequence into two sequence.

I want to implement a two-way relaying model applying network coding and  
using OFDM technique with these USRPs and GNU Radio. Up to now, I built  
the  
flow graphs for two end nodes and the relay node. They work but without  
any  
time synchronization. If I want to turn on/off a chain, I press the  
button.  
I want a method to control the TX chain, and stream tags is the key. I  
have  
just one more month to make the synchronization done.

Thank you for your answers. Do you have any suggestion for me in my  
problem? Can you expand “the USRP source just adds a rx\_time tag on  
certain  
events”?

Best,  
Hoang
