[ntp:questions] [Android+NTP] synchronise time with millisecond accuracy

bcorreia.c at gmail.com bcorreia.c at gmail.com
Wed Mar 26 17:01:22 UTC 2014


Hi mike,

>   You could take out any network transmit/receive asymmetry by having the server broadcast and configure the android device as a broadcast client.
> 
> 
> 
>   As a quick test I pulled the ethernet cable on my laptop and configured wifi so I have a similar topology to you , though BSD. It is configured in standard client/server mode.
> 

The topology is similar, however my Android Server does not have an wireless interface. It is not connected directly with the Android device. The Android device is connected via WiFi to the Android AP and the Android AP is connected with an Ethernet cable to Android Server.

> 
> en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
> 
> 	ether 34:15:9e:01:e5:9c 
> 
> 	inet 192.168.1.12 netmask 0xffffff00 broadcast 192.168.1.255
> 
> 	media: autoselect (100baseTX <full-duplex,flow-control>)
> 
> 	status: active
> 
> electron:~ mike$ ntpq -pn
> 
>      remote           refid      st t when poll reach   delay   offset  jitter
> 
> ==============================================================================
> 
> *192.168.1.4     .PPS1.           1 u   49   64  377    0.938   -0.284   0.037
> 
> 
> 
> # pull the ethernet cable and configure wifi
> 
> 
> 
> en1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
> 
> 	ether f8:1e:df:e4:49:41 
> 
> 	inet 192.168.1.14 netmask 0xffffff00 broadcast 192.168.1.255
> 
> 	media: autoselect
> 
> 	status: active
> 
> 
> 
> # wait until the dust settles. NTP takes a bit of time to get to a clean state.
> 
> 
> 
> electron:~ mike$ ntpq -pn
> 
>      remote           refid      st t when poll reach   delay   offset  jitter
> 
> ==============================================================================
> 
> *192.168.1.4     .PPS1.           1 u   20   64  377    1.600    0.131  14.759
> 
> 
> 
> As you can see the delay and jitter (which is very variable ) go up, but the offset stays < 1ms.  So it should be possible for you to do better.
> 
> If you have another non Android wifi client on your net, what do you see with that as a client?
> 

I have not tested yet with another non Android wifi client, however, I tried to synchronise the Android AP with the Android Server (connected with an Ethernet cable), but the offset is still 2ms. 

> 
> 
> 
> 
> 
> > 
> 
> > 
> 
> > Best regards
> 
> > 
> 
> >



More information about the questions mailing list