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 -- Karlsruhe Institute of Technology (KIT) Communications Engineering Lab (CEL) Dipl.-Ing. Martin Braun Research Associate Kaiserstraße 12 Building 05.01 76131 Karlsruhe Phone: +49 721 608-3790 Fax: +49 721 608-6071 www.cel.kit.edu KIT -- University of the State of Baden-Württemberg and National Laboratory of the Helmholtz Association
pgpqcbzDGx0u3.pgp
Description: PGP signature
_______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio