discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] problem with send() function making OOT


From: Sanjoy Basak
Subject: Re: [Discuss-gnuradio] problem with send() function making OOT
Date: Sun, 19 Jul 2015 00:20:32 +0200

Hi Marcus,

I need help regarding the phase sync part that you mentioned in your
previous post here.

"There's one thing that could use improvement in the echotimer code: If
the set_?x_freq() were done after the time and clock sources had been
set as a timed command (i.e. after calling set_command_time()), then the
SBX daughterboards would always have the same phase relationship after
tuning to the same frequency, which might be really handy in MIMO."

This part I tried in python, however, I am not actually getting any
phase sync between the receive files. I am not really sure whether
defining freq after set_command_time() in python can really help.
However, please let me know what modification should I make or what
exactly I need to do.

I am putting the python code here that I am using right now for 2 usrps.
2 TXs are in one x310 (on gpsdo) and 2 RXs are on the other one
(external ref).
and the connection is TX-wire-30_dB_attenuator-wire-RX, I am taking
wired measurement. I am using 2.45 GHz freq.

---------------------------
        self.usrp_source0 = uhd.usrp_source(
          ",".join(("addr=172.xx.xx.73", "")),
          uhd.stream_args(
            cpu_format="fc32",
            channels=range(2),
          ),
        )

        self.usrp_sink0 = uhd.usrp_sink(
          ",".join(("addr=172.xx.xx.75", "")),
          uhd.stream_args(
            cpu_format="fc32",
            channels=range(2),
          ),
        )


        self.usrp_source0.set_clock_source("external", 0)
        self.usrp_source0.set_time_source("external", 0)
        self.usrp_source0.set_subdev_spec("A:0 B:0", 0)
        self.usrp_source0.set_time_unknown_pps(uhd.time_spec())
        self.usrp_source0.set_samp_rate(samp_rate)
        self.usrp_source0.set_gain(26, 0)
        self.usrp_source0.set_antenna("RX2", 0)
        self.usrp_source0.set_gain(26, 1)
        self.usrp_source0.set_antenna("RX2", 1)

        self.usrp_sink0.set_clock_source("gpsdo", 0)
        self.usrp_sink0.set_time_source("gpsdo", 0)
        self.usrp_sink0.set_subdev_spec("A:0 B:0", 0)
        self.usrp_sink0.set_time_unknown_pps(uhd.time_spec())
        self.usrp_sink0.set_samp_rate(samp_rate)
        self.usrp_sink0.set_gain(0, 0)
        self.usrp_sink0.set_antenna("TX/RX", 0)
        self.usrp_sink0.set_gain(0, 1)
        self.usrp_sink0.set_antenna("TX/RX", 1)

  time.sleep(1)
  print "receiver pps time:"
  cmd_time = self.usrp_source0.get_time_last_pps()
  print "transmitter pps time:"
  cmd_time0 = self.usrp_sink0.get_time_last_pps()
  real_seconds = uhd.time_spec_t.get_real_secs(cmd_time)
  real_seconds0 = uhd.time_spec_t.get_real_secs(cmd_time0)

  print real_seconds
   print real_seconds0


  self.usrp_source0.set_time_next_pps(uhd.time_spec_t(0.0))
  self.usrp_sink0.set_time_next_pps(uhd.time_spec_t(0.0))

  now = self.usrp_source0.get_time_now()
  starttime = now + uhd.time_spec(1.5)
  self.usrp_source0.set_start_time(starttime)
  self.usrp_sink0.set_start_time(starttime)

        self.usrp_source0.set_center_freq(f, 0)
        self.usrp_source0.set_center_freq(f, 1)
        self.usrp_sink0.set_center_freq(f, 0)
        self.usrp_sink0.set_center_freq(f, 1)

        self.blocks_throttle_0_1 =
blocks.throttle(gr.sizeof_gr_complex*1, samp_rate,True)
        self.blocks_throttle_0_0_0 =
blocks.throttle(gr.sizeof_gr_complex*1, samp_rate,True)
        self.blocks_throttle_0_0 =
blocks.throttle(gr.sizeof_gr_complex*1, samp_rate,True)
        self.blocks_throttle_0 = blocks.throttle(gr.sizeof_gr_complex*1,
samp_rate,True)
        self.blocks_file_source_0_0 =
blocks.file_source(gr.sizeof_gr_complex*1,
"/home/sanjoy/Desktop/new/siso with new preamble
3/20150603_siso_echotimer/floatgen.bin", True)
        self.blocks_file_source_0 =
blocks.file_source(gr.sizeof_gr_complex*1,
"/home/sanjoy/Desktop/new/siso with new preamble
3/20150603_siso_echotimer/floatgen.bin", True)
        self.blocks_file_sink_0_0 =
blocks.file_sink(gr.sizeof_gr_complex*1,
"/home/sanjoy/Desktop/siso2.bin", False)
        self.blocks_file_sink_0_0.set_unbuffered(False)
        self.blocks_file_sink_0 =
blocks.file_sink(gr.sizeof_gr_complex*1,
"/home/sanjoy/Desktop/siso1.bin", False)
        self.blocks_file_sink_0.set_unbuffered(False)
-----------------------------

My system config is usrp X310, daughterboard SBX-120, uhd 3.9.

best regards
Sanjoy

-- 
Posted via http://www.ruby-forum.com/.



reply via email to

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