Hello,
I am currently using NCS version 1.6.1 with my modem's firmware version being 1.3.0.
I have encountered an issue while utilizing Zephyr's SNTP library to retrieve time from time.google.com.
Periodically, I am experiencing the following error:
net_sntp: Mismatch originate timestamp: -2085978480, expect: -2085978479
This error appears to originate from the parse_response(...)
function in sntp.c
.
Upon further investigation, I have observed that this error consistently occurs whenever there is a change in the
RRC state during the SNTP request. In over 20 instances of the error, the RRC state has indeed changed.
[00:01:44.449,462] <inf> app: SNTP request on time.google.com
[00:01:46.197,601] <inf> app: RRC mode: Idle
[00:01:46.333,679] <inf> app: RRC mode: Connected
[00:01:46.452,087] <err>app: Request failed with error -22 (the timestamp mismatch error)
I am reaching out to seek clarification on this phenomenon.
Could you provide insights into why the RRC state change might be causing a timestamp mismatch in the SNTP response?
Is this behavior normal? How could I avoid this error?
It seems to be related to timing, and I suspect that an RRC state change in the midst of the query might be disrupting the timing.
Your assistance in resolving this matter would be greatly appreciated.
Best regards.