[Discuss-gnuradio] Gnu Radio Profiling Questions

2016-05-31 Thread Yile Ku
Hello.

I built gnu radio using the cmake -DENABLE_PERFORMANCE_COUNTERS=True on
Ubuntu 14.04.4 32-bit.  I then did a 'sudo make install'.

When I run gr-ctrlport-monitor I get the following error:

e@ubuntu:~$ gr-ctrlport-monitor
Traceback (most recent call last):
  File "/usr/local/bin/gr-ctrlport-monitor", line 28, in 
from gnuradio.ctrlport.GrDataPlotter import *
  File
"/usr/local/lib/python2.7/dist-packages/gnuradio/ctrlport/GrDataPlotter.py",
line 26, in 
from gnuradio.ctrlport.GNURadio import ControlPort
ImportError: No module named GNURadio

Is there a good Wiki page on setting up profiling?
Y-
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] (no subject)

2016-04-26 Thread Yile Ku
So a 'sudo ldconfig' fixed the problem.

On Tue, Apr 26, 2016 at 7:20 AM, Yile Ku <stiffst...@gmail.com> wrote:

> I am running Ubuntu 14.04 and used pybombs to build gnuradio.  Whenever I
> create a module and try and run it, I get the AttributeError shown at the
> bottom.
>
> Y-
>
>
> radio@ubuntu:~$ gr_modtool newmod tryit
> Creating out-of-tree module in ./gr-tryit... Done.
> Use 'gr_modtool add' to add a new block to this currently empty module.
> radio@ubuntu:~$ cd gr-tryit/
> radio@ubuntu:~/gr-tryit$ gr_modtool add -t noblock thisis
> GNU Radio module name identified: tryit
> Language (python/cpp): cpp
> Language: C++
> Block/code identifier: thisis
> Enter valid argument list, including default arguments:
> Add C++ QA code? [Y/n]
> Adding file 'lib/thisis.cc'...
> Adding file 'include/tryit/thisis.h'...
> Adding file 'lib/qa_thisis.cc'...
> Adding file 'lib/qa_thisis.h'...
> Editing swig/tryit_swig.i...
> Adding file 'grc/tryit_thisis.xml'...
> Editing grc/CMakeLists.txt...
> radio@ubuntu:~/gr-tryit$ ls
> apps   CMakeLists.txt  examples  include  MANIFEST.md  swig
> cmake  docsgrc   lib  python
> radio@ubuntu:~/gr-tryit$ mkdir build
> radio@ubuntu:~/gr-tryit$ cd build
> radio@ubuntu:~/gr-tryit/build$ cmake ..
> -- The CXX compiler identification is GNU 4.8.4
> -- The C compiler identification is GNU 4.8.4
> -- Check for working CXX compiler: /usr/bin/c++
> -- Check for working CXX compiler: /usr/bin/c++ -- works
> -- Detecting CXX compiler ABI info
> -- Detecting CXX compiler ABI info - done
> -- Check for working C compiler: /usr/bin/cc
> -- Check for working C compiler: /usr/bin/cc -- works
> -- Detecting C compiler ABI info
> -- Detecting C compiler ABI info - done
> -- Build type not specified: defaulting to release.
> -- Boost version: 1.54.0
> -- Found the following Boost libraries:
> --   filesystem
> --   system
> -- Found PkgConfig: /usr/bin/pkg-config (found version "0.26")
> -- checking for module 'cppunit'
> --   found cppunit, version 1.13.1
> -- Found CPPUNIT: /usr/lib/i386-linux-gnu/libcppunit.so;dl
> -- Found Doxygen: /usr/bin/doxygen (found version "1.8.6")
> Checking for GNU Radio Module: RUNTIME
> -- checking for module 'gnuradio-runtime'
> --   found gnuradio-runtime, version 3.7.9.2
>  * INCLUDES=/usr/local/include
>  *
> LIBS=/usr/local/lib/libgnuradio-runtime.so;/usr/local/lib/libgnuradio-pmt.so
> -- Found GNURADIO_RUNTIME:
> /usr/local/lib/libgnuradio-runtime.so;/usr/local/lib/libgnuradio-pmt.so
> GNURADIO_RUNTIME_FOUND = TRUE
> --
> -- Checking for module SWIG
> -- Found SWIG version 2.0.11.
> -- Found SWIG: /usr/bin/swig2.0
> -- Found PythonLibs: /usr/lib/i386-linux-gnu/libpython2.7.so (found
> suitable version "2.7.6", minimum required is "2")
> -- Found PythonInterp: /usr/bin/python2 (found suitable version "2.7.6",
> minimum required is "2")
> -- Looking for sys/types.h
> -- Looking for sys/types.h - found
> -- Looking for stdint.h
> -- Looking for stdint.h - found
> -- Looking for stddef.h
> -- Looking for stddef.h - found
> -- Check size of size_t
> -- Check size of size_t - done
> -- Check size of unsigned int
> -- Check size of unsigned int - done
> -- Performing Test HAVE_WNO_UNUSED_BUT_SET_VARIABLE
> -- Performing Test HAVE_WNO_UNUSED_BUT_SET_VARIABLE - Success
> -- Configuring done
> -- Generating done
> -- Build files have been written to: /home/radio/gr-tryit/build
> radio@ubuntu:~/gr-tryit/build$ vi ../lib/
> CMakeLists.txt  qa_thisis.h qa_tryit.h  thisis.cc
> qa_thisis.ccqa_tryit.cc test_tryit.cc
> radio@ubuntu:~/gr-tryit/build$ vi ../lib/thisis.cc
> radio@ubuntu:~/gr-tryit/build$ make
> Scanning dependencies of target gnuradio-tryit
> [  6%] Building CXX object lib/CMakeFiles/gnuradio-tryit.dir/thisis.cc.o
> Linking CXX shared library libgnuradio-tryit.so
> [  6%] Built target gnuradio-tryit
> Scanning dependencies of target test-tryit
> [ 12%] Building CXX object lib/CMakeFiles/test-tryit.dir/test_tryit.cc.o
> [ 18%] Building CXX object lib/CMakeFiles/test-tryit.dir/qa_tryit.cc.o
> [ 25%] Building CXX object lib/CMakeFiles/test-tryit.dir/qa_thisis.cc.o
> Linking CXX executable test-tryit
> [ 25%] Built target test-tryit
> Scanning dependencies of target _tryit_swig_doc_tag
> [ 31%] Building CXX object
> swig/CMakeFiles/_tryit_swig_doc_tag.dir/_tryit_swig_doc_tag.cpp.o
> Linking CXX executable _tryit_swig_doc_tag
> [ 31%] Built target _tryit_swig_doc_tag
> Scanning dependencies of target tryit_swig_swig_doc
> [ 37%] Generating doxygen xml for tryit_swig_doc docs
> [ 43%] Generating python docstrings for tryit_swig_doc
> [ 43%] Built target tr

[Discuss-gnuradio] (no subject)

2016-04-26 Thread Yile Ku
I am running Ubuntu 14.04 and used pybombs to build gnuradio.  Whenever I
create a module and try and run it, I get the AttributeError shown at the
bottom.

Y-


radio@ubuntu:~$ gr_modtool newmod tryit
Creating out-of-tree module in ./gr-tryit... Done.
Use 'gr_modtool add' to add a new block to this currently empty module.
radio@ubuntu:~$ cd gr-tryit/
radio@ubuntu:~/gr-tryit$ gr_modtool add -t noblock thisis
GNU Radio module name identified: tryit
Language (python/cpp): cpp
Language: C++
Block/code identifier: thisis
Enter valid argument list, including default arguments:
Add C++ QA code? [Y/n]
Adding file 'lib/thisis.cc'...
Adding file 'include/tryit/thisis.h'...
Adding file 'lib/qa_thisis.cc'...
Adding file 'lib/qa_thisis.h'...
Editing swig/tryit_swig.i...
Adding file 'grc/tryit_thisis.xml'...
Editing grc/CMakeLists.txt...
radio@ubuntu:~/gr-tryit$ ls
apps   CMakeLists.txt  examples  include  MANIFEST.md  swig
cmake  docsgrc   lib  python
radio@ubuntu:~/gr-tryit$ mkdir build
radio@ubuntu:~/gr-tryit$ cd build
radio@ubuntu:~/gr-tryit/build$ cmake ..
-- The CXX compiler identification is GNU 4.8.4
-- The C compiler identification is GNU 4.8.4
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Build type not specified: defaulting to release.
-- Boost version: 1.54.0
-- Found the following Boost libraries:
--   filesystem
--   system
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.26")
-- checking for module 'cppunit'
--   found cppunit, version 1.13.1
-- Found CPPUNIT: /usr/lib/i386-linux-gnu/libcppunit.so;dl
-- Found Doxygen: /usr/bin/doxygen (found version "1.8.6")
Checking for GNU Radio Module: RUNTIME
-- checking for module 'gnuradio-runtime'
--   found gnuradio-runtime, version 3.7.9.2
 * INCLUDES=/usr/local/include
 *
