Go Down

Topic: UDP NTP Clients (Read 898 times) previous topic - next topic

mjbnz

More of a curiousity rather than a problem - my NTP implementation works fine...

But, every example of the Arduino NTP client code I've found online has a reference ID along the lines of:

  pb[12]  = 49;
  pb[13]  = 0x4E;
  pb[14]  = 49;
  pb[15]  = 52;

which ends up being "1N14". Does anyone know why this was chosen, rather than something that meets the NTP RFC, like "INIT", or perhaps the 4 octets of localIP(), with the stratum (byte 2, pb[1]) set to 16?

johnwasser


which ends up being "1N14". Does anyone know why this was chosen,


1N14 is a model of Nixie Tube use in some Nixie Clock projects.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

robtillaart


in practice NTP doesn't care much what is in those 4 bytes AFAIK. You could try with different values and see what happens ...
(don't poll NTPservers more than once a minute, they don't like to be flooded.)
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

mjbnz


1N14 is a model of Nixie Tube use in some Nixie Clock projects.


That's as good an answer as any.. ;)


in practice NTP doesn't care much what is in those 4 bytes AFAIK. You could try with different values and see what happens ...
(don't poll NTPservers more than once a minute, they don't like to be flooded.)


No, they're entirely arbitrary - except for the case of stratum 0, where some combinations of characters are used to rate limit clients... precisely related to your last line.

Personally, my NTP server broadcasts to the network once a minute, so as it stands, the arduino never has to request the time anyway.

Thanks for the replies guys.

Go Up