This is because all the things you use are from a very old version of GNU Radio. You will have to re-write it from scratch, basically.
On 06.12.2015 01:49, Rama V wrote: > Hi, > I am trying to implement a specific application wherein the code > senses for the free channel/frequency band where the usrp can send the > data and again sense for a free channel to send the data and so on. If > the channel is in use, then it should skip the particular channel and > then again sense for a free band. I am writing my own code for this > and is not any other code installed from the Gnu-radio. When I try to > run the code, it says > > Import error: cannot import name usrp > > I have set the Python environment to > /usr/local/lib/python2.7/dist-packages. But I do not know how exactly > I can solve for the error. Please kindly suggest. I would appreciate > that. I am attaching the code for your purposes. > Thank you. > > Regards, > Dave > > On Sun, Nov 29, 2015 at 3:30 PM, Rama V <[email protected] > <mailto:[email protected]>> wrote: > > Hey Marcus, > Thanks for the reply. But the above program is for a specific > application. It can be used for detecting which frequency band is > available and then sending data in that particular > channel/frequency band. I have tried using the application that > has come with GNU Radio "usrp_spectrum_sense.py" which senses for > free center frequency bands available. The > "usrp_spectrum_sense_tx.py" does the above mentioned operation. So > the python file I try to run does not work with the installed GNU > Radio? If so, what can I do? Please suggest. For your convenience, > I am attaching the spectrum sensing python file. I am sorry if I > am not being so explicable. > > Thank you > > Regards, > Dave > > On Thu, Nov 26, 2015 at 2:26 AM, Marcus Müller > <[email protected] <mailto:[email protected]>> wrote: > > Hi Dave, > > like the last times with benchmark_tx, this script is > something you copied from somewhere else and doesn't work with > the version you have installed. > Why do you keep doing this? > Use the scripts that work with your *current* version of GNU > Radio. This one, like benchmark_tx, is contained in your GNU > Radio installation itself, and probably got installed to > /usr/[local/]share/gnuradio/examples/uhd. > > Best regards, > Marcus > > > On 26.11.2015 01:42, Rama V wrote: >> Hi, >> I am trying to compile a file namely >> usrp_spectrum_sense_tx.py but it says the following error >> message: >> >> Traceback (most recent call last): >> File "./usrp_spectrum_sense_tx.py", line 180, in <module> >> from gnuradio import gr, gru, eng_notation, optfir, window >> ImportError: cannot import name optfir >> >> It is showing an ImportError. I need to sense the channel and >> send the data on the available channel. I have set my >> PYTHONPATH to dist-packages. Is there any specific mistake I >> am unable to see? Please suggest. Any help is appreciated. >> >> Thank you, >> >> Regards, >> Dave >> >> >> _______________________________________________ >> Discuss-gnuradio mailing list >> [email protected] <mailto:[email protected]> >> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio > > > _______________________________________________ > Discuss-gnuradio mailing list > [email protected] <mailto:[email protected]> > https://lists.gnu.org/mailman/listinfo/discuss-gnuradio > > >
_______________________________________________ Discuss-gnuradio mailing list [email protected] https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
