Forum: GNU Radio USRP queue ambiguity

5e2a1bdf8cc092c04d4a4cd83f049942?d=identicon&s=25 Mzaherm Mhz (mzaherm)
on 2014-06-17 17:54
Hello,

   I am writing a code for frequency hopping. I am facing a problem when
I change the transmitting frequency. The problem is not in the duration
of the LO settling time as I expected. However, it is in the packets
that are still in the queue (I dont know exactly where this queue
starts/ends), where the last N=? packets are transmitted on the new
frequency instead of the old one (quite sure about the issue, as I
thoroughly tested it with another USRP device as a receiver).

   My code is based on "ofdm/benchmark_tx.py" example. The portion of
the code that matters:
.
.
for i in range(20):
  data = source_file.read(pkt_size - 2)
  tb.txpath.send_pkt(struct.pack('!H',send_seq &0xffff)+data)
#wait till queue is empty
tb.sink.set_freq(ch[c])
.
.

   What is the function to be used as polling to check the emptiness of
the queue (#wait till queue is empty) before changing the frequency? I
dont want to use arbitrary sleep time :)

   Thx for help,
mzaherm
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.