[Discuss-gnuradio] ValueError: The truth value of an array with more than one element is ambiguous - in OOT

2018-06-19 Thread Luis Felipe Albarracin Sanchez
*Hello all,*

*I am developing a Fuzzy system to control some variables in a
Communicatiosn system,  and i have the following code:*

import numpy as np
import string
import pmt
import struct
import pylab as pl
from gnuradio import gr
from gnuradio import digital

# Variable Global

lim=99
x =pl.linspace(0, 100, lim)#Output universe

#Parameters for membership functions
#Input
mp1=[25, 75 ]#Mean
dp1=[25, 25]#Standar Deviation
#Output
mpy=[25, 75]
dpy=[15, 15]

class mod_fuzzy_t1_selector(gr.sync_block):
"""
docstring for block mod_fuzzy_t1_selector
"""
def __init__(self):
#Internal Variables Parameters
self.d_BLER=np.float32(0)
self.d_Act_Nod=np.float32(0)


gr.sync_block.__init__(self,
name="mod_fuzzy_t1_selector",
in_sig=[np.float32, np.float32],
out_sig=[np.float32, np.float32])

def Normaliza(self):

self.xpa1 = (self.d_BLER*100)/30

if self.d_Act_Nod[0] == 0:
   self.xpa2 = 25
else:
   self.xpa2 = 75
def Fuzzy(self):

xp1=self.xpa1
xp2=self.xpa2

u11=pl.exp((-0.5*(xp1-mp1[0])**2)/((dp1[0])**2))
u12=pl.exp((-0.5*(xp1-mp1[1])**2)/((dp1[1])**2))


u21=pl.exp((-0.5*(xp2-mp1[0])**2)/((dp1[0])**2))
u22=pl.exp((-0.5*(xp2-mp1[1])**2)/((dp1[1])**2))


y11=pl.exp((-0.5*(x-mpy[0])**2)/((dpy[0])**2))
y12=pl.exp((-0.5*(x-mpy[1])**2)/((dpy[1])**2))


y21=pl.exp((-0.5*(x-mpy[0])**2)/((dpy[0])**2))
y22=pl.exp((-0.5*(x-mpy[1])**2)/((dpy[1])**2))


A1 = [u12, u22]
Ar1 = min (A1)
 .
 .
 .
 .
def work(self, input_items, output_items):
BLERv = input_items[0]
BLER=BLERv
Act_Nodv = input_items[1]
Act_Nod=Act_Nodv
self.d_Act_Nod=np.float32(Act_Nod)
self.d_BLER=np.float32(BLER)
out0 = output_items[0]
out1 = output_items[1]
self.Normaliza()
out_global = self.Fuzzy()
out0[0] = out_global[0]
out1[0] = out_global[1]

return len(input_items[0])

*I compile it without issues, but when i run the flowgrapgh it shows the
following error with the block i just came up with:*

Executing: /usr/bin/python2 -u /home/luisfelipe/Documentos/GNU
Tests/top_block.py

handler caught exception: The truth value of an array with more than one
element is ambiguous. Use a.any() or a.all()
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/gnuradio/gr/gateway.py",
line 55, in eval
try: self._callback()
  File "/usr/local/lib/python2.7/dist-packages/gnuradio/gr/gateway.py",
line 160, in __gr_block_handle
) for i in self.__out_indexes],
  File
"/usr/local/lib/python2.7/dist-packages/ieee802_11/mod_fuzzy_t1_selector.py",
line 151, in work
out_global = self.Fuzzy()

*  File
"/usr/local/lib/python2.7/dist-packages/ieee802_11/mod_fuzzy_t1_selector.py",
line 97, in FuzzyAr1 = min (A1)*
*ValueError: The truth value of an array with more than one element is
ambiguous. Use a.any() or a.all()*
thread[thread-per-block[2]: ]: SWIG
director method error. Error detected when calling 'feval_ll.eval'


*I would appreciate if someone could give me a ligth of what should i
change in the code so i can fix this. I don know why it says that is an
array when i am putting a variable (float). Any othe ideas regarding the
problem are welcome.*

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


Re: [Discuss-gnuradio] Error Linking UHD

2018-06-19 Thread Gilad Beeri (ApolloShield)
Which version of gnuradio works for you now?

On Tue, Jun 19, 2018 at 5:22 PM Ralph A. Schmid, dk5ras 
wrote:

> Hi,
>
> I had maybe similar issues with gnuradio recently, and when I not only
> removed the build folder but the whole gnuradio folder and did a new git
> clone, it magically went through as if there never had been any issue :)
> Don't ask how much time I wasted on this one :)))
>
> Ralph.
>
> > -Original Message-
> > From: Discuss-gnuradio [mailto:discuss-gnuradio-
> > bounces+ralph=schmid@gnu.org] On Behalf Of Müller, Marcus (CEL)
> > Sent: Tuesday, June 19, 2018 1:33 PM
> > To: gi...@apolloshield.com; discuss-gnuradio@gnu.org
> > Subject: Re: [Discuss-gnuradio] Error Linking UHD
> >
> > I must admit this is surprising to me, as the line of code where
> LIBS=... is
> > printed is pretty integrally coupled to the line that specifies what
> > GNURADIO_ALL_LIBRARIES is. Maybe CMake got confused?
> > I know this is kind of a "haveyoutriedturningitoffandonagain" answer, but
> > have you tried completely rm'ing your build/ directory and letting CMake
> run
> > anew?
> >
> > Best regards,
> > Marcus
> >
> > :e ../cmake/Modules/FindG On Tue, 2018-06-19 at 14:19 +0300,
> > Gilad Beeri (ApolloShield) wrote:
> > > I have a similar problem as described in
> >
> https://lists.gnu.org/archive/html/discuss-gnuradio/2015-05/msg00195.html.
> > >
> > > When I try to run tests (with Python), I get:
> > >
> > > Traceback (most recent call last):
> > >   File "python/myblock.py", line 12, in 
> > > from myproj.myproj_swig import mitigation_source
> > >   File "/home/user/gr/lib/python2.7/site-
> > packages/myproj/myproj_swig.py", line 28, in 
> > > _myproj_swig = swig_import_helper()
> > >   File "/home/user/gr/lib/python2.7/site-
> > packages/myproj/myproj_swig.py", line 24, in swig_import_helper
> > > _mod = imp.load_module('_myproj_swig', fp, pathname, description)
> > > ImportError: /home/user/gr/lib/libgnuradio-myproj-1.0.0git.so.0.0.0:
> > > undefined symbol: _ZN3uhd11time_spec_tC1Eld
> > >
> > >
> > > I did add "UHD" to the line starting with
> > "set(GR_REQUIRED_COMPONENTS"
> > > (in my root CMakeLists.txt) so I get the output of
> > >
> > > Checking for GNU Radio Module: UHD
> > > -- Checking for module 'gnuradio-uhd'
> > > --   Found gnuradio-uhd, version 3.7.11.1-as
> > >  * INCLUDES=/home/user/gr/include
> > >  *
> > > LIBS=/home/user/gr/lib/libgnuradio-uhd.so;/home/user/gr/lib/libgnuradi
> > > o-runtime.so;/home/user/gr/lib/libgnuradio-pmt.so;/usr/lib/liblog4cpp.
> > > so
> > > -- Found GNURADIO_UHD:
> > > /home/user/gr/lib/libgnuradio-uhd.so;/home/user/gr/lib/libgnuradio-run
> > > time.so;/home/user/gr/lib/libgnuradio-pmt.so;/usr/lib/liblog4cpp.so
> > > GNURADIO_UHD_FOUND = TRUE
> > >
> > > I also have in my lib/CMakeLists.txt file ${GNURADIO_ALL_LIBRARIES} in
> > both target_link_libraries() lists.
> > >
> > > I have "#include " in my header file.
> > >
> > > But for some reason, it doesn't seem to link gnuradio-uhd:
> > >
> > > readelf -d /home/user/gr/lib/libgnuradio-myproj-1.0.0git.so.0.0.0
> > >
> > >  0x0001 (NEEDED) Shared library:
> > [libboost_system.so.1.58.0]
> > >  0x0001 (NEEDED) Shared library:
> [libgnuradio-runtime-
> > 3.7.11.1-as.so.0.0.0]
> > >  0x0001 (NEEDED) Shared library:
> [libgnuradio-pmt-
> > 3.7.11.1-as.so.0.0.0]
> > >  0x0001 (NEEDED) Shared library:
> [liblog4cpp.so.5]
> > >  0x0001 (NEEDED) Shared library:
> [libgnuradio-filter-
> > 3.7.11.1-as.so.0.0.0]
> > >  0x0001 (NEEDED) Shared library:
> [libstdc++.so.6]
> > >  0x0001 (NEEDED) Shared library: [libm.so.6]
> > >  0x0001 (NEEDED) Shared library:
> [libgcc_s.so.1]
> > >  0x0001 (NEEDED) Shared library: [libc.so.6]
> > >  0x000e (SONAME) Library soname: [libgnuradio-
> > myproj-1.0.0git.so.0.0.0]
> > > ___
> > > 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] Error Linking UHD

2018-06-19 Thread Ralph A. Schmid, dk5ras
Hi,

I had maybe similar issues with gnuradio recently, and when I not only removed 
the build folder but the whole gnuradio folder and did a new git clone, it 
magically went through as if there never had been any issue :) Don't ask how 
much time I wasted on this one :)))

Ralph.

> -Original Message-
> From: Discuss-gnuradio [mailto:discuss-gnuradio-
> bounces+ralph=schmid@gnu.org] On Behalf Of Müller, Marcus (CEL)
> Sent: Tuesday, June 19, 2018 1:33 PM
> To: gi...@apolloshield.com; discuss-gnuradio@gnu.org
> Subject: Re: [Discuss-gnuradio] Error Linking UHD
> 
> I must admit this is surprising to me, as the line of code where LIBS=... is
> printed is pretty integrally coupled to the line that specifies what
> GNURADIO_ALL_LIBRARIES is. Maybe CMake got confused?
> I know this is kind of a "haveyoutriedturningitoffandonagain" answer, but
> have you tried completely rm'ing your build/ directory and letting CMake run
> anew?
> 
> Best regards,
> Marcus
> 
> :e ../cmake/Modules/FindG On Tue, 2018-06-19 at 14:19 +0300,
> Gilad Beeri (ApolloShield) wrote:
> > I have a similar problem as described in
> https://lists.gnu.org/archive/html/discuss-gnuradio/2015-05/msg00195.html.
> >
> > When I try to run tests (with Python), I get:
> >
> > Traceback (most recent call last):
> >   File "python/myblock.py", line 12, in 
> > from myproj.myproj_swig import mitigation_source
> >   File "/home/user/gr/lib/python2.7/site-
> packages/myproj/myproj_swig.py", line 28, in 
> > _myproj_swig = swig_import_helper()
> >   File "/home/user/gr/lib/python2.7/site-
> packages/myproj/myproj_swig.py", line 24, in swig_import_helper
> > _mod = imp.load_module('_myproj_swig', fp, pathname, description)
> > ImportError: /home/user/gr/lib/libgnuradio-myproj-1.0.0git.so.0.0.0:
> > undefined symbol: _ZN3uhd11time_spec_tC1Eld
> >
> >
> > I did add "UHD" to the line starting with
> "set(GR_REQUIRED_COMPONENTS"
> > (in my root CMakeLists.txt) so I get the output of
> >
> > Checking for GNU Radio Module: UHD
> > -- Checking for module 'gnuradio-uhd'
> > --   Found gnuradio-uhd, version 3.7.11.1-as
> >  * INCLUDES=/home/user/gr/include
> >  *
> > LIBS=/home/user/gr/lib/libgnuradio-uhd.so;/home/user/gr/lib/libgnuradi
> > o-runtime.so;/home/user/gr/lib/libgnuradio-pmt.so;/usr/lib/liblog4cpp.
> > so
> > -- Found GNURADIO_UHD:
> > /home/user/gr/lib/libgnuradio-uhd.so;/home/user/gr/lib/libgnuradio-run
> > time.so;/home/user/gr/lib/libgnuradio-pmt.so;/usr/lib/liblog4cpp.so
> > GNURADIO_UHD_FOUND = TRUE
> >
> > I also have in my lib/CMakeLists.txt file ${GNURADIO_ALL_LIBRARIES} in
> both target_link_libraries() lists.
> >
> > I have "#include " in my header file.
> >
> > But for some reason, it doesn't seem to link gnuradio-uhd:
> >
> > readelf -d /home/user/gr/lib/libgnuradio-myproj-1.0.0git.so.0.0.0
> >
> >  0x0001 (NEEDED) Shared library:
> [libboost_system.so.1.58.0]
> >  0x0001 (NEEDED) Shared library: 
> > [libgnuradio-runtime-
> 3.7.11.1-as.so.0.0.0]
> >  0x0001 (NEEDED) Shared library: [libgnuradio-pmt-
> 3.7.11.1-as.so.0.0.0]
> >  0x0001 (NEEDED) Shared library: [liblog4cpp.so.5]
> >  0x0001 (NEEDED) Shared library: 
> > [libgnuradio-filter-
> 3.7.11.1-as.so.0.0.0]
> >  0x0001 (NEEDED) Shared library: [libstdc++.so.6]
> >  0x0001 (NEEDED) Shared library: [libm.so.6]
> >  0x0001 (NEEDED) Shared library: [libgcc_s.so.1]
> >  0x0001 (NEEDED) Shared library: [libc.so.6]
> >  0x000e (SONAME) Library soname: [libgnuradio-
> myproj-1.0.0git.so.0.0.0]
> > ___
> > 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] Error Linking UHD

2018-06-19 Thread Gilad Beeri (ApolloShield)
The MESSAGE directive shows it should be ok - added to lib/CMakeLists.txt,
after the first target_link_libraries(), the line "MESSAGE(STATUS "DEBUG GR
LIBS: ${GNURADIO_ALL_LIBRARIES}")".

The output:

*-- DEBUG GR LIBS:
/home/user/gr/lib/libgnuradio-runtime.so;/home/user/gr/lib/libgnuradio-pmt.so;/usr/lib/liblog4cpp.so;/home/user/gr/lib/libgnuradio-filter.so;/home/user/gr/lib/libgnuradio-fft.so;/home/user/gr/lib/libgnuradio-uhd.so*

I moved away all cmake/ files and then put them back one-by-one until the
build succeeded, which meant I ended up removing:
 D cmake/Modules/CMakeParseArgumentsCopy.cmake
 D cmake/Modules/FindGnuradioRuntime.cmake
 D cmake/Modules/GrMiscUtils.cmake
 D cmake/Modules/GrPython.cmake
 D cmake/Modules/GrSwig.cmake
 D cmake/Modules/GrTest.cmake
 D cmake/Modules/UseSWIG.cmake

but still no luck (the undefined symbol error still exists).

It might be worth to mention, the version I use is 3.7.11.1.



On Tue, Jun 19, 2018 at 2:47 PM Müller, Marcus (CEL) 
wrote:

> add a "message ()" directive that prints the GNURADIO_ALL_LIBRARIES
> that is actually used in your lib/CMakeLists.txt. If that is wrong:
>
> Move your OOT's cmake/Modules/* out of the way – I do not endorse the
> fact that we're distributing copies of all the GNU Radio CMake scripts
> with our OOT template, as these might outdate locally.
>
> I must admit I don't have an OOT where I test gr-uhd linkage myself.
>
> Best regards,
> Marcus
>
> On Tue, 2018-06-19 at 14:42 +0300, Gilad Beeri (ApolloShield) wrote:
> > I've done "rm -rf build/*" and "pushd build; cmake  ../; and make -j7;
> and make install; popd" ~ 50 times since yesterday :)
> >
> > Any suggestions for debugging it?
> >
> > On Tue, Jun 19, 2018 at 2:33 PM Müller, Marcus (CEL) 
> wrote:
> > > I must admit this is surprising to me, as the line of code where
> > > LIBS=... is printed is pretty integrally coupled to the line that
> > > specifies what GNURADIO_ALL_LIBRARIES is. Maybe CMake got confused?
> > > I know this is kind of a "haveyoutriedturningitoffandonagain" answer,
> > > but have you tried completely rm'ing your build/ directory and letting
> > > CMake run anew?
> > >
> > > Best regards,
> > > Marcus
> > >
> > > :e ../cmake/Modules/FindG   On Tue, 2018-06-19 at 14:19
> +0300,
> > > Gilad Beeri (ApolloShield) wrote:
> > > > I have a similar problem as described in
> https://lists.gnu.org/archive/html/discuss-gnuradio/2015-05/msg00195.html.
> > > >
> > > > When I try to run tests (with Python), I get:
> > > >
> > > > Traceback (most recent call last):
> > > >   File "python/myblock.py", line 12, in 
> > > > from myproj.myproj_swig import mitigation_source
> > > >   File
> "/home/user/gr/lib/python2.7/site-packages/myproj/myproj_swig.py", line 28,
> in 
> > > > _myproj_swig = swig_import_helper()
> > > >   File
> "/home/user/gr/lib/python2.7/site-packages/myproj/myproj_swig.py", line 24,
> in swig_import_helper
> > > > _mod = imp.load_module('_myproj_swig', fp, pathname, description)
> > > > ImportError: /home/user/gr/lib/libgnuradio-myproj-1.0.0git.so.0.0.0:
> undefined symbol: _ZN3uhd11time_spec_tC1Eld
> > > >
> > > >
> > > > I did add "UHD" to the line starting with
> "set(GR_REQUIRED_COMPONENTS" (in my root CMakeLists.txt) so I get the
> output of
> > > >
> > > > Checking for GNU Radio Module: UHD
> > > > -- Checking for module 'gnuradio-uhd'
> > > > --   Found gnuradio-uhd, version 3.7.11.1-as
> > > >  * INCLUDES=/home/user/gr/include
> > > >  *
> LIBS=/home/user/gr/lib/libgnuradio-uhd.so;/home/user/gr/lib/libgnuradio-runtime.so;/home/user/gr/lib/libgnuradio-pmt.so;/usr/lib/liblog4cpp.so
> > > > -- Found GNURADIO_UHD:
> /home/user/gr/lib/libgnuradio-uhd.so;/home/user/gr/lib/libgnuradio-runtime.so;/home/user/gr/lib/libgnuradio-pmt.so;/usr/lib/liblog4cpp.so
>
> > > > GNURADIO_UHD_FOUND = TRUE
> > > >
> > > > I also have in my lib/CMakeLists.txt file ${GNURADIO_ALL_LIBRARIES}
> in both target_link_libraries() lists.
> > > >
> > > > I have "#include " in my header file.
> > > >
> > > > But for some reason, it doesn't seem to link gnuradio-uhd:
> > > >
> > > > readelf -d /home/user/gr/lib/libgnuradio-myproj-1.0.0git.so.0.0.0
> > > >
> > > >  0x0001 (NEEDED) Shared library:
> [libboost_system.so.1.58.0]
> > > >  0x0001 (NEEDED) Shared library:
> [libgnuradio-runtime-3.7.11.1-as.so.0.0.0]
> > > >  0x0001 (NEEDED) Shared library:
> [libgnuradio-pmt-3.7.11.1-as.so.0.0.0]
> > > >  0x0001 (NEEDED) Shared library:
> [liblog4cpp.so.5]
> > > >  0x0001 (NEEDED) Shared library:
> [libgnuradio-filter-3.7.11.1-as.so.0.0.0]
> > > >  0x0001 (NEEDED) Shared library:
> [libstdc++.so.6]
> > > >  0x0001 (NEEDED) Shared library: [libm.so.6]
> > > >  0x0001 (NEEDED) Shared library:
> [libgcc_s.so.1]
> > > >  0x0001 (NEEDED) Shared library: 

Re: [Discuss-gnuradio] Error Linking UHD

2018-06-19 Thread CEL
add a "message ()" directive that prints the GNURADIO_ALL_LIBRARIES
that is actually used in your lib/CMakeLists.txt. If that is wrong:

Move your OOT's cmake/Modules/* out of the way – I do not endorse the
fact that we're distributing copies of all the GNU Radio CMake scripts 
with our OOT template, as these might outdate locally. 

I must admit I don't have an OOT where I test gr-uhd linkage myself.

Best regards,
Marcus

On Tue, 2018-06-19 at 14:42 +0300, Gilad Beeri (ApolloShield) wrote:
> I've done "rm -rf build/*" and "pushd build; cmake  ../; and make -j7; and 
> make install; popd" ~ 50 times since yesterday :)
> 
> Any suggestions for debugging it?
> 
> On Tue, Jun 19, 2018 at 2:33 PM Müller, Marcus (CEL)  wrote:
> > I must admit this is surprising to me, as the line of code where
> > LIBS=... is printed is pretty integrally coupled to the line that
> > specifies what GNURADIO_ALL_LIBRARIES is. Maybe CMake got confused?
> > I know this is kind of a "haveyoutriedturningitoffandonagain" answer,
> > but have you tried completely rm'ing your build/ directory and letting
> > CMake run anew?
> > 
> > Best regards,
> > Marcus
> > 
> > :e ../cmake/Modules/FindG   On Tue, 2018-06-19 at 14:19 +0300,
> > Gilad Beeri (ApolloShield) wrote:
> > > I have a similar problem as described in 
> > > https://lists.gnu.org/archive/html/discuss-gnuradio/2015-05/msg00195.html.
> > > 
> > > When I try to run tests (with Python), I get:
> > > 
> > > Traceback (most recent call last):
> > >   File "python/myblock.py", line 12, in 
> > > from myproj.myproj_swig import mitigation_source
> > >   File "/home/user/gr/lib/python2.7/site-packages/myproj/myproj_swig.py", 
> > > line 28, in 
> > > _myproj_swig = swig_import_helper()
> > >   File "/home/user/gr/lib/python2.7/site-packages/myproj/myproj_swig.py", 
> > > line 24, in swig_import_helper
> > > _mod = imp.load_module('_myproj_swig', fp, pathname, description)
> > > ImportError: /home/user/gr/lib/libgnuradio-myproj-1.0.0git.so.0.0.0: 
> > > undefined symbol: _ZN3uhd11time_spec_tC1Eld
> > > 
> > > 
> > > I did add "UHD" to the line starting with "set(GR_REQUIRED_COMPONENTS" 
> > > (in my root CMakeLists.txt) so I get the output of
> > > 
> > > Checking for GNU Radio Module: UHD
> > > -- Checking for module 'gnuradio-uhd'
> > > --   Found gnuradio-uhd, version 3.7.11.1-as
> > >  * INCLUDES=/home/user/gr/include
> > >  * 
> > > LIBS=/home/user/gr/lib/libgnuradio-uhd.so;/home/user/gr/lib/libgnuradio-runtime.so;/home/user/gr/lib/libgnuradio-pmt.so;/usr/lib/liblog4cpp.so
> > > -- Found GNURADIO_UHD: 
> > > /home/user/gr/lib/libgnuradio-uhd.so;/home/user/gr/lib/libgnuradio-runtime.so;/home/user/gr/lib/libgnuradio-pmt.so;/usr/lib/liblog4cpp.so
> > >   
> > > GNURADIO_UHD_FOUND = TRUE
> > > 
> > > I also have in my lib/CMakeLists.txt file ${GNURADIO_ALL_LIBRARIES} in 
> > > both target_link_libraries() lists.
> > > 
> > > I have "#include " in my header file.
> > > 
> > > But for some reason, it doesn't seem to link gnuradio-uhd:
> > > 
> > > readelf -d /home/user/gr/lib/libgnuradio-myproj-1.0.0git.so.0.0.0
> > > 
> > >  0x0001 (NEEDED) Shared library: 
> > > [libboost_system.so.1.58.0]
> > >  0x0001 (NEEDED) Shared library: 
> > > [libgnuradio-runtime-3.7.11.1-as.so.0.0.0]
> > >  0x0001 (NEEDED) Shared library: 
> > > [libgnuradio-pmt-3.7.11.1-as.so.0.0.0]
> > >  0x0001 (NEEDED) Shared library: [liblog4cpp.so.5]
> > >  0x0001 (NEEDED) Shared library: 
> > > [libgnuradio-filter-3.7.11.1-as.so.0.0.0]
> > >  0x0001 (NEEDED) Shared library: [libstdc++.so.6]
> > >  0x0001 (NEEDED) Shared library: [libm.so.6]
> > >  0x0001 (NEEDED) Shared library: [libgcc_s.so.1]
> > >  0x0001 (NEEDED) Shared library: [libc.so.6]
> > >  0x000e (SONAME) Library soname: 
> > > [libgnuradio-myproj-1.0.0git.so.0.0.0]
> > > ___
> > > Discuss-gnuradio mailing list
> > > Discuss-gnuradio@gnu.org
> > > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

smime.p7s
Description: S/MIME cryptographic signature
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Error Linking UHD

2018-06-19 Thread Gilad Beeri (ApolloShield)
I've done "rm -rf build/*" and "pushd build; cmake  ../; and make -j7; and
make install; popd" ~ 50 times since yesterday :)

Any suggestions for debugging it?

On Tue, Jun 19, 2018 at 2:33 PM Müller, Marcus (CEL) 
wrote:

> I must admit this is surprising to me, as the line of code where
> LIBS=... is printed is pretty integrally coupled to the line that
> specifies what GNURADIO_ALL_LIBRARIES is. Maybe CMake got confused?
> I know this is kind of a "haveyoutriedturningitoffandonagain" answer,
> but have you tried completely rm'ing your build/ directory and letting
> CMake run anew?
>
> Best regards,
> Marcus
>
> :e ../cmake/Modules/FindG   On Tue, 2018-06-19 at 14:19 +0300,
> Gilad Beeri (ApolloShield) wrote:
> > I have a similar problem as described in
> https://lists.gnu.org/archive/html/discuss-gnuradio/2015-05/msg00195.html.
> >
> > When I try to run tests (with Python), I get:
> >
> > Traceback (most recent call last):
> >   File "python/myblock.py", line 12, in 
> > from myproj.myproj_swig import mitigation_source
> >   File
> "/home/user/gr/lib/python2.7/site-packages/myproj/myproj_swig.py", line 28,
> in 
> > _myproj_swig = swig_import_helper()
> >   File
> "/home/user/gr/lib/python2.7/site-packages/myproj/myproj_swig.py", line 24,
> in swig_import_helper
> > _mod = imp.load_module('_myproj_swig', fp, pathname, description)
> > ImportError: /home/user/gr/lib/libgnuradio-myproj-1.0.0git.so.0.0.0:
> undefined symbol: _ZN3uhd11time_spec_tC1Eld
> >
> >
> > I did add "UHD" to the line starting with "set(GR_REQUIRED_COMPONENTS"
> (in my root CMakeLists.txt) so I get the output of
> >
> > Checking for GNU Radio Module: UHD
> > -- Checking for module 'gnuradio-uhd'
> > --   Found gnuradio-uhd, version 3.7.11.1-as
> >  * INCLUDES=/home/user/gr/include
> >  *
> LIBS=/home/user/gr/lib/libgnuradio-uhd.so;/home/user/gr/lib/libgnuradio-runtime.so;/home/user/gr/lib/libgnuradio-pmt.so;/usr/lib/liblog4cpp.so
> > -- Found GNURADIO_UHD:
> /home/user/gr/lib/libgnuradio-uhd.so;/home/user/gr/lib/libgnuradio-runtime.so;/home/user/gr/lib/libgnuradio-pmt.so;/usr/lib/liblog4cpp.so
>
> > GNURADIO_UHD_FOUND = TRUE
> >
> > I also have in my lib/CMakeLists.txt file ${GNURADIO_ALL_LIBRARIES} in
> both target_link_libraries() lists.
> >
> > I have "#include " in my header file.
> >
> > But for some reason, it doesn't seem to link gnuradio-uhd:
> >
> > readelf -d /home/user/gr/lib/libgnuradio-myproj-1.0.0git.so.0.0.0
> >
> >  0x0001 (NEEDED) Shared library:
> [libboost_system.so.1.58.0]
> >  0x0001 (NEEDED) Shared library:
> [libgnuradio-runtime-3.7.11.1-as.so.0.0.0]
> >  0x0001 (NEEDED) Shared library:
> [libgnuradio-pmt-3.7.11.1-as.so.0.0.0]
> >  0x0001 (NEEDED) Shared library:
> [liblog4cpp.so.5]
> >  0x0001 (NEEDED) Shared library:
> [libgnuradio-filter-3.7.11.1-as.so.0.0.0]
> >  0x0001 (NEEDED) Shared library: [libstdc++.so.6]
> >  0x0001 (NEEDED) Shared library: [libm.so.6]
> >  0x0001 (NEEDED) Shared library: [libgcc_s.so.1]
> >  0x0001 (NEEDED) Shared library: [libc.so.6]
> >  0x000e (SONAME) Library soname:
> [libgnuradio-myproj-1.0.0git.so.0.0.0]
> > ___
> > 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] Error Linking UHD

2018-06-19 Thread CEL
I must admit this is surprising to me, as the line of code where
LIBS=... is printed is pretty integrally coupled to the line that
specifies what GNURADIO_ALL_LIBRARIES is. Maybe CMake got confused?
I know this is kind of a "haveyoutriedturningitoffandonagain" answer,
but have you tried completely rm'ing your build/ directory and letting
CMake run anew?

Best regards,
Marcus

:e ../cmake/Modules/FindG   On Tue, 2018-06-19 at 14:19 +0300,
Gilad Beeri (ApolloShield) wrote:
> I have a similar problem as described in 
> https://lists.gnu.org/archive/html/discuss-gnuradio/2015-05/msg00195.html.
> 
> When I try to run tests (with Python), I get:
> 
> Traceback (most recent call last):
>   File "python/myblock.py", line 12, in 
> from myproj.myproj_swig import mitigation_source
>   File "/home/user/gr/lib/python2.7/site-packages/myproj/myproj_swig.py", 
> line 28, in 
> _myproj_swig = swig_import_helper()
>   File "/home/user/gr/lib/python2.7/site-packages/myproj/myproj_swig.py", 
> line 24, in swig_import_helper
> _mod = imp.load_module('_myproj_swig', fp, pathname, description)
> ImportError: /home/user/gr/lib/libgnuradio-myproj-1.0.0git.so.0.0.0: 
> undefined symbol: _ZN3uhd11time_spec_tC1Eld
> 
> 
> I did add "UHD" to the line starting with "set(GR_REQUIRED_COMPONENTS" (in my 
> root CMakeLists.txt) so I get the output of
> 
> Checking for GNU Radio Module: UHD
> -- Checking for module 'gnuradio-uhd'
> --   Found gnuradio-uhd, version 3.7.11.1-as
>  * INCLUDES=/home/user/gr/include
>  * 
> LIBS=/home/user/gr/lib/libgnuradio-uhd.so;/home/user/gr/lib/libgnuradio-runtime.so;/home/user/gr/lib/libgnuradio-pmt.so;/usr/lib/liblog4cpp.so
> -- Found GNURADIO_UHD: 
> /home/user/gr/lib/libgnuradio-uhd.so;/home/user/gr/lib/libgnuradio-runtime.so;/home/user/gr/lib/libgnuradio-pmt.so;/usr/lib/liblog4cpp.so
>   
> GNURADIO_UHD_FOUND = TRUE
> 
> I also have in my lib/CMakeLists.txt file ${GNURADIO_ALL_LIBRARIES} in both 
> target_link_libraries() lists.
> 
> I have "#include " in my header file.
> 
> But for some reason, it doesn't seem to link gnuradio-uhd:
> 
> readelf -d /home/user/gr/lib/libgnuradio-myproj-1.0.0git.so.0.0.0
> 
>  0x0001 (NEEDED) Shared library: 
> [libboost_system.so.1.58.0]
>  0x0001 (NEEDED) Shared library: 
> [libgnuradio-runtime-3.7.11.1-as.so.0.0.0]
>  0x0001 (NEEDED) Shared library: 
> [libgnuradio-pmt-3.7.11.1-as.so.0.0.0]
>  0x0001 (NEEDED) Shared library: [liblog4cpp.so.5]
>  0x0001 (NEEDED) Shared library: 
> [libgnuradio-filter-3.7.11.1-as.so.0.0.0]
>  0x0001 (NEEDED) Shared library: [libstdc++.so.6]
>  0x0001 (NEEDED) Shared library: [libm.so.6]
>  0x0001 (NEEDED) Shared library: [libgcc_s.so.1]
>  0x0001 (NEEDED) Shared library: [libc.so.6]
>  0x000e (SONAME) Library soname: 
> [libgnuradio-myproj-1.0.0git.so.0.0.0]
> ___
> Discuss-gnuradio mailing list
> Discuss-gnuradio@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

smime.p7s
Description: S/MIME cryptographic signature
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] Error Linking UHD

2018-06-19 Thread Gilad Beeri (ApolloShield)
I have a similar problem as described in
https://lists.gnu.org/archive/html/discuss-gnuradio/2015-05/msg00195.html.

When I try to run tests (with Python), I get:

*Traceback (most recent call last):*
*  File "python/myblock.py", line 12, in *
*from myproj.myproj_swig import mitigation_source*
*  File "/home/user/gr/lib/python2.7/site-packages/myproj/myproj_swig.py",
line 28, in *
*_myproj_swig = swig_import_helper()*
*  File "/home/user/gr/lib/python2.7/site-packages/myproj/myproj_swig.py",
line 24, in swig_import_helper*
*_mod = imp.load_module('_myproj_swig', fp, pathname, description)*
*ImportError: /home/user/gr/lib/libgnuradio-myproj-1.0.0git.so.0.0.0:
undefined symbol: _ZN3uhd11time_spec_tC1Eld*


I did add "UHD" to the line starting with "set(GR_REQUIRED_COMPONENTS" (in
my root CMakeLists.txt) so I get the output of

*Checking for GNU Radio Module: UHD*
*-- Checking for module 'gnuradio-uhd'*
*--   Found gnuradio-uhd, version 3.7.11.1-as*
* * INCLUDES=/home/user/gr/include*
* *
LIBS=/home/user/gr/lib/libgnuradio-uhd.so;/home/user/gr/lib/libgnuradio-runtime.so;/home/user/gr/lib/libgnuradio-pmt.so;/usr/lib/liblog4cpp.so*
*-- Found GNURADIO_UHD:
/home/user/gr/lib/libgnuradio-uhd.so;/home/user/gr/lib/libgnuradio-runtime.so;/home/user/gr/lib/libgnuradio-pmt.so;/usr/lib/liblog4cpp.so
 *
*GNURADIO_UHD_FOUND = TRUE*

I also have in my lib/CMakeLists.txt file ${GNURADIO_ALL_LIBRARIES} in
both target_link_libraries() lists.

I have "#include " in my header file.

But for some reason, it doesn't seem to link gnuradio-uhd:

*readelf -d /home/user/gr/lib/libgnuradio-myproj-1.0.0git.so.0.0.0*

* 0x0001 (NEEDED) Shared library:
[libboost_system.so.1.58.0]*
* 0x0001 (NEEDED) Shared library:
[libgnuradio-runtime-3.7.11.1-as.so.0.0.0]*
* 0x0001 (NEEDED) Shared library:
[libgnuradio-pmt-3.7.11.1-as.so.0.0.0]*
* 0x0001 (NEEDED) Shared library: [liblog4cpp.so.5]*
* 0x0001 (NEEDED) Shared library:
[libgnuradio-filter-3.7.11.1-as.so.0.0.0]*
* 0x0001 (NEEDED) Shared library: [libstdc++.so.6]*
* 0x0001 (NEEDED) Shared library: [libm.so.6]*
* 0x0001 (NEEDED) Shared library: [libgcc_s.so.1]*
* 0x0001 (NEEDED) Shared library: [libc.so.6]*
* 0x000e (SONAME) Library soname:
[libgnuradio-myproj-1.0.0git.so.0.0.0]*
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Unable to see GSM signals in USRP Spectrum Scanner (FFT)

2018-06-19 Thread Amrit Zoad
Hello Mr. Müller,

Thanks a lot for the reply! Everything is clear now.

Best regards,

Amrit Zoad


On Mon, Jun 18, 2018 at 1:21 PM Müller, Marcus (CEL) 
wrote:

> Hi Amrit,
>
> Well, usrp_spectrum_sense is a hopping observer, and GSM is a hopping
> system: your probability of intercept is rather low.
>
> Your probability of intercept is in fact, really zero, if your phone
> doesn't do GSM (2G), but uses 3G (UMTS) or 4G (LTE): these use other
> frequencies altogether. So, make sure your phone really does do GSM.
>
> You also don't even have to look at the GSM900 uplink at all:
> Telefonica (which Aldi resells) doesn't use that band at all.
>
> The spectrum sense application is really badly suited for this kind of
> task, as it hops: Instead, simply look at the whole band at once. A
> simple GNU Radio Companion flow graph connecting the USRP source (samp
> rate = total uplink bandwidth) to a Qt GUI Frequency Sink would make
> more sense.
>
> A word of secondary advice: If you're planning to experiment with 2G
> networks of your own, or doing something about the basic properties of
> microwave propagation and so on, observing spectrum of GSM is a
> worthwhile thing to do. Just be warned that it will be increasingly
> hard to find GSM signals "in the wild": T-Mobile will switch off GSM
> end-of-2020, and thus, up to then, all phones that can do both LTE and
> GSM will be instructed to use LTE whenever possible. Since there won't
> be much Machine-to-Machine GSM-only  (which I assume are the primary
> users that won't be able to switch) user equipment in cities, you'll
> see that increasingly many phones don't use GSM anymore at all – even
> if the network still exists; the calculation is very simple: The amount
> of spectrum necessary to let a single user do a GSM phone call is worth
> MB/s for a lot of LTE users. Thus, everybody not using GSM is desirable
> for network operators.
>
> Best regards,
> Marcus
>
> On Mon, 2018-06-18 at 11:25 +0200, Amrit Zoad wrote:
> > Greetings everyone,
> >
> > I hope everyone is having a good day.
> >
> > I have installed GNURadio 3.7 and I wanted to see the GSM signals of my
> phone (when I call someone) with the application "USRP Spectrum Scanner
> (FFT)". But, I was unable to see any fluctiations in the spectrum from 890
> MHz to 915 MHz & 1710 MHz to 1785 MHz. My location is in Germany and I own
> a sim card of Aldi Talk (MEDIONmobile).
> >
> > Then I tried with my phone's Bluetooth 5.0 and I could see the frequency
> hopping from 2.4 GHz to 2.44 GHz along with the light Wi-Fi signals in the
> spectrum.
> >
> > I have the Etttus Research USRP B210 with Bandwidth of 56 MHz (of the
> front-end filter) and thus I am setting the sampling rate to 40 MHz. The
> antenna also works from 850 MHz to 6.5 GHz. so no problem with that as well.
> >
> > What could be reason for me not able to see my phone's GSM signals in
> the spectrum scanner?
> > Your help would be very valuable.
> >
> > Best regards,
> > Amrit Zoad
> > +49 177 8474550 <+49%20177%208474550>
> >
> > ___
> > Discuss-gnuradio mailing list
> > Discuss-gnuradio@gnu.org
> > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

-- 

Best regards,

Amrit Zoad
+49 177 8474550
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio