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

2015-07-18 Thread Sanjoy Basak
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/.

___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


Re: [Discuss-gnuradio] Tag Deletion Scenario

2015-07-18 Thread Tom Rondeau
On Sat, Jul 18, 2015 at 1:19 AM, Richard Bell 
wrote:

> Since tags are in a different buffer then data, if I use get_tags_in_range
> to get tags outside the current noutput_items worth of data I'm working on,
> and erase one of those tags, would the tag simply disappear from the sample
> that has long ago passed through the block?
>
> Here is an example:
>
> nitems_read = 1000;
> noutput_items = 50;
> get_tags_in_range(tags, 0, 100, 200);
> tags.erase(tags.begin());
>
> You can see the current block of data lies between items 1000 and 1049 but
> I'm deleting a tag from the range 100 to 200, whose item may be several
> blocks upstream by now.
>
> If all this works as I've described above, how can we protect blocks up
> stream that may be acting on this tag when it suddenly disappears because
> of an erase call like the one above?
>
> Rich
>

No, what you are describing does not affect downstream blocks. When you
issue get_tags_in_range, we actually only provide you a copy of the tags
from your block's local tag buffer. Erasing it like you're doing here
doesn't remove it from the underlying buffer, just the vector 'tags' that
you have built locally. When tags propagate, the buffer (implemented as a
multimap) is moved downstream by copying each tag in the map from the input
port(s) to the output port(s) based on the propagation policy you set.

The model you are probably looking at in some of the sync blocks is just us
erasing the tags in the local vector. It's just the way we decided to keep
track of the information there, but it does not (should not) affect the
propagation downstream by removing it.

Tom
___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


[Discuss-gnuradio] pybombs users: who among you needs BOOST_SUFFIX=-mt to build GQRX?

2015-07-18 Thread Chris Kuethe
For us debian/ubuntu fans, '-mt' is the wrong thing. I think I have
come up with a somewhat portable way to reliably detect the
appropriate flags to use.. If you *do* need "-mt", please get in touch
with me; I need to get more information about your system.

https://github.com/csete/gqrx/issues/254
https://github.com/gnuradio/pybombs/issues/171

-- 
GDB has a 'break' feature; why doesn't it have 'fix' too?

___
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio