Send USRP-users mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of USRP-users digest..."
Today's Topics:
1. Re: about compling the uhd files (Liang Chen)
2. How to stop "usrp_spectrum_sense.py"? (Syed Aqeel Raza)
----------------------------------------------------------------------
Message: 1
Date: Sat, 29 Mar 2014 20:43:02 +0100
From: Liang Chen <[email protected]>
To: Marcus M?ller <[email protected]>
Cc: usrp-users <[email protected]>
Subject: Re: [USRP-users] about compling the uhd files
Message-ID:
<caegr+jtu+vp41bo8ce+jibfhv8nde9mcru170fxi6o+dsa2...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
Thank you Marcus.
I finally have solved the problem now by taking using cmake.
It took a little bit longer time, but anyway, it worked.
Many thanks and best regards,
Liang
2014-03-29 14:53 GMT+01:00 Marcus M?ller <[email protected]>:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi Liang,
>
> the rx_samples_to_file.cpp is part of the UHD source code tree.
> When you build UHD from source, you will find the executable in the
> build/examples directory.
>
> For instructions on how to build UHD, see
> http://files.ettus.com/uhd_docs/manual/html/build.html
>
> I'm very sorry if I can't be of great assistance at helping
> understanding build systems.
>
> Greetings,
> Marcus
>
> PS: always reply to the mailing list as whole, because I'm busy right
> now and noticed your reply just by accident ;)
>
> On 29.03.2014 13:58, Liang Chen wrote:
> > Dear Marcus, Thank you for your reply.
> >
> > Actually, as a very beginner of Unix, I do not either know how to
> > link the uhd library with the obj. file or use the standard CMake
> > file. Can you explain more on it. How could I do to build the .ext
> > file. Or, even you can provide some key words for me, so that I
> > can google it, that will also help me.
> >
> > Many thanks.
> >
> > Liang
> >
> >
> >
> > 2014-03-29 10:41 GMT+01:00 Marcus M?ller <[email protected]>:
> >
> > Hi Liang,
> >
> >>>> May I ask what is the problem with the second step?
> > you will have to actually link against the UHD libraries. You don't
> > do that, that's why the output to an executable can't work.
> >
> > C++ programs can be compiled to machine code with references to
> > external symbols (i.e. function calls), that's what your first
> > step does, but these symbols have to resolved later on, and that's
> > what your second step should be doing.
> >
> > However, usually you use a build system like CMake to configure
> > your compiler etc correctly to link against all necessary files.
> >
> > Since you're taking a program from the UHD source tree, you could
> > just use the standard CMake method to build uhd.
> >
> > Greetings, Marcus
> >
> > On 29.03.2014 10:24, Liang Chen wrote:
> >>>> Hello again,
> >>>>
> >>>> To be morre specific,
> >>>>
> >>>> I tried the following two steps: g++ -c -Wall -g
> >>>> rx_samples_to_file.cpp (this step is ok and .o is generated)
> >>>> g++ -g -o rx_test.exe rx_samples_to_file.o ( errors, e.g.
> >>>> undefined reference to `uhd::sensor_value_t::to_bool( )
> >>>> const', `uhd::set_thread_priority_safe(float, bool)' , etc)
> >>>>
> >
> >>>>
> >>>> Many thanks.
> >>>>
> >>>> Liang
> >>>>
> >>>>
> >>>> 2014-03-29 9:23 GMT+01:00 Liang Chen
> >>>> <[email protected]>:
> >>>>
> >>>>> Hi, USRP Community,
> >>>>>
> >>>>> I tried to compile an uhd example file:
> >>>>> rx_samples_to_file.cpp with gcc or eclipse IDE. I got a
> >>>>> "full screen" errors. I did not change anything from the
> >>>>> example file while Most of the errros are undefined
> >>>>> reference to ..... , e.g. undefined reference to
> >>>>> `uhd::sensor_value_t::to_bool() const' undefined reference
> >>>>> to `uhd::set_thread_priority_safe(float, bool)' undefined
> >>>>> reference to
> >>>>> `boost::program_options::options_description::m_default_line_length
> >>>>>
> >>>>>
> >>>>>
> >
> >>>>>
> The UHD might be correctly installed because my computer can sample files
> >>>>> with USRP N210 very well.
> >>>>>
> >>>>> I use Ubantu system, but I am very new for the ubantu and
> >>>>> also gcc compling in unix. Hope the community can help me.
> >>>>>
> >>>>> The reason why I compile the provided example function is
> >>>>> that, later, I would do some modification on the file and
> >>>>> try to add some new function in it.
> >>>>>
> >>>>> Great thanks and best regards,
> >>>>>
> >>>>> Liang
> >>>>>
> >>>>>
> >>>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> _______________________________________________ USRP-users
> >>>> mailing list [email protected]
> >>>> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
> >>>>
> >>
> >>
> >>>>
> _______________________________________________
> >> USRP-users mailing list [email protected]
> >> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
> >>
> >
> >>
> >
> >
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1
> Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
>
> iQEcBAEBAgAGBQJTNtBmAAoJEBQ6EdjyzlHty94IAL/SzYXsFWHgwmBZVHDf6RQz
> fypJ+9dYO0MuVO84Ta5Hi9K42JpcaTCrutrae6LSSQhDTr9yvaSoNdEoixI/f6PN
> 1TiFTeCPxMAotPuqkgMUlpcMAJXT2chnadzryDi2IubsZB9+VCmpUBtCGtWlcScE
> LKSR8XI03Z6C6R0Qc1Vt/rAPBfIbN/MyjzQaL78Y5xHwXpJhVDEtv1bNfPuBacoG
> 6tYKzzLQ55jpU3Mxvn13D7d3HXPaDm126AymKI4suwp7dt99azZEREygzZr5pu/F
> lUhheIrGt8ajOlaQrWbMhIqjU+fVCzh2K03hTm3vkOwEA8KcRwIkv5dNnjAnOAU=
> =mhsr
> -----END PGP SIGNATURE-----
>
--
Chen Liang
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/attachments/20140329/e06d770b/attachment-0001.html>
------------------------------
Message: 2
Date: Sun, 30 Mar 2014 16:25:51 +0800
From: Syed Aqeel Raza <[email protected]>
To: [email protected]
Subject: [USRP-users] How to stop "usrp_spectrum_sense.py"?
Message-ID:
<caga9icbzb4qhfom7e4s0pnfufzuv3rf_wrycjjwg42bvrci...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
Hi Everyone,
The "usrp_spectrum_sense.py" program is used to sense the defined spectrum
range. Now, I want to stop it for a period of five second time (e.g. from
55 to 59 seconds). For that purpose, I wrote the following lines in python.
================================================
import usrp_spectrum_sense_updated
import time
class main_class():
# calling the 'usrp_spectrum_sense.py' program
def relay_func(self, tb):
while 1:
curr_time = time.strftime('%S',time.localtime())
if int(curr_time)>=55:
print 'Hello World"
else:
t = usrp_spectrum_sense_updated.ThreadClass()
t.start()
tb = usrp_spectrum_sense_updated.my_top_block()
try:
tb.start()
usrp_spectrum_sense_updated.main_loop(tb)
except KeyboardInterrupt:
pass
if __name__ == '__main__':
tb = main_class()
tb.relay_func(tb)
================================================
In the above program, I tried to stop sensing for the duration of 5 seconds
(i.e. 55 ---- 59 seconds). The program works fine whenever I execute it in
between of the mentioned time and it shift automatically to the sensing
mode at time=0 second; but once it start sensing then it never be returned
to the print message 'hello world' even when the condition is matched.
Earliest and kind response is highly appreciated. Thanks.
Regards,
Syed Aqeel Raza
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/attachments/20140330/7598179b/attachment-0001.html>
------------------------------
Subject: Digest Footer
_______________________________________________
USRP-users mailing list
[email protected]
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
------------------------------
End of USRP-users Digest, Vol 43, Issue 30
******************************************