Sunday, June 30, 2024

Re: error when linking display_qt

This problem has been resolved; becoming apparent after including -DCMAKE_FIND_DEBUG_MODE=ON to the cmake invocation. The QWT library was explicitly set to
(the FILE PATH) -DQWT_LIBRARIES=/usr/lib64/ as opposed to (THE LIBRARY) -DQWT_LIBRARIES=/usr/lib64/libqwt-qt6.so
The library location: /usr/lib64/libqwt-qt5.so -> libqwt-qt5.so.6.2.0
I now have only one failed test to debug; moving on.

Rick

On 2024-06-28 15:51, aardric wrote:

> When building gnuradio using ~/.local as the make prefix from 3.10.0
> (commit 207d020f1) source with openSuSE Leap 15.6, the following error
> upon linking occurs:
>
> /usr/lib64/gcc/x86_64-suse-linux/13/../../../../x86_64-suse-linux/bin/ld: ../../lib/libgnuradio-qtgui.so.3.10.10.0: undefined reference to `QwtPlotItem::getCanvasMarginHint(QwtScaleMap const&, QwtScaleMap const&, QRectF const&, double&, double&, double&, double&) const'
> collect2: error: ld returned 1 exit status
> make[2]: *** [gr-qtgui/examples/c++/CMakeFiles/display_qt.dir/build.make:133: gr-qtgui/examples/c++/display_qt] Error 1
> make[1]: *** [CMakeFiles/Makefile2:6820: gr-qtgui/examples/c++/CMakeFiles/display_qt.dir/all] Error 2
>
>
>
> The build configuration appears to be successful. QT5, QWT6(QT5),
> python3.11 were all found. I have a feeing that this is not a code issue
> but I am unsure of how to obtain further information. Any suggestions
> would be greatly appreciated.
>
> Rick
>
>

Saturday, June 29, 2024

Cannot find GNU Radio "config.conf" file

What?

I can't find 'config.conf' on Radioconda Windows 10.

I'm using Radioconda Release 24.05.29

Searched all over - Anyone know where it is hidden?

Why?

I'm trying to force an editor for the embedded python blocks and it is noted that I can add a few lines in config.conf to force an editor as per,

https://wiki.gnuradio.org/index.php/Embedded_Python_Block#To_specify_a_default_editor_in_Windows

The file path listed in the documentation above does not exist. If I make the path and add a 'config.conf' file to it - GNU Radio Companion does not pick it up.

My install does make a '.gnuradio' directory at,

C:\Users\steve\.gnuradio

And there is a grc.conf file in it that lists things like: Most recently used flowgraphs, etc.

If I similarly add a 'config.conf' file there - GNU Radio Companion does not pick it up.

Any ideas?


System Information

OS Windows 10 22H2
Radioconda installed through Github windows installer

Specific Version

GNU Radio Companion V = 3.10.10.0

  

Friday, June 28, 2024

error when linking display_qt

When building gnuradio using ~/.local as the make prefix from 3.10.0
(commit 207d020f1) source with openSuSE Leap 15.6, the following error
upon linking occurs:

/usr/lib64/gcc/x86_64-suse-linux/13/../../../../x86_64-suse-linux/bin/ld: ../../lib/libgnuradio-qtgui.so.3.10.10.0: undefined reference to `QwtPlotItem::getCanvasMarginHint(QwtScaleMap const&, QwtScaleMap const&, QRectF const&, double&, double&, double&, double&) const'
collect2: error: ld returned 1 exit status
make[2]: *** [gr-qtgui/examples/c++/CMakeFiles/display_qt.dir/build.make:133: gr-qtgui/examples/c++/display_qt] Error 1
make[1]: *** [CMakeFiles/Makefile2:6820: gr-qtgui/examples/c++/CMakeFiles/display_qt.dir/all] Error 2



The build configuration appears to be successful. QT5, QWT6(QT5),
python3.11 were all found. I have a feeing that this is not a code issue
but I am unsure of how to obtain further information. Any suggestions
would be greatly appreciated.

Rick

Thursday, June 27, 2024

Invitation to Special Session “Innovative Security Concepts and Applications in Aerospace Systems” at IEEE TechDefense 2024

Dear Colleagues,

I am pleased to invite you to the Special Session entitled “Innovative Security Concepts and Applications in Aerospace Systems” at IEEE TechDefense 2024 (Index | IEEE TechDefense 2024) organized by the Security Department of Italian Aerospace Research Centre (CIRA), which will be held in Naples (Italy) on 11-13 November.

You may find further details at Special Session 10 | IEEE TechDefense 2024.

If you would like to submit a paper to the workshop and if you need further information or clarification about the organization, please do not hesitate to contact me.

*Despite the paper tentative title and the list of authors should be provided within 31/07/2024, the deadline for EXTENDED abstract submission will be likely extended to 31/08/2024*.

Best regards.

 

Ivan Iudice

 

 

Ivan Iudice, Ph. D.

CIRA – Italian Aerospace Research Centre

Security Department

Via Maiorise – 81043 – Capua (CE) – Italy

Ph.: +39 0823 623181

Fax: +39 0823 623126

http://www.cira.it

SPRINT group – Signal PRocessing and INnovative Transmissions

Via Claudio 21 – 80125 – Naples – Italy

http://sprint.dieti.unina.it

Tuesday, June 25, 2024

Trying to Receive the ADS-B signal and trying to open a external software

#!/usr/bin/env python3
# -*- coding: utf-8 -*-

#
# SPDX-License-Identifier: GPL-3.0
#
# GNU Radio Python Flow Graph
# Title: ADS-B Receiver
# Author: Matt Hostetter
# GNU Radio version: 3.10.9.2

from PyQt5 import Qt
from gnuradio import qtgui
from PyQt5 import QtCore
from gnuradio import analog
from gnuradio import blocks
from gnuradio import gr
from gnuradio.filter import firdes
from gnuradio.fft import window
import sys
import signal
from PyQt5 import Qt
from argparse import ArgumentParser
from gnuradio.eng_arg import eng_float, intx
from gnuradio import eng_notation
import gnuradio.adsb as adsb
import osmosdr
import time
import sip

class adsb_rx(gr.top_block, Qt.QWidget):

def __init__(self):
gr.top_block.__init__(self, "ADS-B Receiver", catch_exceptions=True)
Qt.QWidget.__init__(self)
self.setWindowTitle("ADS-B Receiver")
qtgui.util.check_set_qss()
try:
self.setWindowIcon(Qt.QIcon.fromTheme('gnuradio-grc'))
except BaseException as exc:
print(f"Qt GUI: Could not set Icon: {str(exc)}", file=sys.stderr)
self.top_scroll_layout = Qt.QVBoxLayout()
self.setLayout(self.top_scroll_layout)
self.top_scroll = Qt.QScrollArea()
self.top_scroll.setFrameStyle(Qt.QFrame.NoFrame)
self.top_scroll_layout.addWidget(self.top_scroll)
self.top_scroll.setWidgetResizable(True)
self.top_widget = Qt.QWidget()
self.top_scroll.setWidget(self.top_widget)
self.top_layout = Qt.QVBoxLayout(self.top_widget)
self.top_grid_layout = Qt.QGridLayout()
self.top_layout.addLayout(self.top_grid_layout)

self.settings = Qt.QSettings("GNU Radio", "adsb_rx")

try:
geometry = self.settings.value("geometry")
if geometry:
self.restoreGeometry(geometry)
except BaseException as exc:
print(f"Qt GUI: Could not restore geometry: {str(exc)}", file=sys.stderr)

##################################################
# Variables
##################################################
self.threshold = threshold = 4
self.sample_rate = sample_rate = 2e6
self.gain = gain = 22.9
self.freq = freq = 1091*1e6

##################################################
# Blocks
##################################################

self._threshold_range = qtgui.Range(1, 7, 0.5, 4, 200)
self._threshold_win = qtgui.RangeWidget(self._threshold_range, self.set_threshold, "'threshold'", "counter_slider", float, QtCore.Qt.Horizontal)
self.top_layout.addWidget(self._threshold_win)
self._gain_range = qtgui.Range(20, 60, 2, 22.9, 200)
self._gain_win = qtgui.RangeWidget(self._gain_range, self.set_gain, "'gain'", "counter_slider", float, QtCore.Qt.Horizontal)
self.top_layout.addWidget(self._gain_win)
self.rtlsdr_source_0 = osmosdr.source(
args="numchan=" + str(1) + " " + ""
)
self.rtlsdr_source_0.set_sample_rate(sample_rate)
self.rtlsdr_source_0.set_center_freq(freq, 0)
self.rtlsdr_source_0.set_freq_corr(0, 0)
self.rtlsdr_source_0.set_dc_offset_mode(2, 0)
self.rtlsdr_source_0.set_iq_balance_mode(2, 0)
self.rtlsdr_source_0.set_gain_mode(False, 0)
self.rtlsdr_source_0.set_gain(gain, 0)
self.rtlsdr_source_0.set_if_gain(20, 0)
self.rtlsdr_source_0.set_bb_gain(20, 0)
self.rtlsdr_source_0.set_antenna('', 0)
self.rtlsdr_source_0.set_bandwidth(0, 0)
self.qtgui_time_sink_x_0_0_0 = qtgui.time_sink_f(
300, #size
int(sample_rate), #samp_rate
"Demodulated", #name
2, #number of inputs
None # parent
)
self.qtgui_time_sink_x_0_0_0.set_update_time(5)
self.qtgui_time_sink_x_0_0_0.set_y_axis(0, 1)

self.qtgui_time_sink_x_0_0_0.set_y_label('Amplitude', "")

self.qtgui_time_sink_x_0_0_0.enable_tags(True)
self.qtgui_time_sink_x_0_0_0.set_trigger_mode(qtgui.TRIG_MODE_TAG, qtgui.TRIG_SLOPE_POS, 0, 1.25e-6, 0, "burst")
self.qtgui_time_sink_x_0_0_0.enable_autoscale(True)
self.qtgui_time_sink_x_0_0_0.enable_grid(True)
self.qtgui_time_sink_x_0_0_0.enable_axis_labels(True)
self.qtgui_time_sink_x_0_0_0.enable_control_panel(False)
self.qtgui_time_sink_x_0_0_0.enable_stem_plot(False)

self.qtgui_time_sink_x_0_0_0.disable_legend()

labels = ['', '', '', '', '',
'', '', '', '', '']
widths = [1, 1, 1, 1, 1,
1, 1, 1, 1, 1]
colors = ['blue', 'red', 'green', 'black', 'cyan',
'magenta', 'yellow', 'dark red', 'dark green', 'dark blue']
alphas = [1.0, 1.0, 1.0, 1.0, 1.0,
1.0, 1.0, 1.0, 1.0, 1.0]
styles = [1, 1, 1, 1, 1,
1, 1, 1, 1, 1]
markers = [0, -1, -1, -1, -1,
-1, -1, -1, -1, -1]


for i in range(2):
if len(labels[i]) == 0:
self.qtgui_time_sink_x_0_0_0.set_line_label(i, "Data {0}".format(i))
else:
self.qtgui_time_sink_x_0_0_0.set_line_label(i, labels[i])
self.qtgui_time_sink_x_0_0_0.set_line_width(i, widths[i])
self.qtgui_time_sink_x_0_0_0.set_line_color(i, colors[i])
self.qtgui_time_sink_x_0_0_0.set_line_style(i, styles[i])
self.qtgui_time_sink_x_0_0_0.set_line_marker(i, markers[i])
self.qtgui_time_sink_x_0_0_0.set_line_alpha(i, alphas[i])

self._qtgui_time_sink_x_0_0_0_win = sip.wrapinstance(self.qtgui_time_sink_x_0_0_0.qwidget(), Qt.QWidget)
self.top_layout.addWidget(self._qtgui_time_sink_x_0_0_0_win)
self.qtgui_time_sink_x_0_0 = qtgui.time_sink_c(
1024, #size
int(sample_rate), #samp_rate
"signal source", #name
1, #number of inputs
None # parent
)
self.qtgui_time_sink_x_0_0.set_update_time(1.0/100.0)
self.qtgui_time_sink_x_0_0.set_y_axis(0, 1)

self.qtgui_time_sink_x_0_0.set_y_label('Amplitude', "")

self.qtgui_time_sink_x_0_0.enable_tags(True)
self.qtgui_time_sink_x_0_0.set_trigger_mode(qtgui.TRIG_MODE_TAG, qtgui.TRIG_SLOPE_POS, 0, 1.25e-6, 0, "burst")
self.qtgui_time_sink_x_0_0.enable_autoscale(True)
self.qtgui_time_sink_x_0_0.enable_grid(True)
self.qtgui_time_sink_x_0_0.enable_axis_labels(True)
self.qtgui_time_sink_x_0_0.enable_control_panel(False)
self.qtgui_time_sink_x_0_0.enable_stem_plot(False)

self.qtgui_time_sink_x_0_0.disable_legend()

labels = ['', '', '', '', '',
'', '', '', '', '']
widths = [1, 1, 1, 1, 1,
1, 1, 1, 1, 1]
colors = ['blue', 'red', 'green', 'black', 'cyan',
'magenta', 'yellow', 'dark red', 'dark green', 'dark blue']
alphas = [1.0, 1.0, 1.0, 1.0, 1.0,
1.0, 1.0, 1.0, 1.0, 1.0]
styles = [1, 1, 1, 1, 1,
1, 1, 1, 1, 1]
markers = [0, -1, -1, -1, -1,
-1, -1, -1, -1, -1]


for i in range(2):
if len(labels[i]) == 0:
if (i % 2 == 0):
self.qtgui_time_sink_x_0_0.set_line_label(i, "Re{{Data {0}}}".format(i/2))
else:
self.qtgui_time_sink_x_0_0.set_line_label(i, "Im{{Data {0}}}".format(i/2))
else:
self.qtgui_time_sink_x_0_0.set_line_label(i, labels[i])
self.qtgui_time_sink_x_0_0.set_line_width(i, widths[i])
self.qtgui_time_sink_x_0_0.set_line_color(i, colors[i])
self.qtgui_time_sink_x_0_0.set_line_style(i, styles[i])
self.qtgui_time_sink_x_0_0.set_line_marker(i, markers[i])
self.qtgui_time_sink_x_0_0.set_line_alpha(i, alphas[i])

self._qtgui_time_sink_x_0_0_win = sip.wrapinstance(self.qtgui_time_sink_x_0_0.qwidget(), Qt.QWidget)
self.top_grid_layout.addWidget(self._qtgui_time_sink_x_0_0_win, 1, 0, 1, 2)
for r in range(1, 2):
self.top_grid_layout.setRowStretch(r, 1)
for c in range(0, 2):
self.top_grid_layout.setColumnStretch(c, 1)
self.qtgui_freq_sink_x_0_0 = qtgui.freq_sink_f(
1024, #size
window.WIN_BLACKMAN_hARRIS, #wintype
freq, #fc
(sample_rate*2), #bw
"ABS", #name
1,
None # parent
)
self.qtgui_freq_sink_x_0_0.set_update_time(0.10)
self.qtgui_freq_sink_x_0_0.set_y_axis((-140), 10)
self.qtgui_freq_sink_x_0_0.set_y_label('Relative Gain', 'dB')
self.qtgui_freq_sink_x_0_0.set_trigger_mode(qtgui.TRIG_MODE_FREE, 0.0, 0, "")
self.qtgui_freq_sink_x_0_0.enable_autoscale(False)
self.qtgui_freq_sink_x_0_0.enable_grid(False)
self.qtgui_freq_sink_x_0_0.set_fft_average(1.0)
self.qtgui_freq_sink_x_0_0.enable_axis_labels(True)
self.qtgui_freq_sink_x_0_0.enable_control_panel(False)
self.qtgui_freq_sink_x_0_0.set_fft_window_normalized(False)


self.qtgui_freq_sink_x_0_0.set_plot_pos_half(not True)

labels = ['', '', '', '', '',
'', '', '', '', '']
widths = [1, 1, 1, 1, 1,
1, 1, 1, 1, 1]
colors = ["blue", "red", "green", "black", "cyan",
"magenta", "yellow", "dark red", "dark green", "dark blue"]
alphas = [1.0, 1.0, 1.0, 1.0, 1.0,
1.0, 1.0, 1.0, 1.0, 1.0]

