Hi, I am trying to modify "USRP_Spectrum_Sense.py", in way that I can display the received signal's spectrum using "fftsink2.fft_sink_c" present in "gnuradio.wxgui". I have put top block stuffs in the below class that inherits stdgui2.std_top_block instead of inheriting "gr.top_block".
class my_top_block(stdgui2.std_top_block): def __init__(self,frame,panel,vbox,argv): . . . . . . main_loop(self); (Here I call main loop with self as an instance) I did not change anything within main_loop(). It goes as usual as below.. def main_loop(tb): def bin_freq(i_bin, center_freq): #hz_per_bin = tb.usrp_rate / tb.fft_size freq = center_freq - (tb.usrp_rate / 2) + (tb.channel_bandwidth * i_bin) #print "freq original:",freq #freq = nearest_freq(freq, tb.channel_bandwidth) #print "freq rounded:",freq return freq . . . . . . and calling of the "__init__()" function of the class my_top_block() is happening in the below code. if __name__ == '__main__': t = ThreadClass() t.start() app = stdgui2.stdapp(my_top_block,"USRP Spectrum Sensing") try: app.MainLoop() except KeyboardInterrupt: pass When I run it, execution gets hanged. I tried debugging line by line, I guess the execution stops at "parse_msg()" function call. What is the issue? Can I inherit "sdtgui2.std_top_block"? and, what is the way to display spectrum, while sensing goes on? Could somebody, please help me in this regard? Also, I see a warning as below ""Warning: this may have issues on some machines+Python version combinations to seg fault due to the callback in bin_statitics.\n\n"" In which machine and python version, the above mentioned seg fault will arise? My machine runs some time, and does not run sometime. Regards Chris Clement VIT – Ranked No.13 in Engineering Institution by MHRD, Govt. of India – NIRF Ranking consecutively for two years, 2016 and 2017. VIT – Ranked No.17 in Management Institution by MHRD, Govt. of India – NIRF Ranking consecutively for two years, 2016 and 2017. VIT is the first University in India to get 4-STAR rating from QS, the international ranking agency. VIT has been adjudged as the “University of the year 2016” by the corporate body FICCI. ________________________________________ From: Christopher Clement J Sent: Wednesday, October 10, 2018 10:50 AM To: Prabhat Kumar Rai Subject: Re: Kindly clarify this issue in GNUradio Thank you VIT – Ranked No.13 in Engineering Institution by MHRD, Govt. of India – NIRF Ranking consecutively for two years, 2016 and 2017. VIT – Ranked No.17 in Management Institution by MHRD, Govt. of India – NIRF Ranking consecutively for two years, 2016 and 2017. VIT is the first University in India to get 4-STAR rating from QS, the international ranking agency. VIT has been adjudged as the “University of the year 2016” by the corporate body FICCI. ________________________________________ From: Prabhat Kumar Rai <ee18mtech01...@iith.ac.in> Sent: Wednesday, October 10, 2018 10:42 AM To: Christopher Clement J Subject: Re: Kindly clarify this issue in GNUradio Google the OOT module that might help you. On Wed, Oct 10, 2018 at 10:36 AM Christopher Clement J <christopher.clem...@vit.ac.in> wrote: > > > Thank You, sure I will do.... > > > Another one, while writing Python code for GNU radio applications, how to > know which module is within which other module or package? How to find, which > class to inherit? and which method to use? I am bit stuck up in that. > > Thanks and Regards > J. Christopher Clement > > > > VIT – Ranked No.13 in Engineering Institution by MHRD, Govt. of India – NIRF > Ranking consecutively for two years, 2016 and 2017. > VIT – Ranked No.17 in Management Institution by MHRD, Govt. of India – NIRF > Ranking consecutively for two years, 2016 and 2017. > VIT is the first University in India to get 4-STAR rating from QS, the > international ranking agency. > VIT has been adjudged as the “University of the year 2016” by the corporate > body FICCI. > > ________________________________________ > From: Prabhat Kumar Rai <ee18mtech01...@iith.ac.in> > Sent: Tuesday, October 9, 2018 3:49 PM > To: Christopher Clement J > Subject: Re: Kindly clarify this issue in GNUradio > > Sorry I have no idea about Functionprobe and Python module linking. > Please ask the same in mailing list. > On Mon, Oct 8, 2018 at 10:09 AM Christopher Clement J > <christopher.clem...@vit.ac.in> wrote: > > > > Hi Prabhat, > > > > I try to use "Function probe" block and "Python Module" block. > > > > My idea is to probe a function in "Python Module" block and sets a ID of a > > "Function Probe" block with the function return value of "Python Module" > > block. Block details are as follows.. > > > > > > Function Probe > > > > ID: cos_ampl > > Block Id: Check_Probe > > Function Name: Cos_Ampl > > Poll Rate: 100 Hz > > > > > > > > Python Module > > ID: Check_Probe > > > > > > Python Module code conatins > > > > def Cos_Ampl(): > > return 10; > > > > I am expecting the flow graph to generate a cosine wave of amplitude 10. > > But it is not doing so. Is it possible to link "Function probe" and "Python > > Module". > > > > > > > > > > Regards > > Chris Clement > > > > > > > > > > > > > > VIT – Ranked No.13 in Engineering Institution by MHRD, Govt. of India – > > NIRF Ranking consecutively for two years, 2016 and 2017. > > VIT – Ranked No.17 in Management Institution by MHRD, Govt. of India – NIRF > > Ranking consecutively for two years, 2016 and 2017. > > VIT is the first University in India to get 4-STAR rating from QS, the > > international ranking agency. > > VIT has been adjudged as the “University of the year 2016” by the corporate > > body FICCI. > > > > ________________________________________ > > From: Prabhat Kumar Rai <ee18mtech01...@iith.ac.in> > > Sent: Thursday, October 4, 2018 8:16 PM > > To: Christopher Clement J > > Subject: Re: Kindly clarify this issue in GNUradio > > > > you're welcome > > On Thu, Oct 4, 2018 at 8:15 PM Christopher Clement J > > <christopher.clem...@vit.ac.in> wrote: > > > > > > Thank you Prabhat, > > > > > > I did and found the name. I used name as device address instead of IP > > > address. it is working now. > > > > > > Thanks again > > > > > > Regards > > > Chris > > > > > > > > > > > > > > > VIT – Ranked No.13 in Engineering Institution by MHRD, Govt. of India – > > > NIRF Ranking consecutively for two years, 2016 and 2017. > > > VIT – Ranked No.17 in Management Institution by MHRD, Govt. of India – > > > NIRF Ranking consecutively for two years, 2016 and 2017. > > > VIT is the first University in India to get 4-STAR rating from QS, the > > > international ranking agency. > > > VIT has been adjudged as the “University of the year 2016” by the > > > corporate body FICCI. > > > > > > ________________________________________ > > > From: Prabhat Kumar Rai <ee18mtech01...@iith.ac.in> > > > Sent: Thursday, October 4, 2018 6:05 PM > > > To: Christopher Clement J > > > Subject: Re: Kindly clarify this issue in GNUradio > > > > > > try running uhd_usrp_probe or uhd_find_devices on your terminal > > > On Thu, Oct 4, 2018 at 12:24 PM Christopher Clement J > > > <christopher.clem...@vit.ac.in> wrote: > > > > > > > > Hi Prabhat, > > > > > > > > I am now trying with USRP in GNU radio. > > > > > > > > Can you please tell me, What is to be given in the device address > > > > filed, if i use USRP? > > > > > > > > Regards > > > > J. Christopher Clement > > > > > > > > > > > > VIT – Ranked No.13 in Engineering Institution by MHRD, Govt. of India – > > > > NIRF Ranking consecutively for two years, 2016 and 2017. > > > > VIT – Ranked No.17 in Management Institution by MHRD, Govt. of India – > > > > NIRF Ranking consecutively for two years, 2016 and 2017. > > > > VIT is the first University in India to get 4-STAR rating from QS, the > > > > international ranking agency. > > > > VIT has been adjudged as the “University of the year 2016” by the > > > > corporate body FICCI. > > > > > > > > ________________________________________ > > > > From: Prabhat Kumar Rai <ee18mtech01...@iith.ac.in> > > > > Sent: Tuesday, September 4, 2018 12:51 PM > > > > To: Christopher Clement J > > > > Subject: Re: Kindly clarify this issue in GNUradio > > > > > > > > It's fine if your bladerf is working in gnuradio environment, then no > > > > need to do uhd_image_downloader. If not, then you have to do as it > > > > also contain some utility for usb-compatibility of bladerf. > > > > Again no need to do anything if it is working fine. > > > > On Tue, Sep 4, 2018 at 12:45 PM Christopher Clement J > > > > <christopher.clem...@vit.ac.in> wrote: > > > > > > > > > > What is that? I did Pybombs -p prefix/gnuradio_osmosdr/ install > > > > > gr-osmosdr. > > > > > > > > > > and that is successful. > > > > > > > > > > UHD is only for USRP right? > > > > > > > > > > Do I need to initialize uhd_image_downloader file also? > > > > > > > > > > Bit more of what it is, please? > > > > > > > > > > Regards > > > > > Chris Clement > > > > > > > > > > > > > > > > > > > > > > > > > VIT – Ranked No.13 in Engineering Institution by MHRD, Govt. of India > > > > > – NIRF Ranking consecutively for two years, 2016 and 2017. > > > > > VIT – Ranked No.17 in Management Institution by MHRD, Govt. of India > > > > > – NIRF Ranking consecutively for two years, 2016 and 2017. > > > > > VIT is the first University in India to get 4-STAR rating from QS, > > > > > the international ranking agency. > > > > > VIT has been adjudged as the “University of the year 2016” by the > > > > > corporate body FICCI. > > > > > > > > > > ________________________________________ > > > > > From: Prabhat Kumar Rai <ee18mtech01...@iith.ac.in> > > > > > Sent: Tuesday, September 4, 2018 12:39 PM > > > > > To: Christopher Clement J > > > > > Subject: Re: Kindly clarify this issue in GNUradio > > > > > > > > > > Yeah it will be same for BladeRF too. But before doing that make sure > > > > > you initialize uhd_image_downloader file. > > > > > On Tue, Sep 4, 2018 at 12:34 PM Christopher Clement J > > > > > <christopher.clem...@vit.ac.in> wrote: > > > > > > > > > > > > Thank you for the suggestion.. > > > > > > > > > > > > I am using BladeRF, not USRP and not simulation. I will go through > > > > > > the suggested file and revert back to you. > > > > > > > > > > > > Thanks and regards > > > > > > Chris Clement > > > > > > > > > > > > > > > > > > VIT – Ranked No.13 in Engineering Institution by MHRD, Govt. of > > > > > > India – NIRF Ranking consecutively for two years, 2016 and 2017. > > > > > > VIT – Ranked No.17 in Management Institution by MHRD, Govt. of > > > > > > India – NIRF Ranking consecutively for two years, 2016 and 2017. > > > > > > VIT is the first University in India to get 4-STAR rating from QS, > > > > > > the international ranking agency. > > > > > > VIT has been adjudged as the “University of the year 2016” by the > > > > > > corporate body FICCI. > > > > > > > > > > > > ________________________________________ > > > > > > From: Prabhat Kumar Rai <ee18mtech01...@iith.ac.in> > > > > > > Sent: Tuesday, September 4, 2018 12:28 PM > > > > > > To: Christopher Clement J > > > > > > Subject: Re: Kindly clarify this issue in GNUradio > > > > > > > > > > > > Hi, > > > > > > > > > > > > Have you checked the python file located in (gnuradio/gr-uhd) named > > > > > > usrp_spectrum_sense.py . There is something scheduling thing in that > > > > > > file, you first check it out. > > > > > > Also are you planning to use sdr device like usrp or just for > > > > > > simulation purpose. > > > > > > I think for device purpose, it will be difficult for scheduling the > > > > > > device for different freq. It might be possible when the scheduling > > > > > > time will be far more than the (sampling_rate + delay cause by the > > > > > > device) , alteast 4-5 times. So, 2 second will be sufficient for > > > > > > usrp > > > > > > b2x0, n2xx. > > > > > > > > > > > > This is my personal opinion, as I have never worked on scheduling. > > > > > > On Tue, Sep 4, 2018 at 11:48 AM Christopher Clement J > > > > > > <christopher.clem...@vit.ac.in> wrote: > > > > > > > > > > > > > > Hi prabhat, > > > > > > > > > > > > > > > > > > > > > Thank you for the suggestion in UHD issue. That problem is solved. > > > > > > > > > > > > > > > > > > > > > I have another issue as well. > > > > > > > > > > > > > > > > > > > > > I would like to increment a tuning frequency from 450 MHz to 900 > > > > > > > MHz, with a step size of 6 MHz. This requires a kind of for > > > > > > > looping, I guess. But, I see no blocks to implement this in GRC. > > > > > > > How can I do this? Will python module block help? > > > > > > > > > > > > > > > > > > > > > Also, i need to implement a scheduling, means for every 2 > > > > > > > Seconds, one flow graph needs to be processed. Then, I need to > > > > > > > choose one direction, if decision is true, and other direction, > > > > > > > if the decision is false. How can I implement this scheduling (a > > > > > > > kind of timer oriented thing)? and IF looping? Could you please > > > > > > > share your views? > > > > > > > > > > > > > > > > > > > > > Thanks and Regards, > > > > > > > > > > > > > > > > > > > > > J. Christopher Clement, > > > > > > > > > > > > > > Associate Professor, > > > > > > > > > > > > > > SENSE, > > > > > > > > > > > > > > VIT > > > > > > > > > > > > > > > > > > > > > > > > > > > > VIT – Ranked No.13 in Engineering Institution by MHRD, Govt. of > > > > > > > India – NIRF Ranking consecutively for two years, 2016 and 2017. > > > > > > > VIT – Ranked No.17 in Management Institution by MHRD, Govt. of > > > > > > > India – NIRF Ranking consecutively for two years, 2016 and 2017. > > > > > > > VIT is the first University in India to get 4-STAR rating from > > > > > > > QS, the international ranking agency. > > > > > > > VIT has been adjudged as the “University of the year 2016” by the > > > > > > > corporate body FICCI. > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > Regards, > > > > > > Prabhat Kumar Rai > > > > > > M.Tech - Communication & Signal Processing > > > > > > IIT Hyderabad > > > > > > > > > > > > > > > > > > > > -- > > > > > Regards, > > > > > Prabhat Kumar Rai > > > > > M.Tech - Communication & Signal Processing > > > > > IIT Hyderabad > > > > > > > > > > > > > > > > -- > > > > Regards, > > > > Prabhat Kumar Rai > > > > M.Tech - Communication & Signal Processing > > > > IIT Hyderabad > > > > > > > > > > > > -- > > > Regards, > > > Prabhat Kumar Rai > > > M.Tech - Communication & Signal Processing > > > IIT Hyderabad > > > > > > > > -- > > Regards, > > Prabhat Kumar Rai > > M.Tech - Communication & Signal Processing > > IIT Hyderabad > > > > -- > Regards, > Prabhat Kumar Rai > M.Tech - Communication & Signal Processing > IIT Hyderabad -- Regards, Prabhat Kumar Rai M.Tech - Communication & Signal Processing IIT Hyderabad _______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio