I am building a system using USRPs where 2 USRPs communicate with each other by sharing some data. The system works, but not as quickly and efficiently as I want.
I have 2 USRPs, say A and B. First, B sends some data to A. As soon as A receives data, it responds by sending some data to B. I want all of this to happen within 1 millisecond.
However, the time this process takes is:
Time required for A to receive data sent by B: 15 to 20 ms
Time required for B to receive data sent by A: 15 to 16 ms
This time duration is measured simply with the help of print statements.
I am using USRP N210s(one with XCVR and other with SBX daughterboard, VERT2450 antennas), operating at 2.43GHz.
Benchmark_tx and benchmark_rx from OFDM package are used for TX/RX operations. I have written a python script for each USRP to handle benchmark_tx and benchmark_rx. For both USRPs A and B, receiver is started when the program starts and stopped when program exits. So, devices are always in receiving mode, except when they are transmitting something.
Now back to the problem:
If I add prints before and after send_pkt() call in benchmark_tx.py, I can see that actual transmission operation takes only about 200 microseconds.
After doing code profiling, profile report showed that most of the time was spent in 'wait()' of top_block. I don't understand this!
Is it possible to bring this operation time down to 1 ms? and what optimizations do I need to do to achieve this?
Thanks in advance for any help.