Loading...
Pages: [1]   Go Down
Author Topic: UDP NTP Clients  (Read 479 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 96
Posts: 6361
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Netherlands
Offline Offline
Tesla Member
***
Karma: 87
Posts: 9392
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


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.)
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

0
Offline Offline
Newbie
*
Karma: 0
Posts: 2
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

That's as good an answer as any.. smiley-wink

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.
Logged

Pages: [1]   Go Up
Print
 
Jump to: