Combining tx and rx into one graph?

I have combined the gnuradio-examples/python/digital

…from 4 to 2 files and from 2 top blocks to 1 top block. I want to
switch between transmit and receive to simulate a wireless
sensor node. I am using a flex RFX 2400 board and USRP 1. Maybe I am
not doing this the right way.

So far the code runs and instantiates the flow graph for receive and
send paths simultaneously without error. However, if I send any packets
with send_pkt, then after that the receive loop does not detect

It definitely goes into the tb.wait() where it would normally receive
packets, but if I had run the send_pkt command nothing is actually
received. If I just comment out that send_pkt from the tx loop, it
works receives without problem.

If I receive first by going into the tb.wait() loop, then I don’t know
how to get out of that loop and test the tx afterward. I have been
using ctrl+c to get out of the tb.wait() loop.

Does anyone know how to do this correctly?

As a separate question, what is the method for getting out of the wait

I can attach code if you like. Thanks for bearing with me. I know this
must be a tedious question for many of you :slight_smile: