[Discuss-gnuradio] Segmentation fault (core dump)

2008-07-07 Thread irene159


Hello,

I have modified gr_constellation_decoder_cb.cc in order to have a second
output stream (type float) sending back min_euclid_dist.

http://www.nabble.com/file/p18313925/gr_constellation_decoder_cb.cc
gr_constellation_decoder_cb.cc 

Please take a look and let me know if there are any errors, I am not sure of
how to code two outputs with different data types.

To update the code after this modification I have done a make and make
install in the directory /usr/src/gnuradio/gnuradio-core/src/lib/general as
well as in /usr/src/gnuradio/gnuradio-core/src/lib.

I am now permanently receiving Segmentation fault (core dump) error
message. 

Can somebody help me out ?

Regards, 
Irene
-- 
View this message in context: 
http://www.nabble.com/Segmentation-fault-%28core-dump%29-tp18313925p18313925.html
Sent from the GnuRadio mailing list archive at Nabble.com.



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


[Discuss-gnuradio] Error in benchmark_ofdm.py

2008-07-07 Thread matteo zunino

Hi,

i try to see the modulation of every carriers with the option log, but when i 
put this options the is this errror :

Noise voltage:  4.472135955
Frequency offset:  0
Symbols per Packet:  16.0
Samples per Packet:  11520.0
ofdm_mapper_c.dat: Permission denied
terminate called after throwing an instance of 'std::runtime_error'
  what():  can't open file
Aborted

Why do it happen?

Thanks a lot

Matteo

_
Leggi la tua posta direttamente dal cellulare!
http://windowslivemobile.msn.com/Homepage.aspx?lang=it-it ___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] gr_plot_ofdm

2008-07-07 Thread matteo zunino

Hi, 

i've done the simulation, but i've a question. In the graphs the program did, 
the are, in the constellation rappresentation, blue and red points. What do 
they rappresent?

thanks a lot

matteo

_
Sono arrivati i supereroi di Messenger! Scarica le emoticon di Hero!
http://intrattenimento.it.msn.com/emoticon/hero  ___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] Re: realtime + printf

2008-07-07 Thread Wireless Monster
Hi again,

Can I assume the following? : because I am using the USRP, if when adding
the printf I do not get any under-run everthing is OK (i.e. the behaviour is
the same with and without the printf's) ?

Thanks!


On Sun, Jul 6, 2008 at 1:21 PM, Wireless Monster [EMAIL PROTECTED]
wrote:

 Hi All,

 Does anybody know if adding printf's for debuging while running a gnuradio
 application + usrp can break the real time? or is the printf a low
 priority task that will only be executed if there is enough CPU?

 Thanks!
 [WM]


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


Re: [Discuss-gnuradio] Segmentation fault (core dump)

2008-07-07 Thread Ed Criscuolo

Irene,

  I believe the problem is that you are trying to have two different
types of output streams. According to the documentation on
gr_io_signature, it looks like multiple output streams must
all be of the same type. Or at least of types that have the
same size.

In your code, you try to declare an output signature with
two types:

  gr_make_io_signature2 (1, 2, sizeof (unsigned char), sizeof (float))) 


Apparently, the first one (sizeof(unsigned char)) is getting used
for all outputs, and the second one is being ignored.


Then, later in your work method, you setup the output pointers
as pointer to unsigned char and pointer to float:

  unsigned char *out = (unsigned char *) output_items[0];
  float *foptr = (float *) output_items[1];

But since what you are being handed is a pointer to unsigned char
for both, the successive values of foptr will overwrite each other,
and the ones towards the end of the array will overrun the buffer
entirely.

Your segmentation fault is likely caused by either the buffer overrun,
or trying to write a float to an odd or non-aligned address.

@(^.^)@  Ed


irene159 wrote:


Hello,

I have modified gr_constellation_decoder_cb.cc in order to have a second
output stream (type float) sending back min_euclid_dist.

http://www.nabble.com/file/p18313925/gr_constellation_decoder_cb.cc
gr_constellation_decoder_cb.cc 


Please take a look and let me know if there are any errors, I am not sure of
how to code two outputs with different data types.

To update the code after this modification I have done a make and make
install in the directory /usr/src/gnuradio/gnuradio-core/src/lib/general as
well as in /usr/src/gnuradio/gnuradio-core/src/lib.

I am now permanently receiving Segmentation fault (core dump) error
message. 


Can somebody help me out ?

Regards, 
Irene




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


Re: [Discuss-gnuradio] Error in benchmark_ofdm.py

2008-07-07 Thread Eric Blossom
On Mon, Jul 07, 2008 at 02:40:48PM +0200, matteo zunino wrote:
 
 Hi,
 
 i try to see the modulation of every carriers with the option log, but when i 
 put this options the is this errror :
 
 Noise voltage:  4.472135955
 Frequency offset:  0
 Symbols per Packet:  16.0
 Samples per Packet:  11520.0
 ofdm_mapper_c.dat: Permission denied
 terminate called after throwing an instance of 'std::runtime_error'
   what():  can't open file
 Aborted
 
 Why do it happen?
 Thanks a lot
 
 Matteo

There's probably already a file called ofdm_mapper_c.dat that either
because of its permissions or the permissions of the directory that
it's contained in, can't be overwritten.

Eric



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


[Discuss-gnuradio] Getting started with the USRP/RFX2400 and underflows

2008-07-07 Thread Jason Uher
I am currently trying to get some basic code working to test that my
shiny new USRP is working correctly.  I have been going over the
code/examples/list archives for a few weeks on and off, but most of
the code examples are for the basic RX/TX boards, and I only have two
RFX2400's.

My testing plan was to use the A side to send out some unmodulated
data (which should be the same as OOK? right?) and receive it at the B
side using the WA5VJB antennas, but I can't seem to get it to work.  I
have put together the following code based on the examples and what
help I could find searching the list archives.  I'm thinking it should
play a sine wave out my speakers, but all I hear is static.
Additionally, I get a lot of 'iU' in the output, I was able to find
that U meant underflow, but there was no 'i' listed in the key, just
'a' and 'u'.

So I have two questions that I hope someone has the answer to:
1) Why don't I hear a pretty sine wave?
2) What type of underflow is indicated by the letter 'i'

Thanks
Jason

Output
===

Using TX board A: Flex 2400 Tx MIMO B
Using RX board B: Flex 2400 Rx MIMO B
 gr_fir_fff: using SSE
Press Enter to quit: uUiUiUiU(Lots more iU)

===
Code

from gnuradio import gr
from gnuradio import audio
from gnuradio import usrp

def build_graph ():


  #Parametrs
  tx_inter_rate = 512
  trans_freq = 24e8

  rx_decim_rate = 128;


  #Create the flow graph
  fg = gr.top_block ()


  #Create the USRP sink (transmitter)

  ut = usrp.sink_c (0, tx_inter_rate)

  #First choose the transmitting device
  #tx_sd = usrp.pick_tx_subdevice(ut)
  tx_sd = (0,0) #manually choose the correct device

  m = usrp.determine_tx_mux_value(ut, tx_sd)
  ut.set_mux(m)
  t_subdev = usrp.selected_subdev(ut, tx_sd)
  print Using TX board %s % (t_subdev.side_and_name(),)

  #Transmit at the maximum possible gain
  t_subdev.set_gain(t_subdev.gain_range()[1])

  #Set the transmit frequency and check that it worked
  r = ut.tune(t_subdev._which, t_subdev, trans_freq)

  if not r:
sys.stderr.write('Failed to set RF transmit frequency\n')
raise SystemExit

  #Turn on the transmitter
  t_subdev.set_enable(True)


  #Connect the sink to a SIN source
  src0 = gr.sig_source_c (48000, gr.GR_SIN_WAVE, 350, 0.5)
  fg.connect (src0, ut)



  #Create the USRP Source (receiver)
  ur = usrp.source_c(0,rx_decim_rate)

  #Choose the recieving device
  rx_sd = (1,0)
  m = usrp.determine_rx_mux_value(ur, rx_sd)
  ur.set_mux(m)
  r_subdev = usrp.selected_subdev(ur, rx_sd)
  print Using RX board %s % (r_subdev.side_and_name(),)

  #Set the recieve frequency
  r = ur.tune(r_subdev._which, r_subdev, trans_freq)

  if not r:
sys.stderr.write('Failed to set RF recieve frequency\n')
raise SystemExit

  #Make sure we are using the RX
  r_subdev.select_rx_antenna( 'RX2')

  #Convert complex data to sound samples
  conv2 = gr.complex_to_float ()

  #Decimate the received signal to soundcard rates
  dec_filt = gr.fir_filter_fff(5,(1.0, 1.0, 1.0));


  #Write received data to the soundcard
  dst = audio.sink (48000)

  #Connect the Source to the audio sink
  fg.connect (ur,conv2)
  fg.connect (conv2,dec_filt)
  fg.connect (dec_filt,dst)


  return fg

if __name__ == '__main__':
fg = build_graph ()
fg.start ()
raw_input ('Press Enter to quit: ')
fg.stop ()


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


Re: [Discuss-gnuradio] gr_plot_ofdm

2008-07-07 Thread trondeau
Quoting matteo zunino [EMAIL PROTECTED]:


 Hi,

 i've done the simulation, but i've a question. In the graphs the program did,
 the are, in the constellation rappresentation, blue and red points. What do
 they rappresent?

 thanks a lot

 matteo

Yeah, that's a bit confusing and a good question.

We use a decision directed equalizer inside of the receiver to track the
residual frequency error from the synchronization methods. The blue points
represent the pre-equalized values and the red the post-. You'll notice that
the blue points will slowly spin as the symbols progress while the red dots
stay locked to their constellation points.

Tom


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


RE: [Discuss-gnuradio] IF sampling in ISM band

2008-07-07 Thread Phaysal Khan

Hi List,
Just re-stating the issues I am having with capturing IF samples of an RF 
signal: I am trying to sample a 16MHz wide spectral content from a signal, 
originally centered at 2.414 GHz. I am using RFX2400, gnuradio 3.1.2 and using 
following command:
 
python usrp_rx_cfile.py -f 2404.5M -s --no-hb -8 -N 4 data1.dat
 using -f 2404.5M to get IF (downconverted) signal centered at 10MHz.
 using -s --no-hb -8 to be able to capture 16MHz wide bandwidth.
 I am having following issues:
1. I am getting a downconverted signal centered at zero freq and not at 10MHz 
which I expected.
2. I can see downconverted signal's spectrum to be only +/-4MHz wide, and not 
+/-8MHz.
 
Any idea, what is causing these two problems here!? Faisal 
_
Meet singles near you. Try ninemsn dating now!
http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fdating%2Eninemsn%2Ecom%2Eau%2Fchannel%2Findex%2Easpx%3Ftrackingid%3D1046247_t=773166080_r=WL_TAGLINE_m=EXT___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] IF sampling in ISM band

2008-07-07 Thread Eric Blossom
On Mon, Jul 07, 2008 at 05:27:40PM -0700, Eric Blossom wrote:
 On Tue, Jul 08, 2008 at 10:16:53AM +1000, Phaysal Khan wrote:
  
  Hi List,
  Just re-stating the issues I am having with capturing IF samples of an RF 
  signal: I am trying to sample a 16MHz wide spectral content from a signal, 
  originally centered at 2.414 GHz. I am using RFX2400, gnuradio 3.1.2 and 
  using following command:
   
  python usrp_rx_cfile.py -f 2404.5M -s --no-hb -8 -N 4 data1.dat


I note that you're not specifying -d 4 to set the decimation rate.


   using -f 2404.5M to get IF (downconverted) signal centered at 10MHz.
   using -s --no-hb -8 to be able to capture 16MHz wide bandwidth.
   I am having following issues:
  1. I am getting a downconverted signal centered at zero freq and not at 
  10MHz which I expected.
  2. I can see downconverted signal's spectrum to be only +/-4MHz wide, and 
  not +/-8MHz.
 
 
 In the trunk (sorry, I didn't take time to build 3.1.2), when I do
 this, I see 16MHz of spectrum:
 
   [EMAIL PROTECTED] ~]$ usrp_fft.py -8 -f 92.1 -d 4
 
 How do you _know_ you're not getting +/- 8MHz?
 
 
 How wide is the signal that you want offset by 10MHz?
 
 Eric


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


Re: [Discuss-gnuradio] Segmentation fault (core dump)

2008-07-07 Thread Ed Criscuolo

Arrrgh!  Apologies to all.  I totally missed the all-important 2
at the end of Irene's gr_make_io_signature2 call. Please ignore my
previous post.

@(^.^)@  Ed


Ed Criscuolo wrote:

Irene,

  I believe the problem is that you are trying to have two different
types of output streams. According to the documentation on
gr_io_signature, it looks like multiple output streams must
all be of the same type. Or at least of types that have the
same size.

In your code, you try to declare an output signature with
two types:

  gr_make_io_signature2 (1, 2, sizeof (unsigned char), sizeof (float)))   



Apparently, the first one (sizeof(unsigned char)) is getting used
for all outputs, and the second one is being ignored.


Then, later in your work method, you setup the output pointers
as pointer to unsigned char and pointer to float:

  unsigned char *out = (unsigned char *) output_items[0];
  float *foptr = (float *) output_items[1];

But since what you are being handed is a pointer to unsigned char
for both, the successive values of foptr will overwrite each other,
and the ones towards the end of the array will overrun the buffer
entirely.

Your segmentation fault is likely caused by either the buffer overrun,
or trying to write a float to an odd or non-aligned address.

@(^.^)@  Ed




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


RE: [Discuss-gnuradio] IF sampling in ISM band

2008-07-07 Thread Phaysal Khan

 In the trunk (sorry, I didn't take time to build 3.1.2), when I do this, I 
 see 16MHz of spectrum:  [EMAIL PROTECTED] ~]$ usrp_fft.py -8 -f 92.1 -d 4
 How do you _know_ you're not getting +/- 8MHz?I am looking at the signal 
 spectrum in Matlab. The window shows me, I belive, -Fs/2 to Fs/2. i.e. 
 +/-8MHz, and the main lobe is covering just half of this range. I am using 
 matlab command 
plot(fftshift(abs(fft(data)))
where 'data' contains the IF samples.  I can't use usrp_fft at -d 4 coz I am 
using a laptop right now. It gives me over run errors (uOuO). I might need to 
try that on a desktop.
 
 
 How wide is the signal that you want offset by 10MHz?
My signal is 20MHz wide and I do use '-d 4' when I  use usrp_rx_cfile command. 
(Mistakenly, I forgot to put it in mail). 
 
 
  Eric
_
Meet singles near you. Try ninemsn dating now!
http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fdating%2Eninemsn%2Ecom%2Eau%2Fchannel%2Findex%2Easpx%3Ftrackingid%3D1046247_t=773166080_r=WL_TAGLINE_m=EXTattachment: spectrum.JPG___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] IF sampling in ISM band

2008-07-07 Thread Eric Blossom
On Tue, Jul 08, 2008 at 02:54:38PM +1000, Phaysal Khan wrote:
 
  In the trunk (sorry, I didn't take time to build 3.1.2), when I do this, I 
  see 16MHz of spectrum: 

 [EMAIL PROTECTED] ~]$ usrp_fft.py -8 -f 92.1 -d 4
  How do you _know_ you're not getting +/- 8MHz?

 I am looking at the signal spectrum in Matlab. The window shows me, I
 belive, -Fs/2 to Fs/2. i.e. +/-8MHz, and the main lobe is covering
 just half of this range. I am using matlab command

 plot(fftshift(abs(fft(data)))
 where 'data' contains the IF samples.  I can't use usrp_fft at -d 4
 coz I am using a laptop right now. It gives me over run errors
 (uOuO). I might need to try that on a desktop. 

If you're not using -d 4 you're not getting 16MHz worth of data,
you're getting 8MHz worth of data, thus the +/- 4MHz.

  How wide is the signal that you want offset by 10MHz?

 My signal is 20MHz wide and I do use '-d 4' when I use usrp_rx_cfile
 command. (Mistakenly, I forgot to put it in mail).

Phaysal, there's no way that you can fit a 20MHz wide signal down a
16MS/s complex channel.  If you try to shift it up to 10MHz it's even
worse.

You best shot at getting the data is to put the center of the band of
interest at DC in the complex baseband.  That would give you +/- 8MHz
of relevant data.  You'd still be missing the outer 4 MHz (2MHz on
each side), but given the USB bandwidth, that's the best you can do
with the USRP.

Eric


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