discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] Receiving My Own Transmitted Packets after disconnect


From: Yahya Ezzeldin
Subject: [Discuss-gnuradio] Receiving My Own Transmitted Packets after disconnecting from Transmit Path and connecting to Receive Path
Date: Sun, 24 Feb 2013 19:57:17 +0200

Hi,

I wrote a gnuRadio code that allows me to switch between a Tx_Path and Rx_Path every 10 seconds.

The code is based on the tb.lock() , tb.unlock() functions and the benchmarks provided with gnuradio.

I am able to do the switching fine, however after switching from transmission to reception, the node receives some of the packets that were sent during its own transmission period. 

How can I overcome this echo like effect between the TX and RX periods ?


In the main() function I have

tb.start()
while True:
        time.sleep(10)
        tb.lock()
        tb.conf_transmit()
        tb.unlock()
        tb.transmit_packets()
        tb.lock()
        tb.conf_sense()
        tb.unlock()
    tb.wait()        



In the top_block class I have:

def conf_transmit(self):
        self.disconnect(self.source, self.rxpath)
        self.connect(self.txpath, self.sink)

def conf_sense(self):
        self.disconnect(self.txpath, self.sink)
        self.connect(self.source, self.rxpath)

def transmit_packets(self):
        begin_time = time.time()
        pkt_size=1500
        pktno = 0
        while time.time() - begin_time < 10:   # Send for 10 minutes
            data = "" - 2) * chr(pktno & 0xff) 
            payload = struct.pack('!H', pktno & 0xffff) + data
            self.send_pkt(payload)
            pktno += 1

def send_pkt(self, payload='', eof=False):
        ### Main Function to Send Packets.
        return self.txpath.send_pkt(payload, eof)


Best Regards,
--
Yahya Ezzeldin

reply via email to

[Prev in Thread] Current Thread [Next in Thread]