Simultaneous transmission and reception

Hi Everyone

I am currently trying to make a USRP transceiver run, which is based on
TDMA approach.Elaborating on it, it should be a system which works in
receive mode for sometime, writes the data in a file and in the next
slot transmits the data which has been written in the file.

Reading from the previous archives, I figured out that switching between
the modes can be done by setting the “set_auto_tr(True)”.
The switching works lovely when writing reading and is done into and
from different files. But as soon as the same file is used, problem
starts.

I have been working on tx_voice.py and rx_voice.py. I start the receiver
first so that it writes onto the file. After few seconds, i start the
transmitter and then after every 5 seconds I make the transmit mode go
to sleep for another 5 seconds. But, the problem is that it works fine
for some time but after that the transmit mode stops and the receiver
keeps on receiving more packets and then we dont get into the transmit
mode. The transmit mode stops even though the number of packets written
to file are more than read. Maybe this could be a problem of buffering
or something because if i keep the transmission in repeat mode then the
transmit mode doesnt stop. However In my case, i dont want the
transmission in repetition mode. I only want to transmit whatever i have
received. I have also ensured that the rates of receiveing and
transmission are the same.

Could anybody please help me out with the situation.I just want to
retransmit the data received from USRP.

Thanks for all the help in advance
Pratik Hetamsaria