Home docs pia protocols Sync Clock
Post

Sync Clock

The sync clock protocol provides a monotonic clock that is synchronized across all stations in the mesh. The clock is controlled by the host.

Every two seconds, the station sends the following message to the host:

OffsetSizeDescription
0x08Current system tick
0x88Always 0

The host sends the following reply:

OffsetSizeDescription
0x08System tick copied from request
0x88Synchronized clock in milliseconds

The system tick is used to measure the round trip time. To reduce noise, Pia calculates the median of the last 10 measurements. The estimated round trip time is divided by two, and added to the received clock value.

Contents