Carrier sensing, usrp2 & xcvr2450

Hi all

I have an usrp2 & xcvr2450 board and I wrote a simple python script
which I use to measure the signal strength and transmit a packet.
Since the xcvr2450 does not support full duplex it switches to
transmitting mode after sending the first packet. Is there a way to
switch back to receiving mode? Or is there another way to implement
such an application using the hardware I have?

Thanks,

Stefan Schmid

On 01/14/2011 02:09 PM, Stefan Schmid wrote:

Hi all

I have an usrp2& xcvr2450 board and I wrote a simple python script
which I use to measure the signal strength and transmit a packet.
Since the xcvr2450 does not support full duplex it switches to
transmitting mode after sending the first packet. Is there a way to
switch back to receiving mode? Or is there another way to implement
such an application using the hardware I have?

It switched back to receive as soon as it is done transmitting.

Matt

unfortunately it doesn’t.

I am using two hier_block2, one for the sensing part and one for the
transmitting part. (see code below)

What am I doing wrong? Thanks for your help!

Stefan.

class receive_path(gr.hier_block2):
def init(self, interface="", decim=4, gain=None, freq=None,
mac=""):
gr.hier_block2.init(self, “receive_path”, gr.io_signature(0, 0,
0), gr.io_signature(0, 0, gr.sizeof_gr_complex))
self.u = usrp2.source_32fc(interface, mac)

alpha = 0.001
thresh = 30
self.probe = gr.probe_avg_mag_sqrd_c(thresh,alpha)
self.connect(self.u, self.probe)

def sense(self):
p = self.probe.level()
dbm = 10*math.log10§ #dbm
return dbm

class transmit_path(gr.hier_block2):
def init(self, interface="", interp_rate=4, spb=4,
use_barker=False, mac_addr=None):
gr.hier_block2.init(self, “receive_path”, gr.io_signature(0,
0, 0), gr.io_signature(0, 0, gr.sizeof_gr_complex))
self.u = usrp2.sink_32fc(interface, mac_addr)

self.packet_transmitter = bbn_80211b_mod_pkts(spb=spb,
alpha=0.5, gain=self.normal_gain, use_barker=use_barker)
self.connect(self.packet_transmitter, self.u)

def send_pkt(self, payload='', send_rate=0, eof=False):
    return self.packet_transmitter.send_pkt(payload, send_rate, eof)

class flow_graph(gr.top_block):
def init(self):
gr.top_block.init(self)

self.rxpath = receive_path(interface, decim, gain, freq, mac)
self.txpath = transmit_path(interface, interp, spb, barker, mac)
self.connect(self.txpath)
self.connect(self.rxpath)