discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Monitor O's and U's from Python


From: Richard Bell
Subject: Re: Monitor O's and U's from Python
Date: Fri, 21 Apr 2023 22:46:02 -0700

Hi Marcus,

Good to hear from you, I hope all is well. Thanks for this response.

I tried doing what you said, but I get the attached error message. I have been looking the docs but haven't found much discussion that is helping. Do you see anything wrong with these relevant code snippets?

# create the USRP source
self.uhd_usrp_source_0 = uhd.usrp_source(
            ",".join((addr0, "", "master_clock_rate=200e6")),
            uhd.stream_args(
                cpu_format="fc32",
                args='',
                channels=list(range(0,1)),
     ),
)

# create the message debug block
self.message_debug_block = blocks.message_debug()

# connect the usrps async_msgs port to the message debug blocks store port
self.connect((self.uhd_usrp_source, 'async_msgs'), (self.message_debug_block, 'store'))
image.png

On Fri, Apr 21, 2023 at 5:22 AM Marcus Müller <marcus.mueller@ettus.com> wrote:
Hello Richard,

For RX / "O":

you can observe the RX timestamps (key: rx_time) in tags, and compare with the last tag
you saw, to check whether the difference of `rx_time` value times the sampling rate is the
same as the difference in tag offset (i.e., sample number on which the tag was).

For both TX / "U" and RX / "O":

The USRP source and sinkl blocks have an "async_msg" message output , which will give you
message dicts that (pseudocoding this):

{ "uhd_async_msg" { "channel" : 0 , "time_spec" : [0, 0.0713], "event_code": "underflow" } }


Best,

Marcus

On 21.04.23 09:08, Richard Bell wrote:

> Hello,
>
> I have a python flowgraph that transmits data from one radio to another for a research
> project. Sometimes during one of these tx/rx events, U's or O's will occur, making the
> data invalid. I would like to monitor the USRP for these events from within Python so I
> can request a retransmit when they occur.
>
> How do I monitor for O's and U's from within Python?
>
> Thank you,
>
> Richard


reply via email to

[Prev in Thread] Current Thread [Next in Thread]