[Discuss-gnuradio] Dropping RX buffer or Stopping usrp Sampling from cpp block

2013-07-25 Thread e . jahandar


Hi All, i have problem with USRP2 & Gnuradio.

i'm creating a adaptive filtering gnu radio block which receives a number of 
samples ( 2channel , usally 400,000 ) and process them in order to removing 
static clutters from the sampled signals.

the problem is here, the block is very slow, it takes 4sec to compute and 
produce results. so I'm finding a way to drop the unprocessed samples while 
running adaptive filter. usally gnu radio will buffer the samples and passing 
them by work function.

my problem is when when i received 400k samples and they are under adaptive 
filter processing, gnu radio buffers the rest of them and when the af 
processing ends up, gnu radio passes the next 400k samples which is old as 6sec.

so i am finding a way to drop the samples which i doesn't need them. first i 
write a program to measure processing time and multiplying it by sample rate 
and put it in global variable and drop the samples in next run of work 
function, by this program i receive newest samples always but the problem is 
manually dropping samples are time consuming. is there any way to gnu radio do 
it for me ? i also used stop function for usrp but it causes to crash my 
application. 
I developed the app using gnu radio block howto and passing the usrp object 
directly from python to my cpp block.

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


Re: [Discuss-gnuradio] toggling LFRX gpio pins

2013-07-25 Thread Josh Blum


On 07/24/2013 12:46 PM, Nemanja Savic wrote:
> After some time I maybe realized how this thing works, but I don't know jow
> to call correctly methods from dboard_iface:
> 
> def get_pin_ctrl(self, *args, **kwargs):
> """get_pin_ctrl(self, unit_t unit) -> boost::uint16_t"""
> return _uhd_swig.dboard_iface_get_pin_ctrl(self, *args, **kwargs)
> 
> ef get_gpio_ddr(self, *args, **kwargs):
> """get_gpio_ddr(self, unit_t unit) -> boost::uint16_t"""
> return _uhd_swig.dboard_iface_get_gpio_ddr(self, *args, **kwargs)
> 
> or any of these methods that have *arg and **kwargs. When I call like this:
> iface = usrp1_src.get_dboard_iface()
> print iface.get_pin_ctrl(uhd.dboard_iface.UNIT_RX, 0)
> 
> I get following error:
> 
> Traceback (most recent call last):
>   File "lftx_io.py", line 31, in 
> print iface.get_pin_ctrl(uhd.dboard_iface.UNIT_RX, 0)
>   File "/usr/local/lib64/python2.6/site-packages/gnuradio/uhd/uhd_swig.py",
> line 1691, in get_pin_ctrl
> return _uhd_swig.dboard_iface_sptr_get_pin_ctrl(self, *args, **kwargs)
> TypeError: dboard_iface_sptr_get_pin_ctrl() takes at most 2 arguments (3
> given)
> 
> 

You have the right idea, but that particular function only takes one
argument. So thats the error.

Take a look at include/uhd/usrp/dboard_iface.hpp for documentation. The
python interface may be a little different syntax wise, but the function
names are all the same.

-josh

> 
> On Wed, Jul 24, 2013 at 4:58 PM, Nemanja Savic  wrote:
> 
>> Hi guys again,
>>
>> I have designed small RF frontend using TI's cc1000 transciever. Since the
>> transciever need to be configured using external pins, I need to be able to
>> toggle gpio pins on my LFRX. I have found that I should use dboard_iface
>> which is available in python via swig. However I have several questions:
>> How should I address my board, since there are 4 possible slots, and onlt
>> 2 values of type unit, UNIT_RX and UNIT_TX.
>> As far as i can see, every uhd source has method get_iface, does this
>> anyhow concerns me?
>>
>> Thanks again,
>> Nemanja
>>
>> --
>> Nemanja Savić
>>
> 
> 
> 
> 
> 
> ___
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
> 

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


Re: [Discuss-gnuradio] toggling LFRX gpio pins

2013-07-25 Thread Nemanja Savic
Hi,

thank you Josh. Yesterday late I figured out almost everything. I suppose
everything would be faster with a little bit more documentation.
So, I have USRP1 with wbx, lftx and lfrx.
There is one doubt now. When I set USRP source to wbx and after that read
register for setting direction of the pins i get some value (49116). The
binary representation is not the same as i expect from WBX schematic. In
schematgic is written that for example io_rx[5] for selecting rx1 or rx2 is
output pin, but I get 0 when I read. Also io_rx[15] and io_rx[14] are
unused, but still one is set as output and other as input. Also when I
change antenna selection and read the same value again i read the same
number.

thanks,
Nemanja


On Thu, Jul 25, 2013 at 9:44 AM, Josh Blum  wrote:

>
>
> On 07/24/2013 12:46 PM, Nemanja Savic wrote:
> > After some time I maybe realized how this thing works, but I don't know
> jow
> > to call correctly methods from dboard_iface:
> >
> > def get_pin_ctrl(self, *args, **kwargs):
> > """get_pin_ctrl(self, unit_t unit) -> boost::uint16_t"""
> > return _uhd_swig.dboard_iface_get_pin_ctrl(self, *args, **kwargs)
> >
> > ef get_gpio_ddr(self, *args, **kwargs):
> > """get_gpio_ddr(self, unit_t unit) -> boost::uint16_t"""
> > return _uhd_swig.dboard_iface_get_gpio_ddr(self, *args, **kwargs)
> >
> > or any of these methods that have *arg and **kwargs. When I call like
> this:
> > iface = usrp1_src.get_dboard_iface()
> > print iface.get_pin_ctrl(uhd.dboard_iface.UNIT_RX, 0)
> >
> > I get following error:
> >
> > Traceback (most recent call last):
> >   File "lftx_io.py", line 31, in 
> > print iface.get_pin_ctrl(uhd.dboard_iface.UNIT_RX, 0)
> >   File
> "/usr/local/lib64/python2.6/site-packages/gnuradio/uhd/uhd_swig.py",
> > line 1691, in get_pin_ctrl
> > return _uhd_swig.dboard_iface_sptr_get_pin_ctrl(self, *args,
> **kwargs)
> > TypeError: dboard_iface_sptr_get_pin_ctrl() takes at most 2 arguments (3
> > given)
> >
> >
>
> You have the right idea, but that particular function only takes one
> argument. So thats the error.
>
> Take a look at include/uhd/usrp/dboard_iface.hpp for documentation. The
> python interface may be a little different syntax wise, but the function
> names are all the same.
>
> -josh
>
> >
> > On Wed, Jul 24, 2013 at 4:58 PM, Nemanja Savic 
> wrote:
> >
> >> Hi guys again,
> >>
> >> I have designed small RF frontend using TI's cc1000 transciever. Since
> the
> >> transciever need to be configured using external pins, I need to be
> able to
> >> toggle gpio pins on my LFRX. I have found that I should use dboard_iface
> >> which is available in python via swig. However I have several questions:
> >> How should I address my board, since there are 4 possible slots, and
> onlt
> >> 2 values of type unit, UNIT_RX and UNIT_TX.
> >> As far as i can see, every uhd source has method get_iface, does this
> >> anyhow concerns me?
> >>
> >> Thanks again,
> >> Nemanja
> >>
> >> --
> >> Nemanja Savić
> >>
> >
> >
> >
> >
> >
> > ___
> > Discuss-gnuradio mailing list
> > Discuss-gnuradio@gnu.org
> > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
> >
>
> ___
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>



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


Re: [Discuss-gnuradio] Questions about synchronize usrp2 via mimo cable

2013-07-25 Thread Josh Blum


On 07/24/2013 08:25 PM, yeran wrote:
> Hi all, 
> I am trying to study STBC using USRP2 and have some questions about how to 
> use mimo cable.
> 
> I followed the instruction on ettus but i dont understand 'Configuring the 
> slave' part
> http://files.ettus.com/uhd_docs/manual/html/usrp2.html#using-the-mimo-cable
> 
> Configuring the slave
> In order for the slave to synchronize to the master over MIMO cable,
> the following clock configuration must be set on the slave device:
> 
> uhd::clock_config_t clock_config;
> clock_config.ref_source = uhd::clock_config_t::REF_MIMO;
> clock_config.pps_source = uhd::clock_config_t::PPS_MIMO;
> usrp->set_clock_config(clock_config, slave_index);
> ===
> I wonder where should I add these lines?

The code you have below is correct. The code snippet in the docs using
clock_config reflects an older API. I will correct this. Thanks

-josh

> 
> What I am trying is:
> self.usrp_sink = uhd.usrp_sink(device_addr=self.addr, stream_args = 
> uhd.stream_args(cpu_format="32fc",channels=range(2),),)
> self.usrp_sink.set_clock_source("internal", 0)
> self.usrp_sink.set_time_source("mimo", 0)
> self.usrp_sink.set_clock_source("mimo", 1)
> self.usrp_sink.set_time_source("mimo", 1)
> 
> Am I right about that?
> Thanks for any help~
> 
> Robee
> 
> 
> 
> 
> ___
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
> 

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


[Discuss-gnuradio] gras make error

2013-07-25 Thread Gong Zhang

Hi,
I got the source code of gras using git,and I followed the instruction 
to install gras.But I got errors while making.


/home/zg/Desktop/Codes/gras/gras/Theron/Include/External/boost/atomic/detail/gcc-x86.hpp: 
In function ‘void boost::atomic_thread_fence(boost::memory_order)’:
/home/zg/Desktop/Codes/gras/gras/Theron/Include/External/boost/atomic/detail/gcc-x86.hpp:51: 
warning: case label value exceeds maximum value for type
/home/zg/Desktop/Codes/gras/gras/Theron/Include/External/boost/atomic/detail/gcc-x86.hpp: 
In function ‘void 
boost::detail::atomic::platform_fence_before(boost::memory_order)’:
/home/zg/Desktop/Codes/gras/gras/Theron/Include/External/boost/atomic/detail/gcc-x86.hpp:76: 
warning: case label value exceeds maximum value for type
/home/zg/Desktop/Codes/gras/gras/Theron/Include/External/boost/atomic/detail/gcc-x86.hpp: 
In function ‘void 
boost::detail::atomic::platform_fence_after(boost::memory_order)’:
/home/zg/Desktop/Codes/gras/gras/Theron/Include/External/boost/atomic/detail/gcc-x86.hpp:102: 
warning: case label value exceeds maximum value for type
/home/zg/Desktop/Codes/gras/gras/Theron/Include/External/boost/atomic/detail/gcc-x86.hpp: 
In function ‘void 
boost::detail::atomic::platform_fence_after_load(boost::memory_order)’:
/home/zg/Desktop/Codes/gras/gras/Theron/Include/External/boost/atomic/detail/gcc-x86.hpp:124: 
warning: case label value exceeds maximum value for type
In file included from 
/home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:4:
/home/zg/Desktop/Codes/gras/gras/lib/gras_impl/query_common.hpp: At 
global scope:
/home/zg/Desktop/Codes/gras/gras/lib/gras_impl/query_common.hpp:14: 
error: expected unqualified-id before ‘::’ token
/home/zg/Desktop/Codes/gras/gras/lib/gras_impl/query_common.hpp:14: 
error: expected ‘)’ before ‘::’ token
/home/zg/Desktop/Codes/gras/gras/lib/gras_impl/query_common.hpp:14: 
error: expected initializer before ‘::’ token
/home/zg/Desktop/Codes/gras/gras/lib/gras_impl/query_common.hpp:15: 
error: ‘boost::property_tree’ has not been declared
/home/zg/Desktop/Codes/gras/gras/lib/gras_impl/query_common.hpp:15: 
error: expected constructor, destructor, or type conversion before 
‘pmc_to_ptree’
/home/zg/Desktop/Codes/gras/gras/lib/gras_impl/query_common.hpp:17: 
error: ‘boost::property_tree’ has not been declared
/home/zg/Desktop/Codes/gras/gras/lib/gras_impl/query_common.hpp:17: 
error: expected constructor, destructor, or type conversion before 
‘json_to_ptree’
/home/zg/Desktop/Codes/gras/gras/lib/gras_impl/query_common.hpp:18: 
error: expected unqualified-id before ‘::’ token
/home/zg/Desktop/Codes/gras/gras/lib/gras_impl/query_common.hpp:18: 
error: expected ‘)’ before ‘::’ token
/home/zg/Desktop/Codes/gras/gras/lib/gras_impl/query_common.hpp:18: 
error: expected initializer before ‘::’ token
/home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:14: error: 
‘property_tree’ is not a namespace-name
/home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:14: error: 
expected namespace-name before ‘;’ token
/home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:31: error: 
‘ptree’ does not name a type
/home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:50: error: 
‘ptree’ does not name a type
/home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:160: error: 
‘ptree’ does not name a type
/home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:186: error: ISO 
C++ forbids declaration of ‘ptree’ with no type
/home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:186: error: 
expected ‘,’ or ‘...’ before ‘&’ token
/home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp: In member 
function ‘virtual std::string gras::TopBlock::query(const std::string&)’:
/home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:243: error: 
‘ptree’ does not name a type
/home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:246: error: 
‘((gras::TopBlock*)this)->gras::TopBlock::query’ does not have class type
/home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:246: error: 
expected primary-expression before ‘>’ token
/home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:247: error: 
‘ptree’ was not declared in this scope
/home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:247: error: 
expected ‘;’ before ‘result’
/home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:248: error: 
argument of type ‘std::string (gras::TopBlock::)(const std::string&)’ 
does not match ‘int’
/home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:249: error: 
‘result’ was not declared in this scope
/home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:249: error: 
‘query_blocks’ was not declared in this scope
/home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:250: error: 
‘result’ was not declared in this scope
/home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:250: error: 
‘query_stats’ was not declared in this scope
/home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:251: error: 
‘result’ was not declared in this scope
/

Re: [Discuss-gnuradio] gras make error

2013-07-25 Thread Josh Blum


On 07/25/2013 04:51 AM, Gong Zhang wrote:
> Hi,
> I got the source code of gras using git,and I followed the instruction
> to install gras.But I got errors while making.
> 
> /home/zg/Desktop/Codes/gras/gras/Theron/Include/External/boost/atomic/detail/gcc-x86.hpp:
> In function ‘void boost::atomic_thread_fence(boost::memory_order)’:
> /home/zg/Desktop/Codes/gras/gras/Theron/Include/External/boost/atomic/detail/gcc-x86.hpp:51:
> warning: case label value exceeds maximum value for type
> /home/zg/Desktop/Codes/gras/gras/Theron/Include/External/boost/atomic/detail/gcc-x86.hpp:
> In function ‘void
> boost::detail::atomic::platform_fence_before(boost::memory_order)’:
> /home/zg/Desktop/Codes/gras/gras/Theron/Include/External/boost/atomic/detail/gcc-x86.hpp:76:
> warning: case label value exceeds maximum value for type
> /home/zg/Desktop/Codes/gras/gras/Theron/Include/External/boost/atomic/detail/gcc-x86.hpp:
> In function ‘void
> boost::detail::atomic::platform_fence_after(boost::memory_order)’:
> /home/zg/Desktop/Codes/gras/gras/Theron/Include/External/boost/atomic/detail/gcc-x86.hpp:102:
> warning: case label value exceeds maximum value for type
> /home/zg/Desktop/Codes/gras/gras/Theron/Include/External/boost/atomic/detail/gcc-x86.hpp:
> In function ‘void
> boost::detail::atomic::platform_fence_after_load(boost::memory_order)’:
> /home/zg/Desktop/Codes/gras/gras/Theron/Include/External/boost/atomic/detail/gcc-x86.hpp:124:
> warning: case label value exceeds maximum value for type

The warning tells me that you have a pretty old version of boost, but
this should be ok. The error below is telling me that the ptree is not
being included properly (at least on this system).

Can you tell me the following:
Version of boost?
OS name and version?

-josh

> In file included from
> /home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:4:
> /home/zg/Desktop/Codes/gras/gras/lib/gras_impl/query_common.hpp: At
> global scope:
> /home/zg/Desktop/Codes/gras/gras/lib/gras_impl/query_common.hpp:14:
> error: expected unqualified-id before ‘::’ token
> /home/zg/Desktop/Codes/gras/gras/lib/gras_impl/query_common.hpp:14:
> error: expected ‘)’ before ‘::’ token
> /home/zg/Desktop/Codes/gras/gras/lib/gras_impl/query_common.hpp:14:
> error: expected initializer before ‘::’ token
> /home/zg/Desktop/Codes/gras/gras/lib/gras_impl/query_common.hpp:15:
> error: ‘boost::property_tree’ has not been declared
> /home/zg/Desktop/Codes/gras/gras/lib/gras_impl/query_common.hpp:15:
> error: expected constructor, destructor, or type conversion before
> ‘pmc_to_ptree’
> /home/zg/Desktop/Codes/gras/gras/lib/gras_impl/query_common.hpp:17:
> error: ‘boost::property_tree’ has not been declared
> /home/zg/Desktop/Codes/gras/gras/lib/gras_impl/query_common.hpp:17:
> error: expected constructor, destructor, or type conversion before
> ‘json_to_ptree’
> /home/zg/Desktop/Codes/gras/gras/lib/gras_impl/query_common.hpp:18:
> error: expected unqualified-id before ‘::’ token
> /home/zg/Desktop/Codes/gras/gras/lib/gras_impl/query_common.hpp:18:
> error: expected ‘)’ before ‘::’ token
> /home/zg/Desktop/Codes/gras/gras/lib/gras_impl/query_common.hpp:18:
> error: expected initializer before ‘::’ token
> /home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:14: error:
> ‘property_tree’ is not a namespace-name
> /home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:14: error:
> expected namespace-name before ‘;’ token
> /home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:31: error:
> ‘ptree’ does not name a type
> /home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:50: error:
> ‘ptree’ does not name a type
> /home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:160: error:
> ‘ptree’ does not name a type
> /home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:186: error: ISO
> C++ forbids declaration of ‘ptree’ with no type
> /home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:186: error:
> expected ‘,’ or ‘...’ before ‘&’ token
> /home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp: In member
> function ‘virtual std::string gras::TopBlock::query(const std::string&)’:
> /home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:243: error:
> ‘ptree’ does not name a type
> /home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:246: error:
> ‘((gras::TopBlock*)this)->gras::TopBlock::query’ does not have class type
> /home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:246: error:
> expected primary-expression before ‘>’ token
> /home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:247: error:
> ‘ptree’ was not declared in this scope
> /home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:247: error:
> expected ‘;’ before ‘result’
> /home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:248: error:
> argument of type ‘std::string (gras::TopBlock::)(const std::string&)’
> does not match ‘int’
> /home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:249: error:
> ‘result’ was not declared in this scope
> /home/zg/Desktop/C

[Discuss-gnuradio] Why do i get "no module named wxgui" error

2013-07-25 Thread Lakhan Shiva
Hello, I am pretty new to gnu radio, trying to learn it asap and start
developing apps. I am very interested in it.

When i try to execute the usrp wfm receive python file i get the following
error.

Traceback (most recent call last):
  File "./usrp_wfm_rcv.py", line 25, in 
from gnuradio.wxgui import slider, powermate
ImportError: No module named wxgui

Though i have gr-wxgui folder in my gnuradio directory i get this error. I
have wx python installed on my pc too. Whatever the solution is please
guide me step by step. Thanks in advance!
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] PyBOMBS: First impressions and optional dependencies

2013-07-25 Thread Alexandru Csete
Greetings,

