NTPClient
NTPClient copied to clipboard
Malformed NTP request
FYI, the following is perhaps intended to spell "INIT" code but unfortunately without the "0x" prefix some values are unintended decimal representation resulting in the nonsensical ASCII code "1N14".
packetBuffer[12] = 49; packetBuffer[13] = 0x4E; packetBuffer[14] = 49; packetBuffer[15] = 52;
Well spotted, but it's not clear to me that this actually matters. Given that the reference type is zero (unspecified) and the reference timestamp is zero, it's almost certainly ignored. Do you have a suggestion for a better value?
packetBuffer[12] = 0x49; packetBuffer[13] = 0x4E; packetBuffer[14] = 0x49; packetBuffer[15] = 0x52;
packetBuffer[12] = 0x49; packetBuffer[13] = 0x4E; packetBuffer[14] = 0x49; packetBuffer[15] = 0x52;
This is INIR isn't it ? should be packetBuffer[15] = 0x54;