Prior to this commit, the response of AT+QNTP=1 AT command hasn't been checked. This means the SyncTime() function won't return a falsy value even if the command execution was failed (e.g. because of Open PDP context failed).
This commit fixes that issue according to the Rev. EC2x&EG9x&EM05_TCP/IP_AT_Commands_Manual_V1.0 document from QUECTEL.
The response payload format is +QNTP: <err>,<time>, and if the err code isn't 0, that has to be an error indication; for more information, please refer to the 4 Summary of Error Codes section.
So this commit makes the logic check the response error code is 0 or not.
Prior to this commit, the response of
AT+QNTP=1
AT command hasn't been checked. This means theSyncTime()
function won't return a falsy value even if the command execution was failed (e.g. because ofOpen PDP context failed
). This commit fixes that issue according to theRev. EC2x&EG9x&EM05_TCP/IP_AT_Commands_Manual_V1.0
document from QUECTEL.The response payload format is
+QNTP: <err>,<time>
, and if theerr
code isn't0
, that has to be an error indication; for more information, please refer to the4 Summary of Error Codes
section.So this commit makes the logic check the response error code is
0
or not.