Page 1 of 2
error with sink
Posted: Wed Sep 04, 2013 4:22 am
by on4bhm
Hi,
the rx part seems ok.
but for the transmit part, there seems to be a problem
the osmocom-siggen is working fine
but when i want to use the sink in gnuradio i get this error:
runtime error: resolve_port: hierarchical block 'sink_impl': input 0 is not connected internally
can anyone give me some advice on what to do next?
Re: error with sink
Posted: Wed Sep 04, 2013 3:08 pm
by on4bhm
if i connect UHD source with UHD sink + wx fft gui this works
this way i can create a linear transponder between rx freq and tx freq.
when i want to do the same thing with osmocom bladeRF it doesn't work.
i get the error:
runtime error: resolve_port: hierarchical block 'sink_impl': input 0 is not connected internally
what could be wrong?
anyone tried to make linear transponder with bladeRF?
Re: error with sink
Posted: Wed Sep 04, 2013 4:08 pm
by bpadalino
Ah, if you're trying to put a source and a sink together in the same flow graph it doesn't quite work just yet.
Since both the source and the sink want to open the USB device, the library itself, or the C++ code that is common to them both need to pass the already opened handle to the requesting source or sink. This has been talked about internally but now I just put it on our
tasks list.
Re: error with sink
Posted: Thu Sep 05, 2013 12:30 am
by on4bhm
under which point is it in the task list?
this way i can follow if the item is resolved for me.
it is rarther important, because thats what i wanted to to with the bladeRF: make a linear transponder.
i still have to wait for my transverter though...
kind regards
Re: error with sink
Posted: Thu Sep 05, 2013 8:52 am
by on4bhm
Hi,
I did another test.
i want to use rtl-sdr as source and bladeRF as sink
i get the same error!
Re: error with sink
Posted: Thu Sep 05, 2013 5:55 pm
by bpadalino
I verified the same thing on my setup, but have heard success from many others.
When you compiled gnuradio, did you ever have a 3.6 install and then install 3.7 - or was that machine at 3.7 the whole time?
I currently see exactly what you are where the top_block.py generated has an osmosdr.sink_c() or osmosdr.source_c() call, but when I dir(osmosdr) - it has just osmosdr.source() and osmosdr.sink() without the _c. If I change the top_block.py file to remove the _c, then everything works as expected.
When I look in the list of blocks I can choose from, I see 2 different versions of osmocom Sinks or Sources, so I suspect there is a stale library on our systems which is causing the weird error.
Please try to see if this is the same on your system. I suspect you may have two constituent versions of gnuradio conflicting with each other.
Re: error with sink
Posted: Fri Sep 06, 2013 1:46 am
by on4bhm
in my list of block there is only 1 version of each.
1 source and 1 sink.
is there something else i can check?
Re: error with sink
Posted: Fri Sep 06, 2013 5:15 am
by on4bhm
how can i edit the top_block.py
where is it?
Re: error with sink
Posted: Fri Sep 06, 2013 5:22 am
by bpadalino
When you generate the flowgraph (the icon that is the pyramid pointing to the ball), it usually says:
Code: Select all
Generating: "/path/to/top_block.py"
That is where you can edit the top block and remove the _c if you like. As for the other question - was the gnuradio install you had a fresh 3.7 or was it an upgrade from 3.6?
Re: error with sink
Posted: Sat Sep 07, 2013 6:55 am
by on4bhm
i used this site to get started:
http://rd.csp.it/archives/2467
so it was 3.6
then got the latest source code and tried to build it. this was not succesfull the first time...
had to search for several solutions...
but finally it compiled and installed.
Re: error with sink
Posted: Sat Sep 07, 2013 8:28 am
by bpadalino
So are you now able to run your flow graphs successfully with bladeRF hardware?
Re: error with sink
Posted: Sat Sep 07, 2013 2:52 pm
by on4bhm
no there is no _c anywhere in my top_block.py
this is my top_block.py for the moment
#!/usr/bin/env python
##################################################
# Gnuradio Python Flow Graph
# Title: Top Block
# Generated: Sat Sep 7 14:35:40 2013
##################################################
from gnuradio import eng_notation
from gnuradio import gr
from gnuradio import wxgui
from gnuradio.eng_option import eng_option
from gnuradio.fft import window
from gnuradio.filter import firdes
from gnuradio.wxgui import fftsink2
from grc_gnuradio import wxgui as grc_wxgui
from optparse import OptionParser
import osmosdr
import wx
class top_block(grc_wxgui.top_block_gui):
def __init__(self):
grc_wxgui.top_block_gui.__init__(self, title="Top Block")
##################################################
# Variables
##################################################
self.samp_rate = samp_rate = 1e6
##################################################
# Blocks
##################################################
self.wxgui_fftsink2_0 = fftsink2.fft_sink_c(
self.GetWin(),
baseband_freq=0,
y_per_div=10,
y_divs=10,
ref_level=0,
ref_scale=2.0,
sample_rate=samp_rate,
fft_size=1024,
fft_rate=15,
average=False,
avg_alpha=None,
title="FFT Plot",
peak_hold=False,
)
self.Add(self.wxgui_fftsink2_0.win)
self.osmosdr_source_0 = osmosdr.source( args="nchan=" + str(1) + " " + "" )
self.osmosdr_source_0.set_sample_rate(samp_rate)
self.osmosdr_source_0.set_center_freq(432e6, 0)
self.osmosdr_source_0.set_freq_corr(0, 0)
self.osmosdr_source_0.set_dc_offset_mode(0, 0)
self.osmosdr_source_0.set_iq_balance_mode(0, 0)
self.osmosdr_source_0.set_gain_mode(0, 0)
self.osmosdr_source_0.set_gain(10, 0)
self.osmosdr_source_0.set_if_gain(20, 0)
self.osmosdr_source_0.set_bb_gain(20, 0)
self.osmosdr_source_0.set_antenna("", 0)
self.osmosdr_source_0.set_bandwidth(0, 0)
self.osmosdr_sink_0 = osmosdr.sink( args="nchan=" + str(1) + " " + "" )
self.osmosdr_sink_0.set_sample_rate(samp_rate)
self.osmosdr_sink_0.set_center_freq(1296e6, 0)
self.osmosdr_sink_0.set_freq_corr(0, 0)
self.osmosdr_sink_0.set_gain(10, 0)
self.osmosdr_sink_0.set_if_gain(20, 0)
self.osmosdr_sink_0.set_bb_gain(20, 0)
self.osmosdr_sink_0.set_antenna("", 0)
self.osmosdr_sink_0.set_bandwidth(0, 0)
##################################################
# Connections
##################################################
self.connect((self.osmosdr_source_0, 0), (self.osmosdr_sink_0, 0))
self.connect((self.osmosdr_source_0, 0), (self.wxgui_fftsink2_0, 0))
# QT sink close method reimplementation
def get_samp_rate(self):
return self.samp_rate
def set_samp_rate(self, samp_rate):
self.samp_rate = samp_rate
self.osmosdr_sink_0.set_sample_rate(self.samp_rate)
self.osmosdr_source_0.set_sample_rate(self.samp_rate)
self.wxgui_fftsink2_0.set_sample_rate(self.samp_rate)
if __name__ == '__main__':
parser = OptionParser(option_class=eng_option, usage="%prog: [options]")
(options, args) = parser.parse_args()
tb = top_block()
tb.Start(True)
tb.Wait()
linaro@linaro-ubuntu-desktop:~$
Re: error with sink
Posted: Sat Sep 07, 2013 3:44 pm
by bpadalino
So are you getting the same error as before? Or a different one?
Re: error with sink
Posted: Sun Sep 08, 2013 2:44 am
by on4bhm
the same:
runtime error: resolve_port:
hierarchical block 'sink_impl': input 0 is not connected internally
Re: error with sink
Posted: Mon Sep 09, 2013 6:48 am
by on4bhm
can someone try my grc file above?
thanks