discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Late packet and phase issue


From: Marcus D. Leech
Subject: Re: [Discuss-gnuradio] Late packet and phase issue
Date: Mon, 05 Oct 2015 15:13:40 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

On 10/05/2015 10:58 AM, Leonard Foxes wrote:
Hi list,

It's me again.

I use a USRP N210 with WBX daughterboards and loop back cable to connect TX e RX. I have two problems:

  1. Late packet. I use set_time_now and set_start_time command and after few seconds I see some Ls printed.
  2. Phase. Phase offset changes between executions. (I'm trying to use set_time_command but nothing changes).
This is my python code about usrp:

self.samp_rate = samp_rate = 500e3
self.USRP_address = USRP_address = "addr=192.168.10.2"
self.tun_freq = tun_freq = 1.45e9
self.tun_gain = tun_gain = 19
self.rx_freq_off = rx_freq_off = 0


self.timeref1= timeref1=time.time()

self.uhd_usrp_TX = uhd.usrp_sink(
        device_addr=USRP_address,
        stream_args=uhd.stream_args(
        cpu_format="fc32", 
        channels=range(1),
        ),
        )
self.uhd_usrp_TX.set_samp_rate(samp_rate)
self.uhd_usrp_TX.set_time_now(uhd.time_spec_t(timeref1), 0)
self.uhd_usrp_TX.set_command_time(uhd.time_spec_t(timeref1+0.1), 0)
        self.uhd_usrp_TX.set_center_freq(uhd.tune_request_t(tun_freq), 0)
self.uhd_usrp_TX.clear_command_time()
        self.uhd_usrp_TX.set_gain(tun_gain, 0)
        self.uhd_usrp_TX.set_start_time(uhd.time_spec_t(timeref1+1))


self.uhd_usrp_RX = uhd.usrp_source(
        device_addr=USRP_address,
        stream_args=uhd.stream_args(
        cpu_format="fc32", 
        channels=range(1),
        ),
        )


        self.uhd_usrp_RX.set_samp_rate(samp_rate)
self.uhd_usrp_RX.set_time_now(uhd.time_spec_t(timeref1), 0)
self.uhd_usrp_RX.set_command_time(uhd.time_spec_t(timeref1+0.1), 0)
        self.uhd_usrp_RX.set_center_freq(uhd.tune_request_t(tun_freq + rx_freq_off), 0)
self.uhd_usrp_RX.clear_command_time()
time.sleep(0.15)
        self.uhd_usrp_RX.set_gain(tun_gain, 0)
        self.uhd_usrp_RX.set_start_time(uhd.time_spec_t(timeref1+1))


Any suggestion will be welcome

Thanks in advance,
Leo

Something to realize is that if you call set_time_now() on two different USRPs, they'll not agree in detail about the time-of-day.  If you're
  using an external 10Mhz and 1PPS reference, you should probably use set_time_unknown_pps(), and make sure that both sides
  of this are setting the same time AT THE SAME TIME.

Also, WBX has a 180deg phase-ambiguity.  Two WBX boards with the same 10MHz reference, on USRPs with the same notion of time,
  will either be in-phase, or 180deg out-of-phase, due to hardware ambiguity in the 2XLO mixer used on WBX.



reply via email to

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