for i in range(1):
if len(labels[i]) == 0:
self.qtgui_freq_sink_x_0_0.set_line_label(i, "Data {0}".format(i))
else:
self.qtgui_freq_sink_x_0_0.set_line_label(i, labels[i])
self.qtgui_freq_sink_x_0_0.set_line_width(i, widths[i])
self.qtgui_freq_sink_x_0_0.set_line_color(i, colors[i])
self.qtgui_freq_sink_x_0_0.set_line_alpha(i, alphas[i])

self._qtgui_freq_sink_x_0_0_win = sip.wrapinstance(self.qtgui_freq_sink_x_0_0.qwidget(), Qt.QWidget)
self.top_layout.addWidget(self._qtgui_freq_sink_x_0_0_win)
self.qtgui_freq_sink_x_0 = qtgui.freq_sink_c(
1024, #size
window.WIN_BLACKMAN_hARRIS, #wintype
freq, #fc
(sample_rate*2), #bw
"RTL", #name
1,
None # parent
)
self.qtgui_freq_sink_x_0.set_update_time(0.10)
self.qtgui_freq_sink_x_0.set_y_axis((-140), 10)
self.qtgui_freq_sink_x_0.set_y_label('Relative Gain', 'dB')
self.qtgui_freq_sink_x_0.set_trigger_mode(qtgui.TRIG_MODE_FREE, 0.0, 0, "")
self.qtgui_freq_sink_x_0.enable_autoscale(False)
self.qtgui_freq_sink_x_0.enable_grid(False)
self.qtgui_freq_sink_x_0.set_fft_average(1.0)
self.qtgui_freq_sink_x_0.enable_axis_labels(True)
self.qtgui_freq_sink_x_0.enable_control_panel(False)
self.qtgui_freq_sink_x_0.set_fft_window_normalized(False)

labels = ['', '', '', '', '',
'', '', '', '', '']
widths = [1, 1, 1, 1, 1,
1, 1, 1, 1, 1]
colors = ["blue", "red", "green", "black", "cyan",
"magenta", "yellow", "dark red", "dark green", "dark blue"]
alphas = [1.0, 1.0, 1.0, 1.0, 1.0,
1.0, 1.0, 1.0, 1.0, 1.0]

for i in range(1):
if len(labels[i]) == 0:
self.qtgui_freq_sink_x_0.set_line_label(i, "Data {0}".format(i))
else:
self.qtgui_freq_sink_x_0.set_line_label(i, labels[i])
self.qtgui_freq_sink_x_0.set_line_width(i, widths[i])
self.qtgui_freq_sink_x_0.set_line_color(i, colors[i])
self.qtgui_freq_sink_x_0.set_line_alpha(i, alphas[i])

self._qtgui_freq_sink_x_0_win = sip.wrapinstance(self.qtgui_freq_sink_x_0.qwidget(), Qt.QWidget)
self.top_layout.addWidget(self._qtgui_freq_sink_x_0_win)
self.blocks_complex_to_mag_squared_0 = blocks.complex_to_mag_squared(1)
self.analog_const_source_x_0 = analog.sig_source_f(0, analog.GR_CONST_WAVE, 0, 0, (1*1e6))
self.adsb_framer_1 = adsb.framer(sample_rate, threshold)
self.adsb_demod_0 = adsb.demod(sample_rate)
self.adsb_decoder_0 = adsb.decoder("All Messages", "None", "Brief")


##################################################
# Connections
##################################################
self.msg_connect((self.adsb_demod_0, 'demodulated'), (self.adsb_decoder_0, 'demodulated'))
self.connect((self.adsb_demod_0, 0), (self.qtgui_freq_sink_x_0_0, 0))
self.connect((self.adsb_demod_0, 0), (self.qtgui_time_sink_x_0_0_0, 0))
self.connect((self.adsb_framer_1, 0), (self.adsb_demod_0, 0))
self.connect((self.analog_const_source_x_0, 0), (self.qtgui_time_sink_x_0_0_0, 1))
self.connect((self.blocks_complex_to_mag_squared_0, 0), (self.adsb_framer_1, 0))
self.connect((self.rtlsdr_source_0, 0), (self.blocks_complex_to_mag_squared_0, 0))
self.connect((self.rtlsdr_source_0, 0), (self.qtgui_freq_sink_x_0, 0))
self.connect((self.rtlsdr_source_0, 0), (self.qtgui_time_sink_x_0_0, 0))


def closeEvent(self, event):
self.settings = Qt.QSettings("GNU Radio", "adsb_rx")
self.settings.setValue("geometry", self.saveGeometry())
self.stop()
self.wait()

event.accept()

def get_threshold(self):
return self.threshold

def set_threshold(self, threshold):
self.threshold = threshold
self.adsb_framer_1.set_threshold(self.threshold)

def get_sample_rate(self):
return self.sample_rate

def set_sample_rate(self, sample_rate):
self.sample_rate = sample_rate
self.qtgui_freq_sink_x_0.set_frequency_range(self.freq, (self.sample_rate*2))
self.qtgui_freq_sink_x_0_0.set_frequency_range(self.freq, (self.sample_rate*2))
self.qtgui_time_sink_x_0_0.set_samp_rate(int(self.sample_rate))
self.qtgui_time_sink_x_0_0_0.set_samp_rate(int(self.sample_rate))
self.rtlsdr_source_0.set_sample_rate(self.sample_rate)

def get_gain(self):
return self.gain

def set_gain(self, gain):
self.gain = gain
self.rtlsdr_source_0.set_gain(self.gain, 0)

def get_freq(self):
return self.freq

def set_freq(self, freq):
self.freq = freq
self.qtgui_freq_sink_x_0.set_frequency_range(self.freq, (self.sample_rate*2))
self.qtgui_freq_sink_x_0_0.set_frequency_range(self.freq, (self.sample_rate*2))
self.rtlsdr_source_0.set_center_freq(self.freq, 0)


def main(top_block_cls=adsb_rx, options=None):

qapp = Qt.QApplication(sys.argv)

tb = top_block_cls()

tb.start()

tb.show()

def sig_handler(sig=None, frame=None):
tb.stop()
tb.wait()

Qt.QApplication.quit()

signal.signal(signal.SIGINT, sig_handler)
signal.signal(signal.SIGTERM, sig_handler)

timer = Qt.QTimer()
timer.start(500)
timer.timeout.connect(lambda: None)

qapp.exec_()

if __name__ == '__main__':
main()

Hi Friends,

I am trying to receive the ADS-B signals to identify the aircraft location , amplitude, speed, etc in GNU Radio using RTL-SDR V4. But in my output I can't receive the ADS-B signal. I have no idea how to check my Flowgraph. Screenshot and .grc file of my flowgraph is attached below. Also I want to connect this with an external software called VIRTUAL RADAR to locate the fligh. Please help me friends. Feel free to ask if any other information is required.
Thank you
Nitheesh Babu

Re: Can Embedded Python Blocks have callbacks?

Thanks!  That worked.  Here's a full working block:

"""
Embedded Python Blocks:

Each time this file is saved, GRC will instantiate the first class it finds
to get ports and parameters of your block. The arguments to __init__  will
be the parameters. All of them are required to have default values!
"""

import numpy as np
from gnuradio import gr

```
class blk(gr.sync_block):  # other base classes are basic_block, decim_block, interp_block
    """Embedded Python Block example - a simple multiply const"""

    def __init__(self, example_param=1.0):  # only default arguments here
        """arguments to this function show up as parameters in GRC"""
        gr.sync_block.__init__(
            self,
            name='Embedded Python Block',   # will show up in GRC
            in_sig=[np.complex64],
            out_sig=[np.complex64]
        )
        # if an attribute with the same name as a parameter is found,
        # a callback is registered (properties work, too).
        self.example_param = example_param

    def work(self, input_items, output_items):
        """example: multiply with constant"""
        output_items[0][:] = input_items[0] * self.example_param
        return len(output_items[0])
   
    @property
    def example_param(self):
        return self._example_param
 
    @example_param.setter
    def example_param(self, value):
       print('here')
       self._example_param = value
```


On Tue, Jun 25, 2024 at 8:33 AM Philipp Niedermayer <p.niedermayer@gsi.de> wrote:
As a workaround, use python's property construct to intercept changes on class attribute level:

class blk(...):
    def __init__(self, example_param=1.0):
        ...

        # [...] (properties work, too)
        self.example_param = example_param
   
    @property
    def example_param(self):
        return self._example_param
  
    @example_param.setter
    def example_param(self, value):
       print('here')
       self._example_param = value



From: Jameson Collins [mailto:jameson.collins@gmail.com]
Date: Thursday, June 20, 2024 at 14:10 UTC+2
Subject: Can Embedded Python Blocks have callbacks?

This was my concern, and it does appear to behave that way.

On Wed, Jun 19, 2024 at 4:34 PM Daniel Estévez <daniel@destevez.net> wrote:
On 19/06/2024 14:51, Jameson Collins wrote:
> I'm trying to use a callback to set a variable in an embedded python
> block.  Using the tutorial
> (https://wiki.gnuradio.org/index.php/Embedded_Python_Block
> <https://wiki.gnuradio.org/index.php/Embedded_Python_Block>) as an
> example I added the function below.  I've found that this callback never
> gets called when I update this value from a GUI.  Should it be?
>
> |def set_example_param(self, example_param): print("here")|

Hi Jameson,

I think Embedded Python blocks can only have (automatically generated)
callbacks for __init__() arguments that are assigned as

self.foo = foo

in the body of __init__() (the example template that you get when you
create a new Embedded Python block shows how this works).

If you need more complex callbacks, I think you need to create a regular
Python block in an OOT module.

Best,
Daniel.


Re: Can Embedded Python Blocks have callbacks?

As a workaround, use python's property construct to intercept changes on class attribute level:

class blk(...):
    def __init__(self, example_param=1.0):
        ...

        # [...] (properties work, too)
        self.example_param = example_param
   
    @property
    def example_param(self):
        return self._example_param
  
    @example_param.setter
    def example_param(self, value):
       print('here')
       self._example_param = value



From: Jameson Collins [mailto:jameson.collins@gmail.com]
Date: Thursday, June 20, 2024 at 14:10 UTC+2
Subject: Can Embedded Python Blocks have callbacks?

This was my concern, and it does appear to behave that way.

On Wed, Jun 19, 2024 at 4:34 PM Daniel Estévez <daniel@destevez.net> wrote:
On 19/06/2024 14:51, Jameson Collins wrote:
> I'm trying to use a callback to set a variable in an embedded python
> block.  Using the tutorial
> (https://wiki.gnuradio.org/index.php/Embedded_Python_Block
> <https://wiki.gnuradio.org/index.php/Embedded_Python_Block>) as an
> example I added the function below.  I've found that this callback never
> gets called when I update this value from a GUI.  Should it be?
>
> |def set_example_param(self, example_param): print("here")|

Hi Jameson,

I think Embedded Python blocks can only have (automatically generated)
callbacks for __init__() arguments that are assigned as

self.foo = foo

in the body of __init__() (the example template that you get when you
create a new Embedded Python block shows how this works).

If you need more complex callbacks, I think you need to create a regular
Python block in an OOT module.

Best,
Daniel.


Monday, June 24, 2024

[GSoC] FEC week 4 blog post

Hi all,

Just posted last week's update to my blog: https://kaylacomer.github.io/blog/. Closer to a functional Turbo encoder and decoder but still not quite there.

As always, you can view updates to my code here: https://github.com/kaylacomer/gr-fec_dev.

Best,
Kayla

Sunday, June 23, 2024

[GSoC] GRC week 4 update

Hi everyone,
Another update on my GSoC project in week 4, we restructure the GRC repo. Now GRC is using src layout instead of flat layout.

Read my newest post for more details.

Regards,

Zaky

Friday, June 21, 2024

Re: Looking to deprecate GRC_PREFS_PATH use in mingw64

Hi Marcus,

Thanks for the pointer. I think my problem occurs because of mixing.
I used Ryan's patch to get rid of the need to use GRC_BLOCKS_PATH at
the same time 7350 was put in. I mixed these two changes without
analyzing the logic and that was my mistake. Since I need to use one
environment variable, I might as well use two. I just need to figure
out how to make pacman spit out the requirement to set the environment
variables and I'll be happy with it.

Thanks again,

Chris


On Fri, Jun 21, 2024 at 2:21 PM Marcus Müller <marcus.mueller@ettus.com> wrote:
>
> Hi Chris,
>
> not sure if this is really what you're asking, but: Is this related to the changes made in
>
> https://github.com/gnuradio/gnuradio/pull/7350 (or 7404 on maint-3.10)?
>
> Best regards,
> Marcus
>
> On 21.06.24 19:52, Chris Gorman wrote:
> > Hello All,
> >
> > I'm trying to get a build of gnuradio running under mingw64. It is
> > installed and works mostly. I've patched it with Ryan Volz's patch
> > for removing the global_blocks_path in favour of using prefix to set
> > the blocks path. This works and I no longer need to set the
> > environment variable GRC_BLOCKS_PATH in my .bashrc to launch
> > gnuradio-companion.py.
> >
> > I'm wondering if there is an analogous solution to the use of
> > GRC_PREFS_PATH? I currently have to set GRC_PREFS_PATH to the
> > grc.conf file in my .bashrc to have gnuradio-companion.py to save the
> > file on exit. I don't have a problem with this, but it would be nice
> > to have it save the prefs path to a place in my home directory when it
> > exits without the use of the environment variable.
> >
> > I also noticed in my travels that the .config/gnuradio/grc.conf has
> > become a directory, I assume to facilitate the progression to using
> > the qt-gui. Is the correct location for the grc.conf file
> > .config/gnuradio/grc.conf/grc.conf?
> >
> > I'm currently running main's 5c1edfe06 git hash as qwt-qt5 is at 6.3.0
> > under mingw64 and the 3.10.10.0 release requires that qwt-qt5 be less
> > than 6.3.0. Perhaps I should be using a different branch?
> >
> > Thanks for your time.
> >
> > Chris
> >

Re: Looking to deprecate GRC_PREFS_PATH use in mingw64

Hi Chris,

not sure if this is really what you're asking, but: Is this related to the changes made in

https://github.com/gnuradio/gnuradio/pull/7350 (or 7404 on maint-3.10)?

Best regards,
Marcus

On 21.06.24 19:52, Chris Gorman wrote:
> Hello All,
>
> I'm trying to get a build of gnuradio running under mingw64. It is
> installed and works mostly. I've patched it with Ryan Volz's patch
> for removing the global_blocks_path in favour of using prefix to set
> the blocks path. This works and I no longer need to set the
> environment variable GRC_BLOCKS_PATH in my .bashrc to launch
> gnuradio-companion.py.
>
> I'm wondering if there is an analogous solution to the use of
> GRC_PREFS_PATH? I currently have to set GRC_PREFS_PATH to the
> grc.conf file in my .bashrc to have gnuradio-companion.py to save the
> file on exit. I don't have a problem with this, but it would be nice
> to have it save the prefs path to a place in my home directory when it
> exits without the use of the environment variable.
>
> I also noticed in my travels that the .config/gnuradio/grc.conf has
> become a directory, I assume to facilitate the progression to using
> the qt-gui. Is the correct location for the grc.conf file
> .config/gnuradio/grc.conf/grc.conf?
>
> I'm currently running main's 5c1edfe06 git hash as qwt-qt5 is at 6.3.0
> under mingw64 and the 3.10.10.0 release requires that qwt-qt5 be less
> than 6.3.0. Perhaps I should be using a different branch?
>
> Thanks for your time.
>
> Chris
>

Looking to deprecate GRC_PREFS_PATH use in mingw64

Hello All,

I'm trying to get a build of gnuradio running under mingw64. It is
installed and works mostly. I've patched it with Ryan Volz's patch
for removing the global_blocks_path in favour of using prefix to set
the blocks path. This works and I no longer need to set the
environment variable GRC_BLOCKS_PATH in my .bashrc to launch
gnuradio-companion.py.

I'm wondering if there is an analogous solution to the use of
GRC_PREFS_PATH? I currently have to set GRC_PREFS_PATH to the
grc.conf file in my .bashrc to have gnuradio-companion.py to save the
file on exit. I don't have a problem with this, but it would be nice
to have it save the prefs path to a place in my home directory when it
exits without the use of the environment variable.

I also noticed in my travels that the .config/gnuradio/grc.conf has
become a directory, I assume to facilitate the progression to using
the qt-gui. Is the correct location for the grc.conf file
.config/gnuradio/grc.conf/grc.conf?

I'm currently running main's 5c1edfe06 git hash as qwt-qt5 is at 6.3.0
under mingw64 and the 3.10.10.0 release requires that qwt-qt5 be less
than 6.3.0. Perhaps I should be using a different branch?

Thanks for your time.

Chris

[Extended Deadline] GRCon24 - Abstracts Due July 8



Dear GNURadio Community,

The deadline for submitting abstracts for this year's event has been extended until July 8, 2024 (just a couple more weeks).

GNU Radio Conference 2024 (GRCon24) will be held September 16-20 at the Knoxville Convention Center in Knoxville, Tennessee, USA.  Visit https://events.gnuradio.org/event/24/ for all the details.

GNU Radio Conference (GRCon) is the annual conference for the GNU Radio project and community, and has established itself as one of the premier industry events for Software Radio. It is a week-long conference that includes high-quality technical content and valuable networking opportunities. GRCon is a venue that highlights design, implementation, and theory that has been practically applied in a useful way. GRCon attendees come from a large variety of backgrounds, including industry, academia, government, and hobbyists.  Offering an annual program with broad appeal, GRCon attracts a variety of participants: people new to software radio who are interested in learning more, seasoned developers ready to show off their latest work, and experts who want to keep their finger on the pulse and direction of the industry.

We highly encourage student attendees and participants.  Students presenting their work are offered free admission to the conference thanks to our generous sponsors.  The benefit to students attending and participating in the conference can be tremendous for their future careers.


Call for Participation open through Monday June 17 July 8 (Abstract Submission)

https://events.gnuradio.org/event/24/abstracts/

We are seeking talks, papers, posters, and workshops on Software Radio related topics including the following:

  • 5G/6G/FutureG Wireless Technology

  • Amateur Radio

  • Atmospheric Research

  • Channel Modeling

  • Cognitive Radio and Agile Spectrum Sharing

  • Citizen Science

  • Analog and Digital Signal Processing

  • Education (any level)

  • Front-end Analog characterization

  • Hardware in the Loop

  • Hardware for GNU Radio

  • Heterogeneous signal processing frameworks

  • IOT and M2M applications

  • Machine Learning

  • Massive MIMO and synchronization

  • Non-SDR use of GNU Radio

  • Packaging GNU Radio for improved end user experience

  • Practical applications using GNURadio

  • Radio Astronomy

  • SETI

  • RADAR systems

  • SDR as Instrumentation

  • Space Systems, including ground based systems

  • Wireless Security research

  • SigMF and other archival tools

  • SDR Framework Development


Our first three keynote speakers have been announced:

https://events.gnuradio.org/event/24/page/147-keynote-speakers

Jack Dongarra - University Distinguished Professor of Computer Science in the Electrical Engineering and Computer Science Department at the University of Tennessee;  Dongarra received the 2021 Turing Award "for pioneering contributions to numerical algorithms and libraries that enabled high performance computational software to keep pace with exponential hardware improvements for over four decades." His algorithms and software are regarded to have fueled the growth of high-performance computing and had significant impacts in many areas of computational science, from artificial intelligence to computer graphics. [1]

Shahriar Shahramian - Director of the Communication & Sensing ASICs Research Group, Nokia Bell Labs.  He is also the chair of the mm-Wave & THz subcommittee of IEEE BCICTS and member of the technical program committee of IEEE RFIC & ISSCC. He is also a guest Editor of the IEEE Journal of Solid-State Circuits (JSSC). His research focus includes the design of mm-wave wireless and wireline integrated circuits and systems. Shahriar is a Bell Labs Fellow and leads the design and architecture of several state-of-the-art ASICs for optical coherent and wireless backhaul products.

Philip Erickson - Director of the MIT Haystack Observatory and Principal Research Scientist at MIT. He also leads Haystack's Atmospheric and Geospace Sciences Group, conducting fundamental research on the near-Earth space environment through radio-based experiments and data analysis using a variety of remote sensing techniques involving ground- and space-based data. Phil also is a co-director of the education and public outreach efforts at MIT Haystack, spanning undergraduate research programs, graduate student interactions, K–12 classroom units and outreach, and public Observatory tours and lectures.

Please let us know if you have any questions - grcon@gnuradio.org -  We look forward to seeing you at the conference this year!

Sincerely,

The GRCon24 Organizers



Thursday, June 20, 2024

Re: Can Embedded Python Blocks have callbacks?

This was my concern, and it does appear to behave that way.

On Wed, Jun 19, 2024 at 4:34 PM Daniel Estévez <daniel@destevez.net> wrote:
On 19/06/2024 14:51, Jameson Collins wrote:
> I'm trying to use a callback to set a variable in an embedded python
> block.  Using the tutorial
> (https://wiki.gnuradio.org/index.php/Embedded_Python_Block
> <https://wiki.gnuradio.org/index.php/Embedded_Python_Block>) as an
> example I added the function below.  I've found that this callback never
> gets called when I update this value from a GUI.  Should it be?
>
> |def set_example_param(self, example_param): print("here")|

Hi Jameson,

I think Embedded Python blocks can only have (automatically generated)
callbacks for __init__() arguments that are assigned as

self.foo = foo

in the body of __init__() (the example template that you get when you
create a new Embedded Python block shows how this works).

If you need more complex callbacks, I think you need to create a regular
Python block in an OOT module.

Best,
Daniel.


Re: Can Embedded Python Blocks have callbacks?


```
"""
Embedded Python Blocks:

Each time this file is saved, GRC will instantiate the first class it finds
to get ports and parameters of your block. The arguments to __init__  will
be the parameters. All of them are required to have default values!
"""

import numpy as np
from gnuradio import gr


class blk(gr.sync_block):  # other base classes are basic_block, decim_block, interp_block
    """Embedded Python Block example - a simple multiply const"""

    def __init__(self, example_param=1.0):  # only default arguments here
        """arguments to this function show up as parameters in GRC"""
        gr.sync_block.__init__(
            self,
            name='Embedded Python Block',   # will show up in GRC
            in_sig=[np.complex64],
            out_sig=[np.complex64]
        )
        # if an attribute with the same name as a parameter is found,
        # a callback is registered (properties work, too).
        self.example_param = example_param

    def work(self, input_items, output_items):
        """example: multiply with constant"""
        output_items[0][:] = input_items[0] * self.example_param
        return len(output_items[0])
   
    def set_example_param(self, asdf):
        print('here')
```


On Wed, Jun 19, 2024 at 12:12 PM Croizer Mathieu <croizer.mathieu@gmail.com> wrote:
Hello,

Can you post the rest of the code and a snapshot of your project in gnuradio?  Because with only your function, it's hard to say what happens in your python block :)

Best Regards

M. Croizer


Le mer. 19 juin 2024 à 14:52, Jameson Collins <jameson.collins@gmail.com> a écrit :
I'm trying to use a callback to set a variable in an embedded python block.  Using the tutorial (https://wiki.gnuradio.org/index.php/Embedded_Python_Block) as an example I added the function below.  I've found that this callback never gets called when I update this value from a GUI.  Should it be?

    def set_example_param(self, example_param):          print("here")



Wednesday, June 19, 2024

Re: Can Embedded Python Blocks have callbacks?

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEOn0gFAd3OQG8ow6EtFwrk3lBwykFAmZzQLAACgkQtFwrk3lB
wyml6Q//ZoBVFq+JBeQQrAmqwS4jE9DSKuEa6dPB7kzweVsPwxBn9tF/KCGpNQJU
ovvBv/cB4bX0gP1nJ+JtDytD8JFVg5OmiagctqluxdJPnexPwA4jAX6u9XXs4e2p
MY6KhJmUdYNVuLSR5ejoO1iwm93CRwRuQBJ5IbeizZqJoHkTTHzbbjyk+/LLCydo
E/Id0AM0SdIRAcOdh1id5WBqlius8Wnm7e5AlVUoeFx1yGMqSRTfwG3XxK9+urq/
b5Bk13C/a3TeF81BtPi6FQbXTef8uDWz7qC/r46fcRm8HfGKSzI8CJHyvTIqeIbq
BHVvD1ta0XWBLY1vU9ukZCqY8A9nsrvnqDdRYKe2Th3zijUDmWF13vqvO7T+268J
MDTC13a4qEjogvWHeg64Dq4ieWjrrdIGLvkVGHYnbFCwNraCCPOJeFedttCC0xvs
OZkbulISVAuaQnXT6ddUnH788w2gSQYp5vcd+YQOBd4LavFL5wmjulkAUZ1a3KZQ
SGqROPOK+fl4OyEEFWyBHaUsGIkdyD+M5HKnbqTtMcQXqV+I/QB3pC+T3P9dwZQh
3peGTs3i+Nrrgw4/N9du75/ryjHpxdtf18WBZ7lPTVCYkX/ziq3p2TexZDRJpbsL
215e50PHk5HicJxBzX7mBioJ3XwbEtdmYUVhKOyPAlRsIO54opc=
=dNaD
-----END PGP SIGNATURE-----
On 19/06/2024 14:51, Jameson Collins wrote:
> I'm trying to use a callback to set a variable in an embedded python
> block.  Using the tutorial
> (https://wiki.gnuradio.org/index.php/Embedded_Python_Block
> <https://wiki.gnuradio.org/index.php/Embedded_Python_Block>) as an
> example I added the function below.  I've found that this callback never
> gets called when I update this value from a GUI.  Should it be?
>
> |def set_example_param(self, example_param): print("here")|

Hi Jameson,

I think Embedded Python blocks can only have (automatically generated)
callbacks for __init__() arguments that are assigned as

self.foo = foo

in the body of __init__() (the example template that you get when you
create a new Embedded Python block shows how this works).

If you need more complex callbacks, I think you need to create a regular
Python block in an OOT module.

Best,
Daniel.

Re: Can Embedded Python Blocks have callbacks?

Hello,

Can you post the rest of the code and a snapshot of your project in gnuradio?  Because with only your function, it's hard to say what happens in your python block :)

Best Regards

M. Croizer


Le mer. 19 juin 2024 à 14:52, Jameson Collins <jameson.collins@gmail.com> a écrit :
I'm trying to use a callback to set a variable in an embedded python block.  Using the tutorial (https://wiki.gnuradio.org/index.php/Embedded_Python_Block) as an example I added the function below.  I've found that this callback never gets called when I update this value from a GUI.  Should it be?

    def set_example_param(self, example_param):          print("here")



Can Embedded Python Blocks have callbacks?

I'm trying to use a callback to set a variable in an embedded python block.  Using the tutorial (https://wiki.gnuradio.org/index.php/Embedded_Python_Block) as an example I added the function below.  I've found that this callback never gets called when I update this value from a GUI.  Should it be?

    def set_example_param(self, example_param):          print("here")