Happy New Year! folks,
I need to dynamically change software filter coefficient according to
user
command while the program is running.
So, I made a test program similar to the following.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
class my_top_block(gr.top_block):
Bla bla bla ~~~
usrp2 initialization and flow graph generation
Bla bla bla ~~~
self.connect(self.u, self.s2v, self.fft, self.c2mag, self.stats)
def Main(tb):
Bla bla bla ~~~
Various preparations
Bla bla bla ~~~
while(1):
check_uesr_command()
tb.lock()
print "Tob block locked"
tb.disconnect(tb.u, tb.s2v, tb.fft, tb.c2mag, tb.stats)
print "Tob block disconnected"
tb.connect(tb.u, tb.s2v, tb.fft, tb.c2mag, tb.stats)
print "Tob block re-connected"
tb.unlock()
print "Tob block unlocked"
Bla bla bla ~~~
if name == ‘main’:
tb = my_top_block()
try:
tb.start()
main_loop(tb)
except KeyboardInterrupt:
pass
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
While it is running, the program hangs after the following messages
++++++++++++++++++++++++++
Tob block locked
Tob block disconnected
Tob block re-connected
Tob block unlocked
usrp2: channel 0 not receiving
usrp2::rx_samples() failed
++++++++++++++++++++++++++
The program hangs at the point that it is waiting for the message queue
to
be filled. My guess is that the usrp2 stops sending samples to host
after
the lock/disconnect/connect/unlock procedure.
Without the lock/disconnect/connect/unlock procedure, it works pretty
well
for quite a long time like several days.
I don’t know what I did wrong.
Any hints or advice?
Regards,
ILKYOUNG