LIBS=/usr/local/lib/libgnuradio-runtime.so;/usr/local/lib/libgnuradio-pmt.so
-- Found GNURADIO_RUNTIME:
/usr/local/lib/libgnuradio-runtime.so;/usr/local/lib/libgnuradio-pmt.so
GNURADIO_RUNTIME_FOUND = TRUE
-- 
-- Checking for module SWIG
-- Found SWIG version 2.0.11.
-- Found SWIG: /usr/bin/swig2.0
-- Found PythonLibs: /usr/lib/i386-linux-gnu/libpython2.7.so (found
suitable version "2.7.6", minimum required is "2")
-- Found PythonInterp: /usr/bin/python2 (found suitable version "2.7.6",
minimum required is "2")
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of size_t
-- Check size of size_t - done
-- Check size of unsigned int
-- Check size of unsigned int - done
-- Performing Test HAVE_WNO_UNUSED_BUT_SET_VARIABLE
-- Performing Test HAVE_WNO_UNUSED_BUT_SET_VARIABLE - Success
-- Configuring done
-- Generating done
-- Build files have been written to: /home/radio/gr-tryit/build
radio@ubuntu:~/gr-tryit/build$ vi ../lib/
CMakeLists.txt  qa_thisis.h qa_tryit.h  thisis.cc
qa_thisis.ccqa_tryit.cc test_tryit.cc
radio@ubuntu:~/gr-tryit/build$ vi ../lib/thisis.cc
radio@ubuntu:~/gr-tryit/build$ make
Scanning dependencies of target gnuradio-tryit
[  6%] Building CXX object lib/CMakeFiles/gnuradio-tryit.dir/thisis.cc.o
Linking CXX shared library libgnuradio-tryit.so
[  6%] Built target gnuradio-tryit
Scanning dependencies of target test-tryit
[ 12%] Building CXX object lib/CMakeFiles/test-tryit.dir/test_tryit.cc.o
[ 18%] Building CXX object lib/CMakeFiles/test-tryit.dir/qa_tryit.cc.o
[ 25%] Building CXX object lib/CMakeFiles/test-tryit.dir/qa_thisis.cc.o
Linking CXX executable test-tryit
[ 25%] Built target test-tryit
Scanning dependencies of target _tryit_swig_doc_tag
[ 31%] Building CXX object
swig/CMakeFiles/_tryit_swig_doc_tag.dir/_tryit_swig_doc_tag.cpp.o
Linking CXX executable _tryit_swig_doc_tag
[ 31%] Built target _tryit_swig_doc_tag
Scanning dependencies of target tryit_swig_swig_doc
[ 37%] Generating doxygen xml for tryit_swig_doc docs
[ 43%] Generating python docstrings for tryit_swig_doc
[ 43%] Built target tryit_swig_swig_doc
Scanning dependencies of target _tryit_swig_swig_tag
[ 50%] Building CXX object
swig/CMakeFiles/_tryit_swig_swig_tag.dir/_tryit_swig_swig_tag.cpp.o
Linking CXX executable _tryit_swig_swig_tag
[ 50%] Built target _tryit_swig_swig_tag
[ 56%] Generating tryit_swig.tag
Scanning dependencies of target tryit_swig_swig_2d0df
[ 62%] Building CXX object
swig/CMakeFiles/tryit_swig_swig_2d0df.dir/tryit_swig_swig_2d0df.cpp.o
Linking CXX executable tryit_swig_swig_2d0df
Swig source
[ 62%] Built target tryit_swig_swig_2d0df
Scanning dependencies of target _tryit_swig
[ 68%] Building CXX object
swig/CMakeFiles/_tryit_swig.dir/tryit_swigPYTHON_wrap.cxx.o
Linking CXX shared module _tryit_swig.so
[ 

[Discuss-gnuradio] Parameters for Source Block

2015-05-24 Thread Yile Ku
Got the source block working.  Thanks for the help.  Is there a standard
way to add parameters to a source block?  I notice in gnuradio-companion
you can right click on the block and it has parameters that are settable
for that block.  I need to reference external parameters such as frequency
and sample rate also.

Thx,
Y-
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] I Q samples in a source module

2015-05-08 Thread Yile Ku
My source modules has 16-bit I  Q samples that are interleaved:
I,Q,I,Q,I,Q... as signed 16 bit values.  I generate 512 pairs at a time in
my work function (C++).   I set noutput_items to 512 and copy I and Q out
512 times to the output_items variable in the work function.  Is this the
correct format of data that subsequent modules can expect?I use the
IShort_to_Complex module to convert the samples for subsequent modules.

Thanks,
Y-
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] Module not showing up in companion

2015-04-25 Thread Yile Ku
I have built a custom source module.  I followed the steps for coding and
did a make, make test, make install.  Then I did the gr_modtool makexml
my_mod, and a 'make install again.  I can see the module in
/usr/local/share/gnuradio/grc/blocks/my_mod.xml.  When I run
gnuradio-companion I can find the module when I search.  I am running
gnuradio-companion 3.7.6.1.

Thanks,
Y-
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] I Q channels in source module

2015-04-23 Thread Yile Ku
I am writing a source module/block and I generate 16 bit signed I and Q
values.  There is first a 16 bit I value then a 16 bit Q value repeated
1024 times.

In my source module I have:

usbradio_impl::usbradio_impl()
  : gr::sync_block(usbradio,
  gr::io_signature::make(1, 1, sizeof(short)),
  gr::io_signature::make(1, 1, sizeof(short)))
{
   state = 0;
   cnt = 0;
   set_max_noutput_items(1);
   set_max_output_buffer(2);
}

/*
 * Our virtual destructor.
 */
usbradio_impl::~usbradio_impl()
{
}

int
usbradio_impl::work(int noutput_items,
  gr_vector_const_void_star input_items,
  gr_vector_void_star output_items)
{
short  *out = (short *) output_items[0];

// Do +signal processing+
stuff_output(out);

// Tell runtime system how many output items we produced.
return 1024;
}

The stuff_output(out) function will stuff an I value then a Q value 512
times.

Is that the correct way to present I  Q values?

Thx,
Y-
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] Interfacing a software radio to gnu radio companion

2015-04-20 Thread Yile Ku
Is there some documentation on how to build a module to support a new
software radio generating samples into gnu radio?

Thanks,
Y-
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio