Packet Flowgraph and underflows

Hi,

I’ve been looking for a solution to this and can’t seem to find any
examples.

If I have a flowgraph that transmits packets for instance from a TCP
stream - if this TCP stream only receives data occasionally it will
create underflows (showing up as U characters on STDOUT).

What is the proper way of handling such a scenario? I thought of using
something like the Mute block to transmit a 0 data stream during
periods of no data. However that seems excessively complicated to
implement and I think I am missing some pointer here …

Thanks,
Wolfgang

Hi Wolfgang,

no, you do not need to use something like a mute block.
The functionality you are looking for is already build into UHD (I’m
assuming you are using a USRP as your transmitting device)

The UHD sink in GNU Radio is able to react to some specific stream tags
[1]
one of which is the length tag.
You can assign a name for this tag in the UHD source block (‘Length tag
name’ field).

Now, if you have assigned a value to this ‘Length tag name’ field the
UHD
sink is somehow reacting as a tagged stream block [2].
If samples arrive at the UHD sink, the USRP will only transmit that
amount
of samples specified in the length tag starting from that length tag.
Therefore, you should not see any ‘U’ messages no more as the USRP
automatically stops transmitting and does not expect any more samples
follow.

However, keep in mind that with tagged streams every first sample of a
‘packet’ needs to have the length tag attached.

E.g consider the following stream of samples where the first sample has
a
length tag assigned to it with value 10:

1 2 3 4 5 5 7 8 9 10 11
| |
length tag next length tag needs to be exactly here
value = 10 samples

Hope that helps.
Cheers,
Julian

[1] https://gnuradio.org/doc/doxygen/page_stream_tags.html
[2] https://gnuradio.org/doc/doxygen/page_tagged_stream_blocks.html

Hi Julian,

Thanks for the pointer. I’m using a HackRF - doesn’t look like the
Osmocom sink supports the same construct. Any way of doing something
like this in a more generic approach?

Cheers,
Wolfgang

Hi Julian,

Thanks for this - after a bit of googling I managed to find that as
well. Was a bit hard to get started but after fiddling with the block
buffers got it running the way I need it.

Also for reference - in the Osmocom sink the HackRF does not have the
payload length implementation based on tags yet. In case somebody else
should need it.

Cheers,
Wolfgang

Hi Wolfgang,

sorry for the late reply.

I’m not familiar with the HackRF but something that might be useful for
you
as it makes burst mode transmissions in GNU Radio more generic and
hardware
independent is Eventstream by Tim O’Shea [1].
It should be exactly what you were looking for. It kind of implements
the
‘mute block’ concept you were talking about.

I hope that gets you started. Let me know if you have any more
questions.

[1]
http://oshearesearch.com/2015/03/15/burst-transmission-in-gnu-radio-sample-streams-with-eventstream/

Cheers,
Julian

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs