GithubHelp home page GithubHelp logo

mhostetter / gr-detector Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 2.0 100 KB

GNU Radio OOT Module containing various detectors and synchronizes

CMake 85.59% C 1.05% C++ 3.79% Python 9.58%
gnuradio sdr dsp wireless usrp detector synchronization

gr-detector's Introduction

This is the detector-write-a-block package meant as a guide to building
out-of-tree packages. To use the detector blocks, the Python namespaces
is in 'detector', which is imported as:

    import detector

See the Doxygen documentation for details about the blocks available
in this package. A quick listing of the details can be found in Python
after importing by using:

    help(detector)

gr-detector's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

tubbz-alt otilrac

gr-detector's Issues

Creating a block python to implement multiplier in Gnuradio

I'm creating module multiplier, after that building and install the block named multiplier_ff with these instruction allowed by the site https://wiki.gnuradio.org/index.php/Guided_Tutorial_GNU_Radio_in_Python :
gr_modtool newmod multiplier
cd gr-tutorial
ls
gr_modtool add -t sync -l python

After that, I edited file multiplier.py , qa_multiplier_ff.py and multiplier_multiplier_ff.block.yml
Finally i run python3 qa_multiplier_ff.py; the test is acheived succefully
crm@crm-X570-UD:~/gr-multiplier/python/multiplier$ python3 qa_multiplier_ff.py
DEPRECATED: Using filename with gr_unittest does no longer have any effect.
.

Ran 1 test in 0.001s

OK
After that, build and install projhect with these instructions:
cd gr-multiplier
mkdir build
cd build
cmake ..
make
sudo make install
sudo ldconfig

However when i run gnuradio-companion , there is an error:
<<< Welcome to GNU Radio Companion 3.10.8.0-rc2 >>>

Block paths:
/usr/local/share/gnuradio/grc/blocks

Check: /usr/local/share/gnuradio/grc/blocks/multiplier_multiplier_ff.block.yml
FlowGraph Error: mapping values are not allowed here
in "/usr/local/share/gnuradio/grc/blocks/multiplier_multiplier_ff.block.yml", line 17, column 16

Please help me to solve this problem and make this bloc available in gnuradio

ModuleNotFoundError: No module named 'gnuradio.detection5.energy_detection_ff'

Hello,
I created a block python named«energy_detection_ff» and it is displayed correctly in gnuradio, However when i run and execute code ; it shows an error :

from gnuradio import detection5
File "/usr/local/lib/python3.8/dist-packages/gnuradio/detection5/init.py", line 23, in
from .energy_detection_ff import energy_detection_ff
ModuleNotFoundError: No module named 'gnuradio.detection5.energy_detection_ff'

And the file of init.py is shown as below :

Copyright 2008,2009 Free Software Foundation, Inc.

SPDX-License-Identifier: GPL-3.0-or-later

The presence of this file turns this directory into a Python package

'''
This is the GNU Radio DETECTION5 module. Place your Python package
description here (python/init.py).
'''
import os

import pybind11 generated symbols into the detection5 namespace

try:
# this might fail if the module is python-only
from .detection5_python import *
except ModuleNotFoundError:
pass

import any pure python here

from .energy_detection_ff import energy_detection_ff

Please help me to solve this problem, i asked if i shoud edit the file init.py, I’m so gratefull to help me

Error custom block is disabled in gnuradio

Hello,
these instruction :

gr_modtool newmod energy6
ls
gr_modtool add -t decimator -l python

GNU Radio module name identified: recherche
Enter name of block/code (without module name prefix): energy6_ff
Language: Python
Block/code identifier: energy6_ff
Please specify the copyright holder:
Enter valid argument list, including default arguments:
samples, Pfa
Add Python QA code? [Y/n] y
Adding file 'python/recherche/detector_ff.py'...
Adding file 'python/recherche/qa_detector_ff.py'...
Editing python/recherche/CMakeLists.txt...
Adding file 'grc/recherche_detector_ff.block.yml'...
Editing grc/CMakeLists.txt...

After that, I’m editing file ‘energy6_ff.py by adding your code. Also I’m editing’energy6_detector6_ff.block.yml’ as below :
arameters:

  • id: samples
    label: SAMPLES
    dtype: float32
    default: 1.024k
    parameters:
    • id: Pfa
      label: PFA
      dtype: float32
      default: 400m
      #- id: ...

label: ...

dtype: ...

Make one 'inputs' list entry per input and one 'outputs' list entry per output.

Keys include:

* label (an identifier for the GUI)

* domain (optional - stream or message. Default is stream)

* dtype (e.g. int, float, complex, byte, short, xxx_vector, ...)

* vlen (optional - data stream vector length. Default is 1)

* optional (optional - set to 1 for optional inputs. Default is 0)

inputs:

  • label: in0
    dtype: float32
  • label: in1
    dtype: float32

Make one 'outputs' list entry per output. Sub-entries of dictionary:

* label (an identifier for the GUI)

* dtype

* vlen

* optional (set to 1 for optional inputs)

outputs:

  • label: out
    dtype: float32

'file_format' specifies the version of the GRC yml format used in the file

and should usually not be changed.

file_format: 1

After that, I build and install project :

mkdir build
cd build
cmake ..
make
sudo make install
sudo ldconfig
Finally, I run gnuradio-comapnion and the windows shows :
image

However, this block is disabled i'm not able to connect it with other blocks, I'm so gratefull if you can help me to solve this problem, I ask if if i should edit other files such as: qa_detector6_ff.py and init.py

Best Regards

ModuleNotFoundError: No module named 'gnuradio.detection5.energy_detection_ff'

Hello,
I created a block python named«energy_detection_ff» and it is displayed correctly in gnuradio, However when i run and execute code ; it shows an error :
from gnuradio import detection5
File "/usr/local/lib/python3.8/dist-packages/gnuradio/detection5/init.py", line 23, in
from .energy_detection_ff import energy_detection_ff
ModuleNotFoundError: No module named 'gnuradio.detection5.energy_detection_ff'

And the file of init.py is shown as below :
ab

Please help me to solve this problem, i asked if i shoud edit the file init.py, I’m so gratefull to help me

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.