discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Rx and Tx on same antenna


From: Mirko Heukemes
Subject: Re: [Discuss-gnuradio] Rx and Tx on same antenna
Date: Mon, 24 May 2010 12:05:02 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4

Am 21.05.2010 10:12, schrieb Martin Braun:
On Thu, May 20, 2010 at 02:46:38PM +0200, Mirko Heukemes wrote:
Hello,

I'm starting to play around with gnuradio and the USRP1. I have the
RFX400 daughterboard but only one antenna. I used the examples
usrp_wfm_rcv.py and usrp_nbfm_rcv.py for testing and it worked (I
only had to change the center frequencies for the use with the
FRX400). For emitting I used gnuradio-companion and the WBFM
transmit block that also worked fine. Now, I'm trying to set up a
transceiver that uses for both the receive and emit path the TX/RX
antenna of the RFX400. I made a first (simple) flowgraph using
different classes for the Rx and Tx paths (classes copied from
working grc flowgraphs). I used the same parameters than for the
receiver and emitter alone but I set the transmit parameter of the
USRP sink to Auto T/R. Now, my plan is to remain in the reception
mode all the time and to switch to transmission mode only if I want
to speak. In order to do this, I added this code to my  python
script:

if __name__ == '__main__':
    parser = OptionParser(option_class=eng_option, usage="%prog: [options]")
    (options, args) = parser.parse_args()
    tr = usrp_wbfm_receive_nogui()
    tt = usrp_wbfm_emit_rfx400()
    while 1:
        tr.start()
        raw_input('Press Enter to emit: ')
        tr.stop()
        tt.start()
        raw_input('Press Enter to stop emitting ')
        tt.stop()

And both the reception and transmission seem to work in first place.
But if I press Enter the second time, I get this error message:

RuntimeError: top_block::start: top block already running or wait()
not called after previous stop()

Assuming that it's impossible to restart a block after stopping it
without executing the wait() call, I added tr.wait() and tt.wait()
after the respective stop calls. But then I get another error
message:
Hi Mirko,

I haven't read your code (excuse my laziness), but here's some input:
You can't stop and restart a flow graph (just recently, there was a
similar discussion on this topic). Once it's stopped, its state is
undefined. You need two separate flow graphs for Tx and Rx. If you want
them both in one application, you will have to put them both into one
top_block (see the Python-Applications tutorial on the wiki, it also
happens in usrp_nbfm_ptt.py). Also, tunnel.py by default manages to tx
and rx on one antenna by using the auto-tr feature which you've already
discovered.
Hope this is useful,

MB

Hello,

Thank you for pointing me to the usrp_nbfm_ptt.py, that is exeactly what I was looking for and it gave me some good insight on how to implement a radio with only one antenna.

Best regards


Mirko




reply via email to

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