Hi Marcus,
Thanks for the background. That helps greatly. Having said
that, I am unclear which commands specifically tune the
radios, so I did the following around the frequency tuning
(after all of the time source, gain, and antenna setting
code):
addr_string = "addr0=192.168.10.3,addr1=192.168.10.4"
self.uhd_usrp_sink_0_0 = uhd.usrp_sink(
",".join((addr_string, "")),
uhd.stream_args(
cpu_format="fc32",
channels=range(2),
),
)
self.uhd_usrp_sink_0_0.set_clock_source("external", 0)
self.uhd_usrp_sink_0_0.set_time_source("external", 0)
self.uhd_usrp_sink_0_0.set_clock_source("mimo", 1)
self.uhd_usrp_sink_0_0.set_time_source("mimo", 1)
self.uhd_usrp_sink_0_0.set_samp_rate(samp_rate)
self.uhd_usrp_sink_0_0.set_gain(31.5, 0)
self.uhd_usrp_sink_0_0.set_gain(31.5, 1)
self.uhd_usrp_sink_0_0.set_antenna("TX/RX", 0)
self.uhd_usrp_sink_0_0.set_antenna("TX/RX", 1)
self.analog_sig_source_x_0_1 =
analog.sig_source_c(samp_rate, analog.GR_CONST_WAVE, 10000, 1,
0)
self.analog_sig_source_x_0_0_0 =
analog.sig_source_c(samp_rate, analog.GR_CONST_WAVE, 10000, 1,
0)
self.uhd_usrp_sink_0_0.set_time_unknown_pps(uhd.time_spec())
now = self.uhd_usrp_sink_0_0.get_time_now()
start_time = now + uhd.time_spec(.5)
self.uhd_usrp_sink_0_0.set_command_time(start_time)
self.uhd_usrp_sink_0_0.set_center_freq(915000000, 0)
self.uhd_usrp_sink_0_0.set_center_freq(915000000, 1)
self.uhd_usrp_sink_0_0.clear_command_time()
However, when running it, this does not appear to produce a
constant offset either, but I'm not sure whether this is the
correct code to wrap around. Please keep me posted. Thanks.