Here is the description of my system:
I have an ESP32 which connect to a Raspberry Pi configured as an access point.
On my raspberry pi i have a NTP server : I installed ntpd and i modify the ntpd.conf to add the lines:
server 127.127.1.0 prefer
fudge 127.127.1.0 stratum 12
on my Esp32, I use the library NTPClient.h (GitHub - WhymustIhaveaname/NTPClient: Connect to a NTP server which is a forked that provide milliseconds). The NTP updates are "overkill" for debuging: every 5 seconds, and then display the time every 10ms.
I am keeping developing my system which would require MQTT. Therefore I am using Node-Red.
For now, my simple code does not have any MQTT connection, just sending/receiving NTP paquets.
The issue:
I run the code for few minutes, and I get the real time.
After few minute, i launch node-red, and once everything is properly loaded, the NTP update is completely messed up.
23:43:29.310
23:43:29.320
23:43:29.330
23:43:29.340
23:43:29.350
23:43:29.360
23:43:29.370
23:43:29.380
23:43:29.390
23:43:29.400
23:43:29.410
23:43:29.420
23:43:29.430
23:43:29.440
23:43:29.450
23:43:29.460
sent ntp packet
got ntp packet.
tik, tok, (tok-tik)/2: 347774, 347794, 10.00
receive_int, transmit_int: 0, 0
receive_dec, transmit_dec: 0, 0.000000, 0, 0.000000
current Epoc: 2085978496 0.010000
06:28:16.016
06:28:16.026
06:28:16.036
06:28:16.046
06:28:16.056
06:28:16.066
06:28:16.076
06:28:16.086
06:28:16.096
06:28:16.106
06:28:16.116
06:28:16.126
06:28:16.136
06:28:16.146
I did the test few times, and each time the updated times is exactly 06:28:16, it increases to 06:28:26, then reset to 06:28:16
The main issue: on the boot
If node red is launched the first NTP request provide always the same time: 04:39:39 which is later updated to 06:28:16
Are you aware of a potential interaction between node-red and the ntp server?
Thank you
Sylvain