16-04-2021, 03:05
Hello all
AQM firmware 320-b003
I'm not 100% sure but I think I may have found a bug in the way the AQM module updates the time - or more importantly what happens when it fails to update the time.
I have just put a display on my AQM module and watching the time it sometimes is an hour out, others not. I changed the run_everyHour to run every 10 mins for debug and turned on serial debug and here is what I see. (Ignore the extra serial debug prints of 'update start' and 'Hourly update run', those are mine to track the routine entry etc)
Sending NTP request to sync clock...
NTP replied
UTC time from NTP server: 01:14:41
Local time adjusted to: 13:14:41
Hourly update run
Update start
Sending NTP request to sync clock...
NTP replied
UTC time from NTP server: 01:24:42
Local time adjusted to: 13:24:42
Hourly update run
Update start
Sending NTP request to sync clock...
NTP Clock adjust failed!
Hourly update run
Update start
Sending NTP request to sync clock...
NTP replied
UTC time from NTP server: 01:34:42
Local time adjusted to: 13:34:42
Hourly update run
Update start
Sending NTP request to sync clock...
NTP replied
UTC time from NTP server: 01:44:42
Local time adjusted to: 13:44:42
Hourly update run
So from the above we see that if an update fails then (because I have set a 10 minute update interval) the time is now 10 minutes slow, and continues to be despite further good ntp updates.
This explains the problem I saw when the updates are hourly, if one update fails then the time remains an hour slow until a system restart is performed.
I'm not sure if anyone else has seen this problem, or maybe it is fixed already in a later version and I just need to upgrade the firmware?
Regards to all
Colin
AQM firmware 320-b003
I'm not 100% sure but I think I may have found a bug in the way the AQM module updates the time - or more importantly what happens when it fails to update the time.
I have just put a display on my AQM module and watching the time it sometimes is an hour out, others not. I changed the run_everyHour to run every 10 mins for debug and turned on serial debug and here is what I see. (Ignore the extra serial debug prints of 'update start' and 'Hourly update run', those are mine to track the routine entry etc)
Sending NTP request to sync clock...
NTP replied
UTC time from NTP server: 01:14:41
Local time adjusted to: 13:14:41
Hourly update run
Update start
Sending NTP request to sync clock...
NTP replied
UTC time from NTP server: 01:24:42
Local time adjusted to: 13:24:42
Hourly update run
Update start
Sending NTP request to sync clock...
NTP Clock adjust failed!
Hourly update run
Update start
Sending NTP request to sync clock...
NTP replied
UTC time from NTP server: 01:34:42
Local time adjusted to: 13:34:42
Hourly update run
Update start
Sending NTP request to sync clock...
NTP replied
UTC time from NTP server: 01:44:42
Local time adjusted to: 13:44:42
Hourly update run
So from the above we see that if an update fails then (because I have set a 10 minute update interval) the time is now 10 minutes slow, and continues to be despite further good ntp updates.
This explains the problem I saw when the updates are hourly, if one update fails then the time remains an hour slow until a system restart is performed.
I'm not sure if anyone else has seen this problem, or maybe it is fixed already in a later version and I just need to upgrade the firmware?
Regards to all
Colin
41south.net.nz powered by WeatherDuino and Weewx