1
$\begingroup$

I am studying on making automatic transmitter and receiver with usrp on gnuradio. Firstly, I should transmit any signal with center frequency 400,410,420,430 Mhz with 2 seconds waiting time for each frequency and it should repeat itself. Then, at the receiver side I should find the frequency changing loop and the waiting time to get the signal coming from transmitter. I am working on python code that gnuradio generates and I added for and while loop. Yet, there is nothing worthy. I'm an amateur and working just for 2 weeks.I hope someone can help me to solve the problem. By the way, I check the Guided Tutorials on http://tutorials.gnuradio.org and could not find something useful about outomatic change. Thanks, Furkan.

                                ***EDITED PART***

what I exactly want to do is making transmitter which transmits 400,410,420,430 Mhz signals repetetive with 1 second waiting time for each signal. For receiver part, it will know frequency range and how many second each frequency will transmitted, but it will not start at the same time with the transmitter. So, it should find the center frequency of transmitter first,then continue synchronized to the transmitter. the added code for transmitter is below but it does repeat from 400 to 430,it goes up.

tb.show()

def tick():
    for i in range(0,4):   
        tb.set_center_freq(tb.get_center_freq()+10e6)
        print(tb.get_center_freq())
timer = QTimer()
timer.timeout.connect(tick)
timer.start(1000)
def quitting():

I hope it is clear now. Thanks for all comments and helps.

$\endgroup$
  • $\begingroup$ Welcome to Amateur Radio Stack Exchange. Please take the tour at ham.stackexchange.com/Tour to get the most out of this site. Meanwhile, what you are describing is interesting but you will need to be careful to make sure you are low enough power that you can operate under Part 15 (like garage door openers) which doesn't require the full identification requirements of longer-range ham communications. $\endgroup$ – SDsolar Jul 21 '17 at 8:22
  • 1
    $\begingroup$ Without a specific question I don't think you will get many answers. $\endgroup$ – Phil Frost - W8II Jul 21 '17 at 12:32
  • $\begingroup$ actually I did some works on transmitter part. What I exactly stuck on it is sending different frequencies automatically by usrp by using for or while loops. While qt gui shows center frequency of transmitter changes, usrp sends only the first value when I used QTimer. $\endgroup$ – furkan aydın Jul 21 '17 at 14:17
  • 1
    $\begingroup$ I agree that without a specific question, it will be difficult to attract good answers. Closing. $\endgroup$ – Scott Earle Jul 21 '17 at 14:28
  • 1
    $\begingroup$ You should edit to show the code that you have that does not work. Just the section you edited, not all the rest of the generated code. $\endgroup$ – Kevin Reid AG6YO Jul 21 '17 at 16:18
1
$\begingroup$

There is a problem with your code in tick. Since it is getting the current frequency and adding 10 MHz each time, there is no way of resetting it back to the starting frequency the next time tick is called. Here is a version that ensures it restarts at 400 MHz each time it is called:

 def tick():
 for i in range(0,4):   
    tb.set_center_freq(400e6+i*10e6)
    print(tb.get_center_freq())
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.