[Discuss-gnuradio] can we do some copy operation in GNU Radio

2011-10-10 Thread intermilan




Hi all:
 What confused me is if we can do some copy operation in GNU Radio.
It means we copy the data from in[](the input data of block) to a array, and 
do some operations to the data in the array, then make the operated data in 
the array to be out[](the output data of block).
Did someone do somethings like this?
Because I wrote a block which is used to make burst in GNU Radio,It is copy 
several data from the input data every loop, then put it in the array which I 
defined,
finally output the data in the array. But there is a problem about it ,the 
copier data
was right at first, but after about 30,000 or more bytes, it seemed like lost 
some data.
Why did it happen? I have no idea about it. It is urgent for me.Hope someone 
can help me.
Thank you in advance.

inter.

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


[Discuss-gnuradio] FW: can we do some copy operation in GNU Radio

2011-10-10 Thread intermilan



From: tianxia...@hotmail.com
To: martin.br...@kit.edu
Subject: RE: [Discuss-gnuradio] can we do some copy operation in GNU Radio
Date: Mon, 10 Oct 2011 23:13:07 +0800











Hi Martim:
May be I was not make myself clear. What I have done is  I copied some data
from input data of block named Burst into a array which I defined in the block 
Burst,
and before that I defined some value in the array, so the array had its 
structure. Then 
I made the block Burst output the data in the array. So the data output the 
block Burst
should has the structure which the array has. And I input the same data such as 
(011100).
I plotted the output data, there is a problem about it . It seemed like lost 
some data in
the position which is given to the input data.In other words,the position which 
I defined value 
in the block is not changed. And that is what confused me .
I do not know if I make myself clear,and I put two pictures in the 
attachment,Screenshot-1.png
should be the same as Screenshot.png.Because I cope the same position but just 
many bytes later.
But you can see it seems like lost some data.and the beginning 1010 is defined 
by myself.

inter  


Date: Mon, 10 Oct 2011 16:32:45 +0200
From: martin.br...@kit.edu
To: discuss-gnuradio@gnu.org
Subject: Re: [Discuss-gnuradio] can we do some copy operation in GNU Radio

On Mon, Oct 10, 2011 at 10:15:55PM +0800, intermilan wrote:
 Hi all:
  What confused me is if we can do some copy operation in GNU Radio.
 It means we copy the data from in[](the input data of block) to a array, and
 do some operations to the data in the array, then make the operated data in
 the array to be out[](the output data of block).
 Did someone do somethings like this?
 
Hi intermilan,
 
I'm probably misunderstanding, but it seems like what you describe is
bascically how every single block works. So, choose any block as an
example.
 
MB
-- 
Karlsruhe Institute of Technology (KIT)
Communications Engineering Lab (CEL)
 
Dipl.-Ing. Martin Braun
Research Associate
 
Kaiserstraße 12
Building 05.01
76131 Karlsruhe
 
Phone: +49 721 608-43790
Fax: +49 721 608-46071
www.cel.kit.edu
 
KIT -- University of the State of Baden-Württemberg and
National Laboratory of the Helmholtz Association
 

___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio 
  attachment: Screenshot.pngattachment: Screenshot-1.png___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] question about the input data of my new block

2011-10-09 Thread intermilan






Hi all:
  I wrote a block which is used to make a specific structure of data(like 
some kind of  burst). 
And in this block I defined some position of the array for specific value as  
structure 
required. Other positions of the array will be the input data of this block(did 
not do 
anything to the input data, just copy and store in the array).
  But now there is a problem . I plotted the output data of the block,at 
the beginning ,
it looked well and the data  followed the order as the structure required.But 
after almost 
30,000 or more bytes, the data is not right. The output data still arrayed  as 
the structure 
required.But parts of the data which are the positions for the input data of 
the block is not right. 
It seemed like some input data of this block lost, but no data lost fromthe 
former block. 
I do not know why this happened. I hope someone can help me about this.
  I put two pictures in the attachment. Screenshot.png is the right array the 
data should be.
And Screenshot-1.png is the same position as the Screenshot.png, but just 
almost 35,000  bytes later.
It should be the same as Screenshot.png, but not. It seemed like lost some data 
.
 Thank you in advance.

inter.

  attachment: Screenshot.pngattachment: Screenshot-1.png___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] a question about using new block in GNURadio

2011-09-19 Thread intermilan

Hi Tom:
I used function set_history() as you advised in mu code ,and after I tested 
many values,
I found that the best situation is that there would be  continuous Zeros (may 
be 3 or more)in my output data which made
my data is not the exactly order which I want.  Is that also the buffer thing 
make that happen? Did you had
that before?

Inter.

From: trondeau1...@gmail.com
Date: Tue, 13 Sep 2011 09:27:28 -0400
Subject: Re: [Discuss-gnuradio] a question about using new block in GNURadio
To: tianxia...@hotmail.com
CC: discuss-gnuradio@gnu.org

2011/9/13 intermilan tianxia...@hotmail.com







Hi Tom:

  Thanks for your reply. Can you tell me how to fix it?  May be I looked at 
my code too much, I do not know where to change.

 

inter
Sorry, this is something you're really going to have to work out yourself. I 
find it sometimes helps to draw a picture of the buffers as the work function 
iterates over it to see what's happening to the pointers.


Just remember, if i is the index to the input buffer in, then in[i] is only 
valid for 0 = i = ninput_items[0] (or noutput_items if you are using a 
gr_sync_block). If you need to look beyond the current input buffer, use 
set_history(nhist), and so the constraint becomes 0 = i = (ninput_items[0] + 
nhist).


Tom

 


From: trondeau1...@gmail.com
Date: Mon, 12 Sep 2011 22:42:39 -0400
Subject: Re: [Discuss-gnuradio] a question about using new block in GNURadio
To: tianxia...@hotmail.com


CC: discuss-gnuradio@gnu.org


2011/9/12 intermilan tianxia...@hotmail.com



 


Hi all:
I wrote a new block and add it into the GnuRadio. The function of this 
block is to synchronize the spread signal, 
which means this block used local PN sequence to correlate the input signal. 
And I set the threshold, if the correlation value is 


larger than the threshold, that means I finish the synchronous part. Then use 
the local PN sequence to XOR the synchronized
signal,  so we will get the de-spread signal. 
But there is a problem I can not figure out the reason. I test this block 
in GRC. This block can works well in short time. Then


sometimes the value of the output of this block would become 0. And I do not 
know the reason of this situation. I put my code
of the block in this e-mail. 
I hope someone can help me to find out where is the problem of my code. 
Thank you in advance.





Just a very quick read-through, but it looks like you are advancing i too much. 
You're going to walk it out of bounds of the input buffer.


Tom


 



#ifdef HAVE_CONFIG_H
#include config.h
#endif

#include pn_correlator1_ff.h
#include gr_io_signature.h
#include vector
#include iostream


#include fstream

/*
 * Create a new instance of pn_correlator_cc and return
 * a boost shared_ptr.  This is effectively the public constructor.
 */
pn_correlator_ff_sptr 
pn_make_correlator_ff (int degree, int mask, int seed)


{
  return pn_correlator_ff_sptr (new pn_correlator1_ff (degree, mask, seed));
}

/*
 * Specify constraints on number of input and output streams.
 * This info is used to construct the input and output signatures


 * (2nd  3rd args to gr_block's constructor).  The input and
 * output signatures are used by the runtime system to
 * check that a valid number and type of inputs and outputs
 * are connected to this block.  In this case, we accept


 * only 1 input and 1 output.
 */
static const int MIN_IN = 1;// mininum number of input streams
static const int MAX_IN = 1;// maximum number of input streams
static const int MIN_OUT = 1;// minimum number of output streams


static const int MAX_OUT = 1;// maximum number of output streams

/*
 * The private constructor
 */
pn_correlator_ff::pn_correlator_ff (int degree, int mask, int seed)
  : gr_block(correlator_ff,


   gr_make_io_signature (MIN_IN, MAX_IN, sizeof (float)),
   gr_make_io_signature (MIN_OUT, MAX_OUT, sizeof (float)))
 
{
  d_len = (unsigned int)((1ULL  degree)-1);


  d = degree;
  if (mask == 0)
mask = gri_glfsr::glfsr_mask(degree);
  d_reference = new gri_glfsr(mask, seed);
  for (int i = 0; i  d_len; i++)// initialize to last value in sequence
d_pn = 2.0*d_reference-next_bit()-1.0;


}


void
pn_correlator_ff::forecast (int noutput_items, gr_vector_int 
ninput_items_required)
{
  int input_required =   noutput_items + d*d_len ;
  unsigned ninputs = ninput_items_required.size();


  for (unsigned int i = 0; i  ninputs; i++) {
ninput_items_required[i] = input_required;
  }
}


/*
 * Our virtual destructor.
 */
pn_correlator_ff::~pn_correlator_ff()
{
  delete d_reference;


}



int 
pn_correlator_ff::general_work (int noutput_items,
   gr_vector_int ninput_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];
  int a=0;
  int i=0

Re: [Discuss-gnuradio] a question about using new block in GNURadio

2011-09-13 Thread intermilan

Hi Tom:
  Thanks for your reply. Can you tell me how to fix it?  May be I looked at 
my code too much, I do not know where to change.
 
inter
 



From: trondeau1...@gmail.com
Date: Mon, 12 Sep 2011 22:42:39 -0400
Subject: Re: [Discuss-gnuradio] a question about using new block in GNURadio
To: tianxia...@hotmail.com
CC: discuss-gnuradio@gnu.org


2011/9/12 intermilan tianxia...@hotmail.com



 


Hi all:
I wrote a new block and add it into the GnuRadio. The function of this 
block is to synchronize the spread signal, 
which means this block used local PN sequence to correlate the input signal. 
And I set the threshold, if the correlation value is 
larger than the threshold, that means I finish the synchronous part. Then use 
the local PN sequence to XOR the synchronized
signal,  so we will get the de-spread signal. 
But there is a problem I can not figure out the reason. I test this block 
in GRC. This block can works well in short time. Then
sometimes the value of the output of this block would become 0. And I do not 
know the reason of this situation. I put my code
of the block in this e-mail. 
I hope someone can help me to find out where is the problem of my code. 
Thank you in advance.





Just a very quick read-through, but it looks like you are advancing i too much. 
You're going to walk it out of bounds of the input buffer.


Tom


 



#ifdef HAVE_CONFIG_H
#include config.h
#endif

#include pn_correlator1_ff.h
#include gr_io_signature.h
#include vector
#include iostream
#include fstream

/*
 * Create a new instance of pn_correlator_cc and return
 * a boost shared_ptr.  This is effectively the public constructor.
 */
pn_correlator_ff_sptr 
pn_make_correlator_ff (int degree, int mask, int seed)
{
  return pn_correlator_ff_sptr (new pn_correlator1_ff (degree, mask, seed));
}

/*
 * Specify constraints on number of input and output streams.
 * This info is used to construct the input and output signatures
 * (2nd  3rd args to gr_block's constructor).  The input and
 * output signatures are used by the runtime system to
 * check that a valid number and type of inputs and outputs
 * are connected to this block.  In this case, we accept
 * only 1 input and 1 output.
 */
static const int MIN_IN = 1;// mininum number of input streams
static const int MAX_IN = 1;// maximum number of input streams
static const int MIN_OUT = 1;// minimum number of output streams
static const int MAX_OUT = 1;// maximum number of output streams

/*
 * The private constructor
 */
pn_correlator_ff::pn_correlator_ff (int degree, int mask, int seed)
  : gr_block(correlator_ff,
   gr_make_io_signature (MIN_IN, MAX_IN, sizeof (float)),
   gr_make_io_signature (MIN_OUT, MAX_OUT, sizeof (float)))
 
{
  d_len = (unsigned int)((1ULL  degree)-1);
  d = degree;
  if (mask == 0)
mask = gri_glfsr::glfsr_mask(degree);
  d_reference = new gri_glfsr(mask, seed);
  for (int i = 0; i  d_len; i++)// initialize to last value in sequence
d_pn = 2.0*d_reference-next_bit()-1.0;
}


void
pn_correlator_ff::forecast (int noutput_items, gr_vector_int 
ninput_items_required)
{
  int input_required =   noutput_items + d*d_len ;
  unsigned ninputs = ninput_items_required.size();
  for (unsigned int i = 0; i  ninputs; i++) {
ninput_items_required[i] = input_required;
  }
}


/*
 * Our virtual destructor.
 */
pn_correlator_ff::~pn_correlator_ff()
{
  delete d_reference;
}



int 
pn_correlator_ff::general_work (int noutput_items,
   gr_vector_int ninput_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];
  int a=0;
  int i=0;
  float sum =0;

 while(anoutput_items)
 {
  while(sum0.8)
 {
sum =0;
for (int j = 0; j  d_len; j++) {
  if (j != 0)// retard PN generator one 
sample per period
d_pn = 2.0*d_reference-next_bit()-1.0; // no conditionals
  sum+= (2*(in[i])-1) * d_pn;   
i++;
 }
sum = abs(sum/d_len); //calculate the correlate value 
}

  d_pn = d_reference-next_bit();

  if(d_pn == in[i]) //  use local PN sequence to XOR the synchronized signal
 out[a]=0;
  else
 out[a]=1;
  
 i++;
 a++;
 
 }
  consume_each (noutput_items);
  return noutput_items;
} 

___
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] a question about using new block in GNURadio

2011-09-12 Thread intermilan


 

Hi all:
I wrote a new block and add it into the GnuRadio. The function of this 
block is to synchronize the spread signal, 
which means this block used local PN sequence to correlate the input signal. 
And I set the threshold, if the correlation value is 
larger than the threshold, that means I finish the synchronous part. Then use 
the local PN sequence to XOR the synchronized
signal,  so we will get the de-spread signal. 
But there is a problem I can not figure out the reason. I test this block 
in GRC. This block can works well in short time. Then
sometimes the value of the output of this block would become 0. And I do not 
know the reason of this situation. I put my code
of the block in this e-mail. 
I hope someone can help me to find out where is the problem of my code. 
Thank you in advance.


#ifdef HAVE_CONFIG_H
#include config.h
#endif

#include pn_correlator1_ff.h
#include gr_io_signature.h
#include vector
#include iostream
#include fstream

/*
 * Create a new instance of pn_correlator_cc and return
 * a boost shared_ptr.  This is effectively the public constructor.
 */
pn_correlator_ff_sptr 
pn_make_correlator_ff (int degree, int mask, int seed)
{
  return pn_correlator_ff_sptr (new pn_correlator1_ff (degree, mask, seed));
}

/*
 * Specify constraints on number of input and output streams.
 * This info is used to construct the input and output signatures
 * (2nd  3rd args to gr_block's constructor).  The input and
 * output signatures are used by the runtime system to
 * check that a valid number and type of inputs and outputs
 * are connected to this block.  In this case, we accept
 * only 1 input and 1 output.
 */
static const int MIN_IN = 1;// mininum number of input streams
static const int MAX_IN = 1;// maximum number of input streams
static const int MIN_OUT = 1;// minimum number of output streams
static const int MAX_OUT = 1;// maximum number of output streams

/*
 * The private constructor
 */
pn_correlator_ff::pn_correlator_ff (int degree, int mask, int seed)
  : gr_block(correlator_ff,
   gr_make_io_signature (MIN_IN, MAX_IN, sizeof (float)),
   gr_make_io_signature (MIN_OUT, MAX_OUT, sizeof (float)))
 
{
  d_len = (unsigned int)((1ULL  degree)-1);
  d = degree;
  if (mask == 0)
mask = gri_glfsr::glfsr_mask(degree);
  d_reference = new gri_glfsr(mask, seed);
  for (int i = 0; i  d_len; i++)// initialize to last value in sequence
d_pn = 2.0*d_reference-next_bit()-1.0;
}


void
pn_correlator_ff::forecast (int noutput_items, gr_vector_int 
ninput_items_required)
{
  int input_required =   noutput_items + d*d_len ;
  unsigned ninputs = ninput_items_required.size();
  for (unsigned int i = 0; i  ninputs; i++) {
ninput_items_required[i] = input_required;
  }
}


/*
 * Our virtual destructor.
 */
pn_correlator_ff::~pn_correlator_ff()
{
  delete d_reference;
}



int 
pn_correlator_ff::general_work (int noutput_items,
   gr_vector_int ninput_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];
  int a=0;
  int i=0;
  float sum =0;

 while(anoutput_items)
 {
  while(sum0.8)
 {
sum =0;
for (int j = 0; j  d_len; j++) {
  if (j != 0)// retard PN generator one 
sample per period
d_pn = 2.0*d_reference-next_bit()-1.0; // no conditionals
  sum+= (2*(in[i])-1) * d_pn;   
i++;
 }
sum = abs(sum/d_len); //calculate the correlate value 
}

  d_pn = d_reference-next_bit();

  if(d_pn == in[i]) //  use local PN sequence to XOR the synchronized signal
 out[a]=0;
  else
 out[a]=1;
  
 i++;
 a++;
 
 }
  consume_each (noutput_items);
  return noutput_items;
} 
  ___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] using custom signal processing module

2011-06-06 Thread intermilan

hi Thomas:
What did you import in your python script? you should import your 
package's name, not from gnuradio import your package's name.
Hope this is helpful.

Inter

From: thomas.h@aero.org
To: n...@ettus.com
Date: Mon, 6 Jun 2011 16:59:40 -0400
CC: discuss-gnuradio@gnu.org
Subject: Re: [Discuss-gnuradio] using custom signal processing module

Yes, I did...

My custom module showed up in gnuradio-companion
after I ran make install... But, I couldn't load it in python script. 



Thomas









From:  
 Nick Foster n...@ettus.com

To:  
 Thomas H Kim thomas.h@aero.org

Cc:  
 Discuss-gnuradio@gnu.org

Date:  
 06/06/2011 01:08 PM

Subject:
   Re: [Discuss-gnuradio]
using custom signal processing module








On Mon, 2011-06-06 at 08:45 -0400, Thomas H Kim wrote:

 Hello, 

 

 I followed writing a signal processing block for GNU radio
with

 little bit of modification and I was able to compile and ran make

 check without any problem. 

 When I launch gnuradio-companion, the module I made showed up.

 However, when I try to import the module from python script, I get

 import error saying there is no such as module. 

 Is there anything like Python configuration file which contains all

 paths to Python module? If so, what do I need to modify? 

 Your help will be appreciated. 



Did you make install?



--n



 Thanks, 

 

 Thomas 

 ___

 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] help with add a new block to GNURadio

2011-05-31 Thread intermilan

Hi:
I recently add a new block to the GNURadio and GRC.The function of the 
block is to correlate the received spread signal and the local PN code.
I think my block can work well,but there is one thing I do not know how to 
fix.Sometimes the input of my block is 0 and then it will back to the normal.
But I saw the  output data from the last block ,they are correct.Did anyone 
have situation  before? and how did it happen? In the accessory are the code 
of my block. 
   thank you in advance.
  /* -*- c++ -*- */
/*
 * Copyright 2004 Free Software Foundation, Inc.
 * 
 * This file is part of GNU Radio
 * 
 * GNU Radio is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3, or (at your option)
 * any later version.
 * 
 * GNU Radio is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with GNU Radio; see the file COPYING.  If not, write to
 * the Free Software Foundation, Inc., 51 Franklin Street,
 * Boston, MA 02110-1301, USA.
 */
#ifndef INCLUDED_PN_CORRELATOR_CC_H
#define INCLUDED_PN_CORRELATOR_CC_H

#include gr_block.h
#include gri_glfsr.h
class pn_correlator_cc;

/*
 * We use boost::shared_ptr's instead of raw pointers for all access
 * to gr_blocks (and many other data structures).  The shared_ptr gets
 * us transparent reference counting, which greatly simplifies storage
 * management issues.  This is especially helpful in our hybrid
 * C++ / Python system.
 *
 * See http://www.boost.org/libs/smart_ptr/smart_ptr.htm
 *
 * As a convention, the _sptr suffix indicates a boost::shared_ptr
 */
typedef boost::shared_ptrpn_correlator_cc pn_correlator_cc_sptr;

/*!
 * \brief Return a shared_ptr to a new instance of pn_correlator_cc.
 *
 * To avoid accidental use of raw pointers, pn_correlator_cc's
 * constructor is private.  pn_make_correlator_cc is the public
 * interface for creating new instances.
 */
pn_correlator_cc_sptr pn_make_correlator_cc (int degree, int mask=0, int seed=1);

/*!
 * \brief square a stream of floats.
 * \ingroup block
 *
 * \sa pn_square2_ff for a version that subclasses gr_sync_block.
 */
class pn_correlator_cc : public gr_block
{
private:
  // The friend declaration allows pn_make_correlator_cc to
  // access the private constructor.

  friend pn_correlator_cc_sptr pn_make_correlator_cc (int degree, int mask, int seed);
  intd_len;
  float  d_pn;
  gri_glfsr *d_reference;


  pn_correlator_cc ();  	// private constructor
 protected:
  pn_correlator_cc(int degree, int mask, int seed);

 public:
  void forecast (int noutput_items, gr_vector_int ninput_items_required);
  ~pn_correlator_cc ();	// public destructor


  // Where all the action really happens

   int general_work (int noutput_items,
 gr_vector_int ninput_items,
 gr_vector_const_void_star input_items,
 gr_vector_void_star output_items);
};

#endif /* INCLUDED_PN_CORRELATOR_CC_H */
/* -*- c++ -*- */
/*
 * Copyright 2004 Free Software Foundation, Inc.
 * 
 * This file is part of GNU Radio
 * 
 * GNU Radio is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3, or (at your option)
 * any later version.
 * 
 * GNU Radio is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with GNU Radio; see the file COPYING.  If not, write to
 * the Free Software Foundation, Inc., 51 Franklin Street,
 * Boston, MA 02110-1301, USA.
 */

/*
 * config.h is generated by configure.  It contains the results
 * of probing for features, options etc.  It should be the first
 * file included in your .cc file.
 */
#ifdef HAVE_CONFIG_H
#include config.h
#endif

#include pn_correlator_cc.h
#include gr_io_signature.h

/*
 * Create a new instance of pn_correlator_cc and return
 * a boost shared_ptr.  This is effectively the public constructor.
 */
pn_correlator_cc_sptr 
pn_make_correlator_cc (int degree, int mask, int seed)
{
  return pn_correlator_cc_sptr (new pn_correlator_cc (degree, mask, seed));
}