Yesterday, I started playing with pybombs and fixed a few recipes
related to gr-osmosdr. During this process I made gr-osmosdr depend on
uhd, rtl-sdr, osmo-sdr, hackrf and gr-iqbal. I did this to ensure that
all supported input devices are made available to users. It should be
noted that all these packages are optional and gr-osmosdr would work
just fine with gnuradio as the only dependency still supporting
funcube dongles and I/Q file sources.

Later I will be adding a recipe for the gr-fcdproplus OOT source block
and add that as a gr-osmosdr dependency as well. This works well for
now since all these driver libraries are recent and well maintained.
However, as time goes this driver list will grow and the risk of
something breaking will increase. This made me think whether there may
be a need for a weaker dependency specification, something like the
"recommends" section in deb packages or the "variant" in macports?

As an alternate solution here & now, we could just remove all optional
dependencies from the gr-osmosdr recipe and instruct users to install
their preferred driver libraries prior to installing gr-osmosdr. Or
create meta-recipes that would provide the most common combinations. I
don't know what would be the best solution.

Otherwise I found pybombs to be very easy to use and provide
sufficient flexibility for me to replace my own "build-gnuradio"
scripts for managing multiple installations of gnuradio.

Alex

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


[Discuss-gnuradio] On Scope Sink count-to-voltage conversion

2013-07-25 Thread Zohair M. Abu Shaban
Hello everyone,

On the the GNU scope sink, I have a signal peak of 0.3 counts, to how many 
volts does this correspond? I have read that it corresponds to 1 full scale ADC 
but wasn't successful in finding the latter. 

Any help with this please?

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


[Discuss-gnuradio] Problems with file sink block in grc

2013-07-25 Thread Baier

Dear all,

I have tested the file souce and file sink in grc:
file source-- throttle--- file sink
The source file is a mp3 file withe the size 3.615.346 bytes
The sink file is smaller (unbuffered off): 3.612.672 bytes
The sink file (unbuffered on ) is also smaller 3.615.344 bytes.
The files should have the same size.
I would like to set up the ofdm transmission system  and compute the bit 
error rate for example that would not be possible.

Can somebody help me?
Thanks!


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


[Discuss-gnuradio] How can I add freq. offset(related to time index) after IFFT in data symbol in ofdm example?

2013-07-25 Thread Yingjie Chen
Hi guys,
Thanks in advance.

Since freq. offset is time related, like exp(2pi * fΔ * t), how can I
generate freq. offset in gnuradio?
Normally, freq. offset exists due to mismatched oscillators between
transmitter and receiver.
Is that possible  get the same freq. offset effect mentioned above, merely
through modifying some code in GunRadio but not modifying the RF hardware
in USRP. For example, if I want to add 1KHZ offset in sender in data
symbol(not preamble part,to avoid freq. offset correction), to see if the
receiver can still succeed to decode the data, how should I do? Which part
should I locate at after IFFT moving the samples to base band?

Thanks again.

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


Re: [Discuss-gnuradio] Streaming audio through internet

2013-07-25 Thread Adeel Anwar
>>So far, I have install jack, changed my audio_module to jack and created
a sine wave flowing to an audio_sink.

When I execute the flow graph, nothing happens. (Is this expected?)

How can I capture this audio using VLC?

U can use GR UDP/TCP sink to send the audio samples from GNU Radio to VLC
or any other program


-Adeel


On Thu, Jul 25, 2013 at 9:23 AM, Vanush Vaswani  wrote:

> Hello,
>
> I would like to stream demodulated audio through GNU Radio to the internet
>
> The way I want to achieve this is follows.
> 1. Create virtual sound card available as audio sink, connect some source
> (e.g. sine wave)
> 2. Use VLC streamer to capture audio and stream device through RTSP
>
> So far, I have install jack, changed my audio_module to jack and created a
> sine wave flowing to an audio_sink.
>
> When I execute the flow graph, nothing happens. (Is this expected?)
>
> How can I capture this audio using VLC?
>
> Vanush
> ___
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] How can I add freq. offset(related to time index) after IFFT in data symbol in ofdm example?

2013-07-25 Thread Adeel Anwar
Kay,

Freq offset can be added by multiplying the baseband data with
complex-exponential. In GR this can be done by any of the following ways
 1. Sine Source and Multiply block or
 2. Freq Translating FIR Filter
 3. Channel Model

-Adeel


On Thu, Jul 25, 2013 at 8:26 PM, Yingjie Chen  wrote:

> Hi guys,
> Thanks in advance.
>
> Since freq. offset is time related, like exp(2pi * fΔ * t), how can I
> generate freq. offset in gnuradio?
> Normally, freq. offset exists due to mismatched oscillators between
> transmitter and receiver.
> Is that possible  get the same freq. offset effect mentioned above, merely
> through modifying some code in GunRadio but not modifying the RF hardware
> in USRP. For example, if I want to add 1KHZ offset in sender in data
> symbol(not preamble part,to avoid freq. offset correction), to see if the
> receiver can still succeed to decode the data, how should I do? Which part
> should I locate at after IFFT moving the samples to base band?
>
> Thanks again.
>
> Best,
> Kay
>
> ___
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>
>
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] Fwd: How can I add freq. offset(related to time index) after IFFT in data symbol in ofdm example?

2013-07-25 Thread Adeel Anwar
for index = 1:PacketLength
PacketWithFreqOffset(index) =
Packet(index)*exp(i*2*pi*fΔ*SampleRate*index);
end

So is above  implementation in matlab similar to that in Gnuradio?

No. GNURadio implementation resembles Simulink instead of Matlab. Just
think how can u add freq-offset in Simulink and replicate that in GNURadio

-Adeel


On Thu, Jul 25, 2013 at 8:41 PM, Yingjie Chen  wrote:

> Thanks for you reply, Adeel. I am still confused in implementation.
> I have done simulation before in matlab. In matlab, timebase index can
> refer to each element in signal vector.
> Please refer to following code for illustration, fΔ refers to freq.
> offset, index refers to time index,  Packet is signal vector, SampleRate =
> 1/20Mhz
>
> for index = 1:PacketLength
> PacketWithFreqOffset(index) =
> Packet(index)*exp(i*2*pi*fΔ*SampleRate*index);
> end
>
> So is above  implementation in matlab similar to that in Gnuradio?
>
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] how to raise the packet error rate in benchmark

2013-07-25 Thread yeran
Hi Adeel,

Thanks for your prompt reply!

I don't quite understand your last email. If I want to test the performance of 
transmission under different power allocation. What should I do? Can you please 
be more specific about this?

Currently, what I'm doing is keep the tx-amplitude 0.2, and change the gain 
from 35 to 65. You mean in this range, the power is not liner to gain change, 
right? If so, is there any way to control or influence the power change?

Thank you!

Regards,
Ada

