##################################################
# Variables
##################################################
self.tx_gain = tx_gain = 15
self.samp_rate = samp_rate = 200000
self.f_center = f_center = 1.47e9
self.device = device = "type=usrp2"
##################################################
# Blocks
##################################################
self.usrp_sink = uhd.usrp_sink(
device_addr=device,
stream_args=uhd.stream_args(
cpu_format="fc32",
length_tag_name="packet_len",
channels=range(1),
),
)
self.usrp_sink.set_samp_rate(samp_rate)
self.usrp_sink.set_center_freq(f_center, 0)
self.usrp_sink.set_gain(tx_gain, 0)
self.usrp_sink.set_antenna("TX/RX", 0)
self.blocks_vector_source_x_0 =
blocks.vector_source_c((1,)*5, False, 1, [])
self.blocks_stream_to_tagged_stream_0 =
blocks.stream_to_tagged_stream(gr.sizeof_gr_complex, 1, 5,
“packet_len”)
##################################################
# Connections
##################################################
self.connect((self.blocks_vector_source_x_0, 0),
(self.blocks_stream_to_tagged_stream_0, 0))
self.connect((self.blocks_stream_to_tagged_stream_0, 0),
(self.usrp_sink, 0))
It’s not working either… I can still observe the carrier at the receiver.
- You’ll know if your USRP hasn’t acknowledged tx_eob if you see 'U’s
between bursts.
I am getting exactly one “U”. Both for the code in my previous post as
well as for the above one. It really seems like the USRP is not
recognizing the stream tags.
There are a few things to consider with this flowgraph (as posted):
-
Your vector source is set to /not/ repeat. After your flowgraph
terminates, is that when you observe the LO still running?
-
You're essentially sending a very short rectangular pulse
modulated onto a carrier, which in the frequency domain would look like
a sinc function centered at the carrier. Is this what you want, or are
you just experimenting with the burst interface?
-
Is there a reason your burst pulses need to contain so few
samples?
Could you provide some information about what you’re trying to do in
your end application?
Sean
From: discuss-gnuradio-bounces+sean.nowlan=removed_email_address@domain.invalid
[mailto:discuss-gnuradio-bounces+sean.nowlan=removed_email_address@domain.invalid] On
Behalf Of Marcus M.
Sent: Tuesday, October 21, 2014 1:41 PM
To: [email protected]
Subject: Re: [Discuss-gnuradio] Transmitting bursts with GRC by
inserting SOB and EOB
Sean,
interesting point.
Frederik,
How does your carrier look when you send bursts of >500 samples?
Greetings,
Marcus
On 21.10.2014 19:29, Nowlan, Sean wrote:
I’m concerned that the problem
Frederik is observing has to do with the very short burst he is
sending, something like 5 samples. I suspect this requires 1 call
each to work and tag_work per 5 sample burst, which seems like an
awful lot of context switching and overhead.
>
> -----Original Message-----
> From: Marcus M. [mailto:[email protected]]
> Sent: Tuesday, October 21, 2014 1:24 PM
> To: Nowlan, Sean;
[email protected]mailto:[email protected]; Martin B.
> Subject: Re: [Discuss-gnuradio] Transmitting bursts with GRC
by inserting SOB and EOB
>
Hi Sean,
aaah good catch! Yes, that’s right; sob is safe.
Cheers,
Marcus
On 21.10.2014 19:19, Nowlan, Sean wrote:
From Marcus:
… and that (wut) might be a bug, because it implies that, if the
stream has both a time tag and a sob tag, the question whether the tx
metadata has a time tag depends on in which order these tags are
sorted on the the tag storage multimap. Which might be random,
because tags are sorted only by tag offset.
@Martin: is there a reason that this is explicitely set to false
here, or can one just fix this by deleting a line?
This appears to be handled correctly. Given the same tag offset, the
order of tx_time vs. tx_sob tags should not matter. If tx_time is
found first, it sets found_time_tag=true and
_metadata.has_time_spec=true (lines 652 & 653). Then
_metadata.has_time_spec is overwritten in the tx_sob check (line
665) with ‘false’, but is set back to ‘true’ in line 743 due to
found_time_tag being true.
if (found_time_tag) { _metadata.has_time_spec = true; }
If instead tx_sob is found first and tx_time second, then the time
spec will also be set in line 743. So the question is whether setting
_metadata.has_time_spec=false is really necessary. I’d say it’s worth
keeping in case the user doesn’t always want to use tx_time stamps.
The user may want to schedule some bursts but force others to transmit
as soon as possible while still using the ATR functionality of the
USRP.
I know all this logic can be hard to follow, but it has to handle so
many different cases and possibly span many calls to work and
tag_work.
changing the tag’s name at the Stream to Tagged Stream Block to
something stupid and finally got an “tG” printed out.
It should be mentioned that there are two burst tag interfaces that
cannot be mixed. if a Length Tag Name is specified to the constructor,
all tx_sob and tx_eob tags will be ignored in tag_work to ensure the
interfaces are mutually exclusive. If no Length Tag Name is specified,
then tag_work will search for tx_sob/tx_eob tags and won’t look for
length tags.
Sean
That’s right. tags_demo works perfectly. No carrier in between the
Discuss-gnuradio Info Page
> _______________________________________________
> Discuss-gnuradio mailing list
> [email protected]<mailto:[email protected]>
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio