Re: Minimal deployment of gnuradio application.

2020-07-09 Thread Victor Ortman
Thanks alot for your input guys!

I will take a look at the application. It might be of some use for me going
forward!

Regards, Victor

Den ons 8 juli 2020 kl 22:42 skrev Ron Economos :

> You can write a C++ application that only links to the necessary GNU
> Radio libraries. No Python required. See this repository for an example.
>
> https://github.com/csdvb/dvbs2_tx
>
> Ron
>
> On 7/6/20 02:02, Victor Ortman wrote:
> > Hi guys!
> >
> > Let me start by saying that I am pretty much clueless when it comes to
> > building and linking so I am sorry if what I am asking is unclear or
> > not relevant to this forum. But I'm going to give it a shot.
> >
> >
> > I am working with a gunradio application containing my own OOT-module.
> > The application is intended to run on diskless netbooted clients.
> >
> > The target OS is Ubuntu 18.04 LTS and Gnuradio version is 3.7.
> >
> > Do you guys know if it is possible to easily build my application with
> > statically linked gnuradio and oot libraries so that I can deploy only
> > binaries and library files to the clients without the need to have a
> > full gnuradio installation on them?
> >
> > In short I want to have a working minimal executable with as few and
> > small files to be deployed as possible.
> >
> > I appreciate any insights.
> >
> > Regards, Victor
>
>


Minimal deployment of gnuradio application.

2020-07-06 Thread Victor Ortman
Hi guys!

Let me start by saying that I am pretty much clueless when it comes to
building and linking so I am sorry if what I am asking is unclear or not
relevant to this forum. But I'm going to give it a shot.


I am working with a gunradio application containing my own OOT-module.
The application is intended to run on diskless netbooted clients.

The target OS is Ubuntu 18.04 LTS and Gnuradio version is 3.7.

Do you guys know if it is possible to easily build my application with
statically linked gnuradio and oot libraries so that I can deploy only
binaries and library files to the clients without the need to have a full
gnuradio installation on them?

In short I want to have a working minimal executable with as few and small
files to be deployed as possible.

I appreciate any insights.

Regards, Victor


Re: message passing issue in systemd context

2020-06-05 Thread Victor Ortman
That resolved my issues! Thanks a lot Vasil!

Have a nice weekend.

Den fre 5 juni 2020 kl 12:18 skrev Vasil Velichkov :

> Hi Victor,
>
> On 05/06/2020 12.20, Victor Ortman wrote:
> > Hi.
> >
> > I am having issues running gnuradio flowgraphs containg message passing
> in
> > a systemd context.
> >
> > I have tried running a minimal flowgraph only containing a message strobe
> > and a message debug block.
> > When I run it manually it works just fine, but when executed from a
> systemd
> > service the flowgraph restarts all the time.
> >
> > Here is some cutouts from journalctl:
> >
> > -- Logs begin at Wed 2019-01-02 04:42:01 CET, end at Fri 2020-06-05
> > 11:12:21 CEST. --
> > jun 05 11:12:13 fitlet2-001 python[32548]: Press Enter to quit:
> > jun 05 11:12:12 fitlet2-001 systemd[1]: Started Message passing
> flowgraph.
> > jun 05 11:12:12 fitlet2-001 systemd[1]: Stopped Message passing
> flowgraph.
> > jun 05 11:12:12 fitlet2-001 systemd[1]: msgtest.service: Scheduled
> restart
> > job, restart counter is at 4.
> > jun 05 11:12:12 fitlet2-001 systemd[1]: msgtest.service: Service hold-off
> > time over, scheduling restart.
> > jun 05 11:12:09 fitlet2-001 python[32532]: Press Enter to quit:
>
> When you start it as a service it can't read from the standard input and
> raw_input raises an EOFError exception and the flowgraph terminates.
>
> tb.start()
> try:
> raw_input('Press Enter to quit: ')
> except EOFError:
> pass
> tb.stop()
>
> To resolve this in the Options block set the "Run Options" to "Run to
> Completion" and rebuild.
>
> $ diff -u msgtest.grc msgtest.new.grc
> --- msgtest.grc 2020-06-05 13:02:49.846143560 +0300
> +++ msgtest.new.grc 2020-06-05 13:04:07.072710198 +0300
> @@ -66,7 +66,7 @@
>  
>  
>run_options
> -  prompt
> +  run
>  
>  
>run
>
>
> Regards,
> Vasil
>


message passing issue in systemd context

2020-06-05 Thread Victor Ortman
Hi.

I am having issues running gnuradio flowgraphs containg message passing in
a systemd context.

I have tried running a minimal flowgraph only containing a message strobe
and a message debug block.
When I run it manually it works just fine, but when executed from a systemd
service the flowgraph restarts all the time.

Here is some cutouts from journalctl:

-- Logs begin at Wed 2019-01-02 04:42:01 CET, end at Fri 2020-06-05
11:12:21 CEST. --
jun 05 11:12:13 fitlet2-001 python[32548]: Press Enter to quit:
jun 05 11:12:12 fitlet2-001 systemd[1]: Started Message passing flowgraph.
jun 05 11:12:12 fitlet2-001 systemd[1]: Stopped Message passing flowgraph.
jun 05 11:12:12 fitlet2-001 systemd[1]: msgtest.service: Scheduled restart
job, restart counter is at 4.
jun 05 11:12:12 fitlet2-001 systemd[1]: msgtest.service: Service hold-off
time over, scheduling restart.
jun 05 11:12:09 fitlet2-001 python[32532]: Press Enter to quit:
jun 05 11:12:09 fitlet2-001 systemd[1]: Started Message passing flowgraph.
jun 05 11:12:09 fitlet2-001 systemd[1]: Stopped Message passing flowgraph.
jun 05 11:12:09 fitlet2-001 systemd[1]: msgtest.service: Scheduled restart
job, restart counter is at 3.
jun 05 11:12:09 fitlet2-001 systemd[1]: msgtest.service: Service hold-off
time over, scheduling restart.
jun 05 11:12:05 fitlet2-001 python[32514]: Press Enter to quit:
jun 05 11:12:05 fitlet2-001 systemd[1]: Started Message passing flowgraph.
jun 05 11:12:05 fitlet2-001 systemd[1]: Stopped Message passing flowgraph.
jun 05 11:12:05 fitlet2-001 systemd[1]: msgtest.service: Scheduled restart
job, restart counter is at 2.
jun 05 11:12:05 fitlet2-001 systemd[1]: msgtest.service: Service hold-off
time over, scheduling restart.
jun 05 11:12:02 fitlet2-001 python[32496]: Press Enter to quit:
jun 05 11:12:01 fitlet2-001 systemd[1]: Started Message passing flowgraph.
jun 05 11:12:01 fitlet2-001 systemd[1]: Stopped Message passing flowgraph.
jun 05 11:12:01 fitlet2-001 systemd[1]: msgtest.service: Scheduled restart
job, restart counter is at 1.
jun 05 11:12:01 fitlet2-001 systemd[1]: msgtest.service: Service hold-off
time over, scheduling restart.
jun 05 11:11:58 fitlet2-001 python[32481]: Press Enter to quit:
jun 05 11:11:57 fitlet2-001 systemd[1]: Started Message passing flowgraph.

I an running Gnuradio 3.7.13.4 on Ubuntu 18.04.1 LTS

I have attached the flowgraph, systemd unit file and the /etc/environment
setup file.


Thank you for any assistance!

Regards, Victor


msgtest.grc
Description: Binary data
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
##
# GNU Radio Python Flow Graph
# Title: Msgtest
# GNU Radio version: 3.7.13.5
##

from gnuradio import blocks
from gnuradio import eng_notation
from gnuradio import gr
from gnuradio.eng_option import eng_option
from gnuradio.filter import firdes
from optparse import OptionParser
import pmt


class msgtest(gr.top_block):

def __init__(self):
gr.top_block.__init__(self, "Msgtest")

##
# Variables
##
self.samp_rate = samp_rate = 32000

##
# Blocks
##
self.blocks_message_strobe_0 = blocks.message_strobe(pmt.intern("TEST"), 1000)
self.blocks_message_debug_0 = blocks.message_debug()



##
# Connections
##
self.msg_connect((self.blocks_message_strobe_0, 'strobe'), (self.blocks_message_debug_0, 'print'))

def get_samp_rate(self):
return self.samp_rate

def set_samp_rate(self, samp_rate):
self.samp_rate = samp_rate


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

tb = top_block_cls()
tb.start()
try:
raw_input('Press Enter to quit: ')
except EOFError:
pass
tb.stop()
tb.wait()


if __name__ == '__main__':
main()
[Unit]
Description=Message passing flowgraph
After=network-online.target

[Service]
Restart=always
RestartSec=3
EnvironmentFile=/etc/environment
User=dev
Type=simple
ExecStart=/usr/bin/python /home/dev/src/gr-sapp/examples/msgtest.py

[Install]
WantedBy=multi-user.target


environment
Description: Binary data