Date: Wed, 24 Jul 2013 06:12:15 +0500
Subject: Re: [Discuss-gnuradio] how to raise the packet error rate in benchmark
From: adeela...@gmail.com
To: yeran0...@hotmail.com; discuss-gnuradio@gnu.org

Ada,

>>once the signal has been up converted. Now I'm using 0.2 amplitude and 
35 gain. But I don't understand, how come that the smaller the power is,
 the better transmission performance there will be. And also, why does 
power should be in the range of 0 to 1.0? How to calculate transmission 
power using the -tx-amplitude and tx-gain?
Better performance is not due to smaller power but it is due to the non-linear 
effects of RF-amplifiers. As per my observations, Tx-Dsp amplitude beyond 0.15 
to 0.2 causes the USRP daughter-boards Tx-amplification-stage to go into 
non-linear region thus error-rate of PSK/QAM  increases. Non-linear modulation 
e.g. FSK/GMSK are more robust to Amps non-linear effects. so u can experiment 
increasing TX-amplitude both for FSK-variants & PSK/QAM and observe performance.


-Adeel


On Tue, Jul 23, 2013 at 9:25 PM, yeran  wrote:




Hi everyone,

I'm doing a project on joint decode. But my problem is that in the lab 
environment,  the benchmark transmission is always good, there are hardly any 
packet loss, so I can not show the advantage of joint decode. 


I've tried to change the physical distance from transmission to receiver 
attenna. Still works really well even put in opposite side of the building.

I've tried to change the transmission power and transmission rate. Inspired by 
some previous study, I learned that transmission power is controlled by 
-tx-amplitude and -tx-gain, in which -tx-amplitude sets the amplitude of the 
signal going into the DAC.  RF gain is applied in the daughtercard once the 
signal has been up converted. Now I'm using 0.2 amplitude and 35 gain. But I 
don't understand, how come that the smaller the power is, the better 
transmission performance there will be. And also, why does power should be in 
the range of 0 to 1.0? How to calculate transmission power using the 
-tx-amplitude and tx-gain?


Is there any other way that may cause more error in transmission beside the 
ones I mentioned?

Thanks in advance! Any suggestion will be greatly appreciated!

Ada 
  

___

Discuss-gnuradio mailing list

Discuss-gnuradio@gnu.org

https://lists.gnu.org/mailman/listinfo/discuss-gnuradio



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


Re: [Discuss-gnuradio] FPGA image burning error

2013-07-25 Thread Amy Kumar
Hi

 Thanks for the suggestion.
I could burn the images finally after renaming the file to
u2plus_usrp_n200_r4_fpga.bin and using ./usrp_n2xx_net_burner_gui.py
--dont-check-rev
(It was showing error even with u2plus_r4.bin or u2plus_n200_r4.bin)

 Amy


   On 07/24/2013 12:48 PM, Amy Kumar wrote:

Hi

 I made a change in the u2plus_core.v and generated a new bin file using:
make -f Makefile.N200R4 bin

 When I try burning the new FPGA image to USRP N200 R4, I get the following
error:
'Error: incorrect FPGA image version.Please use the correct image for
device n200_r4'

 I think the revision I've used is correct. I don't understand why I am
getting this error.
Any suggestions would be appreciated.

 Amy


___
Discuss-gnuradio mailing
listDiscuss-gnuradio@gnu.orghttps://lists.gnu.org/mailman/listinfo/discuss-gnuradio

 I think it just checks the filename to make sure that it ends in "_r4".
If you're making your own images, and using your own filenames, you should
  probably use --dont-check-rev

Here's the --help:

Usage: usrp_n2xx_net_burner.py [options]

Options:
  -h, --helpshow this help message and exit
  --addr=ADDR   USRP-N2XX device address
  --fw=FW   firmware image path (optional)
  --fpga=FPGA   fpga image path (optional)
  --reset   reset the device after writing
  --readread to file instead of write from file
  --overwrite-safe  never ever use this option
  --dont-check-rev  disable revision checks
  --listlist possible network devices


-- 
Marcus Leech
Principal Investigator
Shirleys Bay Radio Astronomy Consortiumhttp://www.sbrac.org
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] PYBOMBS Build Failure

2013-07-25 Thread Dan CaJacob
Hi,

I've been trying out pybombs for building the latest gnuradio.  I had a
successful build at home last week, but I am having repeated failures in a
test environment VM (virtualbox, ubuntu 12.04 x64).

I am running the build like this: sudo ./pybombs install gnuradio

Here's the relevant part of the make output:

[ 68%] Built target gnuradio-blocks
Linking CXX shared module _vocoder_swig.so
[ 68%] Built target _vocoder_swig
make: *** [all] Error 2
bash return val = 2
Traceback (most recent call last):
  File "./pybombs", line 91, in 
install(p,True);
  File "/home/spacequest/pybombs/mod_pybombs/pybombs_ops.py", line 49, in
install
global_recipes[pkg].install();
  File "/home/spacequest/pybombs/mod_pybombs/recipe.py", line 512, in
install
st = self.install_src();
  File "/home/spacequest/pybombs/mod_pybombs/recipe.py", line 582, in
install_src
self.install_order[step][1]();
  File "/home/spacequest/pybombs/mod_pybombs/recipe.py", line 612, in make
assert(st == 0);
AssertionError
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] PYBOMBS Build Failure

2013-07-25 Thread Tim Newman
It appears that your error is not with pybombs but with building gnuradio.
 Can you post a bit more of the compile log?

Tim


On Thu, Jul 25, 2013 at 12:36 PM, Dan CaJacob  wrote:

> Hi,
>
> I've been trying out pybombs for building the latest gnuradio.  I had a
> successful build at home last week, but I am having repeated failures in a
> test environment VM (virtualbox, ubuntu 12.04 x64).
>
> I am running the build like this: sudo ./pybombs install gnuradio
>
> Here's the relevant part of the make output:
>
> [ 68%] Built target gnuradio-blocks
> Linking CXX shared module _vocoder_swig.so
> [ 68%] Built target _vocoder_swig
> make: *** [all] Error 2
> bash return val = 2
> Traceback (most recent call last):
>   File "./pybombs", line 91, in 
> install(p,True);
>   File "/home/spacequest/pybombs/mod_pybombs/pybombs_ops.py", line 49, in
> install
> global_recipes[pkg].install();
>   File "/home/spacequest/pybombs/mod_pybombs/recipe.py", line 512, in
> install
> st = self.install_src();
>   File "/home/spacequest/pybombs/mod_pybombs/recipe.py", line 582, in
> install_src
> self.install_order[step][1]();
>   File "/home/spacequest/pybombs/mod_pybombs/recipe.py", line 612, in make
> assert(st == 0);
> AssertionError
>
> ___
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>
>
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] About the latest submission of usrp_spectrum_sense.py

2013-07-25 Thread Ahmed Saeed
Dear all,

I checked your latest submission of "usrp_spectrum_sense.py" and I don't
understand why there is a division of the value of each bin by the sampling
rate. Also I don't understand why there is a  subtraction of the noise
floor from the power db value to calculate an actual db value.

Kindly explain those modifications.

I am working with a USRP N210 and when I run uhd_fft to display an analog
TV channel I get values around -60's db for the central frequencies of both
the audio and video signals. When I used the latest version of
"usrp_spectrum_sense.py", I got positive values for power_db and when I
removed the deduction of the noise floor, I got readings almost near the
noise floor for all bins (including the ones at the central frequency of
the audio and video signals). I hope you can point me to the right
direction and correct my misunderstanding of the code.

Thank you for your time.

Kind regards,
Ahmed Saeed.
-- 
Ahmed Saeed
Research Assistant
Department of Computer Science and Engineering
Egypt-Japan University of Science and Technology (E-JUST)

email: ahmed.sa...@ejust.edu.eg
mobile: +201112389430
web: http://wrc.ejust.edu.eg/people/saeed
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] Question on using UHD Source Block to transmit accurate PM signal

2013-07-25 Thread LD Zhang
Hi,

 

I would like to use the N210 LFTX daughterboard  to transmit bi-phase
modulated signal. The phase switching need to be done accurately in a
real-time sense, that is, the switching times has to be as accurate as
possible, which means it should be controlled by the master clock of the
N210. 

 

>From Gnuradio, I see the UHD source block. But it doesn't take any input. My
question really is: Gnuradio does things on the host computer, but the right
thing to do is to do the real-time phase modulation on the LFTX
daughterboard, to ensure hardware-controlled timing performance. 

 

I don't see a clear way to do this from the gnuradio interface. Are there
any code examples or examples similar to the hardware-control aspect? Maybe
people have done some python code that performs this kind of board-level
manipulation that is controlled by the master clock?

 

Thanks,

 

LD

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


[Discuss-gnuradio] WX GUI Scope frozen and error-msg gr_vmcircbuf_default_factory: Invalid argument

2013-07-25 Thread Kees de Groot
Dear gnuradio-enthousiasts:

I get the folowing error-message from gnuradio when I use the WX GUI Scope from 
the WX Gui Widgets:

°?X?\lonneke\AppData\Roaming\.gnuradio\prefs\gr_vmcircbuf_default_factoryC:\Program
 Files (x86)\gnuradio\lib\site-packages\gnuradio\grc\gui\Dialogs.py:36: 
GtkWarning: gtk_text
_buffer_emit_insert: assertion `g_utf8_validate (text, len, NULL)' failed
  self.insert = lambda line: text_buffer.insert(text_buffer.get_end_iter(), 
line)
: Invalid argument
Þ?X?\lonneke\AppData\Roaming\.gnuradio\prefs\gr_vmcircbuf_default_factory: 
Invalid argument

I can see the scope but the image is frozen.

I tried soo many things (and learned a lot from that) but I am stuck now. What 
can I do?

Regards,

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


[Discuss-gnuradio] A possible bug in the UHD source block?

2013-07-25 Thread LD Zhang
Hi,

 

I am doing testing with UHD source block set to a frequency at the center of
my band of interest. Previous testing with LO set to DC works very well. The
spectrum at the band of interest looks nice and flat. The new configuration
with the new LO and a lower sampling rate (just to cover the band of
interest) does not work as well as the default configuration. I see the same
signal not showing up at the expected frequencies and the spectrum looks
aliased. Is it possible that the UHD source block has a bug in this
configuration?

 

Thanks,

 

LD

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


Re: [Discuss-gnuradio] how to raise the packet error rate in benchmark

2013-07-25 Thread Adeel Anwar
>>Currently, what I'm doing is keep the tx-amplitude 0.2, and change the
gain from 35 to 65. You mean in this range, the power is not liner to gain
change, right? If so, is there any way to control or influence the power
change?
I was mentioning about the that total Tx-Power. U can control Tx-power by
varing the value of tx-dsp-amplitude from 0-1 in daughter-boards that don't
have variable tx-gain e.g. RFX2400 otherwise its the combination of both
tx-dsp-amplitude and tx-gain.


-Adeel


On Thu, Jul 25, 2013 at 9:10 PM, yeran  wrote:

> Hi Adeel,
>
> Thanks for your prompt reply!
>
> I don't quite understand your last email. If I want to test the
> performance of transmission under different power allocation. What should I
> do? Can you please be more specific about this?
>
> Currently, what I'm doing is keep the tx-amplitude 0.2, and change the
> gain from 35 to 65. You mean in this range, the power is not liner to gain
> change, right? If so, is there any way to control or influence the power
> change?
>
> Thank you!
>
> Regards,
> Ada
>
> --
> Date: Wed, 24 Jul 2013 06:12:15 +0500
> Subject: Re: [Discuss-gnuradio] how to raise the packet error rate in
> benchmark
> From: adeela...@gmail.com
> To: yeran0...@hotmail.com; discuss-gnuradio@gnu.org
>
>
> Ada,
>
> >>once the signal has been up converted. Now I'm using 0.2 amplitude and
> 35 gain. But I don't understand, how come that the smaller the power is,
> the better transmission performance there will be. And also, why does power
> should be in the range of 0 to 1.0? How to calculate transmission power
> using the -tx-amplitude and tx-gain?
> Better performance is not due to smaller power but it is due to the
> non-linear effects of RF-amplifiers. As per my observations, Tx-Dsp
> amplitude beyond 0.15 to 0.2 causes the USRP daughter-boards
> Tx-amplification-stage to go into non-linear region thus error-rate of
> PSK/QAM  increases. Non-linear modulation e.g. FSK/GMSK are more robust to
> Amps non-linear effects. so u can experiment increasing TX-amplitude both
> for FSK-variants & PSK/QAM and observe performance.
>
> -Adeel
>
>
> On Tue, Jul 23, 2013 at 9:25 PM, yeran  wrote:
>
> Hi everyone,
>
> I'm doing a project on joint decode. But my problem is that in the lab
> environment,  the benchmark transmission is always good, there are hardly
> any packet loss, so I can not show the advantage of joint decode.
>
> I've tried to change the physical distance from transmission to receiver
> attenna. Still works really well even put in opposite side of the building.
>
> I've tried to change the transmission power and transmission rate.
> Inspired by some previous study, I learned that transmission power is
> controlled by -tx-amplitude and -tx-gain, in which -tx-amplitude sets the
> amplitude of the signal going into the DAC.  RF gain is applied in the
> daughtercard once the signal has been up converted. Now I'm using 0.2
> amplitude and 35 gain. But I don't understand, how come that the smaller
> the power is, the better transmission performance there will be. And also,
> why does power should be in the range of 0 to 1.0? How to calculate
> transmission power using the -tx-amplitude and tx-gain?
>
> Is there any other way that may cause more error in transmission beside
> the ones I mentioned?
>
> Thanks in advance! Any suggestion will be greatly appreciated!
>
> Ada
>
> ___
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>
>
>
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Fwd: How can I add freq. offset(related to time index) after IFFT in data symbol in ofdm example?

2013-07-25 Thread Adeel Anwar
>>Thanks again. I am not familiar with simulink. U mean we can visually
program in GR using signal Block or widget instead of writing all code
directly?
Yes


On Thu, Jul 25, 2013 at 9:04 PM, Yingjie Chen  wrote:

> Thanks again. I am not familiar with simulink. U mean we can visually
> program in GR using signal Block or widget instead of writing all code
> directly?
>
> Sent from my iPhone
>
> On 25 Jul, 2013, at 23:47, Adeel Anwar  wrote:
>
>
>
>
> for index = 1:PacketLength
> PacketWithFreqOffset(index) =
> Packet(index)*exp(i*2*pi*fΔ*SampleRate*index);
> end
>
> So is above  implementation in matlab similar to that in Gnuradio?
>
> No. GNURadio implementation resembles Simulink instead of Matlab. Just
> think how can u add freq-offset in Simulink and replicate that in GNURadio
>
> -Adeel
>
>
> On Thu, Jul 25, 2013 at 8:41 PM, Yingjie Chen  wrote:
>
>> Thanks for you reply, Adeel. I am still confused in implementation.
>> I have done simulation before in matlab. In matlab, timebase index can
>> refer to each element in signal vector.
>> Please refer to following code for illustration, fΔ refers to freq.
>> offset, index refers to time index,  Packet is signal vector, SampleRate =
>> 1/20Mhz
>>
>> for index = 1:PacketLength
>> PacketWithFreqOffset(index) =
>> Packet(index)*exp(i*2*pi*fΔ*SampleRate*index);
>> end
>>
>> So is above  implementation in matlab similar to that in Gnuradio?
>>
>
>
> ___
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>
>
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] gras make error

2013-07-25 Thread Gong Zhang
Sorry for the incomplete information. I'm using Ubuntu 10.04 and the
boost version is 1.40

2013/7/25 Josh Blum :
>
>
> On 07/25/2013 04:51 AM, Gong Zhang wrote:
>> Hi,
>> I got the source code of gras using git,and I followed the instruction
>> to install gras.But I got errors while making.
>>
>> /home/zg/Desktop/Codes/gras/gras/Theron/Include/External/boost/atomic/detail/gcc-x86.hpp:
>> In function ‘void boost::atomic_thread_fence(boost::memory_order)’:
>> /home/zg/Desktop/Codes/gras/gras/Theron/Include/External/boost/atomic/detail/gcc-x86.hpp:51:
>> warning: case label value exceeds maximum value for type
>> /home/zg/Desktop/Codes/gras/gras/Theron/Include/External/boost/atomic/detail/gcc-x86.hpp:
>> In function ‘void
>> boost::detail::atomic::platform_fence_before(boost::memory_order)’:
>> /home/zg/Desktop/Codes/gras/gras/Theron/Include/External/boost/atomic/detail/gcc-x86.hpp:76:
>> warning: case label value exceeds maximum value for type
>> /home/zg/Desktop/Codes/gras/gras/Theron/Include/External/boost/atomic/detail/gcc-x86.hpp:
>> In function ‘void
>> boost::detail::atomic::platform_fence_after(boost::memory_order)’:
>> /home/zg/Desktop/Codes/gras/gras/Theron/Include/External/boost/atomic/detail/gcc-x86.hpp:102:
>> warning: case label value exceeds maximum value for type
>> /home/zg/Desktop/Codes/gras/gras/Theron/Include/External/boost/atomic/detail/gcc-x86.hpp:
>> In function ‘void
>> boost::detail::atomic::platform_fence_after_load(boost::memory_order)’:
>> /home/zg/Desktop/Codes/gras/gras/Theron/Include/External/boost/atomic/detail/gcc-x86.hpp:124:
>> warning: case label value exceeds maximum value for type
>
> The warning tells me that you have a pretty old version of boost, but
> this should be ok. The error below is telling me that the ptree is not
> being included properly (at least on this system).
>
> Can you tell me the following:
> Version of boost?
> OS name and version?
>
> -josh
>
>> In file included from
>> /home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:4:
>> /home/zg/Desktop/Codes/gras/gras/lib/gras_impl/query_common.hpp: At
>> global scope:
>> /home/zg/Desktop/Codes/gras/gras/lib/gras_impl/query_common.hpp:14:
>> error: expected unqualified-id before ‘::’ token
>> /home/zg/Desktop/Codes/gras/gras/lib/gras_impl/query_common.hpp:14:
>> error: expected ‘)’ before ‘::’ token
>> /home/zg/Desktop/Codes/gras/gras/lib/gras_impl/query_common.hpp:14:
>> error: expected initializer before ‘::’ token
>> /home/zg/Desktop/Codes/gras/gras/lib/gras_impl/query_common.hpp:15:
>> error: ‘boost::property_tree’ has not been declared
>> /home/zg/Desktop/Codes/gras/gras/lib/gras_impl/query_common.hpp:15:
>> error: expected constructor, destructor, or type conversion before
>> ‘pmc_to_ptree’
>> /home/zg/Desktop/Codes/gras/gras/lib/gras_impl/query_common.hpp:17:
>> error: ‘boost::property_tree’ has not been declared
>> /home/zg/Desktop/Codes/gras/gras/lib/gras_impl/query_common.hpp:17:
>> error: expected constructor, destructor, or type conversion before
>> ‘json_to_ptree’
>> /home/zg/Desktop/Codes/gras/gras/lib/gras_impl/query_common.hpp:18:
>> error: expected unqualified-id before ‘::’ token
>> /home/zg/Desktop/Codes/gras/gras/lib/gras_impl/query_common.hpp:18:
>> error: expected ‘)’ before ‘::’ token
>> /home/zg/Desktop/Codes/gras/gras/lib/gras_impl/query_common.hpp:18:
>> error: expected initializer before ‘::’ token
>> /home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:14: error:
>> ‘property_tree’ is not a namespace-name
>> /home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:14: error:
>> expected namespace-name before ‘;’ token
>> /home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:31: error:
>> ‘ptree’ does not name a type
>> /home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:50: error:
>> ‘ptree’ does not name a type
>> /home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:160: error:
>> ‘ptree’ does not name a type
>> /home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:186: error: ISO
>> C++ forbids declaration of ‘ptree’ with no type
>> /home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:186: error:
>> expected ‘,’ or ‘...’ before ‘&’ token
>> /home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp: In member
>> function ‘virtual std::string gras::TopBlock::query(const std::string&)’:
>> /home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:243: error:
>> ‘ptree’ does not name a type
>> /home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:246: error:
>> ‘((gras::TopBlock*)this)->gras::TopBlock::query’ does not have class type
>> /home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:246: error:
>> expected primary-expression before ‘>’ token
>> /home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:247: error:
>> ‘ptree’ was not declared in this scope
>> /home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:247: error:
>> expected ‘;’ before ‘result’
>> /home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:248: error:
>> argument of ty

Re: [Discuss-gnuradio] gras make error

2013-07-25 Thread Josh Blum


On 07/25/2013 10:03 PM, Gong Zhang wrote:
> Sorry for the incomplete information. I'm using Ubuntu 10.04 and the
> boost version is 1.40
> 

So heres the deal. Boost 1.40 does not support the property tree.
Property tree was introduced in 1.41: http://www.boost.org/doc/libs/1_41_0/

Anyway, what I have done is make the property tree stuff optional. If
old boost is detected, its compiled out. Try to update your repository
and see if it compiles now:
https://github.com/guruofquality/gras/commit/b877d078b11cb848b344f4f7534398f70157aa15

The property tree is used for the query interface. This drives the
web-based status monitor. So that wont work w/ with boost 1.40, but
everything else should be OK.

Honestly, I only test build on ubuntus as old as 11.04. I have not
tested on 10.04 in a while. But if you find more bugs, I will try to fix
them. And I also recommend to upgrade to a newer ubuntu like 12.04 --
which is the most recent long term support version.

-josh

> 2013/7/25 Josh Blum :
>>
>>
>> On 07/25/2013 04:51 AM, Gong Zhang wrote:
>>> Hi,
>>> I got the source code of gras using git,and I followed the instruction
>>> to install gras.But I got errors while making.
>>>
>>> /home/zg/Desktop/Codes/gras/gras/Theron/Include/External/boost/atomic/detail/gcc-x86.hpp:
>>> In function ‘void boost::atomic_thread_fence(boost::memory_order)’:
>>> /home/zg/Desktop/Codes/gras/gras/Theron/Include/External/boost/atomic/detail/gcc-x86.hpp:51:
>>> warning: case label value exceeds maximum value for type
>>> /home/zg/Desktop/Codes/gras/gras/Theron/Include/External/boost/atomic/detail/gcc-x86.hpp:
>>> In function ‘void
>>> boost::detail::atomic::platform_fence_before(boost::memory_order)’:
>>> /home/zg/Desktop/Codes/gras/gras/Theron/Include/External/boost/atomic/detail/gcc-x86.hpp:76:
>>> warning: case label value exceeds maximum value for type
>>> /home/zg/Desktop/Codes/gras/gras/Theron/Include/External/boost/atomic/detail/gcc-x86.hpp:
>>> In function ‘void
>>> boost::detail::atomic::platform_fence_after(boost::memory_order)’:
>>> /home/zg/Desktop/Codes/gras/gras/Theron/Include/External/boost/atomic/detail/gcc-x86.hpp:102:
>>> warning: case label value exceeds maximum value for type
>>> /home/zg/Desktop/Codes/gras/gras/Theron/Include/External/boost/atomic/detail/gcc-x86.hpp:
>>> In function ‘void
>>> boost::detail::atomic::platform_fence_after_load(boost::memory_order)’:
>>> /home/zg/Desktop/Codes/gras/gras/Theron/Include/External/boost/atomic/detail/gcc-x86.hpp:124:
>>> warning: case label value exceeds maximum value for type
>>
>> The warning tells me that you have a pretty old version of boost, but
>> this should be ok. The error below is telling me that the ptree is not
>> being included properly (at least on this system).
>>
>> Can you tell me the following:
>> Version of boost?
>> OS name and version?
>>
>> -josh
>>
>>> In file included from
>>> /home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:4:
>>> /home/zg/Desktop/Codes/gras/gras/lib/gras_impl/query_common.hpp: At
>>> global scope:
>>> /home/zg/Desktop/Codes/gras/gras/lib/gras_impl/query_common.hpp:14:
>>> error: expected unqualified-id before ‘::’ token
>>> /home/zg/Desktop/Codes/gras/gras/lib/gras_impl/query_common.hpp:14:
>>> error: expected ‘)’ before ‘::’ token
>>> /home/zg/Desktop/Codes/gras/gras/lib/gras_impl/query_common.hpp:14:
>>> error: expected initializer before ‘::’ token
>>> /home/zg/Desktop/Codes/gras/gras/lib/gras_impl/query_common.hpp:15:
>>> error: ‘boost::property_tree’ has not been declared
>>> /home/zg/Desktop/Codes/gras/gras/lib/gras_impl/query_common.hpp:15:
>>> error: expected constructor, destructor, or type conversion before
>>> ‘pmc_to_ptree’
>>> /home/zg/Desktop/Codes/gras/gras/lib/gras_impl/query_common.hpp:17:
>>> error: ‘boost::property_tree’ has not been declared
>>> /home/zg/Desktop/Codes/gras/gras/lib/gras_impl/query_common.hpp:17:
>>> error: expected constructor, destructor, or type conversion before
>>> ‘json_to_ptree’
>>> /home/zg/Desktop/Codes/gras/gras/lib/gras_impl/query_common.hpp:18:
>>> error: expected unqualified-id before ‘::’ token
>>> /home/zg/Desktop/Codes/gras/gras/lib/gras_impl/query_common.hpp:18:
>>> error: expected ‘)’ before ‘::’ token
>>> /home/zg/Desktop/Codes/gras/gras/lib/gras_impl/query_common.hpp:18:
>>> error: expected initializer before ‘::’ token
>>> /home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:14: error:
>>> ‘property_tree’ is not a namespace-name
>>> /home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:14: error:
>>> expected namespace-name before ‘;’ token
>>> /home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:31: error:
>>> ‘ptree’ does not name a type
>>> /home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:50: error:
>>> ‘ptree’ does not name a type
>>> /home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:160: error:
>>> ‘ptree’ does not name a type
>>> /home/zg/Desktop/Codes/gras/gras/lib/top_block_query.cpp:186: error: ISO
>>> C++ forbids declaration of