[Discuss-gnuradio] ImportError: cannot import name packbits

2009-03-12 Thread Jay Kumar
Hello ,
 I have completely installed Gnuradio-3.1.3 on RHEL4.Even I have
uploaded the firmware on the usrp.But when i was trying to run
usrp_fft.py i got the attribute key error.After searhing through all
forum i gor to know that Python 2.3 could not update the numpy's
directories.So i downgraded Numpy to 1.0.4 and now i m getting the
following errors:-

File "./usrp_fft.py", line 23, in ?
from gnuradio import gr, gru
  File "/usr/lib/python2.3/site-packages/gnuradio/gru/__init__.py", line
37, in ?
exec "from gnuradio.gruimpl.%s import *" % (f,)
  File "", line 1, in ?
  File
"/usr/lib/python2.3/site-packages/gnuradio/gruimpl/gnuplot_freqz.py",
line 28, in ?
import numpy
  File "/usr/lib/python2.3/site-packages/numpy/__init__.py", line 93, in
?
import add_newdocs
  File "/usr/lib/python2.3/site-packages/numpy/add_newdocs.py", line 9,
in ?
from lib import add_newdoc
  File "/usr/lib/python2.3/site-packages/numpy/lib/__init__.py", line
18, in ?
from io import *
  File "/usr/lib/python2.3/site-packages/numpy/lib/io.py", line 16, in ?
from _compiled_base import packbits, unpackbits
ImportError: cannot import name packbits

I am badly stucked.Plz help me out.

Thanks
-- 
Posted via http://www.ruby-forum.com/.


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


Re: [Discuss-gnuradio] GRC control over flowgraph programs

2009-03-12 Thread Josh Blum
Hmm, seems like there is no available CPU for the GUI to respond, maybe 
try lowering your frame rate for fft sink.


I have no idea what version of gnuradio or grc you are running. GRC is 
bundled with gnuradio development trunk and gnuradio 3.2 release branch. 
Install one of those gnuradio versions if you have not already done so.


If you still have the trouble, send the generated python code so we can 
all take a look.


-Josh

davek wrote:

this has been discussed before, but i cant find the solution...
im wondering if there is options i need to pass to grc to make it more
resposive while running. A simple grc flowgraph connecting a USRP
source to a FFT sink works fine, but is unresponsive to any input,
eventually ubuntu will pop up a "NOT RESPONDING" windows and let me
kill the process. when i run usrp_fft.py It works fine, letting me
change options, gain and able to close. What do i need to add to my
simple GRC program to allow user input?


___
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] attribute key error

2009-03-12 Thread Jay Kumar
I have installed Gnuradio-3.1.3 on Red Hat Enterprise Linux-4.The
installation of gnuradio was successful.Even I have got USRP connected
and have loaded the firmware.

But when I try to run the given examples of "gr-utils" for example
usrp_fft.py i get the following error:-

[r...@localhost python]# ./usrp_fft.py Traceback (most recent call
last):

File "./usrp_fft.py", line 23, in ?

from gnuradio import gr, gru

File "/usr/lib/python2.3/site-packages/gnuradio/gru/init.py", line 37,
in ?

exec "from gnuradio.gruimpl.%s import *" % (f,)

File "", line 1, in ? File
"/usr/lib/python2.3/site-packages/gnuradio/gruimpl/gnuplot_freqz.py",
line 28, in ?

import numpy

File "/usr/lib/python2.3/site-packages/numpy/init.py", line 107, in ?

import ma

File "/usr/lib/python2.3/site-packages/numpy/ma/init.py", line 14, in ?

import core

File "/usr/lib/python2.3/site-packages/numpy/ma/core.py", line 114, in ?

max_filler.update([(k,-numpy.inf) for k in [numpy.float32,
numpy.float64]])

AttributeError?: keys

What is the reason for such type of error.Can someone guide me through
this problem.

Thanks.
-- 
Posted via http://www.ruby-forum.com/.


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


[Discuss-gnuradio] GRC control over flowgraph programs

2009-03-12 Thread davek
this has been discussed before, but i cant find the solution...
im wondering if there is options i need to pass to grc to make it more
resposive while running. A simple grc flowgraph connecting a USRP
source to a FFT sink works fine, but is unresponsive to any input,
eventually ubuntu will pop up a "NOT RESPONDING" windows and let me
kill the process. when i run usrp_fft.py It works fine, letting me
change options, gain and able to close. What do i need to add to my
simple GRC program to allow user input?


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


Re: [Discuss-gnuradio] OpenBTS issue/help needed

2009-03-12 Thread gohar anwar
Thanks for your reply Davek,
In openbts/tests its written in README.test that 

"Tests that can be built and run.

L1 Software Loopback (no USRP)

This test exercises L1 components for bidirectional channels.  It uses two 
executables: TRXManager/LoopbackTest and TRXManager/TRXSimulator.


also

Beacon test
.
This test uses the tests/BeaconTest and the Transceiver/runTransceiver 
binaries"
There are only .cpp files with these names.
How to build these binaries/executables? 
Make command does not perform this task.

Thanks
Gohar Anwar



From: davek 
To: Gohar 
Cc: "discuss-gnuradio@gnu.org" 
Sent: Friday, March 13, 2009 12:57:04 AM
Subject: Re: [Discuss-gnuradio] OpenBTS issue/help needed

the following excutables are in the openbts folder you svn'ed after
you do a make. they are not copied to the dist with make install, not
sure why, but they work...
openbts/apps/OpenBTS800
openbts/apps/OpenBTS900
openbts/Transciever/transciever

On Thu, Mar 12, 2009 at 3:41 PM, Gohar  wrote:
>
>
> Hi,
> I have installed  the OpenBTS by following the instructions on the page below:
>
> http://www.gnuradio.org/trac/wiki/OpenBTS/BuildingAndRunning
>
> Apparently there were no errors in all the process (ie: ./bootstrap, 
> ./configure, make, make install)
> But i can only see Asterisk folder in /usr/local/share/OpenBTS.
> I want to run the tests like "loopbackTest.cpp" and "BeaconTest.cpp" etc.
>
> How to compile and run these tests? Which commands should i execute in 
> terminal to run these .cpp files?
> I am on Ubuntu 8.10 with the latest trunk of GnuRadio.
>
>
> Best regards
> Gohar Anwar
>
>
>
>
>
>
>
> ___
> 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] USRP2 Gnuradio 3.1.3 and BBN 802.11

