Re: [Discuss-gnuradio] How to finish the rx_callback? in benchmark_ofdm_rx.py

2010-04-21 Thread Lin HUANG
I'm not very clear with your method3. But what we use is very similar
with this method. When we want to jump out from the callback's block
status, we send a useless pkt to it to make it quit out.

Lin

2010/4/20 Sung Jeen Jang wireless.j...@gmail.com:
 Hello all
 At first, I appreciate you read my text.
 My problem is that
 how to finish the rx_callback in benchmark_ofdm_rx.py
 I think that the structure of benchmark_ofdm_rx.py is like this.
 make rx_callback and return this to my_top_block
 and return my_top_block to tb
 and tb.start()
 I want to receive the data in 2.5e9 Hz one time.
 and second time receive the data in 2.6e9 Hz.
 So I would like to make this scenario.
 Receiving the data in specific frequency
 and receiving the data in another frequency.
 I tried these method, but failed.
 failed method 1:
 tb = my_top_block(rx_callback, options)
 tb.start()
 tb.wait() #-- process goes into here and cannot escape
 tb.stop()
 failed method 2:
 tb = my_top_block(rx_callback, options)
 tb.start()
 tb.stop() # - process broken here
 tb.wait()
 method 3:
 def rx_callback(ok, payload):
 n=0
 while n1000:
 n += 1
 (pktno,) = struct.unpack('!H', payload[0:2])
 # -- after n goes over 1000, process broken
 So, is there good method to this problem?
 In combining sensing  transmit, I succeed like this
 if __name__ == '__main__':
   tb_wsensing = my_top_block()
   while 1:
 tb_wsensing.start()  # start executing flow graph in
 another
  thread...
 main_loop(tb_wsensing)
 tb_wsensing.stop()
 tb_wsensing.wait()
 whichfreq=open(minfreq.dat)
 a=whichfreq.readline()
 freq_offset=float(a)
 print a
 transmit()
 Thank you very very very much for your reading.

 ___
 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] Importing Filter Taps

2010-04-21 Thread Umair Naeem
I need to import complex filter taps from a .txt file and use them in FFT 
FIlter block in GRC. How can I do that?


Regards,
Umair Naeem
MSc Communication Engineering
Chalmers University ot Technology, Sweden.


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


Re: [Discuss-gnuradio] Problem with multiple flow graphs on receive side

2010-04-21 Thread abbasi9999

OK,

abbasi wrote:
 
 Hi Sriram ,
 
 Did you managed to solve your problem?
 I'm doing the same, but i don't have any errors. The connecting process is
 ok, 
 
 but i think there is a conflict between the call_back of the receiving
 path and the eval function of the sensing path? have you faced some
 problem like this?
 
 if yes, please inform how did you solve it.
 
 regards,
 
 
 
 Sriram Krishnan-3 wrote:
 
 Hi,
 I am trying to write an application which senses spectrum 
 (usrp_spectrum_sense.py) and transmits/receives signals. I have the 
 tx/rx working fine. But when i add another flow graph(3rd one to 
 existing tx and rx) for the spectrum sense,to the top block, it gives me 
 an error. I get an error on this line which says cant open rx 
 interface and device busy
 
 self._u = usrp.source_c (self._which,
 fusb_block_size=self._fusb_block_size,
 fusb_nblocks=self._fusb_nblocks)
 
 Is it because of competing receive paths. I thought that we could have 
 multiple paths.
 Could somebody help in this regard.
 
 Sriram
 
 
  
 ___
 Discuss-gnuradio mailing list
 Discuss-gnuradio@gnu.org
 http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
 
 
 
 

-- 
View this message in context: 
http://old.nabble.com/Problem-with-multiple-flow-graphs-on-receive-side-tp24526593p28287998.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


Re: [Discuss-gnuradio] two call back function from C

2010-04-21 Thread abbasi9999

dump,
It was another problem


abbasi wrote:
 
 Hi,
 
 Is it not possible to have two call back functions from C++ part to
 python.
 
 for example: 
 1. The call back eval from the gr.bin_statistics_f block 'sink'
 and
 2. The call back from the receive path in tunnel.py class
 phy_rx_callback
 
 I think they are both contradicting each other. so if one works the other
 cannot work (the first one to be called usually works)
 
 Does this mean that we cannot have parallel flow graphs running at the
 same time and calling from C++ to python?
 
 regards,
 
 

-- 
View this message in context: 
http://old.nabble.com/two-call-back-function-from-C-tp28287675p28287999.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


Re: [Discuss-gnuradio] Importing Filter Taps

2010-04-21 Thread Gregor Dschung
My walkthrough:
1) matlab, e.g. A=[3+4i 4+3i 5+2.3i 6 3.4i]
2) copy A to clipboard: clipboard('copy', A)
3) with xclip and sed, the clipboard's content is converted to
something python understands: xclip -o -selection c | sed -r -e
's/^\[//' -e 's/\]$//' -e 's/ /,/g' -e 's/i\*([^,]*),/\1j,/g' -e
's/i\*(.*)$/\1j/'  taps_c.txt
4) from numpy import *
5) e.g. self.filter = gr.interp_fir_filter_ccc(1,
genfromtxt(taps_c.txt, dtype=complex, delimiter=,))

