[Discuss-gnuradio] BasicRX daughtercard for Ham Radio

2015-07-14 Thread Activecat
Dear Sir,

Referring to [1], the correct daughtercard for HF Communications is LFRX
and LFTX.
As a Ham radio receiver, could BasicRX be used instead of LFRX?

Regards,
Activecat.

[1].
http://www.ettus.com/content/files/kb/Selecting_an_RF_Daughterboard.pdf
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Asking help about gr-ieee802-11

2015-04-23 Thread Activecat
Dear Bastian,

I have just downloaded the latest gr-ieee802-11, recompiled and reinstalled.
I am using the latest version of the flowgraph. Just that the gnuradio was
the one installed at January 2015.
Below is the debugging message.

(gdb) run wifi_loopback.py
Starting program: /usr/bin/python wifi_loopback.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library
/lib/i386-linux-gnu/i686/cmov/libthread_db.so.1.
linux; GNU C++ version 4.7.2; Boost_104900;
UHD_003.008.001-121-gebe7169d

[New Thread 0xaecc0b70 (LWP 4846)]
[New Thread 0xad5c1b70 (LWP 4847)]
Using Volk machine: avx_32_mmx_orc
[New Thread 0xa668cb70 (LWP 4848)]
OFDM MAPPER: encoding: 0
set_min_output_buffer on block 31 to 96000
set_min_output_buffer on block 33 to 96000
set_min_output_buffer on block 35 to 96000
set_min_output_buffer on block 36 to 96000
set_min_output_buffer on block 39 to 96000
set_min_output_buffer on block 50 to 96000
[New Thread 0xa397ab70 (LWP 4849)]
[New Thread 0x95dd8b70 (LWP 4850)]
[New Thread 0x955d7b70 (LWP 4851)]
[New Thread 0x94dd6b70 (LWP 4852)]
[New Thread 0x945d5b70 (LWP 4853)]
[New Thread 0x93dd4b70 (LWP 4854)]
[New Thread 0x935d3b70 (LWP 4855)]
[New Thread 0x92dd2b70 (LWP 4856)]
[New Thread 0x925d1b70 (LWP 4857)]
[New Thread 0x91dd0b70 (LWP 4858)]
[New Thread 0x915cfb70 (LWP 4859)]
[New Thread 0x90dceb70 (LWP 4860)]
[New Thread 0x905cdb70 (LWP 4861)]
[New Thread 0x8fdccb70 (LWP 4862)]
[New Thread 0x8f5cbb70 (LWP 4863)]
[New Thread 0x8edcab70 (LWP 4864)]
[New Thread 0x8e5c9b70 (LWP 4865)]
[New Thread 0x8ddc8b70 (LWP 4866)]
[New Thread 0x8d5c7b70 (LWP 4867)]
[New Thread 0x8cdc6b70 (LWP 4868)]
[New Thread 0x8c5c5b70 (LWP 4869)]
[New Thread 0x8bdc4b70 (LWP 4870)]
[New Thread 0x8b5c3b70 (LWP 4871)]
[New Thread 0x8adc2b70 (LWP 4872)]
[New Thread 0x8a5c1b70 (LWP 4873)]
[New Thread 0x89dc0b70 (LWP 4874)]
[New Thread 0x895bfb70 (LWP 4875)]
[New Thread 0x88dbeb70 (LWP 4876)]
[New Thread 0x885bdb70 (LWP 4877)]
[New Thread 0x87dbcb70 (LWP 4878)]
[New Thread 0x875bbb70 (LWP 4879)]
[New Thread 0x86dbab70 (LWP 4880)]
[New Thread 0x865b9b70 (LWP 4881)]
[New Thread 0x85db8b70 (LWP 4882)]
[New Thread 0x855b7b70 (LWP 4883)]
[New Thread 0x84db6b70 (LWP 4884)]
[New Thread 0x845b5b70 (LWP 4885)]
[New Thread 0x83db4b70 (LWP 4886)]
[New Thread 0x835b3b70 (LWP 4887)]
[New Thread 0x82db2b70 (LWP 4888)]
[New Thread 0x825b1b70 (LWP 4889)]
[New Thread 0x81db0b70 (LWP 4890)]
[New Thread 0x815afb70 (LWP 4891)]
[New Thread 0x80daeb70 (LWP 4892)]
[New Thread 0x805adb70 (LWP 4893)]
[New Thread 0x7fdacb70 (LWP 4894)]
[New Thread 0x7f5abb70 (LWP 4895)]
[New Thread 0x7edaab70 (LWP 4896)]
[New Thread 0x7e5a9b70 (LWP 4897)]
[New Thread 0x7dda8b70 (LWP 4898)]
[New Thread 0x7d5a7b70 (LWP 4899)]
[New Thread 0x7cda6b70 (LWP 4900)]
[New Thread 0x7c5a5b70 (LWP 4901)]
[New Thread 0x7bda4b70 (LWP 4902)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x815afb70 (LWP 4891)]
0xb2fc302e in ofdm_decode_signal_impl::general_work(int,
std::vectorint, std::allocatorint , std::vectorvoid const*,
std::allocatorvoid const* , std::vectorvoid*, std::allocatorvoid*
) ()
   from /usr/local/lib/libgnuradio-ieee802_11.so
(gdb)



On Thu, Apr 23, 2015 at 10:36 PM, Bastian Bloessl bloe...@ccs-labs.org
wrote:

 Hi,

 I made quite some changes during the last days so it might well be the
 case that I introduced several bugs.

 Can you please double-check that you are not using the new flow graph with
 an old version of the module (maybe another copy is still installed
 somewhere). If the problem still exists then please start the flow graph in
 a debugger. (I guess it actually seg faults but you don't see it in GRC).
 You can use something like

 gdb python
 run wifi_loopback.py

 and then do a backtrace (bt).

 See also
 https://gnuradio.org/redmine/projects/gnuradio/wiki/TutorialsDebugging

 Best,
 Bastian


 On 04/23/2015 01:33 PM, Activecat wrote:

 Dear Sir,

 Today I helped my friend to setup the gr-ieee802-11.
 Everything go well until I try to execute the flowgraph of
 wifi_loopback.grc
 All ports in the GRC are connected. But when I run the
 wifi_loopback.grc, it stops immediately with below message.


  Generating:

 /home/sgku/download/zz-downloaded/gr-ieee802-11/examples/wifi_loopback.py
   Warning: This flow graph may not have flow control: no audio or
 RF hardware blocks found.
  Add a Misc-Throttle block to your flow graph to avoid CPU
 congestion.

  Executing:

 /home/sgku/download/zz-downloaded/gr-ieee802-11/examples/wifi_loopback.py

  linux; GNU C++ version 4.7.2; Boost_104900;
 UHD_003.008.001-121-gebe7169d

  Using Volk machine: avx_32_mmx_orc
  OFDM MAPPER: encoding: 0

Re: [Discuss-gnuradio] Asking help about gr-ieee802-11

2015-04-23 Thread Activecat
Dear Sir,

Today I helped my friend to setup the gr-ieee802-11.
Everything go well until I try to execute the flowgraph of wifi_loopback.grc
All ports in the GRC are connected. But when I run the wifi_loopback.grc,
it stops immediately with below message.


Generating:
/home/sgku/download/zz-downloaded/gr-ieee802-11/examples/wifi_loopback.py
 Warning: This flow graph may not have flow control: no audio or RF
hardware blocks found.
Add a Misc-Throttle block to your flow graph to avoid CPU congestion.

Executing:
/home/sgku/download/zz-downloaded/gr-ieee802-11/examples/wifi_loopback.py

linux; GNU C++ version 4.7.2; Boost_104900;
UHD_003.008.001-121-gebe7169d

Using Volk machine: avx_32_mmx_orc
OFDM MAPPER: encoding: 0
set_min_output_buffer on block 31 to 96000
set_min_output_buffer on block 33 to 96000
set_min_output_buffer on block 35 to 96000
set_min_output_buffer on block 36 to 96000
set_min_output_buffer on block 39 to 96000
set_min_output_buffer on block 50 to 96000

 Done


Any clue of what had gone wrong?
The flowgraph just doesn't execute.
Below is my system info.

$ cat /etc/debian_version
7.8

$ gcc --version
gcc (Debian 4.7.2-5) 4.7.2
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

$ uname -a
Linux sgku2 3.2.0-4-686-pae #1 SMP Debian 3.2.65-1+deb7u2 i686 GNU/Linux

$ gnuradio-config-info -v
3.7.6.1

$ file /sbin/init
/sbin/init: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),
dynamically linked (uses shared libs),
for GNU/Linux 2.6.26,
BuildID[sha1]=0x6f99a4bee43009171bce9fa5457099aafaf2f753, stripped


Thank you very much.


On Thu, Jan 29, 2015 at 4:30 PM, Activecat active...@gmail.com wrote:

 Dear Bastian,

 Yes, this solves all the problems.
 I just get the current commit and recompile, everything works !
 Thank you very much.

 On Thu, Jan 29, 2015 at 4:20 PM, Bastian Bloessl bloe...@ccs-labs.org
 wrote:

 Either python3 is selected by cmake or (maybe) your swig version does not
 work. The first problem should have been fixed with the most recent commit
 (3 days ago).

  On 29 Jan 2015, at 09:15, Activecat active...@gmail.com wrote:
 
  Dear Sir,
 
  Thank you very much for your prompt response.
  I really appreciate your help.
 
  Refer below result:
 
 
  sgku@mmu2: ~ $ ipython
  Python 2.7.3 (default, Mar 14 2014, 11:57:14)
  Type copyright, credits or license for more information.
 
  IPython 0.13.1 -- An enhanced Interactive Python.
  ? - Introduction and overview of IPython's features.
  %quickref - Quick reference.
  help  - Python's own help system.
  object?   - Details about 'object', use 'object??' for extra details.
 
 
  In [1]: import ieee802_11
 
 ---
  ImportError   Traceback (most recent call
 last)
  ipython-input-1-3c375f221e3a in module()
   1 import ieee802_11
 
  /usr/local/lib/python2.7/dist-packages/ieee802_11/__init__.py in
 module()
   35
   36 # import swig generated symbols into the test namespace
  --- 37 from ieee802_11_swig import *
   38
   39 # import any pure python here
 
  /usr/local/lib/python2.7/dist-packages/ieee802_11/ieee802_11_swig.py in
 module()
   24 fp.close()
   25 return _mod
  --- 26 _ieee802_11_swig = swig_import_helper()
   27 del swig_import_helper
   28 else:
 
  /usr/local/lib/python2.7/dist-packages/ieee802_11/ieee802_11_swig.py in
 swig_import_helper()
   20 if fp is not None:
   21 try:
  --- 22 _mod = imp.load_module('_ieee802_11_swig', fp,
 pathname, description)
   23 finally:
   24 fp.close()
 
  ImportError: dynamic module does not define init function
 (init_ieee802_11_swig)
 
 
 
  On Thu, Jan 29, 2015 at 4:02 PM, Bastian Bloessl bloe...@ccs-labs.org
 wrote:
  Hi,
 
   On 29 Jan 2015, at 08:37, Activecat active...@gmail.com wrote:
  
   error messages:
   Param - Value(value):
 Value ieee802_11.wifi_signal_field() cannot be evaluated:
 name 'ieee802_11' is not defined
  
 
  Please start an interactive python session and ‘import ieee802_11’.
 This will give you more debug output. I guess either your $PYTHONPATH does
 not contain the path of the module or some shared library can not be loaded.
 
  Best,
  Bastian
 

 --
 Dipl.-Inform. Bastian Bloessl
 Distributed Embedded Systems Group
 University of Paderborn, Germany
 http://www.ccs-labs.org/~bloessl/



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


[Discuss-gnuradio] X Window System error

2015-04-08 Thread Activecat
Dear Sir,

I've just install gnuradio using pybombs, and manually install the missing
python-opengl using apt-get.
Unfortunately below error occurs when I execute a flowgraph.

  Executing:
/home/sgku/Dropbox/gnuradio/gr-activecat/examples/jitter/top_block.py
  Using Volk machine: avx_64_mmx
  The program 'python2' received an X Window System error.
  This probably reflects a bug in the program.
  The error was 'BadMatch (invalid parameter attributes)'.
(Details: serial 2351 error_code 8 request_code 70 minor_code 0)
(Note to programmers: normally, X errors are reported asynchronously;
 that is, you will receive the error a while after causing it.
 To debug your program, run it with the --sync command line
 option to change this behavior. You can then get a meaningful
 backtrace from your debugger if you break on the gdk_x_error()
function.)


Please advise if you have a quick fix to this.
My system and version info is available at [1].
Thank you very much.

[1]. https://github.com/activecat/gnuradio/blob/master/system_info.txt
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Failed to install gnuradio with PyBOMBS

2015-04-02 Thread Activecat
Dear Sir,

Thanks, this solve the problems.
The GNU Radio has been installed successfully using PyBOMBS.

Thank you very much.


On Thu, Apr 2, 2015 at 10:30 AM, Ron Economos w...@comcast.net wrote:

  The actual fix is a little more complicated. You can download a patched
 file from here:

 http://www.w6rz.net/dvbt2_paprtr_cc_impl.cc

 w6rz.net is my personal website.

 Ron


 On 04/01/2015 07:11 PM, Activecat wrote:

 Dear Sir,

  I have comment out the #include complex.h, but still has error, as
 below:

  [ 80%] Building CXX object
 gr-dtv/lib/CMakeFiles/gnuradio-dtv.dir/dvbt2/dvbt2_paprtr_cc_impl.cc.o
 [ 86%] Built target gnuradio-qtgui
 [ 86%] Built target fcd_nfm_rx
 [ 87%] Built target test_atsci
 [ 87%] Built target _atsc_swig
 [ 87%] Built target _qtgui_swig
 [ 88%] Built target gnuradio-channels
 [ 88%] Built target _channels_swig
 [ 92%] Built target gnuradio-digital
 [ 92%] Built target _digital_swig
 [ 98%] Built target gnuradio-trellis
 [ 98%] Built target _trellis_swig

 /home/sgku/download/gnuradio/pybombs/src/gnuradio/gr-dtv/lib/dvbt2/dvbt2_paprtr_cc_impl.cc:
 In member function ‘virtual int gr::dtv::dvbt2_paprtr_cc_impl::work(int,
 gr_vector_const_void_star, gr_vector_void_star)’:

 /home/sgku/download/gnuradio/pybombs/src/gnuradio/gr-dtv/lib/dvbt2/dvbt2_paprtr_cc_impl.cc:770:102:
 error: ‘_Complex_I’ was not declared in this scope

 /home/sgku/download/gnuradio/pybombs/src/gnuradio/gr-dtv/lib/dvbt2/dvbt2_paprtr_cc_impl.cc:771:37:
 error: ‘cexp’ was not declared in this scope

 /home/sgku/download/gnuradio/pybombs/src/gnuradio/gr-dtv/lib/dvbt2/dvbt2_paprtr_cc_impl.cc:772:48:
 error: ‘creal’ was not declared in this scope

 /home/sgku/download/gnuradio/pybombs/src/gnuradio/gr-dtv/lib/dvbt2/dvbt2_paprtr_cc_impl.cc:773:49:
 error: ‘cimag’ was not declared in this scope
 make[2]: ***
 [gr-dtv/lib/CMakeFiles/gnuradio-dtv.dir/dvbt2/dvbt2_paprtr_cc_impl.cc.o]
 Error 1
 make[1]: *** [gr-dtv/lib/CMakeFiles/gnuradio-dtv.dir/all] Error 2
 make: *** [all] Error 2
 Build failed. See output above for error messages.


  The complete log is at
 https://github.com/activecat/gnuradio/blob/master/installation_log_003.txt
 Please advise, thanks.


 On Thu, Apr 2, 2015 at 9:49 AM, Ron Economos w...@comcast.net wrote:

 In your previous pull request, you deleted the line:

 #include complex.h

 in gr-dtv/lib/dvbt2/dvbt2_paprtr_cc_impl.cc

 This would directly fix the build issues reported by Activecat and Marcus
 Leech.

 Ron

 On 04/01/2015 06:34 PM, Michael Dickens wrote:

 I'm not sure my forthcoming pull request directly addresses these
 specific issues, but it does a bunch of others for C++11 compliance in
 std::complex -- whether or not you're using C++11; it's backward compatible
 with C++0x and earlier, and should be forward compatible as well. Before we
 address these specific issues, let's get my patches in place -- they remove
 all of the GCC extensions to std::complex, so they might have an impact on
 these issues. I should be able to do the PR tomorrow; still testing on
 various systems tonight. - MLD
 On Wed, Apr 1, 2015, at 09:24 PM, Johnathan Corgan wrote:

 I believe Michael Dickens will have a comprehensive fix for issues like
 this soon.



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




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


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


Re: [Discuss-gnuradio] Failed to install gnuradio with PyBOMBS

2015-04-01 Thread Activecat
Dear Sir,

I have comment out the #include complex.h, but still has error, as
below:

[ 80%] Building CXX object
gr-dtv/lib/CMakeFiles/gnuradio-dtv.dir/dvbt2/dvbt2_paprtr_cc_impl.cc.o
[ 86%] Built target gnuradio-qtgui
[ 86%] Built target fcd_nfm_rx
[ 87%] Built target test_atsci
[ 87%] Built target _atsc_swig
[ 87%] Built target _qtgui_swig
[ 88%] Built target gnuradio-channels
[ 88%] Built target _channels_swig
[ 92%] Built target gnuradio-digital
[ 92%] Built target _digital_swig
[ 98%] Built target gnuradio-trellis
[ 98%] Built target _trellis_swig

/home/sgku/download/gnuradio/pybombs/src/gnuradio/gr-dtv/lib/dvbt2/dvbt2_paprtr_cc_impl.cc:
In member function ‘virtual int gr::dtv::dvbt2_paprtr_cc_impl::work(int,
gr_vector_const_void_star, gr_vector_void_star)’:

/home/sgku/download/gnuradio/pybombs/src/gnuradio/gr-dtv/lib/dvbt2/dvbt2_paprtr_cc_impl.cc:770:102:
error: ‘_Complex_I’ was not declared in this scope

/home/sgku/download/gnuradio/pybombs/src/gnuradio/gr-dtv/lib/dvbt2/dvbt2_paprtr_cc_impl.cc:771:37:
error: ‘cexp’ was not declared in this scope

/home/sgku/download/gnuradio/pybombs/src/gnuradio/gr-dtv/lib/dvbt2/dvbt2_paprtr_cc_impl.cc:772:48:
error: ‘creal’ was not declared in this scope

/home/sgku/download/gnuradio/pybombs/src/gnuradio/gr-dtv/lib/dvbt2/dvbt2_paprtr_cc_impl.cc:773:49:
error: ‘cimag’ was not declared in this scope
make[2]: ***
[gr-dtv/lib/CMakeFiles/gnuradio-dtv.dir/dvbt2/dvbt2_paprtr_cc_impl.cc.o]
Error 1
make[1]: *** [gr-dtv/lib/CMakeFiles/gnuradio-dtv.dir/all] Error 2
make: *** [all] Error 2
Build failed. See output above for error messages.


The complete log is at
https://github.com/activecat/gnuradio/blob/master/installation_log_003.txt
Please advise, thanks.


On Thu, Apr 2, 2015 at 9:49 AM, Ron Economos w...@comcast.net wrote:

 In your previous pull request, you deleted the line:

 #include complex.h

 in gr-dtv/lib/dvbt2/dvbt2_paprtr_cc_impl.cc

 This would directly fix the build issues reported by Activecat and Marcus
 Leech.

 Ron

 On 04/01/2015 06:34 PM, Michael Dickens wrote:

 I'm not sure my forthcoming pull request directly addresses these
 specific issues, but it does a bunch of others for C++11 compliance in
 std::complex -- whether or not you're using C++11; it's backward compatible
 with C++0x and earlier, and should be forward compatible as well. Before we
 address these specific issues, let's get my patches in place -- they remove
 all of the GCC extensions to std::complex, so they might have an impact on
 these issues. I should be able to do the PR tomorrow; still testing on
 various systems tonight. - MLD
 On Wed, Apr 1, 2015, at 09:24 PM, Johnathan Corgan wrote:

 I believe Michael Dickens will have a comprehensive fix for issues like
 this soon.



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

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


[Discuss-gnuradio] Failed to install gnuradio with PyBOMBS

2015-04-01 Thread Activecat
Dear Sir,

Recently I failed to install GNU Radio using PyBOMBS.
Error message:

/home/sgku/download/gnuradio/pybombs/src/gnuradio/gr-dtv/lib/dvbt2/dvbt2_paprtr_cc_impl.cc:750:95:
error: ‘volk_32fc_s32fc_multiply_32fc’ was not declared in this scope
/home/sgku/download/gnuradio/pybombs/src/gnuradio/gr-dtv/lib/dvbt2/dvbt2_paprtr_cc_impl.cc:756:72:
error: cannot convert ‘gr_complex* {aka std::complexfloat*}’ to ‘const
int*’ in argument passing
/home/sgku/download/gnuradio/pybombs/src/gnuradio/gr-dtv/lib/dvbt2/dvbt2_paprtr_cc_impl.cc:780:71:
error: ‘volk_32fc_x2_multiply_conjugate_32fc’ was not declared in this scope
/home/sgku/download/gnuradio/pybombs/src/gnuradio/gr-dtv/lib/dvbt2/dvbt2_paprtr_cc_impl.cc:785:62:
error: cannot convert ‘gr_complex* {aka std::complexfloat*}’ to ‘const
int*’ in argument passing
make[2]: ***
[gr-dtv/lib/CMakeFiles/gnuradio-dtv.dir/dvbt2/dvbt2_paprtr_cc_impl.cc.o]
Error 1
make[1]: *** [gr-dtv/lib/CMakeFiles/gnuradio-dtv.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs
Linking CXX executable fcd_nfm_rx
[ 91%] Built target fcd_nfm_rx
Linking CXX shared module _qtgui_swig.so
[ 91%] Built target _qtgui_swig
Linking CXX shared module _digital_swig.so
[ 91%] Built target _digital_swig
make: *** [all] Error 2
Build failed. See output above for error messages.


The complete installation log is at
https://github.com/activecat/gnuradio/blob/master/installation_log_001.txt

I am using Debian 7.8 64bit.
Further details of system info is at
https://github.com/activecat/gnuradio/blob/master/system_info.txt

Please advise me how to solve this installation error.
Thank you very much.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] PSD in dBm/Hz

2015-03-06 Thread Activecat
Dear Sirs,

Thanks for the answers. Let me further elaborate.

I could get what I want using Matlab, via below steps:
1).  Using GRC flowgraph, connect the USRP Source to a File Sink.
2).  Copy the file (says, test02.dat) to a PC running Matlab.
3).  Using Matlab, run these commands:
   a).  c = read_complex_binary('test02.dat')
   b).  figure; periodogram( c(1:10), [], [], 10e6 )  #
samp_rate is 10e6

In this case I am able to get a PSD plot.
The question is, how to produce the PSD plot using only gnuradio (without
Matlab) ?

Thank you very much.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] PSD in dBm/Hz

2015-03-04 Thread Activecat
Dear Sir,

I am using USRP to receive signal, and then plot the signal using WX GUI
FFT Sink.
I hope to get the vertical axis as Power Spectral Density in dBm/Hz.
Is there any way to do that?

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


Re: [Discuss-gnuradio] Asking help about gr-ieee802-11

2015-01-29 Thread Activecat
Dear Sir,

Thank you very much for your prompt response.
I really appreciate your help.

Refer below result:


sgku@mmu2: ~ $ ipython
Python 2.7.3 (default, Mar 14 2014, 11:57:14)
Type copyright, credits or license for more information.

IPython 0.13.1 -- An enhanced Interactive Python.
? - Introduction and overview of IPython's features.
%quickref - Quick reference.
help  - Python's own help system.
object?   - Details about 'object', use 'object??' for extra details.


In [1]: import ieee802_11
---
ImportError   Traceback (most recent call last)
ipython-input-1-3c375f221e3a in module()
 1 import ieee802_11

/usr/local/lib/python2.7/dist-packages/ieee802_11/__init__.py in module()
 35
 36 # import swig generated symbols into the test namespace
--- 37 from ieee802_11_swig import *
 38
 39 # import any pure python here

/usr/local/lib/python2.7/dist-packages/ieee802_11/ieee802_11_swig.py in
module()
 24 fp.close()
 25 return _mod
--- 26 _ieee802_11_swig = swig_import_helper()
 27 del swig_import_helper
 28 else:

/usr/local/lib/python2.7/dist-packages/ieee802_11/ieee802_11_swig.py in
swig_import_helper()
 20 if fp is not None:
 21 try:
--- 22 _mod = imp.load_module('_ieee802_11_swig', fp,
pathname, description)
 23 finally:
 24 fp.close()

ImportError: dynamic module does not define init function
(init_ieee802_11_swig)



On Thu, Jan 29, 2015 at 4:02 PM, Bastian Bloessl bloe...@ccs-labs.org
wrote:

 Hi,

  On 29 Jan 2015, at 08:37, Activecat active...@gmail.com wrote:
 
  error messages:
  Param - Value(value):
Value ieee802_11.wifi_signal_field() cannot be evaluated:
name 'ieee802_11' is not defined
 

 Please start an interactive python session and ‘import ieee802_11’. This
 will give you more debug output. I guess either your $PYTHONPATH does not
 contain the path of the module or some shared library can not be loaded.

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


Re: [Discuss-gnuradio] Asking help about gr-ieee802-11

2015-01-29 Thread Activecat
Dear Bastian,

Yes, this solves all the problems.
I just get the current commit and recompile, everything works !
Thank you very much.

On Thu, Jan 29, 2015 at 4:20 PM, Bastian Bloessl bloe...@ccs-labs.org
wrote:

 Either python3 is selected by cmake or (maybe) your swig version does not
 work. The first problem should have been fixed with the most recent commit
 (3 days ago).

  On 29 Jan 2015, at 09:15, Activecat active...@gmail.com wrote:
 
  Dear Sir,
 
  Thank you very much for your prompt response.
  I really appreciate your help.
 
  Refer below result:
 
 
  sgku@mmu2: ~ $ ipython
  Python 2.7.3 (default, Mar 14 2014, 11:57:14)
  Type copyright, credits or license for more information.
 
  IPython 0.13.1 -- An enhanced Interactive Python.
  ? - Introduction and overview of IPython's features.
  %quickref - Quick reference.
  help  - Python's own help system.
  object?   - Details about 'object', use 'object??' for extra details.
 
 
  In [1]: import ieee802_11
 
 ---
  ImportError   Traceback (most recent call
 last)
  ipython-input-1-3c375f221e3a in module()
   1 import ieee802_11
 
  /usr/local/lib/python2.7/dist-packages/ieee802_11/__init__.py in
 module()
   35
   36 # import swig generated symbols into the test namespace
  --- 37 from ieee802_11_swig import *
   38
   39 # import any pure python here
 
  /usr/local/lib/python2.7/dist-packages/ieee802_11/ieee802_11_swig.py in
 module()
   24 fp.close()
   25 return _mod
  --- 26 _ieee802_11_swig = swig_import_helper()
   27 del swig_import_helper
   28 else:
 
  /usr/local/lib/python2.7/dist-packages/ieee802_11/ieee802_11_swig.py in
 swig_import_helper()
   20 if fp is not None:
   21 try:
  --- 22 _mod = imp.load_module('_ieee802_11_swig', fp,
 pathname, description)
   23 finally:
   24 fp.close()
 
  ImportError: dynamic module does not define init function
 (init_ieee802_11_swig)
 
 
 
  On Thu, Jan 29, 2015 at 4:02 PM, Bastian Bloessl bloe...@ccs-labs.org
 wrote:
  Hi,
 
   On 29 Jan 2015, at 08:37, Activecat active...@gmail.com wrote:
  
   error messages:
   Param - Value(value):
 Value ieee802_11.wifi_signal_field() cannot be evaluated:
 name 'ieee802_11' is not defined
  
 
  Please start an interactive python session and ‘import ieee802_11’. This
 will give you more debug output. I guess either your $PYTHONPATH does not
 contain the path of the module or some shared library can not be loaded.
 
  Best,
  Bastian
 

 --
 Dipl.-Inform. Bastian Bloessl
 Distributed Embedded Systems Group
 University of Paderborn, Germany
 http://www.ccs-labs.org/~bloessl/


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


Re: [Discuss-gnuradio] Asking help about gr-ieee802-11

2015-01-28 Thread Activecat
Dear Sir,

I am referring to the same problem in
https://www.ruby-forum.com/topic/4487026
but I am using Debian 7.7 AMD64.


I am facing exactly the same problem, as below:

It said i should open /examples/wifi_phy_hier.grc in
gnuradio-companion and build it

but when i open it, one of the block (ID: header formatter) appear
wrong.

error messages:
Param - Value(value):
  Value ieee802_11.wifi_signal_field() cannot be evaluated:
  name 'ieee802_11' is not defined


Question:
I am actually using the default prefix, which is /usr/local.
How should I solve the problem then?


Version info:
sgku@mmu2: ~ $ echo $PYTHONPATH
/usr/local/lib/python2.7/dist-packages

sgku@mmu2: ~ $ uname -a
Linux mmu2 3.2.0-4-686-pae #1 SMP Debian 3.2.63-2+deb7u1 i686 GNU/Linux

sgku@mmu2: ~ $ cat /etc/debian_version
7.7

sgku@mmu2: ~ $ gnuradio-config-info -v
3.7.5.1



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


Re: [Discuss-gnuradio] Persistence Checkbox of WX GUI Scope Plot

2014-07-28 Thread Activecat
Previously I installed gnuradio using build-gnuradio, but recently I
install gnuradio using pybombs.
This Thursday I will go to office to check whether python-opengl has been
installed by pybombs.

Sometime I use WX GUI Scope Sink to get constellation plot, and turn on
Persistence to observe the rotation due to frequency offset.


On Mon, Jul 28, 2014 at 4:42 PM, Martin Braun martin.br...@ettus.com
wrote:

 As Tom said,

 we haven't changed the WX widgets recently.

 Out of curiosity, what do you want that feature on a scope sink for?
 Are you plotting eye diagrams?

 M

 On 07/27/2014 04:10 PM, Activecat wrote:
  Dear Sir,
 
  It is found that in newer version of gnuradio, the WX GUI Scope Sink
  doesn't have a Persistence checkbox.
  In this case how to get back the feature ..?
 
 
  ___
  Discuss-gnuradio mailing list
  Discuss-gnuradio@gnu.org
  https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
 


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

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


Re: [Discuss-gnuradio] New WX GUI Scope Sink

2014-07-28 Thread Activecat
On Sun, Jul 27, 2014 at 10:58 PM, Tom Rondeau t...@trondeau.com wrote:

 On Sun, Jul 27, 2014 at 10:36 AM, Activecat active...@gmail.com wrote:

 Dear Sir,

 The new WX GUI Scope Sink behaves slightly differently from the previous
 one.
 How come it only plots the center part (as circled), how to make it plot
 the full graph without changing the time/div of x-axis?



 Activecat,

 We haven't changed anything in the wxgui for quite some time. My guess
 from this and your last post is that it's either a version issue of
 wxWidgets/wxPython on your machine or that you are not using the OpenGL
 versions of the pltoters. Check to make sure that python-opengl is
 installed.

 Tom



Yes, as you expected, the python-opengl had not been installed.
After installing it, many weird appearance of wxgui are back to normal.

Thank you very much.

Note:
Above problems happen when I install gnuradio using pybombs, regardless of
whether maint or master branch is installed.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Persistence Checkbox of WX GUI Scope Plot

2014-07-28 Thread Activecat
Thanks, the problem is solved after manually installing python-opengl.
The Persistence checkbox is back to normal, and works correctly.