/*
 * Specify constraints on number of input and output streams.
 * This info is used to construct the input and output signatures
 * (2nd  3rd args to gr_block's constructor).  The input and
 * output signatures are used by the runtime system to
 * check that a valid number and type of inputs and outputs
 * are 

Re: [Discuss-gnuradio] help with add a new block to GNURadio

2011-05-31 Thread intermilan

hi Tom:

  Thank you for your reply.
  At the beginning, I want to tell you 
about the function of my block.I want to use this block to correlate the
 received signal(spread signal) and local PN code,after I have a the max
 value of the correlate value,I should use the local PN code to despread
 the received demodulated signal and get the original data. So my input 
number and output number may not be strictly 1:1. And the value of d_len
 is the length of PN code,it may be 7,31,etc. So it can be too large.
 And in the block,it firstly test the in[0]...in[d_len-1],then 
in[d_len]...in[2*d_len-1] in while loop,  and after I get the max 
correlate value(which means the value of  sum is lager than the 
threshold), then go to the for loop to despread the spread signal.and in
 that loop,the in pointer should be incremented until the program end.

  The input of the block is 0 means the inputs themselves are 0,and 
after several bytes it will back to the correct value as the output value
 of the last block.And as you suggested,I use gr_sync_block instead of 
the gr_block,but it work worse than before.The input still will become 
to 0 and will never back the correct value. In my opinion,it may be the problem 
of the in pointer,after the block work for a while ,the value in this pointer 
become to 0,and then it back the value of the output of the last block.
  I hope I make myself clearly.So what do you think about this problem and 
how to fix it.
  Thank you again.

Inter

From: trondeau1...@gmail.com
Date: Tue, 31 May 2011 13:54:44 -0400
To: discuss-gnuradio@gnu.org
Subject: Re: [Discuss-gnuradio] help with add a new block to GNURadio

2011/5/31 intermilan tianxia...@hotmail.com







Hi:
I recently add a new block to the GNURadio and GRC.The function of the 
block is to correlate the received spread signal and the local PN code.
I think my block can work well,but there is one thing I do not know how to 
fix.Sometimes the input of my block is 0 and then it will back to the normal.


But I saw the  output data from the last block ,they are correct.Did anyone 
have situation  before? and how did it happen? In the accessory are the code 
of my block. 
   thank you in advance.
  



I haven't looked over the code too closely, but a few comments. First, because 
you are consuming and returning the same number of items, you can just make 
this a gr_sync_block instead of a gr_block, which means you don't have to worry 
about the forecast function and it simplifies the interface.


On the other hand, since you need at least d_len to make a decision, you'll 
have to either deal with it by holding state or by forcing the scheduler to 
give you the correct number of samples, minimum (set_output_multiple can be 
useful for things like this if d_len is not too large).


Also, you are not initializing sum to anything in the work function, so the 
initial test in the while loop might trigger incorrectly.
You are also incrementing the in pointer during the for loop, but it looks like 
you want to remain there until the sum is greater than your threshold. I would 
think that you would want to test in[0] to in[d_len-1] in one loop, then in[1] 
to in[d_len], and so on. Here, you are going to skip an entire d_len of inputs.


I'm not sure what you mean by the input of your block is 0. Does this mean the 
number of input items is 0 or that the inputs themselves are 0?
Hope this helps some.


Tom


___
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] packer_decoder block in the GRC

2011-05-16 Thread intermilan

Hi:
   I recently used the GRC to test my Pi/4 DQPSK modulation and 
demodulation block.But and my
flow graph is vector_source-packet_encoder-pi/4 dqpsk 
mod-mutily_const-usrp_sink, usrp_source-
pi/4 dqpsk demod-packet_decoder-file_sink.but in my file_sink I got 
nothing.It seem that there is no
data output the packet_decoder.then I change the modulator to DQPSK,but there 
is still nothing output the 
packder_decoder block. And I confirm that there is data input the 
packer_decoder block.Why did it happen? 


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


Re: [Discuss-gnuradio] how to use the gr_mpsk_receiver_cc

2011-05-12 Thread intermilan

hi Max:
  Thank you for your help. I will look at the op25 to see if it can help me.


inter.

 Date: Thu, 12 May 2011 13:51:14 -0700
 From: ikj12...@yahoo.com
 To: discuss-gnuradio@gnu.org
 Subject: Re: [Discuss-gnuradio] how to use the gr_mpsk_receiver_cc
 
 
  Did anyone use it to receive pi/4 DQPSK signal before?
 
 In the op25-dev project http://sedition.org.au/op25/ we see a
 very common variant of PI/4 DQPSK, so-called CQPSK/LSM.
 
 Experimentation has shown that the gr_mpsk_receiver_cc() is not
 optimal for CQPSK.  There seem to be multiple causes, e.g.,:
 
 1) PI/4 (D)QPSK apparently looks enough like 8-PSK that the standard
 GR QPSK phase detector has difficulty achieving phase lock.  There's
 a hack to rotate the second of every two symbols by 45 degress which 
 seems to give a large improvement [see Fig 10. of my LSM page
 at http://www.lightlink.com/mhp/lsm/ ]
 
 2) At least for the specific case of LSM/CQPSK, it was found that a
 Gardner symbol timing loop was superior to the MM loop (and to the
 GR PFB clock sync block) as used in the GR receivers.
 
 The op25 site has example code for using both the gr_mpsk_receiver_cc
 as well as a complete working example using Gardner's method, including
 the PI/4 hack mentioned above.
 
 Finally, you should also take a look at the new magic PFB receiver
 (dqpsk2.py in GR) for your application...
 
 Max
 
 ___
 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] how to use the gr_mpsk_receiver_cc

2011-05-11 Thread intermilan

Hi all:
  I want to use the gr_mpsk_receiver_cc block to receive the pi/4 DQPSK  
signal. Because it said that
it should use for pi/4 DQPSK.But how should I set the parameter of the 
block?Did anyone use it to receive
pi/4 DQPSK signal before?
  ___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] a question about a new PI/4 DQPSK demodulation block

2011-05-10 Thread intermilan

Hi all:
  I recently write a pi/4 dqpsk modulation and demodulation block in the 
gnuradio. My modulation block 
works fine,but there is a question about my demodulation block.In my 
demodulation block, first I compute 
the angle of the input I/Q signal,then do something to the computed 
angle,finally output the sine and cosine
of the angle.Then use a slicer block to decide the value of the data(if 
x0,x=0;else,x=1).Besides  I did not
add the synchronization and RRC block to the modulation and demodulation block 
for now.
Here is the code for the demod_cf.cc(demodulation):
#ifdef HAVE_CONFIG_H
#include config.h
#endif

#include pi4_demod_cf.h
#include gr_io_signature.h
#include stdexcept
#include cmath
#include stdlib.h
#include gr_math.h
pi4_demod_cf_sptr 
pi4_make_demod_cf ()
{
  return pi4_demod_cf_sptr (new pi4_demod_cf ());
}
static const int MIN_IN = 1;// mininum number of input streams
static const int MAX_IN = 1;// maximum number of input streams
static const int MIN_OUT = 1;// minimum number of output streams
static const int MAX_OUT = 1;// maximum number of output streams

pi4_demod_cf::pi4_demod_cf ()
  : gr_block (demod_cf,
   gr_make_io_signature (MIN_IN, MAX_IN, sizeof (gr_complex)),
   gr_make_io_signature (MIN_OUT, MAX_OUT, sizeof (float)))
{
  // nothing else required in this example
}

void
pi4_demod_cf::forecast (int noutput_items, gr_vector_int ninput_items_required)
{
  int input_required = (0.5) * noutput_items ;
  unsigned ninputs = ninput_items_required.size();
  for (unsigned int i = 0; i  ninputs; i++) {
ninput_items_required[i] = input_required;
  }
}
pi4_demod_cf::~pi4_demod_cf ()
{
  
}

int 
pi4_demod_cf::general_work (int noutput_items,
gr_vector_int ninput_items,
gr_vector_const_void_star input_items,
gr_vector_void_star output_items)
{
  float xw = 0;
  const gr_complex *in = (const gr_complex *) input_items[0];
  float *out = (float *) output_items[0];

  for (int i = 0; i (noutput_items/2); i++)
{
float w = gr_fast_atan2f(in[i]);
float dw = w-xw;
dw = fmod(dw,2*M_PI);
*out++ = sin(dw);
*out++ = cos(dw);
xw = w;

}
  consume_each ((0.5)*noutput_items);
  // Tell runtime system how many output items we produced.
  return noutput_items;
}
The flow graph I used to test the block is :
vector_source -thrttole -pi4_mod_fc-pi_demod_cf-slicer-file_sink.
The problem is when I run the flow graph,in the file which I use to receive the 
demodulated data 
there are several 1(output of the demod block is 0) before the correct 
demodulated data.In my 
opinion,that means the demodulation block did not work at first. then it work 
correct to output 
the demodulation data(Am I right about it?).So I thought there is something 
wrong with my code 
of the  demodulation block.But I have checked it over and over again, and still 
not know where
 I should change. I hope someone can help me to figure it out.
Thank you in advance.

Inter.

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


Re: [Discuss-gnuradio] question about a parameter in the example digial-bert

2011-04-20 Thread intermilan


Does anyone know what the parameter alpha is ? I have confused about it several 
days.It is a
parameter in the block gr_probe_mpsk_sbr_f. I think when we set this parameter, 
the ratio for 
the data signal and noise should be set in the received signal.But how do I set 
this parameter?
Is there any rules I should follow to set this alpha parameter? If anyone knows 
something about
this parameter,please tell me.Thank you.

inter

From: tianxia...@hotmail.com
To: discuss-gnuradio@gnu.org
Date: Tue, 12 Apr 2011 18:50:41 +0800
Subject: [Discuss-gnuradio] question about a parameter in the example   
digial-bert








Hi all:
  When I look at the code in the receive_path.py which is under the 
digital-bert folder, I found this sentence:
   self._snr_probe = gr.probe_mpsk_snr_c(10.0/symbol_rate)
 I think this is to set the block which measure the snr of the signal. And 
after I read the code in the gr_probe_
mpsk_snr_c.h/.cc, I think (10.0/symbol_rate) may be the parameter alpha in the 
snr block.And the description about 
the parameter in the block is:Mean and variance smoothing filter constant. But 
I do not know why should we set the 
value as (10.0/symbol_rate),in other words,how should I set this value if I 
want use this block for other flow graph?
What rules should I follow? I hope somebody can help me for that.
Thanks in advance.

Inter 
  

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


Re: [Discuss-gnuradio] segmentation fault when using a new added block

2011-04-18 Thread intermilan

Hi all:
  I have already figured out my problem I mentioned in my last e-mail. That 
is because I installed two 
versions of GNU Radio in my computer.So I get the error segmentation 
fault.But there is another question.
After I uninstalled one version of GnuRadio (now i use gnuradio3.3.0),I use the 
create-gnuradio-out-of-tree-project
command to add a new package which named test.And I did not change the block in 
the package,so they still
were test.square_ff() and test.square2_ff().When I run the test code which is a 
simple python code,I got this error:
AttributeError: 'module' object has no attribute 'square_ff'.So how can I do to 
figure out this problem?I hope someone
can tell me .Thanks in advance.

inter

From: tianxia...@hotmail.com
To: discuss-gnuradio@gnu.org
Date: Thu, 14 Apr 2011 16:09:01 +0800
Subject: [Discuss-gnuradio] segmentation fault when using a new added block








hi all:
I want to use the gr-howto-write-a-block-3.3.0 (my version of the Gnuradio 
is 3.3.0)to add a new package
or a new block to the gnuradio and grc. At first I did not change anything in 
the gr-howto-write-a-block-3.3.0,
so the name of the new package should be howto,and the name of the block should 
be howto.square_ff() and 
howto.square2_ff().I run the follow command as follow:
sudo ./bootstrap
sudo ./configure --prefix=/usr/local
sudo make
sudo make check
sudo make install
 After all commands done,everything seems fine (no error appear after make 
check)and the package looks like  been installed.
Then I write a small python program to test the new block.Here are the codes:
#! /usr/bin/env python
from gnuradio import gr
import howto
class example_block(gr.top_block):
def __init__(self):
gr.top_block.__init__(self)
src = gr.vector_source_f((2,-2,1),
 True)
thr = gr.throttle(gr.sizeof_float,
  32000)
sqr =howto.square_ff()
dst = gr.file_sink(gr.sizeof_float,
   /home/tianxia515/result.dat)

self.connect(src,thr)
self.connect(thr,sqr)
self.connect(sqr,dst)

if __name__ == '__main__':
tb = example_block()
tb.run()

But when I run the program in the shell, there is error segmentation fault.I 
do not know why does this error happen.
I did not change anything in the gr-howto-write-a-block-3.3.0. I hope someone 
can help me to fix this problem and 
tell me why this error happen.
Thanks in advance.

inter.
  

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


Re: [Discuss-gnuradio] segmentation fault when using a new added block

2011-04-18 Thread intermilan

  Hi:
  I missed one thing. If I copy the gr-howto-write-a-block 3.3.0 folder to 
my gnuradio folder,then after
./bootstrap, ./configure ,make, make check ,make install, the block 
how.square_ff() and how.square2_ff()
can work well in my test code.Why? I just use the 
create-gnuradio-out-of-tree-project command to change the 
name of the new package,and other things are same.Why the block of this package 
can work? 

From: tianxia...@hotmail.com
To: discuss-gnuradio@gnu.org
Date: Mon, 18 Apr 2011 16:20:13 +0800
Subject: Re: [Discuss-gnuradio] segmentation fault when using a new added block








Hi all:
  I have already figured out my problem I mentioned in my last e-mail. That 
is because I installed two 
versions of GNU Radio in my computer.So I get the error segmentation 
fault.But there is another question.
After I uninstalled one version of GnuRadio (now i use gnuradio3.3.0),I use the 
create-gnuradio-out-of-tree-project
command to add a new package which named test.And I did not change the block in 
the package,so they still
were test.square_ff() and test.square2_ff().When I run the test code which is a 
simple python code,I got this error:
AttributeError: 'module' object has no attribute 'square_ff'.So how can I do to 
figure out this problem?I hope someone
can tell me .Thanks in advance.

inter

From: tianxia...@hotmail.com
To: discuss-gnuradio@gnu.org
Date: Thu, 14 Apr 2011 16:09:01 +0800
Subject: [Discuss-gnuradio] segmentation fault when using a new added block








hi all:
I want to use the gr-howto-write-a-block-3.3.0 (my version of the Gnuradio 
is 3.3.0)to add a new package
or a new block to the gnuradio and grc. At first I did not change anything in 
the gr-howto-write-a-block-3.3.0,
so the name of the new package should be howto,and the name of the block should 
be howto.square_ff() and 
howto.square2_ff().I run the follow command as follow:
sudo ./bootstrap
sudo ./configure --prefix=/usr/local
sudo make
sudo make check
sudo make install
 After all commands done,everything seems fine (no error appear after make 
check)and the package looks like  been installed.
Then I write a small python program to test the new block.Here are the codes:
#! /usr/bin/env python
from gnuradio import gr
import howto
class example_block(gr.top_block):
def __init__(self):
gr.top_block.__init__(self)
src = gr.vector_source_f((2,-2,1),
 True)
thr = gr.throttle(gr.sizeof_float,
  32000)
sqr =howto.square_ff()
dst = gr.file_sink(gr.sizeof_float,
   /home/tianxia515/result.dat)

self.connect(src,thr)
self.connect(thr,sqr)
self.connect(sqr,dst)

if __name__ == '__main__':
tb = example_block()
tb.run()

But when I run the program in the shell, there is error segmentation fault.I 
do not know why does this error happen.
I did not change anything in the gr-howto-write-a-block-3.3.0. I hope someone 
can help me to fix this problem and 
tell me why this error happen.
Thanks in advance.

inter.
  

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

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


Re: [Discuss-gnuradio] segmentation fault when using a new added block

2011-04-15 Thread intermilan

Hi martin:
  Thanks for your reply.But I did not change anything in the 
gr-howto-write-a-block folder.
and I install and uninstall it several times,but when I run my test python 
program,there is 
still a error which is segmentation fault. I did not change anything in the 
original howto file,
how did this error happen?I am confused about it.

Date: Thu, 14 Apr 2011 13:23:17 +0200
From: martin.br...@kit.edu
To: discuss-gnuradio@gnu.org
Subject: Re: [Discuss-gnuradio] segmentation fault when using a new added block

On Thu, Apr 14, 2011 at 01:19:25PM +0200, Martin Braun wrote:
 On Thu, Apr 14, 2011 at 04:09:01PM +0800, intermilan wrote:
  do not know why does this error happen.
  I did not change anything in the gr-howto-write-a-block-3.3.0. I hope 
  someone
  can help me to fix this problem and
  tell me why this error happen.
 
 Not without seeing your code. Most often, this means you've badly
 indexed your output_items. Check all writes to your output buffer are
 within limits given by noutput_items.
 
I forgot to say: I'm assuming you've changed the 'howto'-code. That's
what's missing.
 
MB
 
-- 
Karlsruhe Institute of Technology (KIT)
Communications Engineering Lab (CEL)
 
Dipl.-Ing. Martin Braun
Research Associate
 
Kaiserstraße 12
Building 05.01
76131 Karlsruhe
 
Phone: +49 721 608-43790
Fax: +49 721 608-46071
www.cel.kit.edu
 
KIT -- University of the State of Baden-Württemberg and
National Laboratory of the Helmholtz Association
 

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


[Discuss-gnuradio] segmentation fault when using a new added block

2011-04-14 Thread intermilan

hi all:
I want to use the gr-howto-write-a-block-3.3.0 (my version of the Gnuradio 
is 3.3.0)to add a new package
or a new block to the gnuradio and grc. At first I did not change anything in 
the gr-howto-write-a-block-3.3.0,
so the name of the new package should be howto,and the name of the block should 
be howto.square_ff() and 
howto.square2_ff().I run the follow command as follow:
sudo ./bootstrap
sudo ./configure --prefix=/usr/local
sudo make
sudo make check
sudo make install
 After all commands done,everything seems fine (no error appear after make 
check)and the package looks like  been installed.
Then I write a small python program to test the new block.Here are the codes:
#! /usr/bin/env python
from gnuradio import gr
import howto
class example_block(gr.top_block):
def __init__(self):
gr.top_block.__init__(self)
src = gr.vector_source_f((2,-2,1),
 True)
thr = gr.throttle(gr.sizeof_float,
  32000)
sqr =howto.square_ff()
dst = gr.file_sink(gr.sizeof_float,
   /home/tianxia515/result.dat)

self.connect(src,thr)
self.connect(thr,sqr)
self.connect(sqr,dst)

if __name__ == '__main__':
tb = example_block()
tb.run()

But when I run the program in the shell, there is error segmentation fault.I 
do not know why does this error happen.
I did not change anything in the gr-howto-write-a-block-3.3.0. I hope someone 
can help me to fix this problem and 
tell me why this error happen.
Thanks in advance.

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


[Discuss-gnuradio] question about a parameter in the example digial-bert

2011-04-12 Thread intermilan

Hi all:
  When I look at the code in the receive_path.py which is under the 
digital-bert folder, I found this sentence:
   self._snr_probe = gr.probe_mpsk_snr_c(10.0/symbol_rate)
 I think this is to set the block which measure the snr of the signal. And 
after I read the code in the gr_probe_
mpsk_snr_c.h/.cc, I think (10.0/symbol_rate) may be the parameter alpha in the 
snr block.And the description about 
the parameter in the block is:Mean and variance smoothing filter constant. But 
I do not know why should we set the 
value as (10.0/symbol_rate),in other words,how should I set this value if I 
want use this block for other flow graph?
What rules should I follow? I hope somebody can help me for that.
Thanks in advance.

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


RE: [Discuss-gnuradio] How to use the SNR block in the GRC

2011-04-10 Thread intermilan


Hi:
I think I found the problem. In my version of the GRC, there is a parameter 
Type in the  gr_probe_mpsk_snr block,
then I can choose it for the signal_mean,noise_variance and snr.So I think the 
block output the value of the type which
I set. If I set the type as snr, the block will output the value of calculated 
snr. So I think I do not use the probe_function
block.
But I still have a problem.In the block, there is a parameter alpha for the 
calculation of the snr. What should I follow to
set the value of this parameter? Can anyone help me about this ?
   Thank you in advance.

Inter.
   
From: tianxia...@hotmail.com
To: j...@joshknows.com; discuss-gnuradio@gnu.org
Subject: RE: [Discuss-gnuradio] How to use the SNR block in the GRC
Date: Fri, 8 Apr 2011 18:20:59 +0800
CC: 








hi josh:

Thank you for your last e-mail.I am sorry I did not mention the version of GRC 
I used,and it is 3.2.2(GNU Radio is 3.3.3).
And I found the probe_function block as you said.I use a scope block to connect 
to the probe_function block to see the output
of the blcok.I also  put the bpsk modulated data input this block,and put the 
output of the block to a file_sink. 

I use the ID of the gr_probe_mpsk_snr block as the parameter Block ID of the 
probe_function block, then set the parameter
 Function name as the name of the functions in the gr_probe_mpsk_snr block such 
as signal_mean(), snr().But there is an 
error  'gr_hier_block2_sptr' object has no attribute 'signal_mean' in the 
flow graph .Why did it happen? Did I set some parameters wrong? 

Can you give me a example flow graph (not the one in the 
digital-bertfolder)about the gr_probe_mpsk_snr and probe_function?

Thank you

inter

 Date: Thu, 7 Apr 2011 11:33:23 -0500
 From: j...@joshknows.com
 To: discuss-gnuradio@gnu.org
 Subject: Re: [Discuss-gnuradio] How to use the SNR block in the GRC
 
 
 
 On 04/07/2011 05:18 AM, intermilan wrote:
  
  Hi all:
  I found these is a block gr_probe_mpsk_snr in the grc which is used to 
  measure the snr of the bpsk or qpsk signals. But I
  do not know how to use this block.In my flow graph, I put the bpsk 
  modulated data input this block,and put the output of the block to a 
  file_sink.
  But there is nothing in that file.So I hope someone can tell me how to use 
  this block.
  Thanks in advance.
  inter
   
 
 
 I dont know what version your using. But I reworked how the probe blocks
 work since the last release, so here is how it works in the current master:
 
 Attach a probe block to your signal. Notice in the probe block docs,
 that the available functions are listed. Use the function probe block to
 read that function periodically and to write the value into a variable.
 
 To display the result, just use the ID from the function probe in the
 value parameter for the appropriate graphical widget.
 
 -Josh
   
  
  
  
  ___
  Discuss-gnuradio mailing list
  Discuss-gnuradio@gnu.org
  http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
 
 ___
 Discuss-gnuradio mailing list
 Discuss-gnuradio@gnu.org
 http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
  

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


RE: [Discuss-gnuradio] How to use the SNR block in the GRC

2011-04-08 Thread intermilan

hi josh:

Thank you for your last e-mail.I am sorry I did not mention the version of GRC 
I used,and it is 3.2.2(GNU Radio is 3.3.3).
And I found the probe_function block as you said.I use a scope block to connect 
to the probe_function block to see the output
of the blcok.I also  put the bpsk modulated data input this block,and put the 
output of the block to a file_sink. 

I use the ID of the gr_probe_mpsk_snr block as the parameter Block ID of the 
probe_function block, then set the parameter
 Function name as the name of the functions in the gr_probe_mpsk_snr block such 
as signal_mean(), snr().But there is an 
error  'gr_hier_block2_sptr' object has no attribute 'signal_mean' in the 
flow graph .Why did it happen? Did I set some parameters wrong? 

Can you give me a example flow graph (not the one in the 
digital-bertfolder)about the gr_probe_mpsk_snr and probe_function?

Thank you

inter

 Date: Thu, 7 Apr 2011 11:33:23 -0500
 From: j...@joshknows.com
 To: discuss-gnuradio@gnu.org
 Subject: Re: [Discuss-gnuradio] How to use the SNR block in the GRC
 
 
 
 On 04/07/2011 05:18 AM, intermilan wrote:
  
  Hi all:
  I found these is a block gr_probe_mpsk_snr in the grc which is used to 
  measure the snr of the bpsk or qpsk signals. But I
  do not know how to use this block.In my flow graph, I put the bpsk 
  modulated data input this block,and put the output of the block to a 
  file_sink.
  But there is nothing in that file.So I hope someone can tell me how to use 
  this block.
  Thanks in advance.
  inter
   
 
 
 I dont know what version your using. But I reworked how the probe blocks
 work since the last release, so here is how it works in the current master:
 
 Attach a probe block to your signal. Notice in the probe block docs,
 that the available functions are listed. Use the function probe block to
 read that function periodically and to write the value into a variable.
 
 To display the result, just use the ID from the function probe in the
 value parameter for the appropriate graphical widget.
 
 -Josh
   
  
  
  
  ___
  Discuss-gnuradio mailing list
  Discuss-gnuradio@gnu.org
  http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
 
 ___
 Discuss-gnuradio mailing list
 Discuss-gnuradio@gnu.org
 http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
  ___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] How to use the SNR block in the GRC

2011-04-07 Thread intermilan

Hi all:
I found these is a block gr_probe_mpsk_snr in the grc which is used to 
measure the snr of the bpsk or qpsk signals. But I
do not know how to use this block.In my flow graph, I put the bpsk modulated 
data input this block,and put the output of the block to a file_sink.
But there is nothing in that file.So I hope someone can tell me how to use this 
block.
Thanks in advance.
inter
  ___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


RE: [Discuss-gnuradio] How to decode the convolutional code, in the GRC

2011-04-05 Thread intermilan


 Achilleas:
  Thanks for your last e-mail.That help me a lot.But there is another 
question about the value of the parameter symbol_table we set in the 
chunks_to_symbol block. After read the code and example,I think if we want to 
implement the TCM ,we should set the value follow the fsm_utlils.py. And if we 
just want to use the trellis_viterbi_combined block to decode the convolutional 
code,we can set any value we want to (should  follow the rules of the 
chunks_to_symbols block). Am I right about it?

inter.



 Date: Fri, 1 Apr 2011 09:59:46 -0400
 From: anas...@umich.edu
 To: tianxia...@hotmail.com; discuss-gnuradio@gnu.org
 Subject: Re: [Discuss-gnuradio] How to decode the convolutional code, in the 
 GRC
 
 The matrices PS and PI are documented in the fsm class and in the
 gr-trellis documentation: PS[s] is a vector of previous states
 that will result in state s and PI[s] is the corresponding vector of
 input symbols that will result in state s from a previous state.
 This is useful in the VA because you have this info precalculated (see
 the fsm.cc) and thus you don't need to do this backwards lookup every
 time in the VA execution-- saves time!
 
 The vector alpha is a temporary vector that holds the accumulated path
 metrics in the VA. You do not need to store ALL of them for a block of K
 steps, but only two of them and then alternate between the two: read
 from one/write to the other (this is what the variable alphai points to!)
 
 The function calc_metric(O, D, TABLE, (in[k*D]), metric,TYPE)
 calculates the metrics required for the viterbi algorithm in each
 step: depending on the TYPE this can be Euclidean, Hamming etc.
 In the code, for every chunk of observation corresponding to step k
 in[k*D]...in[k*D+D-1]
 it evaluates the metric between this observation and EVERY possible
 output symbol of the trellis and puts the results in the vector
 metric. Observe that there are O (this is a big o not a zero)
 possible output symbols for the fsm, and each one of them is translated
 to a signal through the D-dimensional lookup table TABLE, so :
 output symbol 0 will be translated (modulated) to TABLE[0]...TABLE[D-1]
 output symbol 1 will be translated (modulated) to TABLE[D]...TABLE[2D-1]
 ..
 output symbol O-1 will be translated (modulated) to
 TABLE[(O-1)D]...TABLE[OD-1]
 
 eg, in the case of euclidean metrics the calc_metric() will form O
 numbers, each being the euclidean distance between the input
 in[k*D]...in[k*D+D-1]
 and EACH of the translated signals:
 TABLE[0]...TABLE[D-1]
 TABLE[D]...TABLE[2D-1]
 ...
 TABLE[(O-1)D]...TABLE[OD-1]
 
 Regarding references, I am just implementing the standard (block)
 Viterbi algorithm...
 
 Achilleas
 
 
 On 4/1/2011 4:33 AM, intermilan wrote:
  hi Achilleas:
  I recently had read the code in the trellis_viterbi_combined_fb.cc want 
  to understand how you use the viterbi algorithm.But there is something 
  that I can not understand.
  for(int k=0;kK;k++) {
  calc_metric(O, D, TABLE, (in[k*D]), metric,TYPE); // calc metrics
  norm=INF;
  for(int j=0;jS;j++) { // for each next state do ACS
  minm=INF;
  minmi=0;
  for(unsigned int i=0;iPS[j].size();i++) {
  //int i0 = j*I+i;
  if((mm=alpha[alphai*S+PS[j][i]]+metric[OS[PS[j][i]*I+PI[j][i]]])! ;minm)
  minm=mm,minmi=i;
  }
  trace[k*S+j]=minmi;
  alpha[((alphai+1)%2)*S+j]=minm;
  if(minmnorm) norm=minm;
  }
  for(int j=0;jS;j++)
  alpha[((alphai+1)%2)*S+j]-=norm; // normalize total metrics so they do 
  not explode
  alphai=(alphai+1)%2;
  }
  I think above code perform the Add-Compare-Select operations.
  I do not understand is the function of the matrix metric.I saw the code 
  in the calc_metric.cc,it is calculate the ! euclidean between
  the data output the chunks_to_symbols block and the point in the 
  symbol_table.So what is the function of this metric in your viterbi 
  algorithm?
  Besides,what is the function of the PS and PI which is generated by the 
  fsm file? and what is the function of the alpah[] in your code?
  Is there some reference when you write these codes.if there is some 
  ,please tell me.I appreciate your hlep.
  Thanks.
  
  
Date: Mon, 14 Mar 2011 10:11:44 -0400
From: anas...@umich.edu
To: tianxia...@hotmail.com; discuss-gnuradio@gnu.org
Subject: Re: [Discuss-gnuradio] How to decode the convolutional code, 
  in the GRC
   
inter,
   
as i said in my previous email, you just have to consider the equivalent
channel (the fact that it is noiseless is irrelevant in this discussion)
from the output of the FSM encoder to the input of the VA.
It seems you prefer to call it equivalent modulato! r; that's fine!
Once you realize what this equivalent channel/modulator is
(what is its input/output alphabet and what kind of symbols it
inputs/outputs) then it will be strainghtforward to see what the viterbi
decoder block should look like.
If I were to guess from your description, i would say that your
equivallent channel

RE: [Discuss-gnuradio] How to decode the convolutional code in the GRC

2011-03-14 Thread intermilan

Ben:
  Thanks for your last e-mail.What I want to see is  the point of my case 
is to see the BER of data when convolutional code is used in the different 
modulator.So DBPSK block is just one example,and these cases are  particular 
asked to do in the GRC by my supervisor。I will try what you tell me to do to 
see if it works.Thanks again.

inter

 Date: Fri, 11 Mar 2011 20:51:44 -0700
 Subject: Re: [Discuss-gnuradio] How to decode the convolutional code in the 
 GRC
 From: b...@reynwar.net
 To: tianxia...@hotmail.com; discuss-gnuradio@gnu.org
 
 You're right my suggestion won't work since the demodulation blocks
 output bits, and the viterbi_combined block expects complex symbols.
 I'll try again.
 
 How about something like the dbpsk block
 (gnuradio-core/src/python/gnuradio/blks2impl/dbpsk.py) but with the
 constellation_decoder replaced with trellis_viterbi_combined.  If I
 was going to do this I wouldn't try to do it in GRC, but it is
 probably possible.
 
 Ben
 
 2011/3/11 intermilan tianxia...@hotmail.com:
  Ben:
   Thanks for your reply.I knew that block you mentioned.And I know if I
  use the block chunks_to_symbols after the trellis_encoder,that parameter
  constellation should be the same as the parameter symbol_table in the
  chunks_to_symbols.And  I think this is TCM.
   But in my flow graph,there is no chunks_to_symbols block,then I do not
  know how to set that parameter, so I do not know how to decode the data.Do
  you know how to set that parameter constellation in the block
  trellis_viterbi_combined if I used this block in my flow graph?
 
inter
 
 
  Date: Thu, 10 Mar 2011 22:33:36 -0700
  Subject: Re: [Discuss-gnuradio] How to decode the convolutional code in
  the GRC
  From: b...@reynwar.net
  To: tianxia...@hotmail.com; discuss-gnuradio@gnu.org
 
  You probably want to use the trellis_viterbi_combined block.
 
  The documentation for the trellis blocks is in
  gnuradio/gr-trellis/doc/gr-trellis.xml.
  (if you have xmlto installed then an html file is also built.)
 
  Ben
 
  2011/3/10 intermilan tianxia...@hotmail.com:
   Hi all:
 Now I want to use the Trellis_encoder block in the GRC to make an
   example for the convolutional code.In my opinion, I use Trellis_encoder
   to
   produce the convolutional code,  then make the convolutional code
   through
   the modulator and demodulator(such as DPSK), finally use some block to
   decode the convolutional code to get the original data.But after the
   data
   get out the demodulator,I do not know how to decode it.
Here is the flow graph I used:
  
  
   vector_source-throttle-Packed_to_Unpacked-Trellis_encoder-Packet_encoder-DPSK_mod-DPSK_demod-Packet_decoder-?
   Can anyone tell me which block I should use after the Packet_decoder
   to
   decode the convolutional code?
  
  
   Thank you in advance.
  
   ___
   Discuss-gnuradio mailing list
   Discuss-gnuradio@gnu.org
   http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
  
  
 
  ___
  Discuss-gnuradio mailing list
  Discuss-gnuradio@gnu.org
  http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
 
 
  ___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


RE: [Discuss-gnuradio] How to decode the convolutional code, in the GRC

2011-03-14 Thread intermilan

Achilleas:

 What I want to do is want to see the BER when the  convolutional code is 
used in different modulator in the GRC,but I had not put the noise source in 
the flow graph so there is no noise between the modulator and demodulator.
 Besides,in my opinion, we can consider the packet_encoder and 
packet_decoder block is part of the modulation.In other words,in the flow graph 
I mentioned ,the data input the packet_encoder is the same as the 
packet_decoder block(because I did not put the noise block between the 
modulator and demodulator ).
 But I still not understand how to set the parameters in the viterbi block 
in this case, particularly the  parameter constellation if I do not use the 
chunks_to_symbols block.
Thanks for your help.

inter

 Date: Fri, 11 Mar 2011 17:33:25 -0500
 From: anas...@umich.edu
 To: tianxia...@hotmail.com; discuss-gnuradio@gnu.org
 Subject: RE: [Discuss-gnuradio] How to decode the convolutional code, in the 
 GRC
 
 
 inter,
 
 think of whatever is AFTER the trellis encoder and BEFORE the viterbi
 decoder as an equivalent channel.
 
 What is the equivalent channel in your case?
 What is its input alphabet? what is its output alphabet?
 
  From your description, it seems that the input alphabet is the same as 
 the output alphabet of your FSM.
 
 I am not familiar with the block packet decoder so i don't know what 
 it outputs, but whatever it is it should be the output alphabet of your
 equivalent channel.
 
 Once you figure out these things it will be straightforward to see what 
 the viterbi block should be...
 If you gather these pieces of information and still don't see how to 
 implement the viterbi decoder let me know and i will provide further help.
 
 Achilleas
  ___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


RE: [Discuss-gnuradio] How to decode the convolutional code, in the GRC

2011-03-14 Thread intermilan

Achilleas:
 Do you mean I should put the chunks_to_symbols block between the 
packet_decoder and Viterbi_combined block? and when I do it , I can get the 
original data from the viterbi block(I still not add the noise).In my 
opinion,the function of the chunks_to_symbols block is just to identity the 
hamming distance. But in the example about TCM 
(/gnuradio-3.3.0/gr-trellis/src/example),the function of the same block is not 
just to identity the hamming distance but also some kind of modulator.Am I 
right about it?

inter

 Date: Mon, 14 Mar 2011 10:11:44 -0400
 From: anas...@umich.edu
 To: tianxia...@hotmail.com; discuss-gnuradio@gnu.org
 Subject: Re: [Discuss-gnuradio] How to decode the convolutional code, in the 
 GRC
 
 inter,
 
 as i said in my previous email, you just have to consider the equivalent
 channel (the fact that it is noiseless is irrelevant in this discussion)
 from the output of the FSM encoder to the input of the VA.
 It seems you prefer to call it equivalent modulator; that's fine!
 Once you realize what this equivalent channel/modulator is
 (what is its input/output alphabet and what kind of symbols it
 inputs/outputs) then it will be strainghtforward to see what the viterbi
 decoder block should look like.
 If I were to guess from your description, i would say that your
 equivallent channel
 has input/output alphabet equal to the output alphabet of the FSM.
 Its input is a coded symbol from the FSM encoder and its output is also
 such a symbol from the packet decoder.
 So all you need is to do VA with symbol-wise hamming distance as your
 metric. You can achieve that using the viterbi_combined block with
 a trivial 1-D chunks to symbols block (identity) and the appropriate
 parameter for the metric_type.
 
 
 Achilleas
 
 On 3/14/2011 6:45 AM, intermilan wrote:
  Achilleas:
  
  What I want to do is want to see the BER when the convolutional code is 
  used in different modulator in the GRC,but I had not put the noise 
  source in the flow graph so there is no noise between the modulator and 
  demodulator.
  Besides,in my opinion, we can consider the packet_encoder and 
  packet_decoder block is part of the modulation.In other words,in the 
  flow graph I mentioned ,the data input the packet_encoder is the same as 
  the packet_decoder block(because I did not put the noise block between 
  the modulator and demodulator ).
  But I still not understand how to set the parameters in the viterbi 
  block in this case, particularly the parameter constellation if I do not 
  use the chunks_to_symbols block.
  Thanks for your help.
  
  inter
  
Date: Fri, 11 Mar 2011 17:33:25 -0500
From: anas...@umich.edu
To: tianxia...@hotmail.com; di! scuss-gnura...@gnu.org
Subject: RE: [Discuss-gnuradio] How to decode the convolutional code, 
  in the GRC
   
   
inter,
   
think of whatever is AFTER the trellis encoder and BEFORE the viterbi
decoder as an equivalent channel.
   
What is the equivalent channel in your case?
What is its input alphabet? what is its output alphabet?
   
From your description, it seems that the input alphabet is the same as
the output alphabet of your FSM.
   
I am not familiar with the block packet decoder so i don't know what
it outputs, but whatever it is it should be the output alphabet of your
equivalent channel.
   
Once you figure out these things it will be straightforward to see what
the viterbi block should be...
If you gather these pieces of information and still don't see how to
implement the viterbi decoder let me know ! and i will provide 
  further help.
   
Achilleas
 
 -- 
 ___
 Achilleas Anastasopoulos  
 Associate Professor
 EECS Department   Voice : (734)615-4024
 UNIVERSITY OF MICHIGANFax   : (734)763-8041
 Ann Arbor, MI 48109-2122  E-mail: anas...@umich.edu
 URL: http://www.eecs.umich.edu/~anastas/  
 ___
  ___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] How to decode the convolutional code in the GRC

2011-03-10 Thread intermilan

Hi all:
  Now I want to use the Trellis_encoder block in the GRC to make an example 
for the convolutional code.In my opinion, I use Trellis_encoder to produce the 
convolutional code,  then make the convolutional code through the modulator and 
demodulator(such as DPSK), finally use some block to decode the convolutional 
code to get the  original data.But after the data get out the demodulator,I do 
not know how to decode it.
 Here is the flow graph I used:

vector_source-throttle-Packed_to_Unpacked-Trellis_encoder-Packet_encoder-DPSK_mod-DPSK_demod-Packet_decoder-?
Can anyone tell me which block I should use after the Packet_decoder to 
decode the convolutional code?



  Thank you in advance.
  ___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


RE: [Discuss-gnuradio] How to decode the convolutional code in the GRC

2011-03-10 Thread intermilan

Ben:
 Thanks for your reply.I knew that block you mentioned.And I know if I use 
the block chunks_to_symbols after the trellis_encoder,that parameter 
constellation should be the same as the parameter symbol_table in the 
chunks_to_symbols.And  I think this is TCM.
 But in my flow graph,there is no chunks_to_symbols block,then I do not 
know how to set that parameter, so I do not know how to decode the data.Do you 
know how to set that parameter constellation in the block 
trellis_viterbi_combined if I used this block in my flow graph?

  inter

  

 Date: Thu, 10 Mar 2011 22:33:36 -0700
 Subject: Re: [Discuss-gnuradio] How to decode the convolutional code in the 
 GRC
 From: b...@reynwar.net
 To: tianxia...@hotmail.com; discuss-gnuradio@gnu.org
 
 You probably want to use the trellis_viterbi_combined block.
 
 The documentation for the trellis blocks is in
 gnuradio/gr-trellis/doc/gr-trellis.xml.
 (if you have xmlto installed then an html file is also built.)
 
 Ben
 
 2011/3/10 intermilan tianxia...@hotmail.com:
  Hi all:
Now I want to use the Trellis_encoder block in the GRC to make an
  example for the convolutional code.In my opinion, I use Trellis_encoder to
  produce the convolutional code,  then make the convolutional code through
  the modulator and demodulator(such as DPSK), finally use some block to
  decode the convolutional code to get the original data.But after the data
  get out the demodulator,I do not know how to decode it.
   Here is the flow graph I used:
 
  vector_source-throttle-Packed_to_Unpacked-Trellis_encoder-Packet_encoder-DPSK_mod-DPSK_demod-Packet_decoder-?
  Can anyone tell me which block I should use after the Packet_decoder to
  decode the convolutional code?
 
 
  Thank you in advance.
 
  ___
  Discuss-gnuradio mailing list
  Discuss-gnuradio@gnu.org
  http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
 
 
  ___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


RE: [Discuss-gnuradio] question about import a new block in gnuradio-3.3.0

2010-11-17 Thread intermilan

Hi Eric:
   thanks for your help. I figured the question out.

 Date: Tue, 16 Nov 2010 21:46:13 -0800
 From: e...@comsec.com
 To: tianxia...@hotmail.com
 CC: discuss-gnuradio@gnu.org
 Subject: Re: [Discuss-gnuradio] question about import a new block in 
 gnuradio-3.3.0
 
 On Wed, Nov 17, 2010 at 10:48:11AM +0800, intermilan wrote:
  
  hi all:
   I use the command create-gnuradio-out-of-tree-project to bulid a new 
  block,and after that I use the following command:
   ./bootstrap
   ./configure
   make
   make check
   sudo make install
   Then I thought I had installed the new block.then I want to import the 
  new block in the python to make sure it is successfully installed.Then I 
  got this:
  
  tianxia...@ubuntu:~/gnuradio-3.3.0/test_example$ python
  Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56) 
  [GCC 4.4.3] on linux2
  Type help, copyright, credits or license for more information.
   import test_example
  Traceback (most recent call last):
File stdin, line 1, in module
File /usr/local/lib/python2.6/dist-packages/test_example/__init__.py, 
  line 40, in module
  from test_example_swig import *
File 
  /usr/local/lib/python2.6/dist-packages/test_example/test_example_swig.py, 
  line 24, in module
  _test_example_swig = swig_import_helper()
File 
  /usr/local/lib/python2.6/dist-packages/test_example/test_example_swig.py, 
  line 20, in swig_import_helper
  _mod = imp.load_module('_test_example_swig', fp, pathname, description)
  ImportError: libgnuradio-test_example.so.0: cannot open shared object file: 
  No such file or directory
  
  My python is not very well,so I hope someone can help me figure it out.
  Thank you in advance. 
 
 Assuming you've got /usr/local/lib in /etc/ld.so.conf...
 
  $ sudo ldconfig
 
 
 Or
 
  $ export LD_LIBRARY_PATH=/usr/local/lib
 
 
 BTW, it's always helpful to tell us what OS and distribution you're using...
 
 Eric
  ___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] question about import a new block in gnuradio-3.3.0

2010-11-16 Thread intermilan

hi all:
 I use the command create-gnuradio-out-of-tree-project to bulid a new 
block,and after that I use the following command:
 ./bootstrap
 ./configure
 make
 make check
 sudo make install
 Then I thought I had installed the new block.then I want to import the new 
block in the python to make sure it is successfully installed.Then I got this:

tianxia...@ubuntu:~/gnuradio-3.3.0/test_example$ python
Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56) 
[GCC 4.4.3] on linux2
Type help, copyright, credits or license for more information.
 import test_example
Traceback (most recent call last):
  File stdin, line 1, in module
  File /usr/local/lib/python2.6/dist-packages/test_example/__init__.py, line 
40, in module
from test_example_swig import *
  File 
/usr/local/lib/python2.6/dist-packages/test_example/test_example_swig.py, 
line 24, in module
_test_example_swig = swig_import_helper()
  File 
/usr/local/lib/python2.6/dist-packages/test_example/test_example_swig.py, 
line 20, in swig_import_helper
_mod = imp.load_module('_test_example_swig', fp, pathname, description)
ImportError: libgnuradio-test_example.so.0: cannot open shared object file: No 
such file or directory

My python is not very well,so I hope someone can help me figure it out.
Thank you in advance. ___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


RE: [Discuss-gnuradio] question on howto write a new block

2010-11-15 Thread intermilan

hi Eric:
 I had install the gnuradio-3.3.0,and use the 
create-gnuradio-out-of-tree-projec test_example command to make a new block 
which is named test_example,
then I changed the test_example_square_ff.h/cc to test_example_add_ff.h/cc,and 
I also changed other files like Makefile.am.Then I use the following command to 
install the new block:
 ./bootstrap
 ./configure
 ./make
 ./sudo make install
After that I thought I had installed the new block,then I write a simple 
file to test it which is named test.py.but after I run the file ,I got the 
following errors:

File ./test.py, line 4, in module
import test_example
  File /usr/local/lib/python2.6/dist-packages/test_example/__init__.py, line 
40, in module
from test_example_swig import *
  File 
/usr/local/lib/python2.6/dist-packages/test_example/test_example_swig.py, 
line 24, in module
_test_example_swig = swig_import_helper()
  File 
/usr/local/lib/python2.6/dist-packages/test_example/test_example_swig.py, 
line 20, in swig_import_helper
_mod = imp.load_module('_test_example_swig', fp, pathname, description)
ImportError: libgnuradio-test_example.so.0: cannot open shared object file: No 
such file or directory

Can you tell me the reason of these errors?  Thank you in advance.


 Date: Tue, 9 Nov 2010 12:57:29 -0800
 From: e...@comsec.com
 To: discuss-gnuradio@gnu.org
 Subject: Re: [Discuss-gnuradio] question on howto write a new block
 
 On Tue, Nov 09, 2010 at 03:23:35PM +0100, Martin Braun wrote:
  On Tue, Nov 09, 2010 at 05:33:15PM +0800, intermilan wrote:
   hi all:
I am writing a new simple signal processing block following the 
   tutorial
   under the directory /gnuradio-3.2.2/gr-howto-write-a-block-3.2.2(there is 
   no
   gr-howto-write-a-block-3.2.2 at the beginning,and this one is I 
   downloaded and
   copied to this directory)and named 'howto_add_ff' block. I've created
   howto_add_ff.h and howto_add_ff.cc file under /gnuradio-3.2.2/
   gr-howto-write-a-block-3.2.2/src/lib.Then I modified howto.i and 
   Makefile.am in
   the same directory.
  After that  I run the following command under the directory 
   /gnuradio-3.2.2/
   gr-howto-write-a-block-3.2.2:
  ./bootstrap
  ./configure 
  make
 Then I got a error  said thers is no rules for all-am to creat the
   required target howto_add_ff.h.STOP.( I translate the error into 
   english
   beacause I do no use engliah as the language of my Ununtu).
  Can anyone tell me how to fix it?
  
  You've probably not adapted the Makefiles properly.
  Have a look where howto_square_ff.* is referenced (it's a couple of
  places).
  I recommend using gr_modtool.py (you can get it from
  https://www.cgran.org/wiki/devtools), this automatically does all the
  edits for you.
  
  Cheers,
  MB
 
 I'd also suggest starting with 3.3.0 (or git master) instead of 3.2.2, and 
 use the
  
   $ create-gnuradio-out-of-tree-project my-module-name
 
 command to get you started.
 
 Eric
 
 ___
 Discuss-gnuradio mailing list
 Discuss-gnuradio@gnu.org
 http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
  ___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


FW: [Discuss-gnuradio] question on howto write a new block

2010-11-10 Thread intermilan



From: tianxia...@hotmail.com
To: thilo.moeni...@googlemail.com
Subject: RE: [Discuss-gnuradio] question on howto write a new block
Date: Wed, 10 Nov 2010 16:50:53 +0800








Thank you all for the  reply.
 Now I try to install the gnuradio-3.3.0,and then I will try it the way Martins 
told me.

 Date: Tue, 9 Nov 2010 12:32:37 +0100
 Subject: Re: [Discuss-gnuradio] question on howto write a new block
 From: thilo.moeni...@googlemail.com
 To: tianxia...@hotmail.com
 
 Hi,
 
 this Message sounds like a Missing command or file 
 
 in which folder the error occurs?
 
 you can check these files:
 src/headerfile
 src/cc-file
 src/Makefile.am
 swig/Makefile.am
 swig/yourpakage.i
 swig/how_to_add_ff.i
 
 for the next progs you can use Martins gr_modtool... this tool adds a
 new block to your code and you wont forget an entry
 
 check it out:
 https://www.cgran.org/browser/projects/devtools
 
 greetings
 
 thilo
 
 2010/11/9 intermilan tianxia...@hotmail.com:
  hi all:
   I am writing a new simple signal processing block following the
  tutorial under the directory
  /gnuradio-3.2.2/gr-howto-write-a-block-3.2.2(there is no
  gr-howto-write-a-block-3.2.2 at the beginning,and this one is I downloaded
  and copied to this directory)and named 'howto_add_ff' block. I've created
  howto_add_ff.h and howto_add_ff.cc file under
  /gnuradio-3.2.2/gr-howto-write-a-block-3.2.2/src/lib.Then I modified howto.i
  and Makefile.am in the same directory.
 After that  I run the following command under the directory
  /gnuradio-3.2.2/gr-howto-write-a-block-3.2.2:
 ./bootstrap
 ./configure
 make
Then I got a error  said thers is no rules for all-am to creat the
  required target howto_add_ff.h.STOP.( I translate the error into english
  beacause I do no use engliah as the language of my Ununtu).
 Can anyone tell me how to fix it?
 
Thank you in advance
 
  ___
  Discuss-gnuradio mailing list
  Discuss-gnuradio@gnu.org
  http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
 
 
  ___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] question on howto write a new block

2010-11-09 Thread intermilan

hi all:
 I am writing a new simple signal processing block following the tutorial 
under the
directory /gnuradio-3.2.2/gr-howto-write-a-block-3.2.2(there is no 
gr-howto-write-a-block-3.2.2 at the beginning,and this one is I downloaded and 
copied to this directory)and named 'howto_add_ff' block. I've
created howto_add_ff.h and howto_add_ff.cc file under
/gnuradio-3.2.2/gr-howto-write-a-block-3.2.2/src/lib.Then I modified howto.i 
and Makefile.am in the same directory.
   After that  I run 
the following command under the directory 
/gnuradio-3.2.2/gr-howto-write-a-block-3.2.2:
   ./bootstrap

   ./configure 

   make
  Then I got a error  said thers is no rules for all-am to creat the 
required target howto_add_ff.h.STOP.( I translate the error into english 
beacause I do no use engliah as the language of my Ununtu).
   Can anyone tell me how to fix it?

 
  Thank you in advance

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


RE: [Discuss-gnuradio] want to achieve the symbol rate to 270.833kb/s

2010-09-18 Thread intermilan

hi Tom:
  thank you for your answer,I get it .Besides, how do we know the 
symbol rate if the data in the  air?what did you do to measure the symbol rate?



Thank you in advance

 From: trondeau1...@gmail.com
 Date: Fri, 17 Sep 2010 08:21:23 -0400
 Subject: Re: [Discuss-gnuradio] want to achieve the symbol rate to 270.833kb/s
 To: tianxia...@hotmail.com
 CC: discuss-gnuradio@gnu.org
 
 2010/9/17 intermilan tianxia...@hotmail.com:
  hi Tom:
 
I can not find the examples what you asked me to look for.so what the
  version of your Gnuradio? Mine is 3.2.2.
Besides, I still wonder why I can not use the resampler block in the
  /gnuradio-core/src/python/gnuradio/blks2impl in which I can set the value of
  the interpolation and decimation.and the program will automatic to set the
  parameters of the filter I need.I think it is capable. So can you tell some
  specific reasons?
 
 
  thank you
 
 You'll need either GNU Radio 3.3.0 or the latest checkout from git.
 
 Then yes, you can use the rational resampler. I misunderstood what you
 were saying in your original email. I thought you were having problems
 using the rational resampler to make the values work out properly. The
 nice thing about the arbitrary resampler is that you don't have to
 find a valid set of integers for the interp/decim to get your sample
 rate; instead, you pass it a real number to get out the sample rate
 that you want.
 
 But running through the numbers, it looks to me like you'll get the
 desired sample rate. So yes, that should work.
 
 Tom
  ___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


RE: [Discuss-gnuradio] want to achieve the symbol rate to 270.833kb/s

2010-09-17 Thread intermilan

hi Tom:

  I can not find the examples what you asked me to look for.so what the 
version of your Gnuradio? Mine is 3.2.2. 
  Besides, I still wonder why I can not use the resampler block in the 
/gnuradio-core/src/python/gnuradio/blks2impl in which I can set the value of 
the interpolation and decimation.and the program will automatic to set the 
parameters of the filter I need.I think it is capable. So can you tell some 
specific reasons?



  thank you  

 From: trondeau1...@gmail.com
 Date: Wed, 15 Sep 2010 07:43:42 -0400
 Subject: Re: [Discuss-gnuradio] want to achieve the symbol rate to 270.833kb/s
 To: tianxia...@hotmail.com
 CC: discuss-gnuradio@gnu.org
 
 2010/9/15 intermilan tianxia...@hotmail.com:
  hi all:
  I want to make the symbol rate of the data which is transmited by
  the USRP at the 270.833kb/s.I know the OpenBTS had already make it come
  true. but what I want to know is that can I use the resampler block to make
  this happen? (put the resampler block after the GMSK Mod block )and the
  value of the interpolation and decimation of the resampler block can be the
  same as them in the OpenBTS which are 65 and 96.and the interpolation of the
  USRP is 320 which is make the sample rate of the usrp is 400k.I have not do
  it now ,just want to ask here if  it is possible.
 
 
 You should be able to use the gr.pfb_arb_resampler_ccf block to
 accomplish this. It's an arbitrary resampler and so doesn't rely on
 integer relationships. It can be a bit tricky to use, so look at the
 examples in gnuradio-examples/src/python/pfb for help in designing the
 filter for it.
 
 ... One of these days, I need to make a convenience wrapper for this
 block that designs the filter for the half sample rate
 automatically...
 
 Tom
  ___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] want to achieve the symbol rate to 270.833kb/s

2010-09-15 Thread intermilan

hi all:
I want to make the symbol rate of the data which is transmited by the 
USRP at the 270.833kb/s.I know the OpenBTS had already make it come true. but 
what I want to know is that can I use the resampler block to make this happen? 
(put the resampler block after the GMSK Mod block )and the value of the 
interpolation and decimation of the resampler block can be the same as them in 
the OpenBTS which are 65 and 96.and the interpolation of the USRP is 320 which 
is make the sample rate of the usrp is 400k.I have not do it now ,just want to 
ask here if  it is possible.




 Thank you in advence
  ___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


RE: [Discuss-gnuradio] doubt about the the DC offset

2010-08-23 Thread intermilan

hi Eric:

   I think I am the one who ask the same question in my last e-mail.But 
there is no answer for it.I still can not find where is the process of setting 
this value.and I do not understand why this value is 4M.I hope someone can help 
me to figure it out.



  thank you

 Date: Sun, 22 Aug 2010 20:16:30 -0700
 From: e...@comsec.com
 To: tianxia...@hotmail.com
 CC: discuss-gnuradio@gnu.org
 Subject: Re: [Discuss-gnuradio] doubt about the the DC offset
 
 On Mon, Aug 23, 2010 at 09:42:56AM +0800, intermilan wrote:
  
  Hi all:
 
   when I run the test program test_usrp_standard_tx/rx.cc, I
   found that the DC offect is set to 4M. So can anyone tell me
   how this value come out and where can I find the process of
   setting this value? and can we set other values to instead of
   this value?
 
 Please search the mailing list archives.  This questions was asked and
 answered in the last 10 days or so...
 
 Eric
  ___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


RE: [Discuss-gnuradio] doubt about the the DC offset

2010-08-23 Thread intermilan












hi:
So that mean you have done many test cases,then found the 4M is the best 
value to improve the performance.but there is another question,where do you set 
this value in the code? I can not find this in the code.I hope you can tell me 
the position of this value is set at 4M in the code.
 


Thank you

 Date: Mon, 23 Aug 2010 12:35:41 -0700
 From: e...@comsec.com
 To: tianxia...@hotmail.com
 CC: discuss-gnuradio@gnu.org
 Subject: Re: [Discuss-gnuradio] doubt about the the DC offset
 
 On Mon, Aug 23, 2010 at 05:18:58PM +0800, intermilan wrote:
  
  hi Eric:
  
I think I am the one who ask the same question in my last
e-mail.But there is no answer for it.I still can not find where is
the process of setting this value.and I do not understand why this
value is 4M.I hope someone can help me to figure it out.
  
 
 http://osdir.com/ml/discuss-gnuradio-gnu/2010-08/msg00122.html
 
 We picked a value that improved the performance of the test cases we
 looked at.  You are free to pick another value if it works better for
 you, for whatever interpretation of better you like.
 
 
 
   Date: Sun, 22 Aug 2010 20:16:30 -0700
   From: e...@comsec.com
   To: tianxia...@hotmail.com
   CC: discuss-gnuradio@gnu.org
   Subject: Re: [Discuss-gnuradio] doubt about the the DC offset
   
   On Mon, Aug 23, 2010 at 09:42:56AM +0800, intermilan wrote:

Hi all:
   
 when I run the test program test_usrp_standard_tx/rx.cc, I
 found that the DC offect is set to 4M. So can anyone tell me
 how this value come out and where can I find the process of
 setting this value? and can we set other values to instead of
 this value?
   
   Please search the mailing list archives.  This questions was asked and
   answered in the last 10 days or so...
   
   Eric
  ___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] doubt about the the DC offset

2010-08-22 Thread intermilan

Hi all:
 when I run the test program test_usrp_standard_tx/rx.cc, I found that the 
DC offect is set to 4M. So can anyone tell me how this value come out and where 
can I find the process of setting this value? and can we set other values to 
instead of this value?




 Thank you in the advance.
  ___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


RE: [Discuss-gnuradio] what does the corresponds to DC in the IFmean?

2010-08-06 Thread intermilan

Thanks for the answer.

Is that mean if I set the center frequency at 2.5G(RFX2400),the DC is also at 
2.5G?or other values?

 


  Thank you 
 
 Date: Thu, 5 Aug 2010 10:15:43 -0500
 Subject: Re: [Discuss-gnuradio] what does the corresponds to DC in the 
 IFmean?
 From: jasonu...@gmail.com
 To: tianxia...@hotmail.com; discuss-gnuradio@gnu.org
 
 2010/8/5 intermilan tianxia...@hotmail.com:
  hi all:
I recently see the corresponds to DC in the IF in the function
  set_freq() of the db_basic.cc.so what does this  sentence mean? In other
  word, I want to know what is the function of the parameter baseband_freq in
  the set_freq().I hope someone can help me the figure it out.
 
 
 
 0 (DC) in gunradio is moved up to whatever center frequency you
 specify in set_freq in the RF circuitry.
  ___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


RE: [Discuss-gnuradio] doubt about the tune()

2010-08-06 Thread intermilan

   Thanks again.

   I have found the code.But what I want to know is why  the value of the LO 
offset is automatic set at 4M. Why not other values?Is there any reasons for 
it? 

 


   Thank you.
 
 Date: Thu, 5 Aug 2010 19:12:12 -0700
 From: e...@comsec.com
 To: tianxia...@hotmail.com
 Subject: Re: [Discuss-gnuradio] doubt about the tune()
 
 On Thu, Aug 05, 2010 at 09:10:50AM +0800, intermilan wrote:
  
  Thank you for the answer.then I have another quertion.why the value
  is 4M? why not other values like 3M or 5M?and can you tell me where
  is the code to set the DC offect?
 
 The value you're talking about is called lo_offset in the code, and
 is an attribute of the daughterboard class. Some have a zero for their
 offset. The default value for each was choosen as a reasonable compromise.
 
 In python, if db is a daughterboard object,
 
 off = db.lo_offset() # Return the current LO Offset
 
 db.set_lo_offset(1.0e6) # Set LO offset to 1MHz
 
 IIRC, after calling set_lo_offset it doesn't take effect until the
 next time you call tune
 
 See http://gnuradio.org/doc/doxygen/classdb__base.html
 
 To possibly head off some other questions, please take a look at:
 
 http://gnuradio.org/doc/doxygen/classusrp__standard__rx.html
 http://gnuradio.org/doc/doxygen/classusrp__standard__tx.html
 
 And of course, there's always the source code :-)
 
 Eric
 
 
  
   Date: Wed, 4 Aug 2010 10:14:32 -0700
   From: e...@comsec.com
   To: tianxia...@hotmail.com
   CC: discuss-gnuradio@gnu.org
   Subject: Re: [Discuss-gnuradio] doubt about the tune()
   
   On Wed, Aug 04, 2010 at 05:08:44PM +0800, intermilan wrote:

hi all:
I recently run the test_usrp_standard_tx/rx.cc to do some test.and 
after I run the test_usrp_standard_tx.cc, I got the follow information:
which: 0
interp: 64
rf_freq: 2.5e+09
amp: 3.00
nsamples: 3.2e+07
Subdevice name is Flex 2400 Tx
Subdevice freq range: (2.3e+09, 2.7e+09)
mux: 0x98
baseband rate: 2e+06
target_freq: 25.00
ok: true
r.baseband_freq: 250400.00
r.dxc_freq: -400.00
r.residual_freq: 0.00
r.inverted: 0
xfered 3.2e+07 bytes in 4 seconds. 8.002e+06 bytes/sec. cpu time = 0

as you can see, I want to set the frequency at 2.5G(RFX2400) ,but there 
is a parameter called r.basebande=2.504G.I know it is the return valus 
of the tune().but I want to know what is the function of this parameter 
and how did 2.504G come out. can anyone help me to figure it out?
Besides,why the frequenct of the DUC is set at -4M? how did it come out?
   
   It moves the DC offset 4MHz away from the center of your desired
   spectrum. r.baseband_freq + r.dxc_freq = target_freq.
   
   Eric
  
  ___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] what does the corresponds to DC in the IFmean?

2010-08-05 Thread intermilan

hi all: 
  I recently see the corresponds to DC in the IF in the function 
set_freq() of the db_basic.cc.so what does this  sentence mean? In other word, 
I want to know what is the function of the parameter baseband_freq in the 
set_freq().I hope someone can help me the figure it out.



   Thank you in advance


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


[Discuss-gnuradio] doubt about the tune()

2010-08-04 Thread intermilan

hi all:
   I recently run the test_usrp_standard_tx/rx.cc to do some test.and after 
I run the test_usrp_standard_tx.cc, I got the follow information:
which:0
interp:   64
rf_freq:  2.5e+09
amp:  3.00
nsamples: 3.2e+07
Subdevice name is Flex 2400 Tx
Subdevice freq range: (2.3e+09, 2.7e+09)
mux: 0x98
baseband rate: 2e+06
target_freq: 25.00
ok:  true
r.baseband_freq: 250400.00
r.dxc_freq:  -400.00
r.residual_freq: 0.00
r.inverted:  0
xfered 3.2e+07 bytes in 4 seconds.  8.002e+06 bytes/sec.  cpu time = 0

  as you can see, I want to set the frequency at 2.5G(RFX2400) ,but there 
is a parameter called r.basebande=2.504G.I know it is the return valus of the 
tune().but I want to know what is the function of this parameter and how did  
2.504G come out. can anyone help me to figure it out?
  Besides,why the frequenct of the DUC is set at -4M? how did it come out?



  Thank you in advance  
  ___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] doubt about the tune()

2010-08-04 Thread intermilan



From: tianxia...@hotmail.com
To: e...@comsec.com
Subject: RE: [Discuss-gnuradio] doubt about the tune()
Date: Thu, 5 Aug 2010 09:10:50 +0800








   Thank you for the answer.then I have another quertion.why the value is 
4M? why not other values like 3M or 5M?and can you tell me where is the code to 
set the DC offect?



 Thank you

 Date: Wed, 4 Aug 2010 10:14:32 -0700
 From: e...@comsec.com
 To: tianxia...@hotmail.com
 CC: discuss-gnuradio@gnu.org
 Subject: Re: [Discuss-gnuradio] doubt about the tune()
 
 On Wed, Aug 04, 2010 at 05:08:44PM +0800, intermilan wrote:
  
  hi all:
 I recently run the test_usrp_standard_tx/rx.cc to do some test.and 
  after I run the test_usrp_standard_tx.cc, I got the follow information:
  which:0
  interp:   64
  rf_freq:  2.5e+09
  amp:  3.00
  nsamples: 3.2e+07
  Subdevice name is Flex 2400 Tx
  Subdevice freq range: (2.3e+09, 2.7e+09)
  mux: 0x98
  baseband rate: 2e+06
  target_freq: 25.00
  ok:  true
  r.baseband_freq: 250400.00
  r.dxc_freq:  -400.00
  r.residual_freq: 0.00
  r.inverted:  0
  xfered 3.2e+07 bytes in 4 seconds.  8.002e+06 bytes/sec.  cpu time = 0
  
as you can see, I want to set the frequency at 2.5G(RFX2400) ,but 
  there is a parameter called r.basebande=2.504G.I know it is the return 
  valus of the tune().but I want to know what is the function of this 
  parameter and how did  2.504G come out. can anyone help me to figure it out?
Besides,why the frequenct of the DUC is set at -4M? how did it come 
  out?
 
 It moves the DC offset 4MHz away from the center of your desired
 spectrum.  r.baseband_freq + r.dxc_freq = target_freq.
 
 Eric
  ___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] problem about the test_usrp_standard_tx.cc

2010-07-31 Thread intermilan

hi all:
   recently I want to run some c++ programs in the gnuradio,then I found 
the test_usrp_standard_tx/rx.cc.But when I use the command g++ to compile the 
program,there is lots of error.I list the error as follow:
  
 In function `test_output(boost::shared_ptrusrp_standard_tx, long long, 
double, int)':
test_usrp_standard_tx.cc:(.text+0x32c): undefined reference to 
`get_elapsed_time'
test_usrp_standard_tx.cc:(.text+0x334): undefined reference to `get_cpu_usage'
test_usrp_standard_tx.cc:(.text+0x48e): undefined reference to 
`get_elapsed_time'
test_usrp_standard_tx.cc:(.text+0x496): undefined reference to `get_cpu_usage'
/tmp/ccM3f0Rd.o: In function `main':
test_usrp_standard_tx.cc:(.text+0x914): undefined reference to 
`boost::program_options::options_description::m_default_line_length'
test_usrp_standard_tx.cc:(.text+0x95e): undefined reference to 
`boost::program_options::options_description::options_description(std::basic_stringchar,
 std::char_traitschar, std::allocatorchar  const, unsigned int)'
test_usrp_standard_tx.cc:(.text+0xab5): undefined reference to 
`boost::program_options::options_description::add_options()'
test_usrp_standard_tx.cc:(.text+0xad3): undefined reference to 
`boost::program_options::options_description_easy_init::operator()(char const*, 
char const*)'
test_usrp_standard_tx.cc:(.text+0xaf5): undefined reference to 
`boost::program_options::options_description_easy_init::operator()(char const*, 
boost::program_options::value_semantic const*, char const*)'
test_usrp_standard_tx.cc:(.text+0xb17): undefined reference to 
`boost::program_options::options_description_easy_init::operator()(char const*, 
boost::program_options::value_semantic const*, char const*)'
test_usrp_standard_tx.cc:(.text+0xb39): undefined reference to 
`boost::program_options::options_description_easy_init::operator()(char const*, 
boost::program_options::value_semantic const*, char const*)'
test_usrp_standard_tx.cc:(.text+0xb5b): undefined reference to 
`boost::program_options::options_description_easy_init::operator()(char const*, 
boost::program_options::value_semantic const*, char const*)'
test_usrp_standard_tx.cc:(.text+0xb73): undefined reference to 
`boost::program_options::options_description_easy_init::operator()(char const*, 
char const*)'
test_usrp_standard_tx.cc:(.text+0xb8b): undefined reference to 
`boost::program_options::options_description_easy_init::operator()(char const*, 
char const*)'
test_usrp_standard_tx.cc:(.text+0xbad): undefined reference to 
`boost::program_options::options_description_easy_init::operator()(char const*, 
boost::program_options::value_semantic const*, char const*)'
test_usrp_standard_tx.cc:(.text+0xbcf): undefined reference to 
`boost::program_options::options_description_easy_init::operator()(char const*, 
boost::program_options::value_semantic const*, char const*)'
test_usrp_standard_tx.cc:(.text+0xbf1): undefined reference to 
`boost::program_options::options_description_easy_init::operator()(char const*, 
boost::program_options::value_semantic const*, char const*)'
test_usrp_standard_tx.cc:(.text+0xbff): undefined reference to 
`boost::program_options::variables_map::variables_map()'
test_usrp_standard_tx.cc:(.text+0xc73): undefined reference to 
`boost::program_options::store(boost::program_options::basic_parsed_optionschar
 const, boost::program_options::variables_map, bool)'
test_usrp_standard_tx.cc:(.text+0xcd3): undefined reference to 
`boost::program_options::notify(boost::program_options::variables_map)'
test_usrp_standard_tx.cc:(.text+0xe08): undefined reference to 
`boost::program_options::operator(std::basic_ostreamchar, 
std::char_traitschar , boost::program_options::options_description const)'
/tmp/ccM3f0Rd.o: In function 
`boost::program_options::value_semantic_codecvt_helperchar::value_semantic_codecvt_helper()':
test_usrp_standard_tx.cc:(.text._ZN5boost15program_options29value_semantic_codecvt_helperIcEC2Ev[boost::program_options::value_semantic_codecvt_helperchar::value_semantic_codecvt_helper()]+0x16):
 undefined reference to `vtable for 
boost::program_options::value_semantic_codecvt_helperchar'
/tmp/ccM3f0Rd.o: In function 
`boost::program_options::value_semantic_codecvt_helperchar::~value_semantic_codecvt_helper()':
test_usrp_standard_tx.cc:(.text._ZN5boost15program_options29value_semantic_codecvt_helperIcED2Ev[boost::program_options::value_semantic_codecvt_helperchar::~value_semantic_codecvt_helper()]+0xb):
 undefined reference to `vtable for 
boost::program_options::value_semantic_codecvt_helperchar'
/tmp/ccM3f0Rd.o: In function 
`boost::program_options::variables_map::~variables_map()':
test_usrp_standard_tx.cc:(.text._ZN5boost15program_options13variables_mapD1Ev[boost::program_options::variables_map::~variables_map()]+0xd):
 undefined reference to `vtable for boost::program_options::variables_map'
/tmp/ccM3f0Rd.o: In function 
`boost::program_options::validation_error::validation_error(std::basic_stringchar,
 

[Discuss-gnuradio] /gnuradio-example/python/digital/ pick_bitrate.py question

2010-06-17 Thread intermilan

hi all:
I found there is a program (pick_bitrate.py) about bit-rate in the 
/gnuradio-example/python/digital/ .And there is one quertion confuse me about 
this program. 
   There is a formula about bit-rate in the program such as bitrate = 
converter_rate / interp / samples_per_symbol. I know the converter_rate is 
128Msam/s,so if I set the interp and samples_per_symbol, I can get the 
bit-rate.and is it the same as in the GRC?
In the grc, I can set the samples_per_symnol in the flow graph and the interp 
in the usrp_sink.so can I calculate the bitrate through the formula in the 
pick_rate.py?
   Besides,I found there is default bit-rate value in the 
benchmark_tx.py.so is that mean I can set the bit-rate through two ways,one is 
said above,the other is diretcly set the bit-rate in the program's 
(benchmark_tx.py -r) option? and in the second way, the interp is calculated by 
the formula.Am I correct?



   
thank you!
  
_
想知道明天天气如何?必应告诉你!
http://cn.bing.com/search?q=%E5%A4%A9%E6%B0%94%E9%A2%84%E6%8A%A5form=MICHJ2___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] bit rate of the random source

2010-06-11 Thread intermilan

hi all:

  I use the random_source in the GRC to generate the 0,1 sequence,but I do 
not know the bit rate of the sequence.So can anynoe tell me the bit rate of the 
sequence which is generated by the random_source?

  Besides, I saw there is a pick_bitrate.py in the 
/gnuradio-example/python/digetal. Is this the program which  is to decide the 
bit rate of the data send by the USRP?

 


   Thank you
  
_
一张照片的自白――Windows Live照片的可爱视频介绍
http://windowslivesky.spaces.live.com/blog/cns!5892B6048E2498BD!889.entry___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] GRC problem

2010-05-12 Thread intermilan

hello all:

I recently use GRC and USRP to do some experiment. But there is a 
problem for me.

   I use signal_source-packet_encoder-Gmsk_mod-usrp_sink in the transmit 
side.and it the receive side I use 
usrp_source-Gmsk_demod-packet_decoder-scope_sink.Now I know I can see the 
modulationed waveform in the scope_sink which is connected to the usrp_source. 
But I can not see anything in the last scope_sink. The correlative parameters 
which I set about the usrp_sink and usrp_source are the same as the defulat 
value in the benchmark_tx.py and benchmark_rx.py.and the other parameter in the 
other block is the defult value.Can anyone tell me how to figure out this 
problem?


 Thank you
  
_
一张照片的自白――Windows Live照片的可爱视频介绍
http://windowslivesky.spaces.live.com/blog/cns!5892B6048E2498BD!889.entry___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] a problem about the scope_sink in GRC

2010-05-06 Thread intermilan

hello all:
 I am a newer to the Gnuradio. And recently I use USRP and GRC 
to make some examples. But I have a problem about the scope_sink in the GRC. 
there are some block which I used in my graph:
signal_source-packet_encoder-Gmsk_mod-USRP_sink
   USRP_source-Gmsk_demod-packet_decoder-scope_sink
   When I run the graph, I can not see anythin in the scope_sink, 
which mean I can not see the demodulated waveform, can anyone tell me why this 
had happende? By the way,the USRP which I used is RFX2400 and works well.
  

Thank you very much and I 
apperciate the answer.
  
_
MSN十年回馈,每位用户可免费获得价值25元的卡巴斯基反病毒软件2010激活码,快来领取!
http://kaba.msn.com.cn/?k=1___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio