error with sink

Having issues with the site, hardware, source code, or any other issues?
on4bhm
Posts: 36
Joined: Thu Aug 22, 2013 12:07 pm

error with sink

Post 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?
on4bhm
Posts: 36
Joined: Thu Aug 22, 2013 12:07 pm

Re: error with sink

Post 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?
bpadalino
Posts: 303
Joined: Mon Mar 04, 2013 4:53 pm

Re: error with sink

Post 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.
on4bhm
Posts: 36
Joined: Thu Aug 22, 2013 12:07 pm

Re: error with sink

Post 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
on4bhm
Posts: 36
Joined: Thu Aug 22, 2013 12:07 pm

Re: error with sink

Post by on4bhm »

Hi,

I did another test.
i want to use rtl-sdr as source and bladeRF as sink
i get the same error!
bpadalino
Posts: 303
Joined: Mon Mar 04, 2013 4:53 pm

Re: error with sink

Post 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.
on4bhm
Posts: 36
Joined: Thu Aug 22, 2013 12:07 pm

Re: error with sink

Post 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?
on4bhm
Posts: 36
Joined: Thu Aug 22, 2013 12:07 pm

Re: error with sink

Post by on4bhm »

how can i edit the top_block.py

where is it?
bpadalino
Posts: 303
Joined: Mon Mar 04, 2013 4:53 pm

Re: error with sink

Post 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?
on4bhm
Posts: 36
Joined: Thu Aug 22, 2013 12:07 pm

Re: error with sink

Post 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.
bpadalino
Posts: 303
Joined: Mon Mar 04, 2013 4:53 pm

Re: error with sink

Post by bpadalino »

So are you now able to run your flow graphs successfully with bladeRF hardware?
on4bhm
Posts: 36
Joined: Thu Aug 22, 2013 12:07 pm

Re: error with sink

Post 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:~$
bpadalino
Posts: 303
Joined: Mon Mar 04, 2013 4:53 pm

Re: error with sink

Post by bpadalino »

So are you getting the same error as before? Or a different one?
on4bhm
Posts: 36
Joined: Thu Aug 22, 2013 12:07 pm

Re: error with sink

Post by on4bhm »

the same:
runtime error: resolve_port:
hierarchical block 'sink_impl': input 0 is not connected internally
on4bhm
Posts: 36
Joined: Thu Aug 22, 2013 12:07 pm

Re: error with sink

Post by on4bhm »

can someone try my grc file above?

thanks
Post Reply