RE: OOT-Modul and Callback

2023-03-28 Thread Info
Hello,

where can I look, why the GRC don't create

a callback statement in the generated python file?

 

 

From: discuss-gnuradio-bounces+info=kemnas@gnu.org
 On Behalf Of Info
Sent: Montag, 27. März 2023 09:42
To: DiscussGnuRadio 
Subject: OOT-Modul and Callback

 

Hello,

 

I have an OOT Block with a bool parameter and try to set

the parameter with a toggle switch. But it don't work.

 

I have seen that in the generated python file the callback is missing:

 

def set_select(self, select):

self.select = select

Here I expected the callback to set the select:

self.blockname.set_select(self.select)

 

in the yml file I have:

templates:

  imports: from gnuradio import myModule

  make: myModule.addSubSelect(${selector})

  callbacks:

- set_selector($(selector))

 

and in the python file I have:

def set_selector(self, selector):

self.selector = selector 

 

Is this a bug, or must I define something more...

 

Thanks

Karlheinz

 



Boost lib thread issue

2023-03-28 Thread Dennis Joosens
Hi,

I am sporadically (after a few hours of running) getting this message from 
Boost when I run my flowgraph (call the generated Python code from another 
python file):

"thread_body_wrapper :error: ERROR thread[thread-per-block[0]: ]: boost::too_many_args: format-string referred to fewer 
arguments than were passed"

This makes my Python code to stop working since I can't easily catch this error.
The flowgraph records the data generated by 2 USRP B210' simultaneously (see 
attachment). The arguments (parameters) of this flowgraph are changed with 
another Python script by simply using os.system() in Python.

I am running this software on a intel NUC with the following software:
GNU Radio version 3.10.5.1 (Python 3.10.6)
UHD version 4.1.0.5-3

Any thoughts about what could cause this will be appreciated.

Thanks!

Dennis



gw2_4_channels.grc
Description: gw2_4_channels.grc


AW: AW: AW: AW: AW: Import Error "undefined symbol"

2023-03-28 Thread Beckmann, Niklas

Hi,


> Why 3.10.4.0 and not the latest 3.10 (currently is 3.10.5.1)?

I am porting modules from 3.7 to 3.10 and when I started porting, 3.10.4.0 was 
the newest version.


> How did you install gnuradio previously and how did you uninstall it? Make 
> sure you don't have two gnuradio versions installed in parallel - one from 
> deb/apt packages in /usr and a second one from source in /usr/local.

I uninstalled it as given on the GRC-wiki: "sudo apt remove gnuradio"


> How did you install the debug symbols? Before or after installing from source?

I did install debug symbols after installing from source, sould i maybe try 
install debug symbols before installation?


Does it help if I give the code of the according block? I am really running out 
of ideas here...


Thank you so much for you help until here 😊


Best,

N




Von: Vasil Velichkov 
Gesendet: Mittwoch, 22. März 2023 14:02:33
An: Beckmann, Niklas
Cc: discuss-gnuradio@gnu.org
Betreff: Re: AW: AW: AW: AW: Import Error "undefined symbol"

Hi Niklas,

On 22/03/2023 01.03, Beckmann, Niklas wrote:
> I just un- and reinstalled gnuradio from source (basically following the 
> steps at the wiki)... that did not solve the problem.

How did you install gnuradio previously and how did you uninstall it? Make sure 
you don't have two gnuradio versions installed in parallel - one from deb/apt 
packages in /usr and a second one from source in /usr/local.

> Im on version 3.10.4.0 and im on Ubuntu 20.04.

Why 3.10.4.0 and not the latest 3.10 (currently is 3.10.5.1)?

> And i found when gnuradio segfaults: it happens when I add a variable block 
> with
>
> "mymodule.phy_header().formatter()"

What is the phy_header's type? Is it a function or class?

> @Vasil I did install the debug symbols, but when I do the command,

How did you install the debug symbols? Before or after installing from source?

> it still shows
>
> Reading symbols from python...
> (No debugging symbols found in python)

We don't need python debug symbols as this segfault is not in the python and we 
are not going to debug the python executable.

> And the rest of the output is still the same...so I dont know what wrong 
> here. That indicates that the installation of the debug symbols went wrong?

That's strange. Is this with gnuradio installed from source?

Regards,
Vasil


Re: AW: AW: AW: AW: AW: Import Error "undefined symbol"

2023-03-28 Thread Vasil Velichkov
Hi Niklas,

On 28/03/2023 19.20, Beckmann, Niklas wrote:

>> Why 3.10.4.0 and not the latest 3.10 (currently is 3.10.5.1)?
> 
> I am porting modules from 3.7 to 3.10 and when I started porting, 3.10.4.0 
> was the newest version.

OK.  
>> How did you install gnuradio previously and how did you uninstall it? Make 
>> sure you don't have two gnuradio versions installed in parallel - one from 
>> deb/apt packages in /usr and a second one from source in /usr/local.
> 
> I uninstalled it as given on the GRC-wiki: "sudo apt remove gnuradio"

OK.

>> How did you install the debug symbols? Before or after installing from 
>> source?
> 
> I did install debug symbols after installing from source, sould i maybe try 
> install debug symbols before installation?

The debug symbols package is only needed for the version installed with apt. 
You no longer need it as you've removed the gnuradio package and re-installed 
from source. Remove this debug symbols package as well.

When installing from source make sure you are building with debug symbols (-g, 
-g3 or -ggdb flags in CFLAGS and CXXFLAGS). Set CMAKE_BUILD_TYPE to 
RelWithDebInfo

 cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..

Then run

 make clean
 make VERBOSE=1 | grep "\-g"

and check that -g flag is present in the output. After the full rebuild you 
need to reinstall and hopefully this time the backtrace would contains some 
more information.

> Does it help if I give the code of the according block? I am really running 
> out of ideas here...

It could help.

Regards,
Vasil



custom source block in python

2023-03-28 Thread GNU Radio, the Free & Open-Source Toolkit for Software Radio
hi everyone

I have been working on a block that takes measurements from a device
but when I connect it
to a QT gui time sink block, I only get the instantaneous measurement
(just a flat line)
and the shape of the curve over time is not recorded.

Does anyone know how to get the curve to be displayed and not just the
last instantaneous value?

i can attach the code that i have been working on if you need you see it

good day


GNURadio/USRP stream tag execution not as expected

2023-03-28 Thread Nicolas Buhr
Hi everyone,

I already posted this to stackoverflow, but maybe somebody here can help me as 
well.

I’m working with a USRP B210/X310 and I’m trying to send a frame with 
containing some payload, with synchronization sequences before and after the 
payload. For interesting measurements bit error rate measurements, I want to 
get a low SNR for the payload. Since I need a much better SNR for more 
synchronization, I’m trying to send the synchronization sequence with a high 
gain, while sending the payload with a much lower gain.

Trying to implement this I encountered some unexpected behavior while using the 
tagged stream commands for the GNURadio block. So I went back and made the most 
simple setup, I could imagine.

The results and the actual problem can be seen in the screenshots in my 
stackoverflow post:
https://stackoverflow.com/questions/75869595/gnuradio-usrp-stream-tag-execution-not-as-expected

Any ideas, where to look for/how to remove the error?


Thanks in advance,

Nicolas Buhr

Re: custom source block in python

2023-03-28 Thread Nicolas Buhr
Hi,

I think the code of your custom block, its settings, as well as the settings of 
the gui time sink might be helpful.

Nicolas

> Am 28.03.2023 um 21:18 schrieb JORGE GONZALEZ ORELLANA via GNU Radio, the 
> Free & Open-Source Toolkit for Software Radio :
> 
> 
> hi everyone
> 
> I have been working on a block that takes measurements from a device but when 
> I connect it 
> to a QT gui time sink block, I only get the instantaneous measurement (just a 
> flat line) 
> and the shape of the curve over time is not recorded.
> 
> Does anyone know how to get the curve to be displayed and not just the last 
> instantaneous value?
> 
> i can attach the code that i have been working on if you need you see it
> 
> good day


AW: AW: AW: AW: AW: AW: Import Error "undefined symbol"

2023-03-28 Thread Beckmann, Niklas

Hi Vasil,

thank you so far, this is what I get now when I do backtrace.

[New Thread 0x7fffe0c4f700 (LWP 172481)]
[Thread 0x7087c700 (LWP 172476) exited]
[Thread 0x7fffdbfff700 (LWP 172479) exited]
[New Thread 0x7fffdbfff700 (LWP 172482)]
[New Thread 0x7087c700 (LWP 172483)]
[Thread 0x7fffdbfff700 (LWP 172482) exited]
[Thread 0x7087c700 (LWP 172483) exited]
--Type  for more, q to quit, c to continue without paging--

Thread 1 "python" received signal SIGSEGV, Segmentation fault.
0x7fffdaa52c6b in pybind11::detail::same_type (rhs=..., lhs=...)
at /usr/include/pybind11/detail/internals.h:55
55 inline bool same_type(const std::type_info &lhs, const std::type_info &rhs) 
{ return lhs == rhs; }
(gdb) backtrace
#0  0x7fffdaa52c6b in pybind11::detail::same_type(std::type_info const&, 
std::type_info const&) (rhs=..., lhs=...) at 
/usr/include/pybind11/detail/internals.h:55
#1  
pybind11::detail::type_caster_base::src_and_type(gr::digital::packet_header_default
 const*)
(src=0x7fffe3519cf0 )
at /usr/include/pybind11/cast.h:852
#2  
pybind11::detail::type_caster_base::cast_holder(gr::digital::packet_header_default
 const*, void const*)
(holder=0x7fff7cd0, src=0x7fffe3519cf0 ) at /usr/include/pybind11/cast.h:877
#3  
pybind11::detail::copyable_holder_caster 
>::cast(std::shared_ptr const&, 
pybind11::return_value_policy, pybind11::handle)
(src=std::shared_ptr (use count 
25760825, weak count -1) = {...}) at /usr/include/pybind11/cast.h:1466
#4  
pybind11::cpp_function::initialize,
 gr::digital::packet_header_default, , pybind11::name, pybind11::is_method, 
pybind11::sibling, char 
const*>(std::shared_ptr 
(gr::digital::packet_header_default::*)(), pybind11::name const&, 
pybind11::is_method const&, pybind11::sibling const&, char const* 
const&)::{lambda(gr::digital::packet_header_default*)#1}, 
std::shared_ptr, 
gr::digital::packet_header_default*, pybind11::name, pybind11::is_method, 
pybind11::sibling, char 
const*>(pybind11::cpp_function::initialize,
 gr::digital::packet_header_default, , pybind11::name,--Type  for more, q 
to quit, c --Type  for more, q to quit, c to continue without paging--
 pybind11::is_method, pybind11::sibling, char 
const*>(std::shared_ptr 
(gr::digital::packet_header_default::*)(), pybind11::name const&, 
pybind11::is_method const&, pybind11::sibling const&, char const* 
const&)::{lambda(gr::digital::packet_header_default*)#1}&&, 
std::shared_ptr 
(*)(gr::digital::packet_header_default*), pybind11::name const&, 
pybind11::is_method const&, pybind11::sibling const&, char const* 
const&)::{lambda(pybind11::detail::function_call&)#3}::operator()(pybind11::detail::function_call)
 const (call=..., this=0x0)
at /usr/include/pybind11/pybind11.h:159
#5  
pybind11::cpp_function::initialize,
 gr::digital::packet_header_default, , pybind11::name, pybind11::is_method, 
pybind11::sibling, char 
const*>(std::shared_ptr 
(gr::digital::packet_header_default::*)(), pybind11::name const&, 
pybind11::is_method const&, pybind11::sibling const&, char const* 
const&)::{lambda(gr::digital::packet_header_default*)#1}, 
std::shared_ptr, 
gr::digital::packet_header_default*, pybind11::name, pybind11::is_method, 
pybind11::sibling, char 
const*>(pybind11::cpp_function::initialize,
 gr::digital::packet_header_default, , pybind11::name, pybind11::is_method, 
pybind11::sibling, char 
const*>(std::shared_ptr 
(gr::digital::packet_header_default::*)(), pybind11::name const&, 
pybind11::is_method const&, pybind11::sibling const&, char const* 
const&)::{lambda(gr::digital::packet_header_default*)#1}&&, 
std::shared_ptr 
(*)(gr::digital::packet_header_default*), pybind11::name const&, 
pybind11::is_method const&, pybind11::sibling const&, char const* 
const&)::{lambda(pybind11::detail::function_call&)#3}::_FUN(pybind11::detail::function_call)
 () at /usr/include/pybind11/pybind11.h:137
#6  0x7fffda94bfcf in pybind11::cpp_function::dispatcher(_object*, 
_object*, _object*) (self=, args_in=0x7fffd952a1f0, 
kwargs_in=0x0) at /usr/include/pybind11/pybind11.h:624
#7  0x005f6489 in PyCFunction_Call ()
#8  0x005f7056 in _PyObject_MakeTpCall ()
#9  0x0050b993 in  ()
#10 0x00570ac2 in _PyEval_EvalFrameDefault ()
#11 0x00569cea in _PyEval_EvalCodeWithName ()
#12 0x0068e7b7 in PyEval_EvalCode ()
#13 0x00680001 in  ()
#14 0x0068007f in  ()
#15 0x006801cf in PyRun_StringFlags ()
#16 0x0060138e in  ()
#17 0x005c52f0 in  ()
#18 0x0056b9fd in _PyEval_EvalFrameDefault ()
#19 0x00569cea in _PyEval_EvalCodeWithName ()
#20 0x005f6a13 in _PyFunction_Vectorcall ()
#21 0x0056bbdf in _PyEval_EvalFrameDefault ()
#22 0x005f6836 in _PyFunction_Vectorcall ()
#23 0x0056bbdf in _PyEval_EvalFrameDefault ()
#24 0x005f6836 in _PyFunction_Vectorcall ()
#25 0x0056bbdf in _PyEval_EvalFrameDefault ()
#26 0x005f6836 in _PyFunction_Vectorcall ()
#27 0