Cheers,
Gregor

2010/4/21 Umair Naeem ar...@student.chalmers.se:
 I need to import complex filter taps from a .txt file and use them in FFT 
 FIlter block in GRC. How can I do that?


 Regards,
 Umair Naeem
 MSc Communication Engineering
 Chalmers University ot Technology, Sweden.


 ___
 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] fix for usrp2 overruns when stopping and restarting rx streaming

2010-04-21 Thread Martin DvH
Hi All,

When you use an USRP2 for capturing and you call

u2-stop_rx_streaming()

and later

u2-start_rx_streaming(0)

You always get a single overrun.
 -a single 'S' is output on the console
 -u2-rx_overruns() returns 1 (in stead of 0)

I am developing a usrp2 application which does not permit any overrun
conditions, so this needed fixing.

It turns out that the expected sequence number of received samples is
not reset when stopping the stream.

This single line patch fixes this.


Best Regards,

Martin

diff --git a/usrp2/host/lib/usrp2_impl.cc b/usrp2/host/lib/usrp2_impl.cc
index b19c6ec..92d52db 100644
--- a/usrp2/host/lib/usrp2_impl.cc
+++ b/usrp2/host/lib/usrp2_impl.cc
@@ -814,6 +814,7 @@ namespace usrp2 {
   success = transmit_cmd_and_wait(cmd, sizeof(cmd), p,
DEF_CMD_TIMEOUT);
   success = success  (ntohx(reply.ok) == 1);
   d_channel_rings[channel].reset();
+  d_rx_seqno=-1;
   //fprintf(stderr, usrp2::stop_rx_streaming:  success = %d\n,
success);
   return success;
 }





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


[Discuss-gnuradio] CIC filter block

2010-04-21 Thread Alberto Trentadue
Hello

Just checking before: does anybody have a CIC filter implementation for GR?

Thanks in advance.
Alberto


Presentaci un amico! Invita i tuoi amici a scoprire i servizi Tiscali: per ogni 
amico che attiverà un servizio Tiscali, potrai avere 30 euro di sconto e lo 
stesso sconto di 30 euro verrà poi offerto al tuo amico. Scopri come! 
http://abbonati.tiscali.it/presentaci_un_amico/?WT.mc_id=01fw


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


[Discuss-gnuradio] DQPSK Modulation/Demodulation issue

2010-04-21 Thread marcin_w

I've recently been working on transmitting data from a vector source via
DQPSK.

I've created a Simulation [non USRP] with the following flow graph:
   
   TX
   Vector Source [0x6c] ie 01 10 11 00   Packed To Unpacked  Mapper
[Binary 2 Gray]  Differential Encoder 
   Chunks to Symbols

   RX
   Differential Phasor  Constellation Decoder  Mapper [Gray 2 Binary] 
Unpacked To Packed  Vector Sink
   
For differential encoding, i've also ammended the first input byte to be 0.
The Output for the simulation is as expected:

ie.  Input = 0 108 108 108 108 108 108 ...
 Output = 0 108 108 108 108 108 108 ...

When i try transmitting this data through the USRP however, i receive 4
possible outputs. These include:

  108 [which is correct]
  177 [wrong]
  108 [wrong]
  27   [wrong]

  These are funnily the 4 possible outputs which have all possible symbols
in 1 byte.  ie 00 01 10 11
  The output varies, one time i might get all 108s as expected , and other
times ill get one of the other 3 outputs.
  The signal constellation at the output of the differential phasor looks
correct.

  Does anyone have any idea what is going wrong here?
  I've included my python source code below:

  ##
# Gnuradio Python Flow Graph
# Title: Qpsktest
# Generated: Thu Apr 22 02:01:45 2010
##

from gnuradio import gr
from gnuradio.blks2impl import psk
from gnuradio.eng_option import eng_option
from gnuradio.gr import firdes
from grc_gnuradio import usrp as grc_usrp
from grc_gnuradio import wxgui as grc_wxgui
from optparse import OptionParser
import wx

class QPSKtest(gr.top_block):

def __init__(self):
gr.top_block.__init__(self)

##
# Variables
##
self.arity = arity = pow(2,2)
self.samp_rate = samp_rate = 256000
self.rotated_const = rotated_const = map(lambda pt: pt * 1,
psk.constellation[arity])
self.rot = rot = .707 + .707j
self.data = 10 * [0x6C,]

## Initial Block to Capture data from Vector Source and then
Add 0 at the beginning
   
fg = gr.top_block()
   
self.vectorSource = gr.vector_source_b(self.data, False, 1)
self.VSINK = gr.vector_sink_b(1)
   
fg.connect(self.vectorSource, self.VSINK)

fg.run()

actual_data = self.VSINK.data()
   
##make first data element 0 for the sake of the Diff Encoder
etc
actual_data_copy = (0,) + actual_data[1:]
print actual_data_copy

##
# Main Blocks
##
self.gr_chunks_to_symbols_xx_0 =
gr.chunks_to_symbols_bc((map(lambda pt: pt * rot,
psk.constellation[arity])), 1)
self.gr_clock_recovery_mm_xx_0 = gr.clock_recovery_mm_cc(2,
0.25 * 0.03 * 0.03, 0.05, 0.03, 0.005)
self.gr_constellation_decoder_cb_0 =
gr.constellation_decoder_cb((rotated_const), (range(arity)))
self.gr_costas_loop_cc_0 = gr.costas_loop_cc(0.10, 0.25 *
0.1 * 0.1, 0.002, -0.002, 4)
self.gr_diff_encoder_bb_0 = gr.diff_encoder_bb(arity)
self.gr_diff_phasor_cc_0 = gr.diff_phasor_cc()
self.gr_feedforward_agc_cc_0 = gr.feedforward_agc_cc(16,
1.0)
self.gr_fir_filter_xxx_1 = gr.fir_filter_ccf(1,
(gr.firdes.root_raised_cosine(2,2,1.0,0.35,22)))
self.gr_interp_fir_filter_xxx_0 =
gr.interp_fir_filter_ccf(2, (gr.firdes.root_raised_cosine(2, 2, 1.0, 0.35,
22)))
self.gr_map_bb_0 = gr.map_bb((psk.binary_to_gray[arity]))
self.gr_map_bb_0_0 = gr.map_bb((psk.gray_to_binary[arity]))
self.gr_multiply_const_vxx_0 =
gr.multiply_const_vcc(((1.0/16384.0), ))
self.gr_multiply_const_vxx_0_1 =
gr.multiply_const_vcc((16384.0, ))
self.gr_packed_to_unpacked_xx_0 =
gr.packed_to_unpacked_bb(2, gr.GR_MSB_FIRST)
self.gr_unpacked_to_packed_xx_0 =
gr.unpacked_to_packed_bb(2, gr.GR_MSB_FIRST)

self.dataSource = gr.vector_source_b(actual_data_copy,
False, 1)

self.usrp_simple_sink_x = grc_usrp.simple_sink_c(which=0,
side=B)
self.usrp_simple_sink_x.set_interp_rate(500)
self.usrp_simple_sink_x.set_frequency(243000,
verbose=True)
self.usrp_simple_sink_x.set_gain(0)
self.usrp_simple_sink_x.set_enable(True)
self.usrp_simple_source_x_0_0 =
grc_usrp.simple_source_c(which=0, side=B, rx_ant=RX2)

[Discuss-gnuradio] Sending extra info (rssi) in ethernet frames from USRP2 to host

2010-04-21 Thread hanwen
Hi, *

I am reading through the firmware C codes and trying to figure out how to
carry the RSSI values from auxiliary ADC in the word0 section of each
ethernet frame. I was confused by the structure of the firmware C codes. In
the main() of txrx.c, there is no explicit function calls looks like send(),
recv() for handing the ethernet frames. And I found in mimo_app_common_v2.c
some functions like send_reply(), set_reply_hdr() and
handle_control_chan_frame() which may correspond to this issue.
I also tried to modify the u2p_set_word0() function in usrp2_eth_packet.h in
order to carry the RSSI value. But it seems that this only works when
starting streaming as every frame rceived on the host side shows the same
value.
I really want to know how does the frameware handle the samples and
controlling frames. Any hints?

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


[Discuss-gnuradio] Re: fix for usrp2 overruns when stopping and restarting rx streaming

2010-04-21 Thread Johnathan Corgan
On Wed, Apr 21, 2010 at 04:08, Martin DvH gnuradiom...@olifantasia.com wrote:

 This single line patch fixes this.

This has been applied on the master branch.

Johnathan


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


Re: [Discuss-gnuradio] Importing Filter Taps

2010-04-21 Thread Josh Blum

you can call numpy.fromfile in grc
http://docs.scipy.org/doc/numpy/reference/generated/numpy.fromfile.html

if it cant find the numpy module, add an import block that has import 
numpy


-Josh

On 04/21/2010 02:09 AM, Umair Naeem wrote:

I need to import complex filter taps from a .txt file and use them in FFT 
FIlter block in GRC. How can I do that?


Regards,
Umair Naeem
MSc Communication Engineering
Chalmers University ot Technology, Sweden.


___
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] Re: Sending extra info (rssi) in ethernet frames from USRP2 to host

2010-04-21 Thread hanwen
Forget to mention, we are using GR 3.2.2, not the newer one with UDP
supported.

Cheers,
Hanwen

2010/4/21 hanwen kidult.han...@gmail.com

 Hi, *

 I am reading through the firmware C codes and trying to figure out how to
 carry the RSSI values from auxiliary ADC in the word0 section of each
 ethernet frame. I was confused by the structure of the firmware C codes. In
 the main() of txrx.c, there is no explicit function calls looks like send(),
 recv() for handing the ethernet frames. And I found in mimo_app_common_v2.c
 some functions like send_reply(), set_reply_hdr() and
 handle_control_chan_frame() which may correspond to this issue.
 I also tried to modify the u2p_set_word0() function in usrp2_eth_packet.h
 in order to carry the RSSI value. But it seems that this only works when
 starting streaming as every frame rceived on the host side shows the same
 value.
 I really want to know how does the frameware handle the samples and
 controlling frames. Any hints?

 Thanks in advance.
 Hanwen

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


[Discuss-gnuradio] USRP2 FPGA documentation

2010-04-21 Thread David Barton
Hi,

Is there any documentation or source code available for signal processing done 
in the USRP2 FPGA? I have seen lots of block diagrams, etc. for USRP but been 
unable to find anythign similar for usrp 1.

Thanks,
Dave


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


Re: [Discuss-gnuradio] USRP2 FPGA documentation

2010-04-21 Thread Brian Padalino
On Wed, Apr 21, 2010 at 11:42 AM, David Barton david.barto...@yahoo.com wrote:
 Hi,

 Is there any documentation or source code available for signal processing
 done in the USRP2 FPGA? I have seen lots of block diagrams, etc. for USRP
 but been unable to find anythign similar for usrp 1.

Source code is found on Matt's redmine:

http://code.ettus.com/redmine/ettus/projects/fpga/repository

Documentation seems sparse if non-existent.  I am sure he would
welcome anyone who would want to provide said documentation.

 Thanks,
 Dave

Hope this helps!

Brian


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


[Discuss-gnuradio] DPSK Modulator and Demodulator

2010-04-21 Thread David Barton
Hi,

I am having trouble the the DBPSK mod and demod blocks. My flow graph is:
file source - DBPSKmod - DBPSKdemod - file sink

The file source is a 2 byte text file set to not repeat
The default parameters were used for the DBPSKmod and demod blocks (including 2 
Samples/Symbol)
When I run the graph the output text file becomes 13 bytes long and they are 
almost all zeros. I am not sure how it gets to be that length.

I tried connecting the ouput of the DBPSKmod directly to the file sink and the 
file size was 256 bytes. This matched my expectations based on:
2bytes input file * 8bits/byte  *  1Symbol/bit  *  2 complex samples/Symbol* 
8bytes /complex sample = 256 byte output file. 

If anyone knows why the output file of the whole graph would be 13 bytes  or if 
I am missing something please let me know.

Thanks,
Dave


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


[Discuss-gnuradio] Regarding...modulation used by usrp...

2010-04-21 Thread Muhammad Ali Khan
Hello,

I am using USRP with FLEX900 daughter board, i want to ask you that while
transmission what kind of *modulation technique*, used by USRP for
transmitting data.

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


Re: [Discuss-gnuradio] Regarding...modulation used by usrp...

2010-04-21 Thread Brian Padalino
On Wed, Apr 21, 2010 at 2:34 PM, Muhammad Ali Khan mak...@gmail.com wrote:
 Hello,
 I am using USRP with FLEX900 daughter board, i want to ask you that while
 transmission what kind of modulation technique, used by USRP for
 transmitting data.

Which modulation technique would be an acceptable answer?

 Thanks
 Ali

Brian


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


[Discuss-gnuradio] USRP2 FPGA register control

2010-04-21 Thread utsu nn

Dear all,

I searched the email achieve and Internet, only usrp FPGA control information 
can be found.
http://gnuradio.org/redmine/wiki/1/UsrpFAQFpgaRegs
 u = usrp.source_c() 
 u._write_fpga_reg(regno, val)
 set_register(FR_ADC_OFFSET_0, 0);

Nothing related to usrp2 was reported.

If I want to write to USRP2 FPGA register, is there any similar function I can 
call?

Can I write to user-defined registers which I manually add into the verilog .v 
file?

Thanks and have a good day!

Regards,
xj




  
_
The New Busy is not the too busy. Combine all your e-mail accounts with Hotmail.
http://www.windowslive.com/campaign/thenewbusy?tile=multiaccountocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_4___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] importing usrp2 module failing

2010-04-21 Thread George Nychis
Hi all,

I installed GNU Radio via the Ubuntu package first, and when trying to run
usrp2_probe, i got the error ImportError: cannot import name usrp2 ... so
then I tried a manual install from the latest git, and I still get that same
error.

I have confirmed that gnuradio exists in:
/usr/local/lib/python2.6/dist-packages/gnuradio

I see the usrp2 module here:
-rw-r--r-- 1 root staff 58800 2010-04-21 14:34
/usr/local/lib/python2.6/dist-packages/gnuradio/usrp2.py

/usr/local/lib/python2.6/dist-packages is in the sys.path variable in
python:
 sys.path
['', '/usr/lib/python2.6', '/usr/lib/python2.6/plat-linux2',
'/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old',
'/usr/lib/python2.6/lib-dynload', '/usr/lib/python2.6/dist-packages',
'/usr/lib/python2.6/dist-packages/Numeric',
'/usr/lib/python2.6/dist-packages/PIL',
'/usr/lib/python2.6/dist-packages/gst-0.10', '/usr/lib/pymodules/python2.6',
'/usr/lib/python2.6/dist-packages/gtk-2.0',
'/usr/lib/pymodules/python2.6/gtk-2.0',
'/usr/lib/python2.6/dist-packages/wx-2.6-gtk2-unicode',
'/usr/lib/python2.6/dist-packages/wx-2.8-gtk2-unicode',
'/usr/local/lib/python2.6/dist-packages']

**NOTE** I do not get the import error when I do not run the command with
sudo, but then I do not get the proper raw socket permissions.  Maybe that
rings a bell to someone?  Something probably about an environment variable I
am missing.

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


[Discuss-gnuradio] Re: importing usrp2 module failing

2010-04-21 Thread George Nychis
**NOTE** I do not get the import error when I do not run the command with
 sudo, but then I do not get the proper raw socket permissions.  Maybe that
 rings a bell to someone?  Something probably about an environment variable I
 am missing.


actually... I am getting the same error now without using sudo, so that
doesn't seem to be a difference

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


Re: [Discuss-gnuradio] ATSC decoding

2010-04-21 Thread Stephen Branch
 Tom Rondeau trondeau1...@gmail.com 04/20/10 9:58 AM 
On Mon, Apr 19, 2010 at 8:12 PM, Stephen Branch bran...@auburn.edu wrote:
 Hello everyone,

 I am part of Auburn University's Software Defined Radio Senior Design team,

 Software being used:
 Ubuntu v.9.10 on xfs partition
 GNURadio v.3.3 (git)
 Xine

 Available hardware: USRP1, USRP2, WBX daughterboard, TVRX daughterboard

 We followed the instructions in ./gnuradio/gr-atsc/src/python/README to no 
 success.

 Using the FFT we found 507.25M to have a strong signal.
 According to 
 http://en.wikipedia.org/wiki/North_American_broadcast_television_frequencies#UHF_band
  this is channel 20.
 And according to 
 http://www.fcc.gov/fcc-bin/tvq?state=ALcall=arn=city=chan=14cha2=69serv=type=0facid=list=2dist=dlat2=mlat2=slat2=dlon2=mlon2=slon2=size=9
  this is WCOV from Montgomery, Alabama.
 So we do have the correct video carrier frequency, which I assume is the 
 frequency we want to record and decode into a video.

 Question #1) Is the video carrier the one that carriers the video, or would 
 it be the ATSC carrier?


If it's ATSC, you should see a very strong carrier with a very small
lump of energy to the left of it (this is the vestigial sideband) and
a large, fairly flat signal to the right that rolls off. This likely
won't be flat due to fading, but you should be able to recognize it as
a 6 MHz chunk of spectrum being occupied. You probably already know
this, but I'm pointing it out to help distinguish between the ATSC
carrier and video carrier. In NTSC, there were a few different
carriers while in ATSC there's just the one big guy.

And you want to use the ATSC carrier. This wikipedia article gives you
the frequencies:
http://en.wikipedia.org/wiki/Television_channel_frequencies#Americas_.28most_countries.29.2C_South_Korea.2C_Taiwan_and_the_Philippines

For the channel you're looking at (20), the carrier would be at 507.31
MHz. There's a PLL to lock to the carrier, but I'm not sure if it's
broad enough to handle the 60 kHz offset you're using. This could be
the cause of your problem.

In general, you should be able to output the different stages to files
by editing the Python code and take a look at different stages to see
what's going on. This might help identify where the problem is.

Tom


 We then used:
 ./usrp_rx_cfile.py -s -d 10 -g 20 -f 507.25e6 atsc_data_6-4m_complex
 ./interp_short.py atsc_data_6-4m_complex
 ./xlate.py
 ./fpll.py
 ./btl-fsd.py
 ./viterbi-out.py test.mpeg

 Problems:
 /tmp/atsc_pipe_5 never fills with data.
 The output file, 'test.mpeg' is empty.

 Question #2) What do we need to fix to get /tmp/atsc_pipe_5 to fill.
 Question #3) What do we need to fix to get temp.mpeg to fill.

 Thank you,
 Bobby Black  Stephen Branch
 Auburn University
 blac...@auburn.edu
 (334) 804-4826


Thanks Tom,

Just for clarification:

You said:

For the channel you're looking at (20), the carrier would be at 507.31
MHz. There's a PLL to lock to the carrier, but I'm not sure if it's
broad enough to handle the 60 kHz offset you're using. This could be
the cause of your problem.

What exactly do you mean by a 60kHz offset?  
We're not sure where we are using such an offset.
Are there alternatives to how we're doing this that may yield better results?

Thanks again,

Auburn University Senior Design Team: Software Group
Stephen Branch and Bobby Black
bran...@auburn.edu
blac...@auburn.edu 



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


Re: [Discuss-gnuradio] ATSC decoding

2010-04-21 Thread Tom Rondeau
On Wed, Apr 21, 2010 at 3:48 PM, Stephen Branch bran...@auburn.edu wrote:
 Hi Tom,

 Thanks for the response.

 Just for clarification:

 You said:

 For the channel you're looking at (20), the carrier would be at 507.31
 MHz. There's a PLL to lock to the carrier, but I'm not sure if it's
 broad enough to handle the 60 kHz offset you're using. This could be
 the cause of your problem.

 What exactly do you mean by a 60kHz offset?
 We're not sure where we are using such an offset.
 Are there alternatives to how we're doing this that may yield better results?


You said you were looking for a carrier at 507.25 MHz. I said the
carrier is at 507.31 MHz. That's a 60 kHz offset.

Tom


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


Re: [Discuss-gnuradio] Re: importing usrp2 module failing

2010-04-21 Thread George Nychis
thanks Josh!  I seem to have had a conflicting install in /usr/lib/ rather
than /usr/local/lib, so i blasted it and updated PYTHONPATH and all is great
again ;)

- George

On Wed, Apr 21, 2010 at 4:14 PM, Josh Blum j...@joshknows.com wrote:

 its probably an issue of PYTHONPATH, make sure that the import works on
 command line: python -c from gnuradio import usrp2

 You should not need to run as root as long as the socket opener app has
 suid permissions

 sudo chown root:usrp `which usrp2_socket_opener`
 sudo chmod 04750 `which usrp2_socket_opener`

 -Josh


 On 04/21/2010 12:57 PM, George Nychis wrote:

 **NOTE** I do not get the import error when I do not run the command with

 sudo, but then I do not get the proper raw socket permissions.  Maybe
 that
 rings a bell to someone?  Something probably about an environment
 variable I
 am missing.


  actually... I am getting the same error now without using sudo, so that
 doesn't seem to be a difference

 - George




 ___
 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 solve the USRP overrun problem

2010-04-21 Thread Yan Nie
Dear all,


I'm modifying the gr-sounder project to transmit a 113-bit legendre sequence of 
the bandwith 32kHz and upconvert to certain frequency in the range 1MHz to 
20MHz. At receiver side, the received signal is downconverted to baseband and 
store the recovered sequence into a data file.


I modified the FPGA configuration by using clk_divider to downconvert the 
clock, clk64 to 32kHz, and applied the 32kHz to module adc_interface, 
sounder,rx_buffer, dac_interface instead of clk64. The other modules still keep 
the chip-rate(clk64) as the working frequency. At the receiver side, I gt rid 
of the correlation part, made the receiver directly store the received data 
into rx_buffer.


The result shows some USRP overrun signs (uO), and the received data is as 
shown below:
 -1 - 1i
  -1 + 0i
   0 + 0i
   0 + 0i
   0 + 0i
   0 - 1i
  -1 - 1i
  -1 - 1i
  -1 - 1i
   0 + 0i
   0 + 0i
   0 + 0i
   0 + 0i
  -1 - 1i
  -1 - 1i
  -1 - 1i
  -1 + 0i
   0 + 0i
   0 + 0i
   0 + 0i

However, the frequency of baseband data should be 32kHz, which doesn't  exceed 
the maximum USB data rate 8MHz, why the USRP overrun? 

The received data should be the amplitude of the code, 4096, and the data 
should be real part only.  What is the possible reason why the received data is 
as the shown.

Thank you so much!

Regards,
Yan


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


[Discuss-gnuradio] freq_xlating_fir_filter_ccc

2010-04-21 Thread Marcus D. Leech
Ok, so I have an input audio chunk, from DC-48KHz, sampled at 96KHz.

I want to extract 20KHz to 32KHz, and shift this down to DC (DC-12KHz).
  I think I need the freq_xlating_fir_filter_ccc() block, but I've seen
conflicting
  information about how to use this block.


In GRC, what parameters do I give to this block?  The FIR filter is
applied after downconversion,
  correct?  But that filter runs at the *input* sample rate (prior to
decimation) correct?

If I want to grab 20KHz to 32KHz, do I tell the block that my center
frequency is 26KHz?
  (20KHz + output_bandwidth/2)?

Call me confused.

-- 
Marcus Leech
Principal Investigator
Shirleys Bay Radio Astronomy Consortium
http://www.sbrac.org




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


Re: [Discuss-gnuradio] DPSK Modulator and Demodulator

2010-04-21 Thread marcin_w

You can't connect the file source directly to the Modulator. If you are Using
DBPSK, the modulator will be looking for 1 bit at a time, or in this case a
byte with only 1 significant bit. 

Use

File Source  packed to unpacked [1 bit per chunk] MSB first  DBPSK
Modulator

Marcin


David Barton-4 wrote:
 
 Hi,
 
 I am having trouble the the DBPSK mod and demod blocks. My flow graph is:
 file source - DBPSKmod - DBPSKdemod - file sink
 
 The file source is a 2 byte text file set to not repeat
 The default parameters were used for the DBPSKmod and demod blocks
 (including 2 Samples/Symbol)
 When I run the graph the output text file becomes 13 bytes long and they
 are almost all zeros. I am not sure how it gets to be that length.
 
 I tried connecting the ouput of the DBPSKmod directly to the file sink and
 the file size was 256 bytes. This matched my expectations based on:
 2bytes input file * 8bits/byte  *  1Symbol/bit  *  2 complex
 samples/Symbol* 8bytes /complex sample = 256 byte output file. 
 
 If anyone knows why the output file of the whole graph would be 13 bytes 
 or if I am missing something please let me know.
 
 Thanks,
 Dave
 
 
 
 ___
 Discuss-gnuradio mailing list
 Discuss-gnuradio@gnu.org
 http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
 
 

-- 
View this message in context: 
http://old.nabble.com/DPSK-Modulator-and-Demodulator-tp28319509p28323241.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


Re: [Discuss-gnuradio] DPSK Modulator and Demodulator

2010-04-21 Thread marcin_w

My mistake, i didn't realise you were using the available DBPSK block. The
Packed to Unpacked block is already part of this Modulator, so disregard my
comment.

Marcin


marcin_w wrote:
 
 You can't connect the file source directly to the Modulator. If you are
 Using DBPSK, the modulator will be looking for 1 bit at a time, or in this
 case a byte with only 1 significant bit. 
 
 Use
 
 File Source  packed to unpacked [1 bit per chunk] MSB first  DBPSK
 Modulator
 
 Marcin
 
 
 David Barton-4 wrote:
 
 Hi,
 
 I am having trouble the the DBPSK mod and demod blocks. My flow graph is:
 file source - DBPSKmod - DBPSKdemod - file sink
 
 The file source is a 2 byte text file set to not repeat
 The default parameters were used for the DBPSKmod and demod blocks
 (including 2 Samples/Symbol)
 When I run the graph the output text file becomes 13 bytes long and they
 are almost all zeros. I am not sure how it gets to be that length.
 
 I tried connecting the ouput of the DBPSKmod directly to the file sink
 and the file size was 256 bytes. This matched my expectations based on:
 2bytes input file * 8bits/byte  *  1Symbol/bit  *  2 complex
 samples/Symbol* 8bytes /complex sample = 256 byte output file. 
 
 If anyone knows why the output file of the whole graph would be 13 bytes 
 or if I am missing something please let me know.
 
 Thanks,
 Dave
 
 
 
 ___
 Discuss-gnuradio mailing list
 Discuss-gnuradio@gnu.org
 http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
 
 
 
 

-- 
View this message in context: 
http://old.nabble.com/DPSK-Modulator-and-Demodulator-tp28319509p28323370.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


Re: [Discuss-gnuradio] An Allocation Error

2010-04-21 Thread Eric Blossom
On Tue, Apr 20, 2010 at 10:09:03AM +, Umair Naeem wrote:
 I have made a flow graph in GRC and I am getting this error
 
 Generating: /home/salsa/top_block.py
 
 Executing: /home/salsa/top_block.py
 
  gr_fir_ccf: using SSE
 gr_vmcircbuf_sysv_shm: shmget (1): Invalid argument
 gr_buffer::allocate_buffer: failed to allocate buffer of size 21288 KB
 terminate called after throwing an instance of 'std::bad_alloc'
   what():  std::bad_alloc
 

 
 How Can I handle this error?
 

Does make check succeed?


 
 Regards,
 Umair Naeem
 MSc Communication Engineering
 Chalmers University ot Technology, Sweden.


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


Re: [Discuss-gnuradio] Freeze when writing to linux fifo pipe

2010-04-21 Thread Eric Blossom
On Tue, Apr 20, 2010 at 02:57:04PM +0200, Joachim Roop wrote:
 Hi,
 I am trying to write to a linux pipe/fifo, but sadly this seems to freeze 
 python. I am using Ubuntu 10.04 and gnuradio 3.2.2.dfsg-1ubuntu1.
 Please try to execute the code and tell me why this makes the app pause.

 $ man 3 mkfifo

Opening a fifo for reading blocks until there is a writer and vice versa...

Eric



 
 #! /usr/bin/python
 
 # Import stuff
 from gnuradio import gr, gru, eng_notation, optfir
 from gnuradio.eng_option import eng_option
 from gnuradio.wxgui import slider, powermate
 from gnuradio.wxgui import stdgui2, fftsink2, form, scopesink2
 import sys
 import os
 
 # Main application
 class main_app (stdgui2.std_top_block):
   def __init__(self,frame,panel,vbox,argv):
   stdgui2.std_top_block.__init__ (self,frame,panel,vbox,argv)
 
   print '!!!Cleanup'
   os.spawnlp(os.P_WAIT, 'rm', 'rm','/tmp/gnutest1.raw')
   os.spawnlp(os.P_WAIT, 'rm', 'rm','/tmp/gnutest2.raw')
   print '!!!make a fifo'
   os.spawnlp(os.P_WAIT, 'mkfifo', 'mkfifo','/tmp/gnutest1.raw')
   print '!!!make file sink without the fifo'
   outok = gr.file_sink(gr.sizeof_short,'/tmp/gnutest2.raw')
   print '!!!make file sink with the fifo (FREEZING)'
   outcrash = gr.file_sink(gr.sizeof_short, '/tmp/gnutest1.raw')
   print '!!!everything went better than expected'
 
 if __name__ == '__main__':
 app = stdgui2.stdapp (main_app, crashtest)
 app.MainLoop ()


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


Re: [Discuss-gnuradio] Freeze when writing to linux fifo pipe

2010-04-21 Thread Marcus D. Leech
On 04/21/2010 11:26 PM, Eric Blossom wrote:
 On Tue, Apr 20, 2010 at 02:57:04PM +0200, Joachim Roop wrote:
   
 Hi,
 I am trying to write to a linux pipe/fifo, but sadly this seems to freeze 
 python. I am using Ubuntu 10.04 and gnuradio 3.2.2.dfsg-1ubuntu1.
 Please try to execute the code and tell me why this makes the app pause.
 
  $ man 3 mkfifo

 Opening a fifo for reading blocks until there is a writer and vice versa...

 Eric


   
Actually, an open for read will *always* succeed, lest you create
unpleasant deadlock situations...

-- 
Marcus Leech
Principal Investigator
Shirleys Bay Radio Astronomy Consortium
http://www.sbrac.org




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


Re: [Discuss-gnuradio] Freeze when writing to linux fifo pipe

2010-04-21 Thread Eric Blossom
On Wed, Apr 21, 2010 at 11:30:32PM -0400, Marcus D. Leech wrote:
 On 04/21/2010 11:26 PM, Eric Blossom wrote:
  On Tue, Apr 20, 2010 at 02:57:04PM +0200, Joachim Roop wrote:

  Hi,
  I am trying to write to a linux pipe/fifo, but sadly this seems to freeze 
  python. I am using Ubuntu 10.04 and gnuradio 3.2.2.dfsg-1ubuntu1.
  Please try to execute the code and tell me why this makes the app pause.
  
   $ man 3 mkfifo
 
  Opening a fifo for reading blocks until there is a writer and vice versa...
 
  Eric
 
 

 Actually, an open for read will *always* succeed, lest you create
 unpleasant deadlock situations...

Hmmm.  FWIW, from Linux: man 3 mkfifo

Opening a FIFO for reading normally blocks until some other process
opens the same FIFO for writing, and vice versa.  See fifo(7) for
non-blocking handling of FIFO special files.

Eric


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


[Discuss-gnuradio] Clearly, I got gr.freq_xlating_fir_filter_ccc working!

2010-04-21 Thread Marcus D. Leech
Well, after a little bit of mucking about, I was able to down-shift the
segment I needed into a range that
  is audible to the human ear.  Here's a snippet:

http://www.sbrac.org/files/vlf.mp3

(I have it in FLAC and OGG and WAV as well, just figured most folks
would have a MP3 player :-) ).

It's about 40 seconds of a segment of the VLF band, between 23KHz and
28KHz, downshifted so that
  23KHz is at DC.  The dominant tone is the U.S. Navy VLF station
called NAA, located in Cutler, Maine,
  about 850km from me.  Down in the mud, there's also the NML station
that is in North Dakota, about
  1600km from me.  The clicks 'n pops are 'spherics mostly caused by
distant lightning.

I pre-process the entire input bandwidth (DC-48KHz) to remove *all*
harmonics of 60Hz, prior to doing
  anything else with it. That cleans up the spectrum considerably!  The
RMS signal power for up to 4
  narrow-band VLF stations is also recorded in real-time, to measure
ionospheric absorption.

Doing this audio-shifting trick was more for amusement than any
scientific value.

The whole digital portion of the signal processing chain is done in Gnu
Radio.  I have a magnetic loop
  antenna outside the house, about 300' of wire wound onto a 1.8M square
frame, and I'm using
  a cheap Behringer microphone pre-amp as a low-noise amplifier in front
of the sound card.  If the
  sound card was a little quieter, I wouldn't need the pre-amp, but
there's just a little too much noise
  on the card to allow the signals to be really clean, so an audio
pre-amp for VLF radio signals!

Cheers


-- 

Marcus Leech
Principal Investigator
Shirleys Bay Radio Astronomy Consortium
http://www.sbrac.org




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