Quantcast
Channel: stardot.org.uk
Viewing all articles
Browse latest Browse all 5552

econet and other acorn specific networking • Re: SNTP over econet

$
0
0
OK, I've ordered the hardware, and this is what I intent to implement:

SETP
SETP (Simple Econet Time Protocol) is a client-server time synchronisation protocol, based on SNTP but adapted to the limitations of Econet. It does not cover peer-peer synchronisation between servers, but could probably be extended.

A synchronisation consists of three messages:
    • The client sends a broadcast (address FF.FF) to port 7B. The 8-byte payload is a random identifier (SyncID) generated to avoid coincidences. The client records the time of transmission (OrgTime) as accurately as possible.
    • The server receives the broadcast, and records the time of arrival (RecvTime) as accurately as possible, along with SyncID and client address.
    • The server sends a broadcast (address FF.FF) to port 7B, with the same SyncID as its payload. The server records the time of transmission (TransTime) as accurately as possible.
    • The client receives the broadcast (checking SyncID), and records the time of arrival (DestTime) as accurately as possible, along with the server address.
    • The server sends a 48-byte data-block (based on NTP) to the client address, port &7B.
    • The client receives the data block, and checks that both the SyncID and server address match the broadcast.
The server will ignore further broadcasts with the same SyncID, to avoid messages bouncing between servers. If the client receives multiple replies from different servers, it can either use the first, pick a default, use the rest of the data to judge accuracy, or take an average.

The Data-Block
All times are 64-bit unsigned fixed 32.32 format, with zero at 1900-01-01.00:00:00 UTC, ignoring leap seconds. This will roll-over at 2036-02-07.06:28:16 UTC. The precision is about 232 picoseconds.
Byte NameDescriptionDetails
0 bits 0-1LILeap seconds due at end of month0=0, 1=+1, 2=-1, 3=error
0 bits 2-4VNVersion numberMust be 4 (current version)
0 bits 5-7ModeProtocol modeMust be 4 (server)
1StratumNo. of steps to primary clock0=kiss-of-death, 1=primary clock
2Poll intervalMax time between poll messagesunsigned log2 seconds
3PrecisionServer clock precisionsigned log2 seconds
4-7Root delayroundtrip time to primary clocksigned fixed 16.16 seconds
8-11Root disp.max error due to clock frequencyunsigned fixed 16.16 seconds
12-15Ref. IDIdentifier for server time referencesee NTP for details
16-23Ref. timeTime server clock was last setfixed 32.32 seconds since 1900
24-31SyncIDThe identifier used in broadcasts(in NTP this is OrgTime)
32-39RecvTimeTime query arrived, on server clockfixed 32.32 seconds since 1900
40-47TransTimeTime reply sent, on server clockfixed 32.32 seconds since 1900
Calculations
Roundtrip time = (DestTime - OrgTime) - (TransTime - RecvTime)
Correction to client clock = (RecvTime - OrgTime) + (TransTime - DestTime)) / 2

All suggestions for improvement welcome!

Statistics: Posted by Barneyntd — Thu Sep 04, 2025 9:12 pm



Viewing all articles
Browse latest Browse all 5552

Trending Articles