On Mon, Jul 28, 2014 at 6:27 PM, Activecat active...@gmail.com wrote:

 Previously I installed gnuradio using build-gnuradio, but recently I
 install gnuradio using pybombs.
 This Thursday I will go to office to check whether python-opengl has been
 installed by pybombs.

 Sometime I use WX GUI Scope Sink to get constellation plot, and turn on
 Persistence to observe the rotation due to frequency offset.


 On Mon, Jul 28, 2014 at 4:42 PM, Martin Braun martin.br...@ettus.com
 wrote:

 As Tom said,

 we haven't changed the WX widgets recently.

 Out of curiosity, what do you want that feature on a scope sink for?
 Are you plotting eye diagrams?

 M

 On 07/27/2014 04:10 PM, Activecat wrote:
  Dear Sir,
 
  It is found that in newer version of gnuradio, the WX GUI Scope Sink
  doesn't have a Persistence checkbox.
  In this case how to get back the feature ..?
 
 
  ___
  Discuss-gnuradio mailing list
  Discuss-gnuradio@gnu.org
  https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
 


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



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


[Discuss-gnuradio] Persistence Checkbox of WX GUI Scope Plot

2014-07-27 Thread Activecat
Dear Sir,

It is found that in newer version of gnuradio, the WX GUI Scope Sink
doesn't have a Persistence checkbox.
In this case how to get back the feature ..?
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Problem with large number of inputs.

2014-07-27 Thread Activecat
Mostafa,

I do not think you have truly run the complete codes using Qtcreator,
because that doesn't have a gnuradio runtime (the scheduler).
At the other hand, your problem sounds more like a c++ coding error rather
than gnuradio-specific.
The helpful approach is

1).  Put up the OOT into github.
  This should be the simplest but complete OOT.

2).  Provide a big picture of what you try to accomplish.
  From experience many amateur programmers write codes wrong from the
ground up, and yet expect others to troubleshoot.
  When this happens, the only way to help is to start with the big
picture of what you wish to accomplish.

From previous experience you refused to reveal the big picture but
emphasize others to look at your existing buggy codes.
Please be reminded that this is an open forum and nobody get paid for
helping you.


On Mon, Jul 28, 2014 at 7:39 AM, Mostafa Alizadeh m.alizade...@gmail.com
wrote:

 I forgot to say, I'm using Qtcreator to debug my GNURadio codes I do not
 need any others!

 The prgram is terminated at line in which I read from the input for the
 first time i.e. :

 y_p[i][k] = 0;
 for (int j=0; jN_FS_phich(d_normal_cp); j++)
 {
 y_p[i][k] = y_p[i][k] + in[i*8+j][k];
 }

 Best,


 On Mon, Jul 28, 2014 at 4:05 AM, Mostafa Alizadeh m.alizade...@gmail.com
 wrote:

 Yes you're right about casting between in and input_items, however, I
 think this problem is somehow related to the large number input ports! I
 don't why!

 Here is the whole block:

 #ifdef HAVE_CONFIG_H
 #include config.h
 #endif

 #include gnuradio/io_signature.h
 #include phich_grouping_impl.h

 int N_FS_phich(bool normal_cp){
 if(normal_cp)
 return 8;
 else
 return 4;
 }

 namespace gr {
   namespace my {

 phich_grouping::sptr
 phich_grouping::make(bool normal_cp, int N_phich_group)
 {
   return gnuradio::get_initial_sptr
 (new phich_grouping_impl(normal_cp, N_phich_group));
 }

 /*
  * The private constructor
  */
 phich_grouping_impl::phich_grouping_impl(bool normal_cp, int
 N_phich_group)
   : gr::block(phich_grouping,
   gr::io_signature::make(N_phich_group *
 N_FS_phich(normal_cp), N_phich_group * N_FS_phich(normal_cp) ,
 sizeof(gr_complex)),
   gr::io_signature::make(1, 1, sizeof(gr_complex))),
   d_normal_cp(normal_cp),
   d_N_phich_group(N_phich_group)
 {
 set_tag_propagation_policy(TPP_DONT);

 }

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

 void
 phich_grouping_impl::forecast (int noutput_items, gr_vector_int
 ninput_items_required)
 {
 for (int i=0; id_N_phich_group * N_FS_phich(d_normal_cp); i++)
 {
 ninput_items_required[i] = 12;
 }
 }

 int
 phich_grouping_impl::general_work (int noutput_items,
gr_vector_int ninput_items,
gr_vector_const_void_star input_items,
gr_vector_void_star output_items)
 {
 const gr_complex *in[d_N_phich_group * N_FS_phich(d_normal_cp)];
 gr_complex *out = (gr_complex *) output_items[0];
 //in = (const gr_complex *) input_items;

 cout  n input input_items.size()  endl;
 int phich_in_len[d_N_phich_group];

 int x = 0;
 for (int i=0; id_N_phich_group * N_FS_phich(d_normal_cp); i++)
 {
 in[i] = (const gr_complex *) input_items[i];

 // reading tags
 vectortag_t tag_len;
 get_tags_in_window(tag_len,
0,
0,
ninput_items[0],
pmt::string_to_symbol(length));
 if(tag_len.size()0)
 {
 phich_in_len[i] = pmt::to_long(tag_len[0].value);
 x++;
 }

 }

 gr_complex y_p[d_N_phich_group][12];
 gr_complex y__p_tilt[d_N_phich_group/2][12];

 //cout  \tin[0][0]  in[0][0]  endl;

 if (x == d_N_phich_group * N_FS_phich(d_normal_cp)) // x ==
 d_N_phich_group) is for checking all the input tags are read
 {
 // grouping ...
 for (int i=0; id_N_phich_group ;i++)
 {
 for (int k=0; kphich_in_len[i]; k++)
 {
 y_p[i][k] = 0;
 for (int j=0; jN_FS_phich(d_normal_cp); j++)
 {
 y_p[i][k] = y_p[i][k] + in[i*8+j][k];
 }
 }

 }

 
 ...
 ...


 // adding tag
 add_item_tag(0,
  nitems_written(0),
  pmt::string_to_symbol(length),
 

Re: [Discuss-gnuradio] PyBombs install maint branch from fresh

2014-07-23 Thread Activecat
On Wed, Jul 23, 2014 at 5:16 PM, Martin Braun martin.br...@ettus.com
wrote:

 On 07/23/2014 07:14 AM, Activecat wrote:
  Dear Sirs,
 
  I am performing fresh gnuradio installation using pybombs.
  Pybombs install master branch by default.
  How to make pybombs install 'maint' instead?
 
  Act@rsLAPTOP: ~/download/pybombs $ git checkout maint
  error: pathspec 'maint' did not match any file(s) known to git.

 This is not how you use git; you need to give it a remote branch to
 track first. Also, if you checked out 'maint' on pybombs, it wouldn't
 necessarily check out 'maint' on any SW package it's trying to install.

 I assume you're trying to install GNU Radio maint, right? I guess one
 way would be to modify the gnuradio.lwr recipe, change the default
 branch to maint.

 M



Thanks.
yes, I am trying to install GNU Radio maintenance branch.
I will change the gitbranch of gnuradio.lwr recipe to 'maint'.
Does this means the uhd.lwr also need to be 'maint', or can just be
'master' as default?
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] PyBombs install maint branch from fresh

2014-07-23 Thread Activecat
On Wed, Jul 23, 2014 at 7:18 PM, Tim O'Shea tim.oshea...@gmail.com wrote:

 Martin,
 You are probably right we should track maint by default at this point.
 I think it's worth adding a Pybombs environment question about which branch
 to track during initial setup for those that prefer to track master
 however.
  Tim


I agree with you.
It is quite strange that the build-gnuradio script installs 'maint'
branch by default, whereas pybombs installs 'master' branch by default.
This is lack of consistency.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] PyBombs install maint branch from fresh

2014-07-23 Thread Activecat
On Wed, Jul 23, 2014 at 7:15 PM, Marcus Müller mar...@hostalia.de wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 As UHD and GNU Radio are widely independent, you can use whatever
 combination you want in almost any situation (aside from severe API
 breakage).


Thanks.
Just curious, does below statement still apply ..?



We provide UHD and GNU Radio binary installers for Ubuntu and Fedora users.
There are two choices:

   - *Unstable*: Built off of GNU Radio's *master* branch and an *unstable*
   UHD install, which includes bugfixes and new features.
   - *Stable*: Built off of GNU Radio's *maint* branch and a *stable* UHD
   install, which only includes bugfixes since the last major release.


*These GNU Radio installers will only work with their corresponding UHD
binary*. If you use an unstable UHD binary with a stable GNU Radio binary
(or vice versa), you will not be able to use *any* gr-uhd features.

http://code.ettus.com/redmine/ettus/projects/uhd/wiki/GNURadio_Linux
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] PyBombs install maint branch from fresh

2014-07-23 Thread Activecat
On Wed, Jul 23, 2014 at 8:40 PM, Marcus Müller mar...@hostalia.de wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Ah well, consistency with the slowly aging build-gnuradio was not the
 intended purpose of having pyBOMBS. build-gnuradio is the result of an
 ongoing effort to bring a stable GNU Radio to a lot of platforms
 without having people worry too much about getting all the
 dependencies and the build process right.

 PyBOMBS had this in mind too, but also was meant to provide a
 comfortable framework to get OOTs and dependencies installed in a
 flexible manner; thus, using master made a lot of sense, so the latest
 and greatest OOTs could run. However, since maint is so close to
 master, and PyBOMBS has hit the mass market, switching to maint does
 sound very clever.


Thanks for clarification.
This makes a very good sense.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] QAM Mod / Demod blocks

2014-07-23 Thread Activecat
On Wed, Jul 23, 2014 at 9:45 PM, Tom Rondeau t...@trondeau.com wrote:

 On Wed, Jul 23, 2014 at 8:42 AM, Activecat active...@gmail.com wrote:

 Dear Sir,

 I am learning to use the built-in QAM Mod and QAM Demod blocks.
 Refer below flowgraph.

 The problem is, at the output of the QAM Demod block, I can't get what
 I fed into the QAM Mod block.
 What is missing ..?


 All modulators take in packed bits and all demodulators output unpacked
 bits. First, remember that there are filters involved, so there's going to
 be a delay. You'd need to synchronize the output of the demodulator to some
 known word to understand which output bit is the correct start of the data
 stream. Easier would be to unpack the source data. Out of the 'head' block,
 make another connection to a 'unpack_k_bits' block with an unpacking value
 of 8. Use this to compare to the demodulated bits.

 Also, the vector source should generate values from 0 to 255 to create the
 packed bits needed as input to the modulator. Otherwise, you'll just be
 heavily biasing the constellation to just a few points. You can stick a
 constellation display block on the output of the modulator to see.

 Tom



Thank you very much.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] PyBombs install maint branch from fresh

2014-07-22 Thread Activecat
Dear Sirs,

I am performing fresh gnuradio installation using pybombs.
Pybombs install master branch by default.
How to make pybombs install 'maint' instead?

Act@rsLAPTOP: ~/download/pybombs $ git checkout maint
error: pathspec 'maint' did not match any file(s) known to git.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Build OOT gr-test2

2014-07-06 Thread Activecat
On Sun, Jul 6, 2014 at 4:59 PM, Marcus Müller marcus.muel...@ettus.com
wrote:

  I *assume* that activecat's module should build fine, it does on my
 computer (however, activecat, remove the build folder from git; that
 shouldn't be included ;) ).


Sorry for that, I have now removed the build folder.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Build OOT gr-test2

2014-07-06 Thread Activecat
Bill,

Do you face these problems when building OOT newly created from gr_modtool ?
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] missing internal callbacks

2014-07-03 Thread Activecat
On Fri, Jul 4, 2014 at 5:40 AM, emat...@yahoo.com wrote:

 Hello-

 when creating a flowgraph in GRC there are times I would like to change
 the decimation on-the-fly with a gui slider.  However, this does not work
 because the decimation factor in blocks such as the AM Demod or Decimating
 Fir Filter does not have an internal callback (as I understand it).  My
 main purpose is to be able to dynamically change the sampling rate to
 re-scale the x-axis in a gui fft sink while the flowgraph is operating.  Is
 there a way around this?  Is this a necessary limitation, or just something
 nobody has gotten around to implementing?



It is not impossible to have a block that its decimation factor or/and
sampling rate could be changed on the fly.
Create your own block, inherited from general block.
But it is tricky to code it correctly, need a lot of skill and testings.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Simple block with constant rate

2014-07-01 Thread Activecat
On Tue, Jul 1, 2014 at 6:17 PM, caruiz.ext caruiz@catec.aero wrote:

   --- Delay = 1
 current_delay  delay -delay of 1 sample
 I insert a virtual sample (linear interpolation)
 I sent the next sample (2)
 current_delay = 1


I don't understand what this means.


   --- Delay = 1
  current_delay = delay - nothing
 I send the next sample (3)
 current_delay = 1




My comments:

1).  I see no reason that q, inicio, sample_rate and delay should
be defined as public class variables, rather than private.

2).  You make this a general block that always consumes and returns the
same value.  This is similar to a sync block.
  But a delay block is not a sync block.

3).  Basically what a delay block does is just to copy input[i] to
output[ i + delay ], this creates an effect of delaying the signal.
  You don't need to create a std::queue to perform delay.

4).  The definition of Sample class, if it is really needed, should be
placed in separate file.

5).  Your always forecast 1 input item, but in general_work() you always
consumes and access the input buffer as if its length is always not smaller
than noutput_items.
  (you forget the memory boundary) This is fatal.

6).  I don't understand your attached picture.
  I also don't understand your requirement.


You have written a code (delay_cola_fff) that is wrong from the ground up.
The only way to help you is to understand your requirement and suggest
something else from scratch.
Unfortunately I fail to understand your requirement.

I suggest you to look into the source code of the existing Delay block,
and start from there.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Simple block with constant rate

2014-07-01 Thread Activecat
On Tue, Jul 1, 2014 at 9:30 PM, Activecat active...@gmail.com wrote:


 On Tue, Jul 1, 2014 at 6:17 PM, caruiz.ext caruiz@catec.aero wrote:

   --- Delay = 1
 current_delay  delay -delay of 1 sample
 I insert a virtual sample (linear interpolation)
 I sent the next sample (2)
 current_delay = 1


 I don't understand what this means.


   --- Delay = 1
  current_delay = delay - nothing
 I send the next sample (3)
 current_delay = 1




 My comments:

 1).  I see no reason that q, inicio, sample_rate and delay should
 be defined as public class variables, rather than private.

 2).  You make this a general block that always consumes and returns the
 same value.  This is similar to a sync block.
   But a delay block is not a sync block.

 3).  Basically what a delay block does is just to copy input[i] to
 output[ i + delay ], this creates an effect of delaying the signal.
   You don't need to create a std::queue to perform delay.

 4).  The definition of Sample class, if it is really needed, should be
 placed in separate file.

 5).  Your always forecast 1 input item, but in general_work() you always
 consumes and access the input buffer as if its length is always not smaller
 than noutput_items.
   (you forget the memory boundary) This is fatal.

 6).  I don't understand your attached picture.
   I also don't understand your requirement.


 You have written a code (delay_cola_fff) that is wrong from the ground up.
 The only way to help you is to understand your requirement and suggest
 something else from scratch.
 Unfortunately I fail to understand your requirement.

 I suggest you to look into the source code of the existing Delay block,
 and start from there.



Meanwhile, you shouldn't have skipped the unittest from the very beginning.
The unittest will show you that this block (delay_cola_fff) doesn't work
accordingly.
There is no point to go further unless this block has passed its unittest.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Simple block with constant rate

2014-06-25 Thread Activecat
On Wed, Jun 25, 2014 at 5:15 PM, caruiz.ext caruiz@catec.aero wrote:

 Signal 2,3,-,-,4,-,-,-,5,1,1,-,4,55...
 Noise  1,1,0,2,2,1,2,3,4,2,3,4,1,12...

 Output 3,4,0,2,6,1,2,3,9,3,4,4,5,67...



I believe your problem could be easily solved.
Let's show us the code that generates the Signal (2,3,-,-,4,), or does
it come from a UHD source?
Meanwhile your code above is not correct.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Simple block with constant rate

2014-06-25 Thread Activecat
On Wed, Jun 25, 2014 at 6:53 PM, caruiz.ext caruiz@catec.aero wrote:

  Activecat, my input block is a variable delay.

 - I have a signal recorded in a file.

 - Signal enters in a variable delay (delay is controlled by another block).
 - Signal enters in Add noise block.
 File -- Variable delay -- Add noise -- out

 My problem is that if variable delay is, for example, 5 samples: a sample
 enters, the block waits 5 samples, the sample leaves. Then my output is:
 sample_3,- , - , - , - , - ,sample_2 , - , - , - , - , - , sample_1



Could you please explain how did you build the variable delay, do you use
the built-in delay block?
If this is a custom delay block, please show your code.

Meanwhile your understanding about the delay block is wrong.
Says, the input is:  s1, s2, s3, s4, s5.
After going through the delay block (with delay=5), the output becomes: 0,
0, 0, 0, 0, s1, s2, s3, s4, s5.
The output of delay block will never be - but it could be 0 (zero).

Probably you just need the standard Add block instead of your custom
block above.
Could you try this first..?
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] RAW source

2014-06-24 Thread Activecat
Sara,

We don't seem to communicate at the same frequency.
I have nothing else to say.
Good luck.



On Wed, Jun 25, 2014 at 11:06 AM, Sara Chérif saracheri...@gmail.com
wrote:

 Thanks Activecat very much .

 Now, SIP packets length is varying  RTP packets have fixed length of 87
 bytes . Now to input this traffic coming from the soft phone to the
 Gnuradio to be processed, i use the UDP source block(to read the UDP
 packets from the soft phone port)
   in UDP source block , I can determine only one port number and Ip
 address. I put the IP address of the Wlan interface (my laptop IP address)
 , i also tried to put 0.0.0.0 and the port number of twinkle soft phone
 on which i receive the RTP traffic.

 I faced some problems:

 First ,How to receive now the SIP signaling packets and the Rtp packets at
 the same time to establish a call with another soft phone ( as the soft
 phone uses 2 different port numbers for sip  RTP while i have to identify
 only one port number in the UDP source block)??
 The flow graph i use consists of :Udp source - throttle -Uchar to float
 and WX GUI sink scope.
 I tried to duplicate the flow graph (to use another one which is the same
 as above and runs in parallel )
 Also I tried to use 2 UDP source block then the add block.
 But I don't know till now how to multiplexes the two traffics (SIP and
 RTP) as we need to integrate the whole system to see this  what is the
 right method ? DO I have to write simply the port of the ethernet
 connection ?
 What will I do in this case  : If I want to make the call between the 1st
  2nd lap ( One has Twinkle  the other has GNU Radio  Twinkle,  and I
 want GNU Radio to capture packets coming to Twinkle ? (use 2 udp source +
 add block ) ?

 Second, i don't know how to determine the payload size. what if the packet
 length in the case of the Sip signaling is variant. In the  soft phone, we
 can determine the maximum transfer unit (MTU), does this help here ?

 Third, i have a question relating to the OFDM transmitter: what is the
 required packet length , I wrote it 100  as each sip packet is 87 bytes and
 I will use coding with rate 7/8 then after coding each packet is 100 bytes)
 what if the packet length is variable as in the case i stated above (SIP
 pkt length is not constant)?

 Note: i want to capture the packets coming from the soft phone in order to
 process them on gnuradio using OFDM system and send and receive them at the
 other end using two Usrps to be used as input to the other soft phone.

 Thanks in advance


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


Re: [Discuss-gnuradio] RAW source

2014-06-23 Thread Activecat
On Thu, Jun 19, 2014 at 9:32 PM, Sara Chérif saracheri...@gmail.com wrote:

 Sorry , I forgot to say that some packets coming from Twinkle are SIP 
 ARP packets not only RTP.
 Hence , I think I need to receive RAW packets in GNU Radio ( as I have
 different type of packets:  RTP , ARP , SIP packets)

 Note that :
 I use 4 laps  2 USRPs.
 1st  4th lap has twinkle softphone  I will make a call between them.
 2nd lap has an OFDM TX implemented by Gnuradio.
 3rd lap has an OFDM RX implemented by Gnuradio.
 First and 2nd laps are connected by Ethernet cable.
 3rd  4th laps are connected by Ethernet cable.
 One USRP is connected to the 2nd lap , the other USRP is connected to the
 3rd lap.
 2nd lap(GNUradio ,ofdm tx)  will receive the packets from 1st lap(Twinkle)
 using RAW socket (as I think ) .
 2nd lap will send the packets to the 3rd lap by the USRPs.
 3rd lap ( Gnuradio , ofdm rx)  will send real time voice packets to 4th
 lap (Twinkle) using RAW socket(as I think).

 If I want only to make a call  send and receive the voip real time
 packets , Do I have then to write a specific block as this mentioned
 decoder ?

 Thanks in Advance.




Hi Sara,

After few rounds of communications, apparently you are interested to
intercept the VoIP session at OSI layer 5 or above (eg. RTP session), and
you try to use gnuradio (with USRPs) to accomplish that.
Probably this is because your area of interest is actually those RTP and
VoIP stuffs.
I have few highlights:

1).  To accomplish this, one of the right ways is to make your PC becomes
one of the VoIP endpoints.
In this case you listen to the speaker and speak to microphone attached to
your PC.  At the other end of the session is a SIP phone.
With this, you really dig into the RTP and VoIP stuffs.
You need neither gnuradio nor USRP.  In this case the wireless link is
trivial in your setup.

2).  In this case you need ASIO [1] or something similar, and start working
from the low level.
But as ASIO may not sound as an easy topic, you are looking for tools like
gnuradio to abstract the low level stuff.
Yes gnuradio has built-in blocks that abstract ASIO, but that abstraction
doesn't mean to let you work at RTP layer.

3).  In this case the gnuradio is not the right tool for your purpose.  You
had chosen the tool without first qualifying it.
Your setup above (with the 4 laps) couldn't actually force gnuradio to
intercept the VoIP session at RTP layer.
This is a wrong design.


Let's be honest about your area of interest.
Anyway I could be wrong.

1. http://www.boost.org/doc/libs/1_55_0/doc/html/boost_asio.html
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] RAW source

2014-06-21 Thread Activecat
On Sat, Jun 21, 2014 at 7:31 PM, Sara Chérif saracheri...@gmail.com wrote:

 Thanks Marcus Müller , Marcus D. Leech , Activecat.

 yes , we can call this Ethernet to wireless bridge using GSM RF channel
 . I have some questions, please :

 1- Can I use both UDP source  TCP source  in this way :
   Can I connect output of UDP source  output of TCP source to input
 of Socket PDU  and connect output of Socket PDUto the input of the
 PDU to tagged stream  block ?  What is wrong in this connection ?

 2- But when I connect the output of TCP or UDP source to the Socket PDU ,
 I got an error ! what does the Socket PDU block take as an input?!

 3- Also when I connect output of TCP or UDP source to PDU to tagged
 stream  I got an error , what must be the input of the PDU to tagged
 stream block ?! Does the PDU to tagged stream  is used here instead of
 the stream to tagged stream block  and has same role?


 4- Does the block  Socket PDU can be used instead of a socket ? It don't
 understand what is the importance of this block ?

 5-  Is there any flags so that when signaling packets are coming (SIP or
 ARP)  : TCP source is enabled while UDP source is disabled  ?
   And the inverse happens when there is RTP packets coming?
 Note that , in network settings in Twinkle soft phone , there is a port
 number for RTP different from port number of SIP  we can change these
 ports numbers , I don't know if this may help me .

 6- Do I have to write a code for socket ?or simply I can write ,in the
 UDP source block in Gnu radio(2nd lap) , the IP address  port number of
 the Ethernet connection (of 2nd lap) receiving from Twinkle(1st lap) ?

 7-  If there is no new packets coming , I want to send zeros instead of
 repeating the sent packets ? How Can I do this ?
 i.e: I want to insert 8 bits zeros after each ofdm symbol as a guard band
 : I tried to insert  pad source  block to do this , after the IFFT block
 and before the cyclic prefixer block
  , but it is not allowed to connect 2 inputs to the cyclic prefixer also I
 don't know how to use the pad source to insert these zeros  I don't know
 if there is a block to concatenate between the zeros coming from the pad
 source  the output of the ifft block .

 Thanks in advance .



Looking at above questions, you doesn't seem to understand OSI 7 layers
model.

You said this is a wireless bridge.
If you have decided to have gnuradio (with USRPs) working at layer 2, then
you no longer need to consider TCP, UDP, RTP etc.
Even if you decided to have gnuradio working at layer 3, you also no need
to handle TCP, UDP, RTP etc.

If you want to have gnuradio (with USRPs) working at layer 7, then you this
will be very complicated and the resulting setup will be very application
specific, i.e. you will need to handle each application one by one. This
approach is unnecessarily complicated and hence not recommended.



An analogue to this:

Says, now you have a PC that you want to connect to internet. In another
room you have a DSL router which is already connected to internet.
Currently the PC has no connection to the DSL router, it is standalone.
To connect the PC to the DSL router, you have few options:

Option 1:  Use Ethernet Extender
The Externet Extender do not need to understand any IP address, TCP, UDP,
HTTP etc.
In this case the Ethernet Extender is working at OSI layer 1.  The Ethernet
Extender doesn't even need to care about the MAC address, right ?

Option 2: Use a bridge
The bridge need a MAC address but does not need any IP address.  It will
perform packet switching based on MAC addresses. It doesn't need to look at
the IP addresses of the packets, no need to talk about the TCP, HTML etc.
In this case the bridge is working at OSI layer 2.

Option 3: Use a router
If the IP address of your PC is in different subnet from the Ethernet port
of the DSL router, then you need put another router between the PC and the
DSL router. The default gateway of the PC is pointing to the
interconnecting router.
In this case the router is working at OSI layer 3.   The router doesn't
need to understand any HTTP protocol, right?

Option 4: Use a proxy server
The HTTP proxy server needs to understand HTTP traffic, know the contents
of each website etc in order to perform filtering and caching.  In this
case the proxy server is working at OSI layer 7.


Now let's come back to your question.
As you already decided to have gnuradio working at layer 2, why you still
need to care about the UDP, TCP, RTP etc ?
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] prototype for make() does not match any in class

2014-06-19 Thread Activecat
On Thu, Jun 19, 2014 at 3:47 PM, Hoang Ngo Khac khachoang1...@gmail.com
wrote:

 Dear all,

 I'm writing an out-of-tree C++ block performing some PSK mapping method
 (BPSK, QPSK. 16PSK, 256PSK). I got this error when running make command:

  /home/khachoang/gr-Hoang/lib/Digital_Mapper_impl.cc:36:5: error:
 prototype for ‘gr::Hoang::Digital_Mapper::sptr
 gr::Hoang::Digital_Mapper::make(int)’ does not match any in class
 ‘gr::Hoang::Digital_Mapper’
 /home/khachoang/gr-Hoang/include/Hoang/Digital_Mapper.h:49:19: error:
 candidate is: static gr::Hoang::Digital_Mapper::sptr
 gr::Hoang::Digital_Mapper::make()



Chances are, when you created this block using gr_modtool, you didn't
specify any argument.
But later you decided to add the argument int mapping_mode, you did this
by amending Digital_Mapper_impl.h and Digital_Mapper_impl.cc but
forgotten to look into the file include/Hoang/Digital_Mapper.h

If this is the case, the easiest solution is to remove and recreate this
block, both by using gr_modtool, but ensure to specify the argument int
maping_mode during the block creation wizard.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] RAW source

2014-06-19 Thread Activecat
On Thu, Jun 19, 2014 at 8:11 PM, Marcus D. Leech mle...@ripnet.com wrote:

  On 06/19/2014 07:54 AM, Sara Chérif wrote:

  Hi,
 I want to capture packets coming from Twinkle Soft phone in gnuradio,
 these packet are RTP packets .
  But in gnuradio , there is only UDP or TCP source ! I can't find Raw
 source to correspond to the RTP packets.
   Is there an alternative to RAW source in GNUradio ?
  Thanks.
  https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

 RTP is usually carried over UDP



Just to be more detailed, RTP is a Session Layer (OSI Layer 5) protocol [1]
that lies on top of UDP (an OSI Layer 4 protocol).

1. http://en.wikipedia.org/wiki/OSI_model
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] RAW source

2014-06-19 Thread Activecat
On Thu, Jun 19, 2014 at 9:32 PM, Sara Chérif saracheri...@gmail.com wrote:

 Sorry , I forgot to say that some packets coming from Twinkle are SIP 
 ARP packets not only RTP.
 Hence , I think I need to receive RAW packets in GNU Radio ( as I have
 different type of packets:  RTP , ARP , SIP packets)

 Note that :
 I use 4 laps  2 USRPs.
 1st  4th lap has twinkle softphone  I will make a call between them.
 2nd lap has an OFDM TX implemented by Gnuradio.
 3rd lap has an OFDM RX implemented by Gnuradio.
 First and 2nd laps are connected by Ethernet cable.
 3rd  4th laps are connected by Ethernet cable.
 One USRP is connected to the 2nd lap , the other USRP is connected to the
 3rd lap.
 2nd lap(GNUradio ,ofdm tx)  will receive the packets from 1st lap(Twinkle)
 using RAW socket (as I think ) .
 2nd lap will send the packets to the 3rd lap by the USRPs.
 3rd lap ( Gnuradio , ofdm rx)  will send real time voice packets to 4th
 lap (Twinkle) using RAW socket(as I think).


Hi Sara,

What you need is only a wireless bridge.
A wireless bridge allows you to connect one network (1st and 2nd lap) to
another (3rd and 4th lap) over the airwaves (which is USRP-to-USRP), rather
than having to run wire from one room (2nd lap) to another (3rd lap).
I would say you only need to work at the OSI layer 1 (physical layer).  In
this case you can ignore the UDP, RTP etc as far as gnuradio is concerned.

In alternative you may implement the wireless bridge using 802.11, but it
is not mandatory for you to work at OSI layer 2.

So you may rephrase your question as how to build wireless bridge using
USRPs ?
Then you may want to work in either transparent repeater mode or bridge
mode. In either case you don't need to work at layer 3 or above.
The basic requirements are just that, you need the USRPs to setup wireless
link at full-duplex, and make sure the bandwidth of the wireless channel is
sufficient for few concurrent VoIP calls.

Anyway, I may be wrong.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] testing block written in block

2014-06-18 Thread Activecat
On Wed, Jun 18, 2014 at 4:57 PM, sreena p h sreena...@yahoo.in wrote:

 Hi

 I'm new to GNU radio and is trying to develop my own block. I want to
 develop a block that intake a vector and out put sum of the vector
 elements. I used the out of tree module and followed tutorial using python
 code. How should be the arguments of blocks.vector_source_f to be given if
 i am inputting vector stream of four integers is used. the python code and
 test file is given below.



Does your intake vectors have fixed-length or variable length?

If they are variable length, then your sream_ff block won't be very useful
in graphical GRC flowgraph, because there the vector streams are usually
fixed-length.

If they are fixed-length, then your problem could be easily solved; just
create sream_ff as a decimator block.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] testing block written in block

2014-06-18 Thread Activecat
On Wed, Jun 18, 2014 at 9:14 PM, Nowlan, Sean sean.now...@gtri.gatech.edu
wrote:

  If you’d rather use stock GR blocks or you would like a flowgraph with
 identical functionality, you can hook up a Vector to Stream block (with
 num_items=vector_length) to an Integrate block (with
 decimation=vector_length).



 …

 vector_length = 10

 self.vec2stream = blocks.vector_to_stream(gr.sizeof_gr_complex,
 vector_length)

 self.integrate = blocks.integrate_cc(vector_length)

 self.connect((self.vec2stream, 0), (self.integrate, 0))

 …



 Sean



I agree, that the Integrate block is a decimator block that implement this
perfectly.
Just that she may want to use integrate_ff rather than integrate_cc,
depending on her needs.
Also we are assuming that the intake vectors are fixed in length.

int
integrate_ff_impl::work(int noutput_items,
  gr_vector_const_void_star input_items,
  gr_vector_void_star output_items)
{
  const float *in = (const float *)input_items[0];
  float *out = (float *)output_items[0];

  for (int i = 0; i  noutput_items; i++) {
out[i] = (float)0;
for (int j = 0; j  d_decim; j++)
  out[i] += in[i*d_decim+j];
  }

  return noutput_items;
}
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] UHD Driver Not Working

2014-06-17 Thread Activecat
On Tue, Jun 17, 2014 at 2:25 AM, Carl Condas ccon...@yahoo.com wrote:

 An attempt to use PyBOMBS to install GNU Radio resulted in no errors.
 However, the UHD driver must have installed incorrectly, because the source
 and sink blocks are not working. Is there any way to fix this problem?

 -Carl



I guess you are not installing on Ubuntu Linux.
I experienced the same problem [1] when using PyBOMBS to install gnuradio
on Debian Wheezy.
Nevertheless the link below may worth referred.

In short, you may try these in sequence:
a).  Run ./pybombs env and then source ../target/setup_env.sh
b).  Search for uhd_usrp_source.xml and make sure that this is in your
GRC path
c).  Manually remove all ghost version of uhd and reinstall it using
pybombs.


1.
http://gnuradio.4.n7.nabble.com/PyBOMBS-installed-gnuradio-uhd-usrp-sink-not-found-td48388.html
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Using set_min_output_buffer() in Python block

2014-06-17 Thread Activecat
On Tue, Jun 17, 2014 at 6:16 PM, David Halls david.ha...@toshiba-trel.com
wrote:

 Thanks Activecat!! I had the problem that

 out_rc[0:len(rcABm)] = rcABm
 ValueError: operands could not be broadcast together with shapes (4096)
 (5376)

 where out_rc = output_items[3]

 using set_output_multiple(4096*2) has resolved my problem by increasing
 the length of the output buffer vector to 4096*2. I wonder if there is a
 fixed limit as to how far I can stretch this? In the future I may want my
 decoder to output even more than blocks in one go.



In GRC graphical flowgraph there is a Max Number of Output setting under
the Options block.
Documentation: The Max Number of Output is the maximum number of output
items allowed for any block in the flowgraph; to disable this set the
max_nouts equal to 0. Use this to adjust the maximum latency a flowgraph
can exhibit.

Besides this I guess there is no other limiting factor.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Writing wav file in GMSK TX, RX

2014-06-09 Thread Activecat
On Mon, Jun 9, 2014 at 1:57 PM, dushyant.marathe dushyantmara...@gmail.com
wrote:

 Hello list,

 I am simulating Voice transmission system in GRC using 'GMSK Mod', 'GMSK
 Demod' in loop without any channel in between  My flow graph configuration
 is as follows:

 Wav file source - Throttle - Packet encoder - GMSK Mod - GMSK Demod -
 Packet decoder - Wav file sink/Scope/FFT Sink.

 When I execute the above flow graph, I get output at Scope, FFT Sink.
 Also it writes wav file using 'Wav file sink' block, but I am not able to
 play that wav file, it gives error.



You didn't mention how you played the wave file.
Take note that in gnuradio, audio sink accepts floating point samples in
the range of -1 and +1. [1]
Beyond the range you will get clipping error.

1.
http://gnuradio.org/redmine/projects/gnuradio/wiki/TutorialsWritePythonApplications#A-first-working-code-example
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Scheduling a block even with no input items RE: Flow graph blocking when doing 2x1 transmission

2014-06-09 Thread Activecat
On Tue, Jun 3, 2014 at 11:08 PM, Activecat active...@gmail.com wrote:


 Create a general block with two inputs and two outputs.
 The two outputs connect to the USRP UHD sink. The first input connects to
 the constantly transmitting source while the second input connects to the
 non-consistent source.

 In your forecast function:

ninput_items_required[0] = noutput_items;
ninput_items_required[1] = 0;


 Then in your general_work function:

   const gr_complex *in0 = (const gr_complex*) input_items[0];
   const gr_complex *in1 = (const gr_complex*) input_items[1];
   gr_complex *out0 = (gr_complex*) output_items[0];
   gr_complex *out1 = (gr_complex*) output_items[1];

   for (int i=0; i  noutput_items; i++)
   out0[i] = in0[i];

   for (int i=0; i  ninput_items[1]; i++)
   out1[i] = in1[i]

for (int i=ninput_items[1]; i  noutput_items; i++)
   out1[i] = 0.0; // here you fill in the zeros, but won't
 over-filled.

   consume( 0, noutput_items);
   consume( 1, ninput_items[1]);

   return noutput_items;



I've tested out above idea, it works.
Its implementation source file is at
https://github.com/activecat/gr-test2/blob/master/lib/streamer1_impl.cc
To test it out, just run the flowgraph of
https://github.com/activecat/gr-test2/blob/master/examples/flowgraph_09.grc

https://github.com/activecat/gr-test2
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Frequency Counter‏

2014-06-07 Thread Activecat
First of all, please stay on the list.
Refer inline reply below.


On Fri, Jun 6, 2014 at 11:12 PM, jimsiaf91 [via GnuRadio] 
ml-node+s4n4882...@n7.nabble.com wrote:

 Well,
 I tried it with my usrp N210. The first time it showed something on the
 Scope sink. After that it did not.


Your setup could be wrong.



 Only when I run first the flowgraph_6.grc then the 5th ( the one with the
 USRP source) showed something. I do not understand why this is happening.


I see no correlation on this.



 Besides that, I tried to measure at 2Ghz with and external frequency
 generator (sin) and also attached a number sink after the block you wrote.
 The number sink did not show 2Ghz (in units), instead jittered at about
 1000 units.


If the Sample Rate (samp_rate) of the UHD (USRP) source is only 100kHz, it
cannot measure 2GHz external frequency.
Refer Nyquist sampling theory.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Scheduling a block even with no input items RE: Flow graph blocking when doing 2x1 transmission

2014-06-07 Thread Activecat
On Thu, Jun 5, 2014 at 4:19 PM, David Halls david.ha...@toshiba-trel.com
wrote:

  Original message 
 From: Activecat
 Date:2014/06/05 7:57 AM (GMT+00:00)
 To: David Halls ,discuss-gnuradio@gnu.org
 Subject: Re: [Discuss-gnuradio] Scheduling a block even with no input
 items RE: Flow graph blocking when doing 2x1 transmission

 David,
  Basically my idea to solve the problem may involve an overhaul of your
 existing flowgraph, as below:

  1).  You must understand that the output of UHD source is at constant
 rate. In particular I am referring to the Relay Rx USRP.
Even when the USRP does not receive any RF signal, it keeps
 sending out zeros (plus noise) as its output, at constant rate.

Try to make all your blocks behave in this way. I am referring to
 the blocks between the Relay Rx and Relay Tx.
The idea is: keep transmitting, don't produce no output at any
 time.  If nothing need to be produced, then output zeros at constant rate.
In this case all your custom blocks are either sync block,
 decimation or interpolation blocks. You don't need any general block.

 2).  With above condition fulfilled, we could ensure that the data fed
 into the Relay Tx USRP is at constant rate, and we could then determine
 this rate by simple calculations.
The data stream into the Relay Tx USRP will not stop at any
 instance. It is 'consistent'.

  3).  You want the Relay Rx USRP ignores the received signal during the
 time that the Relay Tx USRP is transmitting, that is fine.
But just try to make the downstream block of Relay Rx USRP keep
 transmitting zeros rather than stop transmitting during this period.

  4).  With these, you will have both Relay Tx USRP and Source USRP
 transmitting at constant data rate and nonstop.
They could be transmitting at different rates, that is ok, and
 this is not difficult to handle.

  With this, you avoid the initial problem (problem of occasionally there
 is no items at one of the inputs) mentioned in this thread, which is the
 root cause of your problem.
  Then your problem is solved !

Great! Thanks active cat.  This will take some time, I'll will report
back once I have it working!! :)


Hi David,

I have a frequency counter block [1], could be used as an example.
The freq_counter1 is a general block, it was implemented as a sync block
in freq_counter2.
You may run examples/flowgraph_07.grc and flowgraph_08.grc to see their
outputs.

1. https://github.com/activecat/gr-test2
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Scheduling a block even with no input items RE: Flow graph blocking when doing 2x1 transmission

2014-06-05 Thread Activecat
On Wed, Jun 4, 2014 at 7:10 PM, David Halls david.ha...@toshiba-trel.com
wrote:

 Activecat,
 In fact my horrible hack doesn't work properly. Once items start arriving
 at Payload TD Tx 2, they still don't arrive as 'consistently' (for want of
 a better word), as those from the Noise Source block, and thus zeros are
 inserted when they are not required!

 David



David,

Basically my idea to solve the problem may involve an overhaul of your
existing flowgraph, as below:

1).  You must understand that the output of UHD source is at constant rate.
In particular I am referring to the Relay Rx USRP.
  Even when the USRP does not receive any RF signal, it keeps sending
out zeros (plus noise) as its output, at constant rate.

  Try to make all your blocks behave in this way. I am referring to the
blocks between the Relay Rx and Relay Tx.
  The idea is: keep transmitting, don't produce no output at any time.
If nothing need to be produced, then output zeros at constant rate.
  In this case all your custom blocks are either sync block, decimation
or interpolation blocks. You don't need any general block.

2).  With above condition fulfilled, we could ensure that the data fed into
the Relay Tx USRP is at constant rate, and we could then determine this
rate by simple calculations.
  The data stream into the Relay Tx USRP will not stop at any
instance. It is 'consistent'.

3).  You want the Relay Rx USRP ignores the received signal during the
time that the Relay Tx USRP is transmitting, that is fine.
  But just try to make the downstream block of Relay Rx USRP keep
transmitting zeros rather than stop transmitting during this period.

4).  With these, you will have both Relay Tx USRP and Source USRP
transmitting at constant data rate and nonstop.
  They could be transmitting at different rates, that is ok, and this
is not difficult to handle.

With this, you avoid the initial problem (problem of occasionally there is
no items at one of the inputs) mentioned in this thread, which is the root
cause of your problem.
Then your problem is solved !
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Frequency Counter‏

2014-06-05 Thread Activecat
On Tue, Jun 3, 2014 at 11:41 PM, Dimitris Siafarikas jimsia...@hotmail.com
wrote:

 Exceptional work! Looking forward to try this with my usrp tomorrow ;)





Dimitris,

How is your test result with USRP, any updates ..?
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] signal level

2014-06-05 Thread Activecat
On Thu, Jun 5, 2014 at 4:09 PM, Marcus Müller marcus.muel...@ettus.com
wrote:

  Hi Ali,
 power is very less...
 Of course, since power is proportional to amplitude squared.
 Obviously, if you try to drive an DAC with more than it's maximum
 amplitude, you will get clipping.
 This is a nonlinear thing and has very bad effects on your spectrum, and
 that's why you usually avoid it.



Dear Sirs,

There is a parameter Ch0: Gain(dB) on both UHD Source and UHD Sink.
Does this gain apply before or after the ADC?

Meanwhile depends on daughtercards, sometime there are some built-in
auto-gain mechanism, is this correct?
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] signal level

2014-06-05 Thread Activecat
On Thu, Jun 5, 2014 at 3:54 PM, Martin Braun martin.br...@ettus.com wrote:

 On 05.06.2014 05:17, jason sam wrote:

 Hi Tom,
 Can you tell what is the constraint for USRP B210?


 Stay *well* within +/-1.



Is there any way to tell whether clipping had happened, says from warning
message etc ..?
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Calling functions from flowgraph ?

2014-06-05 Thread Activecat
On Thu, Jun 5, 2014 at 5:07 PM, Abouda Yassine abouda21yass...@gmail.com
wrote:

 Hi everybody,

 well,I had a python script which works with gnuradio and outputs results
 on the terminal.To make it more visual,I made all the blocks on the
 gnuradio-comapnion but now I would like to output the results on the
 terminal which means I have to call the main loop in the python script from
 the flowgraph to get the job done.In other words,when I hit the button
 execute the flowgraph,I want to see the porgram running.I hope you
 understood what I'm trying to do.So,how can I do that?



I think I understand your requirements.  You just need to perform these
steps:

Step 1:
In GRC (gnuradio-companion), open the flowgraph and then press F5 (or,
click menu Build -- Generate)
This will generate a new file: top_block.py
The file is located at the same directory where your *.grc file is located.

Step 2:
Open a terminal, cd to directory of the top_block.py, execute it:
  python top_block.py

With this you will see all python outputs at this terminal.

Is this exactly what you asking for..?

P/S:  In fact Marcus Muller had already answered your question in above
message.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Calling functions from flowgraph ?

2014-06-05 Thread Activecat
Please stay on the list.

On Thu, Jun 5, 2014 at 11:42 PM, Abouda Yassine abouda21yass...@gmail.com
wrote:

 Hi,
 Well,in fact that is not my question.I am going to explain with an example
 let's say I am using a random source which generates numbers between 0 and
 255,and store them
 in a file sink.Then I would like to output the numbers above 100 in
 terminal.So I am going to need a small function containing an if
 condition.Suppose I wrote this function in a seperate python file and i
 would like to import it from the flowgraph without using the generated file
 you talked about(top_block.py).Is that possible?Does the GRC offer this
 kind of functionality.I hope that I you get the idea.

 regards,
 yassine



The top_block.py is a valid python file, you could amend it accordingly to
include additional import XXX statement, as long as it is valid in python
language.

In this case you have to edit the top_block.py by hand, this cannot be done
from the GRC.

Hope this answers your question.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Calling functions from flowgraph ?

2014-06-05 Thread Activecat
On Fri, Jun 6, 2014 at 12:07 AM, Activecat active...@gmail.com wrote:

 Please stay on the list.

 On Thu, Jun 5, 2014 at 11:42 PM, Abouda Yassine abouda21yass...@gmail.com
  wrote:

 Hi,
 Well,in fact that is not my question.I am going to explain with an
 example let's say I am using a random source which generates numbers
 between 0 and 255,and store them
 in a file sink.Then I would like to output the numbers above 100 in
 terminal.So I am going to need a small function containing an if
 condition.Suppose I wrote this function in a seperate python file and i
 would like to import it from the flowgraph without using the generated file
 you talked about(top_block.py).Is that possible?Does the GRC offer this
 kind of functionality.I hope that I you get the idea.

 regards,
 yassine



 The top_block.py is a valid python file, you could amend it accordingly to
 include additional import XXX statement, as long as it is valid in python
 language.

 In this case you have to edit the top_block.py by hand, this cannot be
 done from the GRC.

 Hope this answers your question.



Nevertheless this won't gain you any benefit, because you won't be able to
use your function directly in the flowgraph.
The correct way is explained in [1].

1.  http://gnuradio.org/redmine/projects/gnuradio/wiki/OutOfTreeModules
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] something about forecast()

2014-06-04 Thread Activecat
On Wed, Jun 4, 2014 at 2:22 PM, xianda wangxianda920...@163.com wrote:

 Hi all:
  I want to know something about the forecast().
  I have already known that forcast() can tell  scheduler how many
 input items are required for each output item.
  1.But now i have read two example:
 The first one:
void your_block::forecast(int
 noutput_items,gr_vector_int ninput_items_required){

 ninput_items_required[0]=100 * 
 noutput_items;
 ninput_items_required[1]=100 * 
 noutput_items; }


In your first example above, you have exactly two input ports.
That's why you need to specify ninput_items_required[0] and
ninput_items_required[1], there are in total 2 ports.
In fact in this example the value of ninput_items_required.size() is 2.
In alternative, you could also replace above two lines with:

for (unsigned i=0; i  2; i++)
   ninput_items_required[i] = 100 * noutput_items;


Or, to be more generic, you could also use this:

   for (unsigned i=0; i  ninput_items_required.size(); i++)
   ninput_items_required[i] = 100 * noutput_items;



  2.I want to know if we use the general_work().Is it means that 
 we must use the forcast()?Thanks.
 Best regards


If you use general block, you need to specify forecast().
General block has general_work() function but not general() function.

If you use sync block, decim, interpolation block etc, you have work()
but not general_work(), and you don't need to write forecast().
This is very straight-forward.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Scheduling a block even with no input items RE: Flow graph blocking when doing 2x1 transmission

2014-06-04 Thread Activecat
On Wed, Jun 4, 2014 at 4:59 PM, David Halls david.ha...@toshiba-trel.com
wrote:

  Hi!

  This shouldn't be the case. But is there any easy way to allow different
 rates on the two streams, so I could produce more zeros on stream 1 than
 items on stream 0? Or vice versa?

  David



Please stay on the list.

To have different rates on different inputs,
[1]
http://lists.gnu.org/archive/html/discuss-gnuradio/2014-05/msg00166.html
[2]  http://gnuradio.4.n7.nabble.com/set-relative-rate-td46167.html
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Scheduling a block even with no input items RE: Flow graph blocking when doing 2x1 transmission

2014-06-04 Thread Activecat
On Wed, Jun 4, 2014 at 10:52 PM, David Halls david.ha...@toshiba-trel.com
wrote:

 Not quite...

 i). the Source Tx USRP has a constant stream of data, and is constantly
 transmitting. If the codewords in the file are exhausted it repeats.
 ii). the Relay Tx USRP transmits data only when data has been received
 by the Relay Rx (I will use tx_time to control when the received burst is
 re-transmitted)
 iii). the Relay Rx USRP will receive data only when the Source Tx USRP
 transmits (section where Relay Tx's too will be ignored),


What do you mean by section where Relay Tx's too will be ignored ?



 I have changed the block you suggested, to avoid inserting 0's mid burst.


So does this give better results?
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Scheduling a block even with no input items RE: Flow graph blocking when doing 2x1 transmission

2014-06-04 Thread Activecat
On Wed, Jun 4, 2014 at 10:52 PM, David Halls david.ha...@toshiba-trel.com
wrote:

 Not quite...

 i). the Source Tx USRP has a constant stream of data, and is constantly
 transmitting. If the codewords in the file are exhausted it repeats.
 ii). the Relay Tx USRP transmits data only when data has been received
 by the Relay Rx (I will use tx_time to control when the received burst is
 re-transmitted)
 iii). the Relay Rx USRP will receive data only when the Source Tx USRP
 transmits (section where Relay Tx's too will be ignored),



To clarify, is it true that both the Source TX USRP and Relay Tx USRP
are controlled by the same UHD Sink in the flowgraph?
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Scheduling a block even with no input items RE: Flow graph blocking when doing 2x1 transmission

2014-06-04 Thread Activecat
On Wed, Jun 4, 2014 at 8:53 PM, David Halls david.ha...@toshiba-trel.com
wrote:

 Hi Activecat,

 I have disconnected the rest of the flow graph because it is extremely
 complex.

 In the system I have a Source, a Relay (1 rx USRP, 1 tx USRP), a
 Destination. S --- R_rx/R_tx -- D

 The two transmitters that you see on that flow graph snippet I sent you
 are the the Source Tx and the Relay Tx.

 Payload TD Tx 1 is derived from input codewords that are generated in
 MATLAB and stored in a file, then loaded into the flow graph. The payload
 is created in a similar fashion to Martin's original OFDM_tx. This is then
 transmitted from Source Tx.

 Until this point, no packets are received by Relay Rx but once the source
 transmits, these packets are then received by Relay Rx, and then there is a
 decode-and-forward chain of blocks, and this then creates Payload TD Tx 2.

 The full flow graph is attached, but may be missing many blocks for you...



Could you send the source code of the missing blocks to me?
I am trying hard to help you out.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Scheduling a block even with no input items RE: Flow graph blocking when doing 2x1 transmission

2014-06-04 Thread Activecat
On Wed, Jun 4, 2014 at 7:10 PM, David Halls david.ha...@toshiba-trel.com
wrote:

 Activecat,

 In fact my horrible hack doesn't work properly. Once items start arriving
 at Payload TD Tx 2, they still don't arrive as 'consistently' (for want of
 a better word), as those from the Noise Source block, and thus zeros are
 inserted when they are not required!

 David



David,

Could you please explain in details, what is this Payload TD Tx 2?
How does it generate data, is it getting data from a hardware or console,
why it sometime idle but sometime transmitting?

This is a virtual source. Where is it associated virtual sink?
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Scheduling a block even with no input items RE: Flow graph blocking when doing 2x1 transmission

2014-06-04 Thread Activecat
On Wed, Jun 4, 2014 at 10:25 PM, David Halls david.ha...@toshiba-trel.com
wrote:

 Yes, there are 3. The Source Tx, the Relay Tx, and the Relay Rx.



To clarify,
i).  the Source Tx USRP may or may not receive data at any time interval.
ii). the Relay Tx USRP transmit data only when the Source Tx USRP
receive data, and there is a delay due to signal processing
iii). the Relay Rx USRP will receive data only when the Relay Tx USRP
transmit it,

is this correct?
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Scheduling a block even with no input items RE: Flow graph blocking when doing 2x1 transmission

2014-06-04 Thread Activecat
Please do not top post.
Refer
http://gnuradio.org/redmine/projects/gnuradio/wiki/MailingLists#Guidelines-for-posting
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Frequency Counter‏

2014-06-03 Thread Activecat
On Mon, May 5, 2014 at 4:25 PM, Dimitris Siafarikas jimsia...@hotmail.com
wrote:

 Hi list,

 Has anyone been able to implement a frequency counter yet?

 Any ideas on how I should try it?


Hi Dimitris,

Yes.
I have recently created a block for frequency counting, refer
https://github.com/activecat/gr-test2

Try to run this flowgraph:  gr-test2/examples/flowgraph_04.grc
amazingly it shows quite an accurate result.

Let's test it with various frequencies by adjusting the GUI Slider.

I created this block when I need to observe the frequency stability of
signal from USRP, as in flowgraph_05.
Hope this block is useful to you too.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Scheduling a block even with no input items RE: Flow graph blocking when doing 2x1 transmission

2014-06-03 Thread Activecat
On Tue, Jun 3, 2014 at 9:59 PM, David Halls david.ha...@toshiba-trel.com
wrote:

 The problem with using 'sob', 'eob' is because I have two inputs to the
 USRP UHD sink. One is constantly transmitting and has items coming in from
 time=0, but the other has no input items from time=0, they only arrive
 later on. As a result the sink seems to block waiting for items on *both*
 inputs before it will transmit anything. I don't want the USRP to have to
 wait for the second stream to be populated before it transmits anything...



Create a general block with two inputs and two outputs.
The two outputs connect to the USRP UHD sink. The first input connects to
the constantly transmitting source while the second input connects to the
non-consistent source.

In your forecast function:

   ninput_items_required[0] = noutput_items;
   ninput_items_required[1] = 0;


Then in your general_work function:

  const gr_complex *in0 = (const gr_complex*) input_items[0];
  const gr_complex *in1 = (const gr_complex*) input_items[1];
  gr_complex *out0 = (gr_complex*) output_items[0];
  gr_complex *out1 = (gr_complex*) output_items[1];

  for (int i=0; i  noutput_items; i++)
  out0[i] = in0[i];

  for (int i=0; i  ninput_items[1]; i++)
  out1[i] = in1[i]

  for (int i=ninput_items[1]; i  noutput_items; i++)
  out1[i] = 0.0; // here you fill in the zeros, but won't
over-filled.

  consume( 0, noutput_items);
  consume( 1, ninput_items[1]);

  return noutput_items;


Hope this helps !
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Scheduling a block even with no input items RE: Flow graph blocking when doing 2x1 transmission

2014-06-03 Thread Activecat
On Tue, Jun 3, 2014 at 9:59 PM, David Halls david.ha...@toshiba-trel.com
wrote:

 The problem with using 'sob', 'eob' is because I have two inputs to the
 USRP UHD sink. One is constantly transmitting and has items coming in from
 time=0, but the other has no input items from time=0, they only arrive
 later on. As a result the sink seems to block waiting for items on *both*
 inputs before it will transmit anything. I don't want the USRP to have to
 wait for the second stream to be populated before it transmits anything...


David,

Just one consideration:
Says, in0 is the port getting constant input, whereas in1 is getting
the non-consistent input.
Will this happen where in1 is getting more input than in0 ?
When this happen do you want to fill in0 instead with zeros?
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] scheduler source code

2014-06-02 Thread Activecat
Dear Sirs,

To grasp a better understanding of how the scheduler works, I try to look
into its source code.
The files like scheduler.cc and scheduler.h don't contain much code.
The single_threaded_scheduler.cc contains part of the codes, I am looking
for files like this.

Could you suggest to me which files I shall go through in sequence?
I know this is not easy. This is my first attempt to do so, a lot more
effort will be needed.
Thank you very much.

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


Re: [Discuss-gnuradio] a criticism to GNURadio's scheduler!

2014-06-01 Thread Activecat
On Sun, Jun 1, 2014 at 4:56 PM, Mostafa Alizadeh m.alizade...@gmail.com
wrote:

 Hi Mike,

 No, the throttle isn't a source! It just controls the flow of items in an
 specific time interval. I don't want this! I want cognitively tell the
 source produces the random bits after some special procedures have done (a
 message can do this for the source). But the scheduler crazily wants the
 source to produce items! :)



Mostafa,

Why not you tell us what you are trying to accomplish using this flowgraph
(not this block).
Give us a big picture of what you try to accomplish, let us figure out the
implementation details for you.

Chances are there is no problem with gnuradio but with your knowledge about
gnuradio.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] a criticism to GNURadio's scheduler!

2014-06-01 Thread Activecat
On Mon, Jun 2, 2014 at 1:27 AM, Mostafa Alizadeh m.alizade...@gmail.com
wrote:

 Activecat,

 I think change my topology to get rid of this things. :)
 However, I still believe in that the GNURadio fails in this scenario.
 As we have throttle or message_strobe blocks, I need to have a source
 which generates items controlled by another block.


It is very common to have blocks generating items while they are controlled
by another block.
These blocks are not source block but they could be sync block,
decimation block, interpolation block, general block etc.
Apparently you have seriously wrong concept at the very basic level, from
the very beginning.



 I'll try to see this problem in another way to escape from it!


As you refuse to tell us what you try to accomplish with this flowgraph, I
have to leave you alone and wish all the best to you.
Please don't seek help when you are not yet ready to be helped.
Don't abuse the forum please.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] C++11 support

2014-06-01 Thread Activecat
Hi list,

Could anyone tell me about the C++11 support in gnuradio?

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


Re: [Discuss-gnuradio] Dynamically changing input index of Selector block.

2014-05-31 Thread Activecat
On Sat, May 31, 2014 at 5:37 PM, Marcus Müller marcus.muel...@ettus.com
wrote:

  Problem being is that as soon as the head block signals done, the
 flowgraph might come to a halt, effectively breaking the skip head
 subgraph;


Thanks for highlighting this.
Now I recall that the Head block return -1 when it is done.
This makes a very good sense to use alternative likes M in N block.
Thanks.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] sampling rate of a customized signal source

2014-05-31 Thread Activecat
On Sat, May 31, 2014 at 11:47 PM, Activecat active...@gmail.com wrote:

 I've created a sample for you at https://github.com/activecat/gr-test1
  You could run the flowgraph found in the examples directory.
 Try to change the samp_rate of the flowgraph from 32kHz to different
 values (64kHz, 200kHrz etc).
 You will observe via the GUI Scope Sink, that the block consistently
 produces two 1ms pulse for every 10ms.



Try to run gr-test1/examples/flowgraph_02.grc, you may try setting
different values to samp_rate of the flowgraph.
The outcomes indicates that this pulse1 block is very consistent with the
built-in Signal Source block, in term of how it works respecting to the
samp_rate variable.

https://github.com/activecat/gr-test1
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Dynamically changing input index of Selector block.

2014-05-30 Thread Activecat
On Fri, May 30, 2014 at 4:57 PM, dushyant.marathe dushyantmara...@gmail.com
 wrote:

 Hi Activecat,

 I used both Head and Skip Head blocks in parallel to separate out
 multiplexed input stream.
 The Head block correctly gives me first 240k elements  but, Skip Head
 block doesn't give me any elements after skipping 240k elements. For your
 reference I have attached image of my flow graph (Head_Skip_Head.jpg).

 http://gnuradio.4.n7.nabble.com/file/n48637/Head_Skip_Head.jpg

 Moreover when I used Skip Head block alone, it gives me correctly all the
 elements after skipping 240k elements.

 Why is it so ? I could not find out. Please give me some insight.



Try with File Sink first instead of Wave File Sink, this may make a
difference.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Dynamically changing input index of Selector block.

2014-05-30 Thread Activecat
On Fri, May 30, 2014 at 10:20 PM, Mike Jameson mike.jame...@ettus.com
wrote:

 FYI, the head block copies the first N items to the output then signals
 done:
 http://gnuradio.org/doc/doxygen/classgr_1_1blocks_1_1head.html

 Instead of using the Head block, the Keep M in N block should do the
 trick.


You know your requirements well, let's pick whichever suits you best.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] sampling rate of a customized signal source

2014-05-30 Thread Activecat
Hi Pengyu,
There are few considerations:

 On Sat, May 31, 2014 at 4:19 AM, Pengyu Zhang zhange...@gmail.com wrote:

 Hi All,
 How to determine the sampling rate of a customized signal source?

 I designed a customized signal source which should output two 1ms pulses
 every 10ms. If I do not know the sampling rate of the customized module, I
 do not know how many elements I should put into the out* buffer for
 generating the two 1ms pulses.



To make the discussion easy, let's assume there is rate-limiting block (eg.
throttle, USRP etc) in your flowgraph.

1).  When your parameters above are described in time (example 1ms, 10ms
etc), it is very likely that you will need to configure Sample Rate
(which is samp_rate) as one of the variables of your custom block setting.

2).  If you need 1ms pulses, this means your samp_rate must not be lower
than 1kHz.
  In fact your samp_rate must be multiple of 1kHz.
  You may want to put a runtime check on this.

3).  When you say should output two 1ms pulses every 10ms, does it mean
it output one 1ms pulse every 5ms ?
  Let me assume yes to proceed with the discussion.

Says, the amplitude of the pulse is 1V.

4).  When samp_rate=1kHz, then your custom block will output one 1V and
four 0V in every five outputs.
 This means you need to set_output_multiple(5)

5).  When samp_rate=10kHz, then your custom block will output ten 1V and
forty 0V in every fifty outputs.
  This means you need to set_output_multiple(50).

6).  To generalize item 4 and 5 above, you need to
  set_output_multiple( samp_rate / 200 );

 (many more)

This gives you some idea to start with, the rest is up to you to figure out.
Good luck.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] run a top block within a block!

2014-05-30 Thread Activecat
On Sat, May 31, 2014 at 12:11 PM, Mostafa Alizadeh m.alizade...@gmail.com
wrote:

 Hi GNURadiores,
 I was thinking about how to change dynamically the blocks connected in my
 top block when it's running!


What do you want to change; the block parameters, or the links connecting
the blocks (which is the flowgraph itself)?
Basically both are possible, you may need to enhance your flowgraph in
python code by hand. During execution, lock the flowgraph, modify it
accordingly, and then unlock it to proceed with the flowgraph execution.



 After a long time, I reach to this point that I may have a top block is
 running within *a block*!


Probably you are referring to hierarchical block ..?
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] assertion error beyond 4096 output items

2014-05-29 Thread Activecat
On Thu, May 29, 2014 at 2:41 PM, Karan Talasila karan@gmail.com wrote:

 So at the input of the C++ we are giving vector_source_c() and then input
 output signatures are sizeof(gr_complex). The work function is taking
 noutput_items and returning noutput_items. We understand now that because
 we have used set_output_multiple(fft_length) in the constructor, the
 noutput_items is fixed at the fft_length and then work function is being
 called.


The noutput_items could be fft_length or multiple of fft_length.
Says fft_length is 8192, then noutput_items could be either 8192, 16384 or
24576 etc, determined by the scheduler.
If you only get noutput_items equals to 8192, that could be due to the
number of input elements available is less than 16384.



  However one small doubt,when we print value of noutput_items in C++
 program inside the work function ,the print statement is executed twice for
 any fft_length we use. Is this correct?  It should only print once the
 value of noutput_items if i am right.


If the print statement is executed twice, that means the work() function is
invoked twice.
It could be something wrong with your code, let's show your code here.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] assertion error beyond 4096 output items

2014-05-29 Thread Activecat
On Thu, May 29, 2014 at 3:12 PM, Karan Talasila karan@gmail.com wrote:

 @Activecat Here is the c++ block code


Let's change the print statement to below, recompile, run and paste the
console output here.

  std::cout  al_enc::work:  noutput_items=  noutput_items 
std::endl;

Also, what did you configure on the vector_source_c ?
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Dynamically changing input index of Selector block.

2014-05-29 Thread Activecat
On Thu, May 29, 2014 at 2:59 PM, dushyant.marathe dushyantmara...@gmail.com
 wrote:

 Hi Activecat,

 Thanks for the reply.

 As suggested by you, I used Stream Mux  and it worked for me.

 Now I want to de-multiplex the output of Stream Mux so as to get back
 both
 the inputs separately.

Discuss-gnuradio@gnu.org

Use both Head and Skip Head blocks in parallel.

For example, the Head block let you get the first 1000 elements.
The Skip Head block let you get elements 1001 onwards.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] assertion error beyond 4096 output items

2014-05-29 Thread Activecat
On Thu, May 29, 2014 at 4:54 PM, Karan Talasila karan@gmail.com wrote:

 We changed the print statement to what you said and console output is

 sagar@Horus:~/gr-alamouti/
 build$ ctest -V -R al_enc
 UpdateCTestConfiguration  from
 :/home/sagar/gr-alamouti/build/DartConfiguration.tcl
 UpdateCTestConfiguration  from
 :/home/sagar/gr-alamouti/build/DartConfiguration.tcl
 Test project /home/sagar/gr-alamouti/build
 Constructing a list of tests
 Done constructing a list of tests
 Checking test dependency graph...
 Checking test dependency graph end
 test 2
 Start 2: qa_al_enc

 2: Test command: /bin/sh
 /home/sagar/gr-alamouti/build/python/qa_al_enc_test.sh
 2: Test timeout computed to be: 9.99988e+06
 2: al_enc::work:noutput_items1024
 2: al_enc::work:noutput_items1024



This is unittest, not the application flowgraph.

Unittest is used to verify your code.
Application flowgraph is used to run RF simulations.

In application flowgraph, if you only have 8192 inputs while the fft_length
is set to 8192, then the work() should be called only once.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] assertion error beyond 4096 output items

2014-05-29 Thread Activecat
On Thu, May 29, 2014 at 4:54 PM, Karan Talasila karan@gmail.com wrote:

 We changed the print statement to what you said and console output is

 sagar@Horus:~/gr-alamouti/
 build$ ctest -V -R al_enc
 UpdateCTestConfiguration  from
 :/home/sagar/gr-alamouti/build/DartConfiguration.tcl
 UpdateCTestConfiguration  from
 :/home/sagar/gr-alamouti/build/DartConfiguration.tcl
 Test project /home/sagar/gr-alamouti/build
 Constructing a list of tests
 Done constructing a list of tests
 Checking test dependency graph...
 Checking test dependency graph end
 test 2
 Start 2: qa_al_enc

 2: Test command: /bin/sh
 /home/sagar/gr-alamouti/build/python/qa_al_enc_test.sh
 2: Test timeout computed to be: 9.99988e+06
 2: al_enc::work:noutput_items1024
 2: al_enc::work:noutput_items1024


Are you sure this is from the code unmodified at
http://pastebin.com/da21Ww4B ?
You configured n=2048 but the work() is called with noutput_items=1024.
Earlier you said it worked well.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] assertion error beyond 4096 output items

2014-05-29 Thread Activecat
On Thu, May 29, 2014 at 4:54 PM, Karan Talasila karan@gmail.com wrote:

 Vector_source_c takes in an argument numb which is a list that contains
 fft_size values. I will paste the qa code here(http://pastebin.com/da21Ww4B).
 http://pastebin.com/da21Ww4B



Something a little bit out of topic:
Part of your code at http://pastebin.com/da21Ww4B

numb=list()
for i in range (n):
numb.append(complex(lst1[i],lst2[i]))


Above code is not vectorized.
The vectorized version may look like:

numb = numpy.complex64( lst1 )  +  1j * numpy.complex64( lst2 )


Vectorization is probably less critical in unittest, but should not be
overlooked for blocked coded in python.
For info about vectorization,
http://www.mathworks.com/help/matlab/matlab_prog/vectorization.html
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Debian Jessie update

2014-05-28 Thread Activecat
On Wed, May 28, 2014 at 2:22 PM, Ralph A. Schmid, dk5ras
ra...@schmid.xxxwrote:

 I guess you will have to re-build everything regarding gnuradio. I did
 this yesterday due to an update from libboost 1.53 to 1.54.

 Ralph.


Yes, re-installation solves the problem.
Thanks.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Debian Jessie update

2014-05-28 Thread Activecat
On Wed, May 28, 2014 at 5:17 PM, Marcus Müller mar...@hostalia.de wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 To explain: Binaries are generally linked against binaries, ie.
 against a certain set of symbols only present in a certain build of a
 binary; thus, usually libraries link against specific versionized
 libraries.

 If you update a library, binaries linked against the old version are
 bound to stop working. In most unixoid systems, this is circumvented
 (sometimes) by having the ability to have multiple libraries in
 different versions installed [1](libgrandmascheesecake.so.1.0.0,
 libgrandmascheesecake.so.1.1.2) and a symlink from the general name to
 the recent one (libgrandmascheesecake.so -
 libgrandmascheesecake.so.1.1.2). However, usually you don't want to
 have conflicting versions, so package management usually goes miles to
 ensure that all packages in a certain distribution version are built
 against the same library version.

 Greetings,
 Marcus

 [1] windows-y systems usually ship all the libraries in the same
 directory as the executable, which is --from a storage point of view--
 quite like static linking.


Thank you very much.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Dynamically changing input index of Selector block.

2014-05-28 Thread Activecat
On Tue, May 27, 2014 at 3:07 PM, dushyant.marathe dushyantmara...@gmail.com
 wrote:

 My GRC flow graph design is as follows:

 Two different signal sources = selector (with 2 input  1 output) = scope

 Now I want to change input index of 'Selector' block automatically so that
 for fixed time 1st input is selected and then 2nd.



You may try to use Stream Mux, not Selector.
When its Lengths is determined correctly, it select 1st input for a
predetermined fixed time, then select 2nd input.
In this case the second number of Length is a big number, approximate
infinity.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] assertion error beyond 4096 output items

2014-05-28 Thread Activecat
Hi Karan,
You keep Marcus very busy, let me help to offload him.

On Wed, May 28, 2014 at 8:36 PM, Karan Talasila karan@gmail.com wrote:

 Hi Marcus,
  Thank you for evaluating our code and help debugging it. what we
 understand from your reply is that work function at a time processes
 noutput_items and this can be lesser than or more than the fft_length. As
 an example in our code when we give the fft length as 8192, but the
 noutput_items is still  4096, so does that mean it has to execute work
 function twice to process 4096*2=8192 items?


When the desirable fft_length is 8192, could you accept to perform FFT at
only 4096 elements?
If yes, perform FFT on this 4096 elements, and return 4096.
If not, make sure you use set_output_multiple(fft_length) or at least
set_min_noutput_items(fft_length), in this case the scheduler will not call
work() function with insufficient number of elements.



 Regarding the first approach you suggested, we change the input signature
 and output signature to (sizeof (gr_complex)*fft_length) so that it is a
 single vector that is being processed. Then we return 1 as suggested. But
 it is throwing an itemsize mismatch error. I have attached the c++ file
 here ( http://pastebin.com/TKemtbxN ). The error says



The correct way is, in your work() function you should have 2 loops,
because now your in[0] is a vector but no longer solely a complex number.
Example:

  for (int i=0; i  noutput_items; i++)
  {
  for (int j=0; j  fft_length; j++)
  {
 ..
  }
  }


For the second method suggested should we write a general work function and
 a forecast function which would mean doing away with sync block that we are
 using with work function right now?


No need, because set_output_multiple() works with sync block as well.

Note:
Apologize in advance if my answer is incorrect.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] Debian Jessie update

2014-05-27 Thread Activecat
Hi,

I am not able to run GRC after updating my Debian Jessie. (apt-get update,
apt-get dist-upgrade, apt-get autoremove)
I am using Debian jessie. Before this GRC run well.

  user1@pc1: ~ $ gnuradio-config-info -v
  gnuradio-config-info: error while loading shared libraries:
libboost_program_options.so.1.54.0: cannot open shared object file: No such
file or directory

  ~ $ uname -a
  Linux rsLAPTOP 3.14-1-amd64 #1 SMP Debian 3.14.4-1 (2014-05-13) x86_64
GNU/Linux

  ~ $ gcc --version
  gcc (Debian 4.8.2-21) 4.8.2
  Copyright (C) 2013 Free Software Foundation, Inc.
  This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Probably the latest libboost doesn't work very well with gnuradio v3.7.3.
How to solve this?  How to fall back?
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Frequency modulation in GRC

2014-05-25 Thread Activecat
On 25.05.2014 20:01, jason sam wrote:

  But if it is doing FM then there should be some min and max
  frequencies between which the signal will be switching?



If you refer to the source code of the frequency_modulator_fc_impl.cc, then
the min and max frequencies could be calculated.

Says, your sampling rate is samp_rate

Assuming the lowest input value to the FM block is zero, then
  minimum frequency of the FM output = samp_rate * sensitivity / ( 2 * PI )

Assuming the highest input value to the FM block is Vmax, then
  maximum frequency of the FM output = samp_rate * ( sensitivity + Vmax ) /
( 2 * PI)


For reference, the work function of the FM block is as below.

int
frequency_modulator_fc_impl::work( int noutput_items,
  gr_vector_const_void_star input_items,
  gr_vector_void_star output_items)
{
  const float *in = (const float*)input_items[0];
  gr_complex *out = (gr_complex*)output_items[0];

  for(int i = 0; i  noutput_items; i++)
  {
d_phase = d_phase + d_sensitivity * in[i];

while (d_phase  (float)(M_PI))
  d_phase -= (float)(2.0 * M_PI);

while (d_phase  (float)(-M_PI))
  d_phase += (float)(2.0 * M_PI);

float oi, oq;

gr_int32 angle = gr::fxpt::float_to_fixed (d_phase);
gr::fxpt::sincos(angle, oq, oi);
out[i] = gr_complex(oi, oq);
  }

  return noutput_items;
}
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Frequency modulation in GRC

2014-05-25 Thread Activecat
On Mon, May 26, 2014 at 10:20 AM, Activecat active...@gmail.com wrote:

 On 25.05.2014 20:01, jason sam wrote:

  But if it is doing FM then there should be some min and max
  frequencies between which the signal will be switching?



 If you refer to the source code of the frequency_modulator_fc_impl.cc,
 then the min and max frequencies could be calculated.

 Says, your sampling rate is samp_rate

 Assuming the lowest input value to the FM block is zero, then
   minimum frequency of the FM output = samp_rate * sensitivity / ( 2 * PI )

 Assuming the highest input value to the FM block is Vmax, then
   maximum frequency of the FM output = samp_rate * ( sensitivity + Vmax )
 / ( 2 * PI)


To avoid disagreement, the sampling rate (samp_rate) refers to the number
of elements produced by this FM block per second.
If there is no speed-limiting element (throttle, usrp, sound card etc) in
the flowgraph, then someone may say that samp_rate becomes meaningless, if
this is the case then in fact frequency also becomes quite meaningless..
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Installation issues with gnuradio on Ubuntu 12.04

2014-05-24 Thread Activecat
On Sat, May 24, 2014 at 2:15 PM, Ron Economos w...@comcast.net wrote:

   Custom install locations do require some additional environment
 setup. Sylvain gave me a nice shell script for that.

 BASE=/opt/gnuradio
 export PATH=${PATH}:${BASE}/bin
 export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${BASE}/lib64
 export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:${BASE}/lib64/pkgconfig
 export PYTHONPATH=${PYTHONPATH}:${BASE}/lib64/python2.7/site-packages/

 Just change the first line to the directory of  your custom install.
 Setting PKG_CONFIG_PATH will resolve finding packages
 in OOT builds. Remember to use the same custom install prefix
 in the cmake of your OOT builds.

 Ron


With above environment variables, do we still need to define the
CMAKE_INSTALL_PREFIX ?
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Installation issues with gnuradio on Ubuntu 12.04

2014-05-23 Thread Activecat
On Fri, May 23, 2014 at 11:28 PM, Ron Economos w...@comcast.net wrote:

 Chose an install directory that makes sense
 for you. /opt works well since it has the correct
 permissions.

 cd gnuradio
 mkdir build
 cd build
 cmake -DCMAKE_INSTALL_PREFIX=/opt/gnuradio ..
 make
 sudo make install

 This will build GnuRadio and install it in /opt/gnuradio



Will this later cause problem with OOT created with earlier version of
gr_modtool?
It seems that the /usr/local has been hard-coded into some files of the
OOT, as shown below.
Hence the OOT installation may fail to put all necessary files correctly
into /opt/gnuradio.

user1@pc1: ~/gnuradio/gr-mymodule1 $ grep -R /usr/local
cmake/Modules/FindGnuradioRuntime.cmake:PATHS /usr/local/include
cmake/Modules/FindGnuradioRuntime.cmake:PATHS /usr/local/lib
cmake/Modules/FindGnuradioRuntime.cmake:  /usr/local/lib64
cmake/Modules/FindCppUnit.cmake:/usr/local/include
cmake/Modules/FindCppUnit.cmake:/usr/local/lib
cmake/Modules/FindFFTW3.cmake:PATHS /usr/local/include
cmake/Modules/FindFFTW3.cmake:PATHS /usr/local/lib
cmake/Modules/FindFFTW3.cmake:PATHS /usr/local/lib
cmake/Modules/activecatConfig.cmake:  /usr/local/include
cmake/Modules/activecatConfig.cmake:  /usr/local/lib
cmake/Modules/activecatConfig.cmake:  /usr/local/lib64
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] PyBOMBS installed gnuradio: uhd_usrp_sink not found

2014-05-21 Thread Activecat
After installing gnuradio using PyBOMBS, the USRP Sink and Source blocks
are unavailable.
Below is the message:


1). To verify uhd has been installed:

[03:25pm] activecat@rs: ~/download/gnuradio/pybombs $ ./pybombs install
uhd
Settled on prefix: /usr/local
Initializing environmental variables...

/usr/local/python/:/usr/local/lib/python2.6/site-packages/:/usr/local/lib64/python2.6/site-packages/:/usr/local/lib/python2.6/dist-packages/:/usr/local/lib64/python2.6/dist-packages/:/usr/local/lib/python2.7/site-packages/:/usr/local/lib64/python2.7/site-packages/:/usr/local/lib/python2.7/dist-packages/:/usr/local/lib64/python2.7/dist-packages/:/usr/local/python/:/usr/local/lib/python2.6/site-packages/:/usr/local/lib64/python2.6/site-packages/:/usr/local/lib/python2.6/dist-packages/:/usr/local/lib64/python2.6/dist-packages/:/usr/local/lib/python2.7/site-packages/:/usr/local/lib64/python2.7/site-packages/:/usr/local/lib/python2.7/dist-packages/:/usr/local/lib64/python2.7/dist-packages/
-- loading recipes ---
Loading recipes ...
Loading recipes ... done
-- loading recipes finished --

checking for uhd
True
uhd already installed



2). To execute GRC and load the flowgraph:

activecat@rs: ~/download/gnuradio/pybombs $ gnuradio-companion
Warning: Block key blocks_ctrlport_monitor_performance not found when
loading category tree.
Warning: Block key blocks_ctrlport_monitor_performance not found when
loading category tree.
 Welcome to GNU Radio Companion v3.7.4git-257-gcb0bc7f0 

Preferences file: /home/activecat/.grc
Block paths:
/usr/local/share/gnuradio/grc/blocks
/home/activecat/.grc_gnuradio

Loading:
/home/activecat/Dropbox/gr-activecat/examples/1002_quad_PLL.grc
 Done

Showing:
/home/activecat/Dropbox/gr-activecat/examples/1002_quad_PLL.grc

Loading:
/home/activecat/Dropbox/gr-activecat/examples/4001_tx_works.grc
 Error: Block key uhd_usrp_sink not found in Platform - grc(GNU
Radio Companion)
None
 Done

Showing:
/home/activecat/Dropbox/gr-activecat/examples/4001_tx_works.grc



3).  The error message (part of above message):

 Error: Block key *uhd_usrp_sink* not found in Platform - grc(GNU
Radio Companion)


4).  System info:

activecat@rs: ~ $ uname -a
Linux mmuDESKTOP 3.2.0-4-686-pae #1 SMP Debian 3.2.57-3+deb7u1 i686
GNU/Linux

activecat@rs: ~ $ gcc --version
gcc (Debian 4.7.2-5) 4.7.2
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

activecat@rs: ~ $ cmake --version
cmake version 2.8.9


How to solve this?
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] PyBOMBS installed gnuradio: uhd_usrp_sink not found

2014-05-21 Thread Activecat
On Wed, May 21, 2014 at 4:35 PM, Mike Jameson mike.jame...@ettus.comwrote:

 Have you run:

 ./pybombs env

 ...and then run:

 source ../target/setup_env.sh (alter file path to taste)

 Mike



Yes, this has been performed.
During gnuradio installation, I configured the prefix to /usr/local due to
a reason mentioned in
http://gnuradio.4.n7.nabble.com/PyBOMBS-install-gnuradio-3-7-4-td48343.html

Hence, I had performed these:
  sudo ./pybombs install gnuradio --- install gnuradio to /usr/local
  sudo ./pybombs env ---  refresh settings in
/usr/local/setup_env.sh

  source /usr/local/setup_env.sh
  gnuradio-companion


With these the uhd becomes not available in GRC.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] put a block to sleep

2014-05-21 Thread Activecat
On Wed, May 21, 2014 at 5:53 PM, Mostafa Alizadeh m.alizade...@gmail.comwrote:

 Hello everybody,

 I want to connect a source to a sink block but there must be a sort of
 synchronization between them. The sink block should ask the source to
 generate data stream on some specific instances. Between these instances,
 the source block must put to the sleep or be disabled. How could I do this?


The scheduler takes care of this. You don't need to worry this.


 I thought it was possible with exchanging messages between these two
 blocks by which the sink block send a message to the source to disable or
 enable it. But this doesn't work because the scheduler will remain on the
 source after generating only one block of data (I need to generate just one
 block) at the start up of the flowgraph!


If you just need to generate only one block of data (one element), then you
may not need gnuradio.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] PyBOMBS install gnuradio 3.7.4

2014-05-21 Thread Activecat
On Tue, May 20, 2014 at 4:29 PM, Martin Braun martin.br...@ettus.comwrote:

 FYI, I don't like installing stuff to /usr/local. If you take PyBombs'
 directory, and then use -DCMAKE_INSTALL_PREFIX on your own OOT, that'll
 make both work and you don't have to screw around in your system's dirs.
 M



With the cmake
-DCMAKE_INSTALL_PREFIX=/home/user1/download/gnuradio/target  ../ , one of
the python files is still installed into /usr/local. The block also doesn't
show up in the block tree.

Instead of
/home/user1/download/gnuradio/target/lib/python2.7/dist-packages/activecat/abc.py,
it wrongly installed to
/usr/local/lib/python2.7/dist-packages/activecat/abc.py

As a result  I have to copy it manually to the correct location.

It seems PyBOMBS is still very problematic.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] PyBOMBS installed gnuradio: uhd_usrp_sink not found

2014-05-21 Thread Activecat
On Wed, May 21, 2014 at 7:31 PM, Mike Jameson mike.jame...@ettus.comwrote:

 The UHD Source GRC block uses the file called uhd_usrp_source.xml.
 Make sure that this is in your GRC path.

 To set the GRC path you need to go into the ~/.gnuradio folder and create
 a config.conf file and add the following tweaked with your actual path to
 the UHD source block:

 [grc]
 global_blocks_path = /usr/local/share/gnuradio/grc/blocks

 Mike



Unfortunately, the file uhd_usrp_source.xml doesn't exist at all.
I've searched it in both /usr/local and ~/download/gnuradio/target, the
file simply does not exists!
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] PyBOMBS install gnuradio 3.7.4

2014-05-20 Thread Activecat
On Tue, May 20, 2014 at 11:06 AM, Activecat active...@gmail.com wrote:

 I've just reinstalled gnuradio yesterday, using PyBOMBS.
 The newly installed version is gnuradio 3.7.4. The installation succeeded,
 but it then failed to compile my custom module which worked flawlessly with
 previous gnuradio installation.

 The previous version was gnuradio 3.7.3 which was installed using
 build-gunuradio, which had no problem at all.

 Compilation error:

 Linking CXX shared library libgnuradio-activecat.so
 [ 71%] Built target gnuradio-activecat
 Scanning dependencies of target test-activecat
 [ 72%] Building CXX object
 lib/CMakeFiles/test-activecat.dir/test_activecat.cc.o
 [ 74%] Building CXX object
 lib/CMakeFiles/test-activecat.dir/qa_activecat.cc.o
 Linking CXX executable test-activecat
 /usr/bin/ld: CMakeFiles/test-activecat.dir/test_activecat.cc.o:
 undefined reference to symbol
 '_ZN5boost10filesystem6detail16create_directoryERKNS0_4pathEPNS_6system10error_codeE'
 /usr/bin/ld: note:
 '_ZN5boost10filesystem6detail16create_directoryERKNS0_4pathEPNS_6system10error_codeE'
 is defined in DSO
 /home/sgku/download/gnuradio/target/lib/libboost_filesystem-mt.so.1.53.0 so
 try adding it to the linker command line

 /home/sgku/download/gnuradio/target/lib/libboost_filesystem-mt.so.1.53.0:
 could not read symbols: Invalid operation
 collect2: error: ld returned 1 exit status
 make[2]: *** [lib/test-activecat] Error 1
 make[1]: *** [lib/CMakeFiles/test-activecat.dir/all] Error 2
 make: *** [all] Error 2



The problem has been solved.
Solution: Reinstall gnuradio using PyBOMBS, make sure prefix=/usr/local

Note:
During PyBOMBS install wizard, we are prompted for prefix, which defaults
to ../target
If we just press ENTER to accept the default value, then the prefix becomes
something like /home/user1/download/gnuradio/target.
But regardless of what has been configured for the prefix, the OOT
(out-of-tree module) will be install into /usr/local.
Since the newly generated setup_env.sh does not include /usr/local, above
error could occur.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] PyBOMBS install gnuradio 3.7.4

2014-05-20 Thread Activecat
On Tue, May 20, 2014 at 4:29 PM, Martin Braun martin.br...@ettus.comwrote:

 FYI, I don't like installing stuff to /usr/local. If you take PyBombs'
 directory, and then use -DCMAKE_INSTALL_PREFIX on your own OOT, that'll
 make both work and you don't have to screw around in your system's dirs.
 M


In this case we execute cmake
-DCMAKE_INSTALL_PREFIX=/home/user1/download/gnuradio/target  ../ in the
OOT build directory.
Is there any way to hard code this install_prefix into the OOT setting
file, so that we just need cmake ../ in the OOT build directory?
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] PyBOMBS install gnuradio 3.7.4

2014-05-20 Thread Activecat
On Tue, May 20, 2014 at 5:15 PM, Activecat active...@gmail.com wrote:

 In this case we execute cmake
 -DCMAKE_INSTALL_PREFIX=/home/user1/download/gnuradio/target  ../ in the
 OOT build directory.
  Is there any way to hard code this install_prefix into the OOT setting
 file, so that we just need cmake ../ in the OOT build directory?


Thanks, I've found the answer at
http://www.cmake.org/pipermail/cmake/2007-September/016565.html
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Random number of output items

2014-05-20 Thread Activecat
On Tue, May 20, 2014 at 10:23 PM, Francois Gervais 
francoisgerv...@gmail.com wrote:

 Sorry about that I'll try to clarify thing.
 I'm using an rtl-sdr adapter to receive an RF signal. I demodulate it and
 send it through the MM clock recovery and bit slicer. Then the binary
 signal enters the block I'm talking about here.
 This block find a valid packet by matching the preamble and the sync
 pattern and translates the packet into another format that is understood by
 a software stack designed for these type of packets.
 Normally this stack would take it's input from a serial port but in my
 case I output the packets in the correct serial protocol through a file
 sink that is binded to a FIFO.


A picture is worth a thousand words. If you attached your existing
flowgraph then it helps a lot.


 I'll take a look at the PDU block but this translation needs to be done
 between two very specific protocol. I don't think a generic block can
 achieve that.



Please be reminded that PDU and tagged stream are two different things.
There are PUD to Tagged Stream and also Tagged Stream to PDU blocks, to
perform conversions.
Tagged Stream Block is a special block that can only take input of tagged
stream; the tag of the first element must consists the packet-length
information, here the default tag key is packet_len

PDU is used for Message Passing, I doubt you really need this in your
flowgraph.

If you are sure that your custom block needs to produce output in packets
(not solely bytes), then you may want to make the block output as tagged
stream.  If applicable, in alternative, you may consider to use the Stream
to Tagged Stream block. In this case, the downstream blocks may be
inherited from Tagged Stream Block.

In cases other than that, you don't need tagged stream block at all.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] using uhd_fft with USRP1

2014-05-19 Thread Activecat
On Mon, May 19, 2014 at 9:04 PM, Tom Rondeau t...@trondeau.com wrote:

 On Mon, May 19, 2014 at 12:40 AM, Activecat active...@gmail.com wrote:

 On Wed, Apr 30, 2014 at 4:17 AM, Martin Braun martin.br...@ettus.comwrote:

 Hey Don,

 this is a bug in UHD, which is fixed on the current 'master'. If you're
 using 'master', you can simply update UHD and reinstall (git pull etc.).

 If you can't update for some reason right now, --wire-format=sc16 might
 help.

 Cheers,
 Martin



 Unfortunately it becomes incompatible after the uhd update:

   RuntimeError:
   GR-UHD detected ABI compatibility mismatch with UHD library.
   GR-UHD was build against ABI: 3.7.0-0,
   but UHD library reports ABI: 3.7.1-0
   Suggestion: install an ABI compatible version of UHD,
   or rebuild GR-UHD component against this ABI version.

 So, how to update the ABI, without a complete gnuradio rebuild ..?


 If you still have the build directory from your previous build of GNU
 Radio, you can just go into the gr-uhd directory and type make and make
 install. You might want to make clean to make sure it rebuilds and
 therefore links against the newest versions; gr-uhd isn't that big, so
 rebuilding the whole component isn't that time consuming.

 If you did not save the original build directory, you will have to rebuild
 the whole thing to update the library.

 Tom



Do I need to cmake ../ first?  The make within gr-uhd produces
following error:

  activecat@rs: ~/download/gnuradio37/gnuradio/gr-uhd $ make
  make: *** No targets specified and no makefile found.  Stop.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] using uhd_fft with USRP1

2014-05-19 Thread Activecat
On Mon, May 19, 2014 at 9:20 PM, Tom Rondeau t...@trondeau.com wrote:

 On Mon, May 19, 2014 at 9:15 AM, Activecat active...@gmail.com wrote:


 On Mon, May 19, 2014 at 9:04 PM, Tom Rondeau t...@trondeau.com wrote:

 On Mon, May 19, 2014 at 12:40 AM, Activecat active...@gmail.com wrote:

 On Wed, Apr 30, 2014 at 4:17 AM, Martin Braun 
 martin.br...@ettus.comwrote:

 Hey Don,

 this is a bug in UHD, which is fixed on the current 'master'. If you're
 using 'master', you can simply update UHD and reinstall (git pull
 etc.).

 If you can't update for some reason right now, --wire-format=sc16 might
 help.

 Cheers,
 Martin



 Unfortunately it becomes incompatible after the uhd update:

   RuntimeError:
   GR-UHD detected ABI compatibility mismatch with UHD library.
   GR-UHD was build against ABI: 3.7.0-0,
   but UHD library reports ABI: 3.7.1-0
   Suggestion: install an ABI compatible version of UHD,
   or rebuild GR-UHD component against this ABI version.

 So, how to update the ABI, without a complete gnuradio rebuild ..?


 If you still have the build directory from your previous build of GNU
 Radio, you can just go into the gr-uhd directory and type make and make
 install. You might want to make clean to make sure it rebuilds and
 therefore links against the newest versions; gr-uhd isn't that big, so
 rebuilding the whole component isn't that time consuming.

 If you did not save the original build directory, you will have to
 rebuild the whole thing to update the library.

 Tom



 Do I need to cmake ../ first?  The make within gr-uhd produces
 following error:

   activecat@rs: ~/download/gnuradio37/gnuradio/gr-uhd $ make
   make: *** No targets specified and no makefile found.  Stop.


 Is that the build directory or the source directory? Looks like the latter
 to me. But if it is the build directory, then missing the make files means
 that you've gotten rid of the build, so yes, you'd have to rerun cmake.

 Tom



During gnuradio installation, I executed the build-gnuradio in folder
~/download/gnuradio37
I am unsure of which are considered as build directories.

  activecat@rs: ~/download/gnuradio37 $ l
  total 76k
  drwxr-xr-x  9 sgku sgku 4.0K Apr  9 08:31 bladeRF/
  -rwxr-xr-x  1 sgku sgku  37K Apr  5 07:47 build-gnuradio*
  drwxr-xr-x 31 sgku sgku 4.0K Apr  9 08:46 gnuradio/
  drwxr-xr-x 14 sgku sgku 4.0K Apr  9 09:50 gr-baz/
  drwxr-xr-x 11 sgku sgku 4.0K Apr  9 09:52 grextras/
  drwxr-xr-x 13 sgku sgku 4.0K Apr  9 09:47 gr-iqbal/
  drwxr-xr-x 12 sgku sgku 4.0K Apr  9 09:50 gr-osmosdr/
  drwxr-xr-x 10 sgku sgku 4.0K Apr  9 09:47 hackrf/
  drwxr-xr-x  8 sgku sgku 4.0K Apr  9 09:47 rtl-sdr/
  drwxr-xr-x  8 sgku sgku 4.0K May 15 22:42 uhd/


Are below directories considered build directory ?
  activecat@rs: ~/download/gnuradio37 $ find -name build
  ./uhd/host/build
  ./gnuradio/build
  ./grextras/build
  ./gr-baz/build
  ./gr-iqbal/build
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] using uhd_fft with USRP1

2014-05-19 Thread Activecat
On Mon, May 19, 2014 at 9:39 PM, Tom Rondeau t...@trondeau.com wrote:

 Yes, in this case, you want to look in gnuradio/build/gr-uhd.
 Tom


Thanks. Next time I could try to rebuild this part only.
Earlier I had rebuilt the whole gnuradio already.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Random number of output items

2014-05-19 Thread Activecat
On Tue, May 20, 2014 at 2:17 AM, Francois Gervais francoisgerv...@gmail.com
 wrote:

 Hi,

 I'm making a block which takes bit from a bit slicer and output packets as
 input comes in. My block will output bytes so it can emulate a usb adapter
 that receives the RF signal and output a packet stream through an FTDI.
 That way I can use the stack that comes with the adapter without owning
 one. I'll use a FIFO file so other than not issuing the serail
 configuration the stack should be used pretty much as is.

 However, I'm not sure what I should do about the the number of outputs.
 Let say I'm waiting for the preamble, I won't output anything. When I get
 the preamble and the sync I'll send a sync byte of my own. From here every
 8 inputs I'll output a byte. So basically my block will output 0 or 1
 output.

 Can someone help me a little with the use of forecast and noutput_items in
 my case? Also do I need to use the consume_each function?


If your block emulates a USB adapter, defines it as a source block, then
you don't need to touch forecast().
If your block takes input from another block, then it is not source block.
I don't really understand your requirements.

The number of outputs (referred as noutput_items) is determined by the
scheduler, not yourself.
Says, when you have X bytes to send out,
if X  noutput_items:  Send out noutput_items number of output, and
return noutput_items
if X  noutput_items:  Send out X number of output, and return X
if X == noutput_items: (either one of above)

When you send out a sync byte, add that to the output count.

When you are waiting for the preamble, you may want to send out a series of
zeros, rather than just producing no output.
Producing no output may cause the downstream blocks to become unresponsive.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


  1   2   3   >