Packet loss during carrier-sensing (as a transceiver node)

Dear all,

Thanks for your reading in advance.

I met a problem when I attempt to use USRP as a transciever node.
I try to realize a transceiver by constructing two python threadings,
one is
“sender” and the other one is “listener”.
The sender is responsible for sending packets to USRP for transmission
into
the air, after ensuring the medium is idle.
The listener is to receive packets from USRP.

However, when “the sender” tried to run continuous “carrier sense” until
busy medium becomes idle, I discovered that the “listener” couldn’t work
to
receive the packets that should arrive during the period of carrier
sensing.
In the meanwhile, the listener was not conscious of any packet arrival,
even
“corrupted” packets.

My preliminary conjecture is the “sender” occupies all of the resources,
so
the listener is unable to perform packet reception.

p.s. My pseudo code to implement continuous carrier sense:
while medium_busy()
print “carrier sensed”
sleep for a period of time, “DIFS”
send packet

From the condition I described above, I want to ask:

  1. I guess the problem results from a bad scheduling between listener
    and
    sender threadings. Is there any other possibility to cause the problem ?
    If
    yes, what is it?
  2. Does anyone know some other way to implement a transceiver on USRP?
    If
    yes, please briefly describe it.

My operation environments:

  1. Ubuntu 9.04
  2. Gnuradio 3.2.0
  3. USRP1 + XCVR2450

Thank you again!

Sincerely,
Larsson