[Discuss-gnuradio] Understanding GNU Radio Debugging

2017-11-16 Thread Sumit Kumar
(My comments are unbold, system commands and prints are bold)

Hi,

I followed tutorials below:

https://wiki.gnuradio.org/index.php/TutorialsGDB
https://wiki.gnuradio.org/index.php/TutorialsDebugging

I made a dummy block. I am learning to debug GR apps. I put the following
inside my work function

*std::cout << "Hello" << std::endl; *
*GR_LOG_DEBUG(d_logger, "\n");*
*GR_LOG_DEBUG(d_logger, boost::format("Hello Debugger") );*

And I expect them to be printed while the program runs. However I never see
them printed at all :-/ Then I thought to use gdb and see whats happening.

Here is what I did:
First I did cmake using the following :

*cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_GR_LOG=On
-DCMAKE_INSTALL_PREFIX=../ ../*

Its says me following. I wanted logging actually but looks like it ignored
me.

*CMake Warning:*
*  Manually-specified variables were not used by the project:*

*ENABLE_GR_LOG*

Is this OK ?

Well I went ahead and compiled. Make test was also successful.

Now I created a grc file using my own block and in the top_block.py, I did
the following at the bottom:

*if __name__ == '__main__':*
*print 'Blocked waiting for GDB attach (pid = %d)' % (os.getpid(),)*
*raw_input ('Press Enter to continue: ')*
*main()*

Upon running it, I got pid and attached my gdb to that. Hit enter and I got
following

*john@john-Precision-5510:~/radio/default/src/gr-ieee-80211/build$ sudo gdb
-p 6160*
*GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1*
*Copyright (C) 2016 Free Software Foundation, Inc.*
*License GPLv3+: GNU GPL version 3 or later
>*
*This is free software: you are free to change and redistribute it.*
*There is NO WARRANTY, to the extent permitted by law.  Type "show copying"*
*and "show warranty" for details.*
*This GDB was configured as "x86_64-linux-gnu".*
*Type "show configuration" for configuration details.*
*For bug reporting instructions, please see:*
*>.*
*Find the GDB manual and other documentation resources online at:*
*>.*
*For help, type "help".*
*Type "apropos word" to search for commands related to "word".*
*Attaching to process 6160*
*[New LWP 6161]*
*[New LWP 6162]*
*[New LWP 6163]*
*[New LWP 6164]*
*[New LWP 6165]*
*[New LWP 6166]*
*[New LWP 6167]*
*[Thread debugging using libthread_db enabled]*
*Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".*
*0x7f654851624d in read () at ../sysdeps/unix/syscall-template.S:84*
*84 ../sysdeps/unix/syscall-template.S: No such file or directory.*

Is this normal ? I searched on google but couldn't understand properly.

Well I kept going ahead and made a break point on my work function.


*b gr::ieee802_11::test_cf_impl::work(int, std::vector >&, std::vector
>&) *

Then I continued in gdb, program started running correctly but never saw my
outputs printed. Even I made break point where the print statements are
there, dint work :(

*Breakpoint 1 at 0x7f65146cc2f0: file
/home/john/radio/default/src/gr-ieee-80211/lib/test_cf_impl.cc, line 63.*
*(gdb) c*
*Continuing.*
*[New Thread 0x7f650de3b700 (LWP 6300)]*
*[New Thread 0x7f650d63a700 (LWP 6301)]*
*[New Thread 0x7f650ce39700 (LWP 6302)]*
*[New Thread 0x7f64fc83b700 (LWP 6303)]*
*[New Thread 0x7f64fc03a700 (LWP 6304)]*
*[New Thread 0x7f64fb308700 (LWP 6306)]*
*[New Thread 0x7f64fab07700 (LWP 6307)]*
*[New Thread 0x7f64fa306700 (LWP 6308)]*
*[New Thread 0x7f64f9b05700 (LWP 6309)]*
*[New Thread 0x7f64f9304700 (LWP 6310)]*
*[Switching to Thread 0x7f64fab07700 (LWP 6307)]*

*Thread 15 "test_cf3" hit Breakpoint 1, gr::ieee802_11::test_cf_impl::work
(this=0x2023650, noutput_items=8184, *
*input_items=std::vector of length 1, capacity 1 = {...}, *
*output_items=std::vector of length 1, capacity 1 = {...})*
*at /home/john/radio/default/src/gr-ieee-80211/lib/test_cf_impl.cc:63*
*warning: Source file is more recent than executable.*
*63 {*
*(gdb) n*
*[Thread 0x7f64fc03a700 (LWP 6304) exited]*
*68   volk_32fc_magnitude_squared_32f(out, in, noi);*
*(gdb) n*
*63 {*

What obvious mistake I am doing ? Isn't this the right way to use
GR_LOG_DEBUGGER

I was also not able to see the print outputs during my make test.
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Project Call November Tomorrow!

2017-11-16 Thread Philip Balister
Is that Thursday or Friday?

On 11/15/2017 09:10 PM, Martin Braun wrote:
> Quick reminder that our montly project call is happening tomorrow, 10 AM
> Pacific, 19:00 CET, in the usual place.
> 
> Cheers,
> Martin
> 
> ___
> 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] Project Call November Tomorrow!

2017-11-16 Thread Michael Dickens
Thursday / today. 1 PM US/Eastern for those of us in that timezone. -
MLD

On Thu, Nov 16, 2017, at 08:27 AM, Philip Balister wrote:
> Is that Thursday or Friday?
> 
> On 11/15/2017 09:10 PM, Martin Braun wrote:
> > Quick reminder that our montly project call is happening tomorrow, 10 AM
> > Pacific, 19:00 CET, in the usual place.

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


Re: [Discuss-gnuradio] Question on number of input items per work call

2017-11-16 Thread Michael Dickens
Hi Anil - In the case where your block gets 4095 items, it can't process
all of those items. Your block performs seven 512-length FFTs, consumes
7x512 == 3584 items, and generates 3584 items, leaving 511 unprocessed.
The code that calls your block's "::work" method will handle making sure
that the input and output streams are updated correctly, and that those
unprocessed 511 items are the next in the input data stream.
When doing streaming, you can, to some degree, control the amount of
input and output items via special functions / methods such as
"set_output_multiple". You can also set the input / output types to be a
vector of a specific length, e.g., that of your FFT == 512. Using either
"set_output_multiple" or a vector will guarantee that the number of
input and/or output items meets the criteria you require for this
specific block (for it to be a multiple of the FFT size, 512 items in
this case).
Hope this helps! - MLD

ps> I'm pretty sure there are presentations on the internet freely
ps> available that cover the  concepts of how GR works under the hood --
ps> probably in basic detail, not getting bogged down by too many cases
ps> / specifics. I'd encourage you to see what you can find in that
ps> regard; GRCon and people's blogs are always good places to learn
ps> about how GR works.
On Wed, Nov 15, 2017, at 09:56 PM, Anil Kumar Yerrapragada wrote:
> Hi all


> 


> I am experimenting with my own python block. I started by simply
> interrogating each variable to see their types and shapes.> 


> I connected a vector source that just generates increasing numbers (0,
> 1, 2, 3, 4, 5 and so on upto a big number).> 


> I noticed that the length of (input_items[0]) seems to oscillate
> between 4096 and 4095 in successive work calls. I also noticed that in
> each work call, a NEW set of samples appear. (attached file)> 


> Here are my questions:


> 


> If I were just doing something really simple like squaring each
> element, in each work call I'd just square every element in the vector
> input_items[0]. No problem.> 


> Suppose I need to do an FFT. (I know it can be done with stream to
> vector followed by FFT) But suppose I wanted to make it work with
> streams.> 


> In each work call, I’d divide the input_items[0] vector into chunks of
> size = FFT size and take the FFT of each chunk. Again no problem.
> Since 4096 will divide perfectly by a power of 2 FFT size.> 


> But what about the case when I have 4095? If I do FFT = 512, I will
> get 7 chunks of 512 and I will be left over with  511. Would I have to
> save those 511 elements and use them in the next work call when
> input_items[0] gets new elements?
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] Global socket in the flowgraph

2017-11-16 Thread Carlos Alberto Ruiz Naranjo
Hello,

dataCapture blocks are TCP clients with different requests. I want use the
same socket for the 3 blocks. It is posible?

Thank you.


[image: Imágenes integradas 1]
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] How to use the AMC part of GR-Inspector?

2017-11-16 Thread Torbjörn Olsson
Hi All,

I have been trying to look at the concept of automatic modulation 
classification by using the GR-Inspector blocks in GNU-Radio. However, I have 
not been successful in getting the AMC blocks to work as I had expected. After 
some reading I now think I know what is my major problem; I need to have a 
”tensorflow graph” file with a trained ANN model to load into the block that 
does the ”intelligent” part in the GNU-Radio flowgraph.

Any kind of pointers or directions how to accomplish the above is much 
appreciated. Perhaps there is already a ”trained” file to load into the model, 
just for testing? 

The GR-Inspector is a very useful part of GNU-Radio, and if anyone has the time 
and knowledge to make a simple tutorial, or show an example, for newbies for 
the AMC part, I think it would be much appreciated by a lot of people. 

Cheers!
Torbjörn


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


Re: [Discuss-gnuradio] Global socket in the flowgraph

2017-11-16 Thread Marcus Müller
Sure, unless the dataCapture blocks (which I don't know) have a bug.

Best regards,
Marcus
On Thu, 2017-11-16 at 15:26 +0100, Carlos Alberto Ruiz Naranjo wrote:
> Hello,
> 
> dataCapture blocks are TCP clients with different requests. I want use the 
> same socket for the 3 blocks. It is posible?
> 
> Thank you.
> 
> 
> 
> ___
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

smime.p7s
Description: S/MIME cryptographic signature
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Global socket in the flowgraph

2017-11-16 Thread Carlos Alberto Ruiz Naranjo
Thank you Marcus.

Where do I create the socket and how I pass it to the blocks?

On Nov 16, 2017 19:07, "Marcus Müller"  wrote:

> Sure, unless the dataCapture blocks (which I don't know) have a bug.
>
> Best regards,
> Marcus
> On Thu, 2017-11-16 at 15:26 +0100, Carlos Alberto Ruiz Naranjo wrote:
> > Hello,
> >
> > dataCapture blocks are TCP clients with different requests. I want use
> the same socket for the 3 blocks. It is posible?
> >
> > Thank you.
> >
> >
> >
> > ___
> > 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] Global socket in the flowgraph

2017-11-16 Thread Marcus Müller
Hi Carlos,

I don't know the blocks, hence I can't tell you anything about them.

Best regards,

Marcus


On 16.11.2017 19:32, Carlos Alberto Ruiz Naranjo wrote:
> Thank you Marcus.
>
> Where do I create the socket and how I pass it to the blocks?
>
> On Nov 16, 2017 19:07, "Marcus Müller"  > wrote:
>
> Sure, unless the dataCapture blocks (which I don't know) have a bug.
>
> Best regards,
> Marcus
> On Thu, 2017-11-16 at 15:26 +0100, Carlos Alberto Ruiz Naranjo wrote:
> > Hello,
> >
> > dataCapture blocks are TCP clients with different requests. I
> want use the same socket for the 3 blocks. It is posible?
> >
> > Thank you.
> >
> >
> >
> > ___
> > Discuss-gnuradio mailing list
> > Discuss-gnuradio@gnu.org 
> > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
> 
>



smime.p7s
Description: S/MIME Cryptographic Signature
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] Interpreting the recieved packet

2017-11-16 Thread Rensi Mathew
Hi all
I am using a SDR B200 to receive packets from a TelsoB. I am using a message 
debug box after the PHY layer. The output I am getting is 
: 41 98 ad cd ab ff ff 40 2c 81 00 2c 40 32 37 38 0010: 37 00 11 e5 1f 65 4e

I am not able to interpret the fields according to 802.15.4 standard. Can 
anyone help me please?
Thanking youRensi Sam ___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] Sync block or general block?

2017-11-16 Thread Ali
Hi to all,

I am trying to create an OOT block. There are 6 inputs which are float32
single parameters. There are 3 outputs. 2 of them are again single variable
and float32. The last output is a 33x1 vector with float32 entries.

Which block type should I use and how should be the forecast function?

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