time-nuts@lists.febo.com

Discussion of precise time and frequency measurement

View all threads

Re: [time-nuts] wifi with time sync

HM
Hal Murray
Fri, Jan 13, 2017 10:45 PM

What standard protocol would you recommend I run from the command line on my
computer  to get a quick estimate of the timing lag and variablilty  on my
particular WiFi connection?

I'd use ping.  But you said "quick estimate".

My wifi is crappy enough that its noise swamps everything else.  Out of
habbit, I never ping a switch so I don't have to worry about the extra delay
from its CPU.


To add to this I'd be curious in knowing about easy PC based ways to measure
network latencies / delays with microsecond accuracy vs millisecond
accuracy.

I don't know of any "easy" way to do that.  If I wanted to work on that
problem, I would investigate the PTP level time stamping that you can get
from some Ethernet chips.

Most Unix like OSes now support getting a time stamp on received packets.
That's interrupt level rather than hardware level.  I just poked around a
bit.  I didn't find a simple way to get a transmit time stamp, but there was
enough discussion that something might work.  Depends on your OS and hardware
and ...

If the network is lightly loaded, you can probably assume that the packet has
started when the call to send returns.

If you have a setup on a LAN with identical machines and can feed the same
PPS pulse to both of them you can probably get the clocks in sync close to a
microsecond.

--
These are my opinions.  I hate spam.

> What standard protocol would you recommend I run from the command line on my > computer to get a quick estimate of the timing lag and variablilty on my > particular WiFi connection? I'd use ping. But you said "quick estimate". My wifi is crappy enough that its noise swamps everything else. Out of habbit, I never ping a switch so I don't have to worry about the extra delay from its CPU. ----- > To add to this I'd be curious in knowing about easy PC based ways to measure > network latencies / delays with microsecond accuracy vs millisecond > accuracy. I don't know of any "easy" way to do that. If I wanted to work on that problem, I would investigate the PTP level time stamping that you can get from some Ethernet chips. Most Unix like OSes now support getting a time stamp on received packets. That's interrupt level rather than hardware level. I just poked around a bit. I didn't find a simple way to get a transmit time stamp, but there was enough discussion that something might work. Depends on your OS and hardware and ... If the network is lightly loaded, you can probably assume that the packet has started when the call to send returns. If you have a setup on a LAN with identical machines and can feed the same PPS pulse to both of them you can probably get the clocks in sync close to a microsecond. -- These are my opinions. I hate spam.