Hi Hideyuki,

Our students were working (with my help) on synchronizing two USRPs B210
with use of Octoclock-G.
To make your code work without any race-conditions I would add a loop
that waits for pps edge before your adjustment code, like this:
```
  time_last_pps = self.uhd_usrp_source_0.get_time_last_pps()
  while(self.uhd_usrp_source_0.get_time_last_pps() == time_last_pps):
    time.sleep(0.01)
```

Code like this will work perfectly on devices like USRP X3x0. But sadly
not on B210 - with them there is always
always some time-offset between the devices. It changes randomly every
time we run the program. The values we observed are in range of few
hundreds of us. We still need to check again with different USRP B210s
and different Octoclock-G, but my theory is currently following:

I haven't seen anyone admitting publicly that he/she in fact
synchronized B210 in time (I exclude from 'synchronized' doing the
synchronization in signal post processing).

**************************************************************************************************************
So unless someone will come out, say is openly that he synchronized
USRPs B210, how he did it and what time offsets were observed, issue of
synchronizing B210s is still open and not solved.
***************************************************************************************************************

--
Best Regards,
Piotr Krysik

W dniu 25.10.2017 o 08:59, Hideyuki Matsunaga via USRP-users pisze:
> I bought 2 B210s for testing direction of arrival estimation, like below.
>
> =======================   Configuration =============================
>
> Ch0 <--> | USRP0 Rx 0 |
>          |            | <-- USB3.0 --> |       PC                        |
> Ch1 <--> | USRP0 Rx 1 |                | Ubuntu 14.04                
>    | 
>                                        | GNU Radio Companion 3.7.11.1 
>   |  
> Ch2 <--> | USRP1 Rx 0 |                | UHD_003.010.001.001-79-g7ac01c7f|
>          |            | <-- USB3.0 --> |                                 |
> Ch3 <--> | USRP1 Rx 1 |
>                 
> - External 10MHz reference CLK & 1PPS are provided by function
> generator(Tektronix AFG1012) to each B210
> - center freq  2.4GHz
> - samping rate 4MHz
>
> In GRC
> - 2 separate USRP Source for each B210, settings are below
>  - Sync option   unknown pps
>  - Clock Source  External
>  - Time Source   External
>  - Num Channels  2
>
> I generated python code by GRC and then I added custom timing
> adjustment code.
> ```
>  self.uhd_usrp_source_0.set_time_next_pps(uhd.time_spec(0))
>  self.uhd_usrp_source_1.set_time_next_pps(uhd.time_spec(0))
>  time.sleep(1.0)
>
>  start_time = uhd.time_spec(5.0)
>  self.uhd_usrp_source_0.set_start_time(start_time)
>  self.uhd_usrp_source_1.set_start_time(start_time)
> ```
> ===========================================================================
>
> I believe that I am following all the instructions what I found in web.
> but, when I tried to check that sampling timing is exactly matched or not 
> by dumping all the samples(connect File Sink), I found sampling gaps
> between 2 B210.
>
> While testing, I confirmed that 
> - there are no overflow,
> - start timing would be exactly the same(using Tag Debug to confirm)
>
> I observed that
> - gaps looks fixed size during running
> - gaps are slightly different every time
>
>
> Please let me know what I am missing.
>
>


_______________________________________________
USRP-users mailing list
[email protected]
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

Reply via email to