2009-03-12 Thread Jane Chen

Hi all,

Is anyone working on 802.11 with USRP2 ?  In 
https://www.cgran.org/browser/projects , I found two projects, span_80211b and  
bbn_80211; however, they have not been changed for months. Does anyone know any 
projects are working on 802.11 with USRP2?

Thank you,
Jane

On Thu, Feb 19, 2009 at 22:18, Miklos Christine  wrote:
> If I revert to an old version of Gnuradio, would the USRP2 work with that?
> The Gnuradio code and BBN code that worked on the USRP, would it work on the
> USRP2?
> Is it backwards compatible?
>
> Thanks,
> Miklos Christine
>
> On Thu, Feb 19, 2009 at 11:26 AM, Eric Blossom  wrote:
>>
>> On Thu, Feb 19, 2009 at 10:40:42AM -0800, Miklos Christine wrote:
>> > Hello,
>> >
>> > I'm working on a project that involves the USRP2. I've downloaded the
>> > lastest version of Gnuradio and the BBN 802.11 code. I've come to
>> > realize
>> > that the newest release of Gnuradio is not compatible with the BBN code.
>> > Is there an earlier version of gnuradio that will work with the USRP2
>> > and
>> > the BBN code?
>> >
>> > Thanks,
>> > Miklos Christine
>>
>> The USRP2 is new.  No early version of GNU Radio supports it.
>> A bit of googling will find you several discussions about people
>> updating the BBN code to work with the latest GR code.
>>
>> Eric
>
>


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


Re: [Discuss-gnuradio] STD_SWIG_PYTHON_ARGS and gr-howto

2009-03-12 Thread Michael Dickens

I noticed some changes in the build system recently, such as the
introduction of STD_SWIG_PYTHON_ARGS. Perhaps the mini-build-subsystem
of gr-howto just needs the same updates?


I neglected to update the howto's Makefile.common during the last  
update.  I have another update in the queue that touches the way SWIG  
works, so I'll correct the howto's common makefile includes.  Thanks  
for pointing this out. - MLD



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


Re: [Discuss-gnuradio] Can a host control an USRP1 and an USRP2 with the same clock?

2009-03-12 Thread Juha Vierinen
> If the USRP1 and the USRP2 can work on the same host at the same time, can
> the USRP1 and  the USRP2 work synchronously (can they have the same clock or
> common time reference?)?  Some discussions mentioned the synchronization of
> two USRP2, but I cannot find discussions about  synchronization of a USRP1
> and a USRP2.

You can timestamp USRP1 data by inserting a syncronization pulse
(e.g., GPS PPS) to a digital i/o pin. You need the gr-gpio firmware
for this. This will have approximately one sample accuracy with a very
small known constant offset. We have been using this for nearly a year
with good success. You can easily get less than 1 us absolute timing
accuracy this way. I'm guessing that similar functionality will soon
appear for USRP2 as well, so you can keep these two in sync to some
extent.

Regarding relative sample clock coherence, Martin DvH had a nice idea
about syncronizing the relative clock frequencies by inserting a PPS
or 10 MHz signal into the digital i/o pin. This allows you to estimate
relative clock frequency to a reference 10 MHz or a 1 PPS signal.

However, if you buy some more hardware, you can drive both USRP2 and
USRP1 from the same clock. The USRP2 takes a 10 MHz standard, but the
USRP2 needs a 64 MHz clock. I have used either a 6x multiplier  or a
cheap DDS board to generate the USRP1 clock (60 MHz and 64 MHz). I
don't really know a source for 6x clock multipliers (if somebody
knows, please tell me). The DDS I'm using to generate a 64 MHz clock
for USRP1 is this:

http://www.eskimo.com/~novatech/PDF_files/lpo400ads.pdf

It even fits nicely into a USRP1 box, taking the space of one
daughterboard slot.

Hope this helps.

BR,
juha


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


[Discuss-gnuradio] Can a host control an USRP1 and an USRP2 with the same clock?

2009-03-12 Thread Jhon Lee
Hi all,

I would like to build a base station with multi-standards (WiFi, GSM, WCDMA, 
etc.). For the first step, I want to build this base station based on OpenBTS 
and BBN 802.11 projects. The OpenBTS works well with USRP1 and people are 
making BBN 802.11 work with USRP2, so I want to connect one USRP1 and one USRP2 
to my host.
 I already read the wiki and the datasheets of the USRP1 and USRP2; however, I 
still have some questions and hope to get some hints from you guys, please!!

Is it possible to connect one USRP1 and one USRP2 to a single host PC at the 
same time? Any gnuradio examples that can help me to figure out how to do this?

If the USRP1 and the USRP2 can work on the same host at the same time, can the 
USRP1 and  the USRP2 work synchronously (can they have the same clock or common 
time reference?)?  Some discussions mentioned the synchronization of two USRP2, 
but I cannot find discussions about  synchronization of a USRP1 and a USRP2.


Thank you so much!

Jhon



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


RE: [Discuss-gnuradio] extract timestamp data

2009-03-12 Thread Cocuzzo, Daniel C.
Thanks for the guidance here. I'd actually like to save timestamps to a file, 
along with data - it sounds like this would require not only a custom copy 
handler but also a custom source block to pass the timestamp up to the flow 
graph. Am I on the right track here? 

I'm not sure I totally understand the interactions of the low-level code, is 
there any further documentation for that?

Thanks,
Dan


-Original Message-
From: Douglas Geiger [mailto:doug.gei...@bioradiation.net]
Sent: Thu 3/12/2009 10:51 AM
To: Cocuzzo, Daniel C.
Cc: Pham, Thanh; Discuss-gnuradio@gnu.org
Subject: Re: [Discuss-gnuradio] extract timestamp data
 
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Cocuzzo, Daniel C. wrote:
> I'm also wondering about how to extract ethernet packet information,
> such as timestamp. If anyone has any pointers to reference materials it
> would be greatly appreciated.
> 
> Thanks,
> Dan
> 
> 

 The easiest way (depending on what you are doing with the timestamps)
is probably by dealing with the low-level libusrp2, and writing a custom
copy handler (look at rx_streaming_samples.cc in usrp2/host/apps). The
metadata structure (in usrp2/metadata.h) provides the timestamp from the
fpga.
 I'm playing around right now with creating a custom source block that
has access to the timestamps (i.e. the copy handler passes it from the
low-level library into the source block - but not to the rest of the
flowgraph). I'm only interested in it as far as providing aligned
samples from two USRP2 (like usrp_multi does for the USRP1). Depending
on what you need the timestamps for, that may be the way to go.
 Doug

- --
Doug Geiger
Research Assistant
Communications and Signal Processing Lab
Oklahoma State University
http://cspl.okstate.edu
douglas.gei...@okstate.edu
doug.gei...@ieee.org
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJuSFmgfOzzR5bXIgRAl9uAKCbn2HziekL8O+kUIyg9uG4qwjB/QCfXxQL
sGldNGn6AVsCnzkM8gVFPqM=
=GDET
-END PGP SIGNATURE-

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


[Discuss-gnuradio] Re: do not able to find blks2.ofdm_mod in svn

2009-03-12 Thread Josh Blum

hi tusear,

I added the OFDM mod and demod to the "Modulators" category in the GRC 
gui. However, there are no OFDM examples for GRC.


A quick loopback test to let you know that the blocks work:
signal source -> ofdm mod -> ofdm demod -> throttle -> scope sink or fft 
sink


Tushar Patel wrote:

Hi jose
I try to find out ofdm block but it want appear there.
May by I am looking at wrong place.

here the path where i looked
http://gnuradio.org/svn/gnuradio/trunk/grc/examples/

thanks for guidance



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


[Discuss-gnuradio] do not able to find blks2.ofdm_mod in svn

2009-03-12 Thread Tushar Patel
Hi jose
I try to find out ofdm block but it want appear there.
May by I am looking at wrong place.

here the path where i looked
http://gnuradio.org/svn/gnuradio/trunk/grc/examples/

thanks for guidance


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


Re: [Discuss-gnuradio] Listen to Mp3 via FM broadcast

2009-03-12 Thread Juha Vierinen
> I late to reply to your email. I have set the paths according to the
> installation.

I think the real problem was the python2.4 on the first line.  You
have probably installed gnuradio with 2.5.

> However, I still can not listen to any radio signal.
> I just found out that I need TVRX in order for me to receive the FM radio.

You can receive FM radio with BasicRX, and also every plain old radio set.

I now updated my fmradio.py script and tested that it works at least
with BasicTX. I guess this could be done a lot better, I just don't
have time right now. This was originally a one night hack, and it will
remain one for now. The script can be found here:

http://www.mep.fi/viewcvs/fmradio/fmradio.py?revision=1.4&root=cvs&view=markup

I also noticed that debian's sox didn't support mp3 out of the box
anymore, so I compiled my own. Why no support? Politics:

https://bugs.launchpad.net/ubuntu/+source/sox/+bug/223783

juha


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


[Discuss-gnuradio] libcomedi 0.7.22.2-2 not working in Ibex (Ubuntu 8.10)

2009-03-12 Thread pratincola

Hi, I am just getting started in GNU Radio, and I was having some trouble
getting libcomedi 0.7.22.2-2 to work in Ibex.

the libcomedi-0.7.22 is packaged for hardy, which is replaced by libcomedi0
in intrepid ibex.

The deb files for GNURadio 3.1.3 we're written for hardy, they haven't been
updated to work with intrepid Ibex.  
I know the  3.1.4 release will work this out, but is there a work around to
fix it in Intepid Ibex?

Thanks In advance,
 

-- 
View this message in context: 
http://www.nabble.com/libcomedi-0.7.22.2-2-not-working-in-Ibex-%28Ubuntu-8.10%29-tp22485297p22485297.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] OpenBTS issue/help needed

2009-03-12 Thread davek
the following excutables are in the openbts folder you svn'ed after
you do a make. they are not copied to the dist with make install, not
sure why, but they work...
openbts/apps/OpenBTS800
openbts/apps/OpenBTS900
openbts/Transciever/transciever

On Thu, Mar 12, 2009 at 3:41 PM, Gohar  wrote:
>
>
> Hi,
> I have installed  the OpenBTS by following the instructions on the page below:
>
> http://www.gnuradio.org/trac/wiki/OpenBTS/BuildingAndRunning
>
> Apparently there were no errors in all the process (ie: ./bootstrap, 
> ./configure, make, make install)
> But i can only see Asterisk folder in /usr/local/share/OpenBTS.
> I want to run the tests like "loopbackTest.cpp" and "BeaconTest.cpp" etc.
>
> How to compile and run these tests? Which commands should i execute in 
> terminal to run these .cpp files?
> I am on Ubuntu 8.10 with the latest trunk of GnuRadio.
>
>
> Best regards
> Gohar Anwar
>
>
>
>
>
>
>
> ___
> 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] OpenBTS issue/help needed

2009-03-12 Thread Gohar


Hi,
I have installed  the OpenBTS by following the instructions on the page below:

http://www.gnuradio.org/trac/wiki/OpenBTS/BuildingAndRunning

Apparently there were no errors in all the process (ie: ./bootstrap, 
./configure, make, make install)
But i can only see Asterisk folder in /usr/local/share/OpenBTS.
I want to run the tests like "loopbackTest.cpp" and "BeaconTest.cpp" etc.

How to compile and run these tests? Which commands should i execute in terminal 
to run these .cpp files?
I am on Ubuntu 8.10 with the latest trunk of GnuRadio.


Best regards
Gohar Anwar




  


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


Re: [Discuss-gnuradio] Claiming interface 2 (RX) fails!

2009-03-12 Thread Ujala Qasim
Hi,Well I am implementing the given task by picking up selected function
from usrp_prims, usrp_standard, usrp_basic and fusb_generic etc in a program
of my own. As these are just simple classes which define particular
functions, I was confused and could not very much clearly understand that in
which order should I be calling all those functions defined in the above
mentioned classes because they are so inter-related. So I implemented my own
program according to my own understanding (which I am not re-writing, just
picking up function definitions from the classes) which follows these basic
steps:

1. running libusb core functions first:

  usb_init(); /* initialize the library */
  usb_find_busses(); /* find all busses */
  usb_find_devices(); /* find all connected devices */

 as done in usrp_primss.cc in usrp_one_time_init()

2. then find the device on the bus and open it using usb_open()
usb_dev_handle *open_dev(void)
{
  struct usb_bus *bus;
  struct usb_device *device;

  for(bus = usb_get_busses(); bus; bus = bus->next)
{
  for(device = bus->devices; device; device = device->next)
{
  if(device->descriptor.idVendor == MY_VID
 && device->descriptor.idProduct == MY_PID)
{
  myDev = device;
  return usb_open(device);
}
}
}
  return NULL;
}

as done in usrp_prims.cc in struct usb_device *usrp_find_device (int nth,
bool fx2_ok_p)

3. Then open USRP command interface by calling following functions:

if(usb_set_configuration(udh, 1) < 0)
{
  printf("error: setting config 1 failed\n");
  usb_close(udh);
  return 0;
}

  if(usb_claim_interface(udh, 0) < 0 )
{
  printf("error: claiming interface 0 failed\n");
  usb_close(udh);
  return 0;
}

as done in usrp_prims.cc in usrp_open_interface (struct usb_device *dev, int
interface, int altinterface) by calling usrp_open_cmd_interface (struct
usb_device *dev)

4. Then open USRP RX interface by calling following functions:

Where bulk_udh is a usb device handle for RX interface.

if(!(bulk_udh = usb_open(myDev)))
{
  printf("error: device not found!\n");
  return 0;
}

if(usb_set_configuration(bulk_udh, 1) < 0)
{
  printf("error: setting config 1 failed\n");
  usb_close(bulk_udh);
  return 0;
}

if (usb_claim_interface (bulk_udh, USRP_RX_INTERFACE) < 0){
printf("error: claming interface failed!\n");
usb_close (bulk_udh);
return 0;
  }

  if (usb_set_altinterface (bulk_udh,USRP_RX_ALTINTERFACE) < 0){
printf("error: setting altinterface failed!\n");
usb_release_interface (bulk_udh, USRP_RX_INTERFACE);
usb_close (bulk_udh);
return 0;
  }

as done in usrp_prims.cc in usrp_open_interface (struct usb_device *dev, int
interface, int altinterface) by calling usrp_open_rx_interface (struct
usb_device *dev)

but here the bulk_udh fails to claim the interface

5. Then calling the functions:

set_rx_freq (0, 0);

  set_nchannels (1);

  set_pga (0, 0);

  set_mux(0x32103210); // Board A only

  set_decim_rate(8);

  set_ddc_phase(0,0);

 from usrp_standard class

6. And performing bulk read through usb_bulk_read function


Can you please tell me if these sequence of steps is correct? And if I am
going in the right direction?

Thanks.




On Thu, Mar 12, 2009 at 9:54 PM, Eric Blossom  wrote:

> On Thu, Mar 12, 2009 at 09:03:23PM +0500, Ujala Qasim wrote:
> > Hi!
> > I am trying to write a program in C that interfaces between USRP and
> > Windows, this is my initial code:
>
> ...
>
> > However, the claiming of interface always fails on bulk_udh. Please guide
> me
> > in this regard as to what I am doing wrong?
>
> Instead of attempting to rewrite all of the well tested USRP C++ code
> into C, have you considered writing a small shim that would create a C
> friendly interface to the usrp_standard_tx and usrp_standard_rx
> classes?  It is possible to write C++ code that can call C++ code, yet
> is callable from C by using the C++ extern "C" { ... } feature.
> Of course the C interface can only use C data types, not C++ classes.
> See a good C++ book for details and/or search for "C linkage".
>
> Please don't ask quesions about how to do this on this list.  It has
> nothing to do with GNU Radio in particular, and everything to do with
> generic C and C++ programming.  If you're not familiar with C++,
> perhaps you can find a local C++ hacker who can assist you.  Another
> approach may be to write your application in the subset of C++ that
> looks pretty much like C...
>
> Eric
>
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] Terminate the receiving process.

2009-03-12 Thread Brook Lin

Hi All,

I am using benchmark_tx.py and benchmark_rx.py to transmit and receive a
file. At the benchmark_tx.py, by setting the value of -M, the transmitter
process is terminated when the total transmitting packages size is larger
than M*1e6. When the transmitter stops, the receiver stops receiving, but
benchmark_rx.py process is still running. My question here is, how the
receiver knows that the transmitter stops and terminate the receive process
itself. Thanks in advance.

Brook
-- 
View this message in context: 
http://www.nabble.com/Terminate-the-receiving-process.-tp22481579p22481579.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] tunnel.py buffer crash

2009-03-12 Thread Eric Blossom
On Thu, Mar 12, 2009 at 10:01:28AM -0700, yyzhuang wrote:
> 
> Hi Eric,
> 
> The command line: sudo ./tunnel.py --freq 2.44G --bitrate 500k -v (is
> bitrate has something to do with buffer?)
> 
> I installed GNU Radio from here: svn co
> http://gnuradio.org/svn/gnuradio/branches/releases/3.1 gnuradio 

Thanks.

> I never had that buffer problem before I moved the 2 boxes to another lab
> (from computer science lab to ee lab). Will it because of the higher
> interference in the busier channel that caused too many packets being queued
> in the buffer, and caused the buffer over flow? 

No, the error message most likely indicates an internal error in one
of the blocks.  If you can reproduce the problem and can grab a gdb
backtrace when it happens, that would be very helpful in figuring out
which block has the problem.

Here's how to use gdb with python. Add the code below to the top of
tunnel.py, after all the imports.

Debugging with gdb

If your block isn't working, and you can't sort it out through python
test cases or a few printfs in the code, you may want to use gdb to
debug it. The trick of course is that all of GNU Radio, including your
new block, is dynamically loaded into python for execution.

Try this: In your python test code, after the relevant imports, print
out the process id and wait for a keystroke. In another window run gdb
and tell it to attach to the python process with the given process
id. At this point you can set breakpoints or whatever in your code. Go
back to the python window and hit Enter so it'll continue.

  #!/usr/bin/env python
  from gnuradio import gr


  # insert this in your test code...
  import os
  print 'Blocked waiting for GDB attach (pid = %d)' % (os.getpid(),)
  raw_input ('Press Enter to continue: ')
  # remainder of your test code follows...

Eric


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


Re: [Discuss-gnuradio] how to take input from multiple subdevices in the USRP simultaneously

2009-03-12 Thread Eric Blossom
On Thu, Mar 12, 2009 at 09:40:29AM -0700, sHabzbd wrote:
> 
> Hi Everyone:
> 
> I am guessing that my last post was not clear since I didnt get any replies.
> So here I go again.
> 
> 1. I am using two Flex900 daughter cards on a single USRP.
> 2. I am getting to select two subdevices (0,0) and (1,0) ie. daughter board
> A or daughter board B
> 3. On each subdevice I am getting to select two antennas 'TX/RX' and 'RX2'
> 
> Now here is the thing. I can take anyone of the input at a single time, ie.
> I can either get
> a. subdevice(0,0) & antenna 'TX/RX'
> b. subdevice(0,0) & antenna 'RX2'
> c. subdevice(1,0) & antenna 'TX/RX'
> d. subdevice(1,0) & antenna 'RX2'
> 
> That is I am getting to set the usrp mux with 
>   tb.src_usrp.set_mux(usrp.determine_rx_mux_value(tb.src_usrp, subdevice))
> and then select and antenna for the subdevice
>   tb.subdev.select_rx_antenna('RX2')
> 
> But I need to build a graph where I can take at least two of the above
> mentioned inputs. And store them in two separate sinks if possible. Using
> two different sink_files.
> 
> Would really really appreciate any help or some direction or hint.
> 
> Thank you loads in advance.
> 

Hi Shabbir,

I can point you to two different examples that between them do
something similar to what you're trying to do.

The first is gnuradio-examples/python/usrp_wfm_rcv2_nogui.py.
This uses two DDCs to extract two streams from a single daughterboard.
You can ignore the fact that the signal processing is an FM recvr.

The second is gnuradio-examples/python/multi-antenna/multi_file.py.
This one expects two Basic Rx daughterboards, and extracts a total of
4 streams, 2 from each daughterboard.

In your case, since your extracting a single stream from each
daughterboard, you'll want to use the tune method twice, once on each
daughterboard.  Your rx mux setting should be 0x32103210

Eric


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


Re: [Discuss-gnuradio] tunnel.py buffer crash

2009-03-12 Thread yyzhuang

Hi Eric,

The command line: sudo ./tunnel.py --freq 2.44G --bitrate 500k -v (is
bitrate has something to do with buffer?)

I installed GNU Radio from here: svn co
http://gnuradio.org/svn/gnuradio/branches/releases/3.1 gnuradio 

I never had that buffer problem before I moved the 2 boxes to another lab
(from computer science lab to ee lab). Will it because of the higher
interference in the busier channel that caused too many packets being queued
in the buffer, and caused the buffer over flow? 

Thanks a ton.

Yanyan


Eric Blossom wrote:
> 
> On Wed, Mar 11, 2009 at 11:44:59PM -0700, yyzhuang wrote:
>> 
>> Hi,
>> 
>> Has anybody got this error when running tunnel.py in gnuradio-example
>> (with
>> virtual IP addresses set up on two PCs and ping each other on this
>> tunnel)?
>> 
>> ./gr_buffer.h:125: unsigned int gr_buffer::index_add(unsigned int,
>> unsigned
>> int): Assertion `s < d_bufsize' failed.
>> 
>> I got this problem on both the sender and receiver side. Thanks a lot.
>> 
>> Yanyan
> 
> Can you please provide the exact command line that you used to invoke
> tunnel.py?  Which version of GNU Radio were you using?  trunk (which
> rev) or tarball (which rev)?
> 
> Thanks,
> Eric
> 
> 
> ___
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
> 
> 

-- 
View this message in context: 
http://www.nabble.com/tunnel.py-buffer-crash-tp22470731p22480884.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] Claiming interface 2 (RX) fails!

2009-03-12 Thread Eric Blossom
On Thu, Mar 12, 2009 at 09:03:23PM +0500, Ujala Qasim wrote:
> Hi!
> I am trying to write a program in C that interfaces between USRP and
> Windows, this is my initial code:

...

> However, the claiming of interface always fails on bulk_udh. Please guide me
> in this regard as to what I am doing wrong?

Instead of attempting to rewrite all of the well tested USRP C++ code
into C, have you considered writing a small shim that would create a C
friendly interface to the usrp_standard_tx and usrp_standard_rx
classes?  It is possible to write C++ code that can call C++ code, yet
is callable from C by using the C++ extern "C" { ... } feature. 
Of course the C interface can only use C data types, not C++ classes.
See a good C++ book for details and/or search for "C linkage".

Please don't ask quesions about how to do this on this list.  It has
nothing to do with GNU Radio in particular, and everything to do with
generic C and C++ programming.  If you're not familiar with C++,
perhaps you can find a local C++ hacker who can assist you.  Another
approach may be to write your application in the subset of C++ that
looks pretty much like C...

Eric


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


[Discuss-gnuradio] how to take input from multiple subdevices in the USRP simultaneously

2009-03-12 Thread sHabzbd

Hi Everyone:

I am guessing that my last post was not clear since I didnt get any replies.
So here I go again.

1. I am using two Flex900 daughter cards on a single USRP.
2. I am getting to select two subdevices (0,0) and (1,0) ie. daughter board
A or daughter board B
3. On each subdevice I am getting to select two antennas 'TX/RX' and 'RX2'

Now here is the thing. I can take anyone of the input at a single time, ie.
I can either get
a. subdevice(0,0) & antenna 'TX/RX'
b. subdevice(0,0) & antenna 'RX2'
c. subdevice(1,0) & antenna 'TX/RX'
d. subdevice(1,0) & antenna 'RX2'

That is I am getting to set the usrp mux with 
tb.src_usrp.set_mux(usrp.determine_rx_mux_value(tb.src_usrp, subdevice))
and then select and antenna for the subdevice
tb.subdev.select_rx_antenna('RX2')

But I need to build a graph where I can take at least two of the above
mentioned inputs. And store them in two separate sinks if possible. Using
two different sink_files.

Would really really appreciate any help or some direction or hint.

Thank you loads in advance.

Here goes the code that I could do so far.

##
#bring in blocks from the main gnu radio package
from gnuradio import gr

#bring in the USRP source/sink
from gnuradio import usrp
import sys
from gnuradio import audio

def build_graph():
 
#create the top block 
tb=gr.top_block()

#creat the USRP source
tb.src_usrp=usrp.source_c(decim_rate=16)

#create a signal sink
tb.sink_file = gr.file_sink(gr.sizeof_gr_complex, 'test89.dat')

#create counter
tb.count=gr.head(gr.sizeof_gr_complex, int(2000))

#connect the source to the sink
tb.connect(tb.src_usrp,tb.count,tb.sink_file)

#choose the sub device
#subdev_spec = usrp.pick_rx_subdevice(tb.src_usrp)
subdev_spec = (0,0)
#subdev_spec = (1,0)

#Set the mux
tb.src_usrp.set_mux(usrp.determine_rx_mux_value(tb.src_usrp, 
subdev_spec))

#get the sub-device
tb.subdev = usrp.selected_subdev(tb.src_usrp, subdev_spec)

#select receive antenna ('TX/RX' or 'RX2')
#tb.subdev.select_rx_antenna('TX/RX')
tb.subdev.select_rx_antenna('RX2')

#Set the gain
g=tb.subdev.gain_range()
gain=float(g[0]+g[1])/2
#gain=
tb.subdev.set_gain(gain)

#tune the center frequency
frequency=float(948e6)
tb.src_usrp.tune(0, tb.subdev, frequency)

return tb

if __name__ == '__main__':
tb = build_graph ()
tb.start ()   
#

Thank you loads again.

Kind regards,

Shabbir Ahmed
PhD. Student
Victoria University, Melbourne, AUS


-- 
View this message in context: 
http://www.nabble.com/how-to-take-input-from-multiple-subdevices-in-the-USRP-simultaneously-tp22479958p22479958.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] tunnel.py buffer crash

2009-03-12 Thread Eric Blossom
On Wed, Mar 11, 2009 at 11:44:59PM -0700, yyzhuang wrote:
> 
> Hi,
> 
> Has anybody got this error when running tunnel.py in gnuradio-example (with
> virtual IP addresses set up on two PCs and ping each other on this tunnel)?
> 
> ./gr_buffer.h:125: unsigned int gr_buffer::index_add(unsigned int, unsigned
> int): Assertion `s < d_bufsize' failed.
> 
> I got this problem on both the sender and receiver side. Thanks a lot.
> 
> Yanyan

Can you please provide the exact command line that you used to invoke
tunnel.py?  Which version of GNU Radio were you using?  trunk (which
rev) or tarball (which rev)?

Thanks,
Eric


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


Re: [Discuss-gnuradio] Listen to Mp3 via FM broadcast

2009-03-12 Thread jingx kwan
Hello Eric,

I late to reply to your email. I have set the paths according to the
installation.
However, I still can not listen to any radio signal.
I just found out that I need TVRX in order for me to receive the FM radio.


Thank you

On Mon, Mar 9, 2009 at 10:39 AM, Eric Blossom  wrote:

> On Sun, Mar 08, 2009 at 04:01:53PM -0700, didem colak wrote:
> >
> > hi all,
> >
> > does the problem still continue?
> >
> > also i have an error msg  at below.
> >
> >
> > di...@didem:~/Desktop/gnuradio/gnuradio-examples/python/usrp$
> ./didemdenemeraw.py -1 dodi.pls
> > Traceback (most recent call last):
> >   File "./didemdenemeraw.py", line 4, in ?
> > from gnuradio import gr, eng_notation
> > ImportError: No module named gnuradio
> >
> > i am using ubuntu 8.04 and python 2.5 .
> > thanks,
>
> Did you set PYTHONPATH?
>
> Did you read and follow these directions:
>
> http://gnuradio.org/trac/wiki/UbuntuInstall#BrokenlibtoolonDebianandUbuntu
>
> Eric
>
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Re: USRP2 questions

2009-03-12 Thread Kyle Jamieson
Scenario 3 - An arbitrary number of USRP2 systems, no MIMO cables,  
no HUB

Some means of providing the same 10 MHz reference to all USRP2 systems
must be set up. Typically this would be the 10 MHz output of some lab
reference like a GPS-locked reference. That reference would be put
through some sort of active splitter, and fed into all the USRP2s by  
SMA

connector on the front panel
Some means of providing the same time reference to all USRP2 systems  
is
also needed. This would normally be a 1 PPS signal generated by the  
same

reference. It will need to go through some sort of active splitter and


Matt,

If the 1 pps signal were a square wave, pulse width 200 ms, with an  
accuracy of +-130 ns with respect to UTC, would that work with the  
current firmware installed in the U2?


Also, might an coax F-type active splitter (prob. intended for TV)  
work?  Or is there an active splitter you can suggest that would work  
for sure?


Thanks,
Kyle


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


[Discuss-gnuradio] Claiming interface 2 (RX) fails!

2009-03-12 Thread Ujala Qasim
Hi!
I am trying to write a program in C that interfaces between USRP and
Windows, this is my initial code:

#include "usb.h"
#include "usrp_spi_defs.h"
#include "usrp_commands.h"
#include "fpga_regs_standard.h"
#include "ad9862.h"
#include "usrp_interfaces.h"
#include 
#include 

#define SAMPELS_PER_READ (512)

struct usb_device *myDev;
struct usb_dev_handle *bulk_udh;

usb_dev_handle *open_dev(void)
{
  struct usb_bus *bus;
  struct usb_device *device;

  for(bus = usb_get_busses(); bus; bus = bus->next)
{
  for(device = bus->devices; device; device = device->next)
{
  if(device->descriptor.idVendor == MY_VID
 && device->descriptor.idProduct == MY_PID)
{
  myDev = device;
  return usb_open(device);
}
}
}
  return NULL;
}

int main(void)
{
  usb_dev_handle *udh; /* the device handle */
  char tmp[BUF_SIZE];

  int a;
  int noverruns = 0;
  int overrun;
  int total_reads = 1;
  int i;
  int buf[SAMPELS_PER_READ];
  int bufsize = sizeof(buf);
  char * tempBuf[4*SAMPELS_PER_READ];


  usb_init(); /* initialize the library */
  usb_find_busses(); /* find all busses */
  usb_find_devices(); /* find all connected devices */


  if(!(udh = open_dev()))
{
  printf("error: device not found!\n");
  return 0;
}

  if(usb_set_configuration(udh, 1) < 0)
{
  printf("error: setting config 1 failed\n");
  usb_close(udh);
  return 0;
}

  if(usb_claim_interface(udh, 0) < 0 )
{
  printf("error: claiming interface 0 failed\n");
  usb_close(udh);
  return 0;
}

if(!(bulk_udh = usb_open(myDev)))
{
  printf("error: device not found!\n");
  return 0;
}

if(usb_set_configuration(bulk_udh, 1) < 0)
{
  printf("error: setting config 1 failed\n");
  usb_close(bulk_udh);
  return 0;
}

if (usb_claim_interface (bulk_udh, USRP_RX_INTERFACE) < 0){
printf("error: claming interface on bulk_udh failed!\n");
usb_close (bulk_udh);
return 0;
  }

  if (usb_set_altinterface (bulk_udh,USRP_RX_ALTINTERFACE) < 0){
printf("error: setting altinterface failed!\n");
usb_release_interface (bulk_udh, USRP_RX_INTERFACE);
usb_close (bulk_udh);
return 0;
  }

  set_rx_freq (0, 106.2);

  set_nchannels (1);

  set_pga (0, 0);

  set_mux(0x32103210); // Board A only

  set_decim_rate(8);

  set_ddc_phase(0,0);

  printf("USRP Transfer Starts\n");


  // Do USRP Samples Reading
for (i = 0; i < 100; i++)
{
read(&buf, bufsize, &overrun);
if (overrun)
{
printf ("USRP Rx Overrun\n");
noverruns++;
}
// Do whatever you want with the data
}


  printf("USRP Transfer Stopped\n");

  usb_release_interface(udh, 0);
  usb_close(udh);

  return 0;
}

However, the claiming of interface always fails on bulk_udh. Please guide me
in this regard as to what I am doing wrong?

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


Re: [Discuss-gnuradio] extract timestamp data

2009-03-12 Thread Dimitris Symeonidis
I was contemplating trying to use the timestamps and 4 antennas on the
same usrp{1,2} to try and create a smart antenna array for DOA...

Dimitris Symeonidis
"If you think you're too small to make a difference, try sleeping with
a mosquito!" - Amnesty International



On Thu, Mar 12, 2009 at 15:51, Douglas Geiger
 wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Cocuzzo, Daniel C. wrote:
>> I'm also wondering about how to extract ethernet packet information,
>> such as timestamp. If anyone has any pointers to reference materials it
>> would be greatly appreciated.
>>
>> Thanks,
>> Dan
>>
>>
>
>  The easiest way (depending on what you are doing with the timestamps)
> is probably by dealing with the low-level libusrp2, and writing a custom
> copy handler (look at rx_streaming_samples.cc in usrp2/host/apps). The
> metadata structure (in usrp2/metadata.h) provides the timestamp from the
> fpga.
>  I'm playing around right now with creating a custom source block that
> has access to the timestamps (i.e. the copy handler passes it from the
> low-level library into the source block - but not to the rest of the
> flowgraph). I'm only interested in it as far as providing aligned
> samples from two USRP2 (like usrp_multi does for the USRP1). Depending
> on what you need the timestamps for, that may be the way to go.
>  Doug
>
> - --
> Doug Geiger
> Research Assistant
> Communications and Signal Processing Lab
> Oklahoma State University
> http://cspl.okstate.edu
> douglas.gei...@okstate.edu
> doug.gei...@ieee.org
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.9 (Cygwin)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFJuSFmgfOzzR5bXIgRAl9uAKCbn2HziekL8O+kUIyg9uG4qwjB/QCfXxQL
> sGldNGn6AVsCnzkM8gVFPqM=
> =GDET
> -END PGP SIGNATURE-
>
>
> ___
> 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] extract timestamp data

2009-03-12 Thread Douglas Geiger
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Cocuzzo, Daniel C. wrote:
> I'm also wondering about how to extract ethernet packet information,
> such as timestamp. If anyone has any pointers to reference materials it
> would be greatly appreciated.
> 
> Thanks,
> Dan
> 
> 

 The easiest way (depending on what you are doing with the timestamps)
is probably by dealing with the low-level libusrp2, and writing a custom
copy handler (look at rx_streaming_samples.cc in usrp2/host/apps). The
metadata structure (in usrp2/metadata.h) provides the timestamp from the
fpga.
 I'm playing around right now with creating a custom source block that
has access to the timestamps (i.e. the copy handler passes it from the
low-level library into the source block - but not to the rest of the
flowgraph). I'm only interested in it as far as providing aligned
samples from two USRP2 (like usrp_multi does for the USRP1). Depending
on what you need the timestamps for, that may be the way to go.
 Doug

- --
Doug Geiger
Research Assistant
Communications and Signal Processing Lab
Oklahoma State University
http://cspl.okstate.edu
douglas.gei...@okstate.edu
doug.gei...@ieee.org
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJuSFmgfOzzR5bXIgRAl9uAKCbn2HziekL8O+kUIyg9uG4qwjB/QCfXxQL
sGldNGn6AVsCnzkM8gVFPqM=
=GDET
-END PGP SIGNATURE-


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


[Discuss-gnuradio] STD_SWIG_PYTHON_ARGS and gr-howto

2009-03-12 Thread Martin Braun
Hi,

it seems there's a bug in gr-howto-write-a-block.

The swig call in src/lib/Makefile.am is defined as

howto.cc howto.py: $(ALL_IFILES)
$(SWIG) $(STD_SWIG_PYTHON_ARGS) -module howto \
-o howto.cc $(LOCAL_IFILES)

but STD_SWIG_PYTHON_ARGS is never defined in that module.
I believe Makefile.common should be updated to have something like

<<< SNIP >>>
SWIGGRFLAGS = -I$(GNURADIO_CORE_INCLUDEDIR)/swig
-I$(GNURADIO_CORE_INCLUDEDIR)

# swig flags
# -w511 turns off keyword argument warning
# "-outdir $(builddir)" writes all generated output files to
#   the local builddir (which should always be '.')
SWIG_PYTHON_FLAGS = -fvirtual -python -modern -keyword \
-w511 -outdir .

# standard swig flags used by most components
STD_SWIG_PYTHON_ARGS = \
$(SWIG_PYTHON_FLAGS) \
$(SWIGGRFLAGS)
<<< SNIP >>>

This works with me, but I don't really understand the auto-build system
that well - perhaps someone who does can prepare a patch that definitely
does what it should.

I noticed some changes in the build system recently, such as the
introduction of STD_SWIG_PYTHON_ARGS. Perhaps the mini-build-subsystem
of gr-howto just needs the same updates?

Cheerio,
MB

-- 
Dipl.-Ing. Martin Braun   Phone: +49-(0)721-608 3790
Institut fuer Nachrichtentechnik  Fax:   +49-(0)721-608 6071
Universitaet Karlsruhe (TH)   http://www.int.uni-karlsruhe.de/


pgpVg4b88uBta.pgp
Description: PGP signature
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] gr_top_block adding new block while running

2009-03-12 Thread Engin Karabulut
hi all,

I want to record for example a fir filter output
to file when I want. I have develop basic application,
given some parts below

.
.
def start_record_samples (self):
self.stop()
self.utfil = gr.file_sink(gr.sizeof_float,"capture.cfile")
self.connect(self.chan_filt,self.utfil)
self.start()
  
def stop_record_samples (self):
self.stop()
self.disconnect(self.chan_filt,self.utfil)
self.start()

.
.

these functions are controlled with two buttons. "start" button calls 
start_record_samples and "stop" button calls stop_record_samples.

but they don't work properly.

start_record_samples gives error given below,

Traceback (most recent call last):
  File "/usr/local/lib/python2.5/site-packages/gnuradio/wxgui/form.py", line 
33, in 
wx.EVT_BUTTON(parent, new_id, lambda evt: callback())
  File "usrp_snby_rcv.py", line 219, in record_samples
self.start_record_samples()
  File "usrp_snby_rcv.py", line 227, in start_record_samples
self.start()
  File "/usr/local/lib/python2.5/site-packages/gnuradio/gr/top_block.py", 
line 72, in start
self._tb.start()
  File "/usr/local/lib/python2.5/site-
packages/gnuradio/gr/gnuradio_swig_py_runtime.py", line 1411, in start
return _gnuradio_swig_py_runtime.gr_top_block_sptr_start(*args, 
**kwargs)
RuntimeError: top_block::start: top block already running or wait() not 
called after previous stop()

how can  I add new block temporarily to a running gr_top_block scheduler? 
because after stop it can't start anymore.

regards.






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


Re: [Discuss-gnuradio] extract timestamp data

2009-03-12 Thread Mattias Kjellsson


Cocuzzo, Daniel C. wrote:


I'm also wondering about how to extract ethernet packet information, 
such as timestamp. If anyone has any pointers to reference materials 
it would be greatly appreciated.



Hi,

As far as I know, there is a timestamp- field in the ethernet- packet 
header. Look in "gnuradio/usrp2/firmware/include/usrp2_eth_packet.h" for 
definitions of the ethernet- structures.
Have a close look at how the headers are combined, and also remember 
that there is a "union u2_subpkt_t", which eased up the programming for 
me a bit.


There is a timestamp- field in "u2_fixed_hdr_t", but I don't know 
exactly how that comes out in the higher levels of the api. I have been 
toled that the lower levels of the code should already be able to handle 
this, but that it hasn't got it's way up all the way through the api 
yet. But that was a month or two ago, maybe someone of the core- 
developers can answer that more precisely.


Best Regards
//Mattias Kjellsson


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


[Discuss-gnuradio] Question regarding BBN 80211 bbn_slicer_cc

2009-03-12 Thread Mir Ali
Hi,

Can anyone give me the reference to the algorithm implemented for the slicer
in bbn_80211? I understand how the code works but I want to know the basis
behind this algorithm. Can I find any textbook or paper that supports this
implementation?

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


[Discuss-gnuradio] OFDM blocks now in GRC

2009-03-12 Thread Josh Blum
I just added the blks2.ofdm_mod/demod blocks to GRC in the gnuradio 
trunk. svn up!


The generated code looks a bit odd... but so are the OFDM blocks:

- options class containing parameters to ofdm mod and demod (why not 
*args and **kwargs?)

- no input stream to ofdm mod, has a send_pkts function
- output stream from ofdm demod that isnt the data, has a callback 
function to receive data


Regardless, the blocks seem to work in loopback, I hope somebody will 
give them a more brutal test.


Thanks,
-Josh


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