|
From: | Marcus Müller |
Subject: | Re: Monitor O's and U's from Python |
Date: | Sun, 23 Apr 2023 12:48:03 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 |
Hi Richard and Marcus,
We managed to do it: Now I'm confused!
So, as expected, things like
from gnuradio.blocks import message_debug
blk = message_debug()
print(blk.message_ports_in())
#(print_pdu store print system)
work quite nicely.
However, um, that's not the case for
from gnuradio import uhd
src = "" uhd.stream_args_t(cpu_format="fc32",
channels=(0,)))
print(src.message_ports_out())
#()
although I can very much see the code that should be adding the port in the commit I mentioned last email. Or so I thought.
That just adds the port to the USRP sink. So, I was wrong, and ph1t0's commit cb27b1f496 added that same port to the source only in later 2022, and that wasn't backported to maint-3.10.
OK, Richard, change of plans: Before the USRP block(s) had that message port, we all just used the "UHD: USRP Async Msg Source" block, which, as you might guess, fulfills that role. I think it might not work in GRC in 3.10, but it's probably the way to go on 3.8. Haven't worked with it in quite a while, but if you have the uhd_rx_cfile example at hand: that shows how to use it in Python.
Hope this is a at least a bit helpful, and sorry for the confusion,
Best,
Marcus
On 23.04.23 11:54, Marcus Müller wrote:
Hi Richard, hi Marcus,
huh, surprising; Piotr Krysik's commit 94fddb6371264c79969c0448c19fdb637d6ffc31 added these in 2018, back in the days when we've had tagged 3.8tech-preview. So, that *really* should be in there. Let me quickly spin up a retro machine with 3.8 on it and check that.
Best,
Marcus
On 23.04.23 03:33, Marcus D. Leech wrote:
On 22/04/2023 21:25, Richard Bell wrote:
They must be really new, because I'm running GR 3.10 with UHD 4.1.0.5 and there's no output message port.Thanks for catching that Marcus.
I'm still having a problem even finding an output message port for the usrp_source block. I should say I'm using gnuradio 3.8.5, if that makes a difference.
For example, if I print self.uhd_usrp_source.message_ports_in() I get "command" and "system". But if I print self.uhd_usrp_source.message_ports_out() I get an empty tuple.Are output message ports on usrp sources somewhat new?
On Sat, Apr 22, 2023 at 7:07 AM Marcus D. Leech <patchvonbraun@gmail.com> wrote:
On 22/04/2023 01:46, Richard Bell wrote:
I think you should be using msg_connect, rather than "connect".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 sourceself.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 blockself.message_debug_block = blocks.message_debug()
# connect the usrps async_msgs port to the message debug blocks store portself.connect((self.uhd_usrp_source, 'async_msgs'), (self.message_debug_block, 'store'))
[Prev in Thread] | Current Thread | [Next in Thread] |