discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Help needed with message ports


From: Michael Dickens
Subject: Re: [Discuss-gnuradio] Help needed with message ports
Date: Sat, 21 Jul 2018 10:23:00 -0400

Hi Volker - Just to clarify:

You've added an -optional- input async message port to a block that currently 
does just streaming. If you -do not- try to connect to this new port, then 
everything works as desired & as before. If you -do- try to connect to the port 
then you get the runtime error "insufficient connected output ports (1 needed, 
0 connected)". Yes?

"Once upon a time" ... there was, and as it turns out still is (just tried 
using the current GIT master of GR), a bug in the code that handles connections 
for mixed streams and -input- async messages, which results in the runtime 
error you're encountering. I can provide a very simplified OOT that shows this 
error; I tried to track it down once but got sidetracked & never figured it 
out. Maybe I'll give it a go again this coming week ... or, maybe you can?

Sorry for the bad news! - MLD

On Fri, Jul 20, 2018, at 6:28 AM, Volker Schroer wrote:
> Hi,
> 
> I'm trying to add an message port to my  working oot module fcdproplus 
> to be able to control the frequency by an message from a qtgui sink.
> 
> I used the analog signal source as guide and implemented a message sink 
> in the grc description, registered the in port, and defined  a handler 
> function like described in the tutorial.
> 
> I can run my example of a simple fm receiver as before, but when I 
> connect the message out port of a qtgui sink to my message in port of my 
> oot block,
> 
> I get the following error message:
> 
> 
> ./FMRadio.py
> INFO: Audio source arch: alsa
> Funcube Dongle Pro+ found as: plughw:3,0
> Dongle sucessfully initialized
> Result of Action :+++++
> FCDAPP 20.03
>   Lna gain enabled
>   Mixer gain enabled
> If gain set to: 10
> Set Frequency to: 94.3 KHz, corrected to: 94300 Khz
> INFO: Audio sink arch: alsa
> Traceback (most recent call last):
>    File "./FMRadio.py", line 277, in <module>
>      main()
>    File "./FMRadio.py", line 266, in main
>      tb.start()
>    File 
> "/usr/local/gnuradio/lib64/python2.7/site-packages/gnuradio/gr/
> top_block.py", 
> line 109, in start
>      top_block_start_unlocked(self._impl, max_noutput_items)
>    File 
> "/usr/local/gnuradio/lib64/python2.7/site-packages/gnuradio/gr/
> runtime_swig.py", 
> line 5678, in top_block_start_unlocked
>      return _runtime_swig.top_block_start_unlocked(r, max_noutput_items)
> RuntimeError: fcdproplus(3): insufficient connected output ports (1 
> needed, 0 connected)
> 
> These are the connections:
> 
> 
>         ##################################################
>          # Connections
>          ##################################################
>          self.msg_connect((self.qtgui_sink_x_0, 'freq'), 
> (self.fcdproplus_fcdproplus_0, 'freq'))
>          self.connect((self.analog_fm_demod_cf_0, 0), 
> (self.audio_sink_0, 0))
>          self.connect((self.analog_fm_demod_cf_0, 0), 
> (self.audio_sink_0, 1))
>          self.connect((self.fcdproplus_fcdproplus_0, 0), 
> (self.low_pass_filter_0, 0))
>          self.connect((self.fcdproplus_fcdproplus_0, 0), 
> (self.qtgui_sink_x_0, 0))
>          self.connect((self.low_pass_filter_0, 0), 
> (self.analog_fm_demod_cf_0, 0))
> 
> If I remove the line
> 
> self.msg_connect((self.qtgui_sink_x_0, 'freq'), 
> (self.fcdproplus_fcdproplus_0, 'freq'))
> 
> 
> from my python script he error message disappears.
> 
> What am I doing wrong?
> 
> 
> Any help is appreciated.
> 
> -- Volker
> 
> 
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio



reply via email to

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