This commit is contained in:
cfif 2024-12-05 15:05:36 +03:00
parent 563ce28fea
commit f5f489aac0
2 changed files with 33 additions and 0 deletions

View File

@ -48,4 +48,6 @@ AtCommandResult GsmWithGnss_setCodecConf(tAtCmd *env, tString32 codecConf);
//4. The current setting is stored in NVM.
AtCommandResult AtGsmTelitLe910_Gnss_ExternalLnaSupport(tAtCmd *env, eTelitLe910_ExternalLnaSupportMode value);
AtCommandResult GsmWithGnss_StartRMCThread2(tAtCmd *env);
#endif //UVEOS_ON_NATION_ATGSMTELITLE910_GNSS_H

View File

@ -204,6 +204,37 @@ AtCommandResult GsmWithGnss_SelectStandartNetwork(tAtCmd *env, uint8_t standatr)
return AtCmdOkErrAnswer(env, env->stdRxTimeout);
}
AtCommandResult GsmWithGnss_StartRMCThread2(tAtCmd *env) {
AtCmdPrepare(env);
AtCmdTxClear(env);
AtCmdSendStatic(env, "AT$GPSNMUN=3,0,0,0,0,1,0\r\n");
uint32_t timeout = 10000;
uint32_t endMs = SystemGetMs() + timeout;
uint32_t leftMs = timeout;
while ((AtCmdReceiveNextLine(env, leftMs) == AT_OK) && (SystemGetMs() < endMs)) {
leftMs = endMs - SystemGetMs();
if (AtCmdRxBeginWithStatic(env, "CONNECT")) {
AtCmdRxClear(env);
return AT_OK;
} else if (AtCmdRxBeginWithStatic(env, "NO CARRIER")) {
AtCmdRxClear(env);
continue;
} else {
AtCmdProcessUnresolvedLine(env);
AtCmdRxClear(env);
continue;
}
}
return AT_TIMEOUT;
}
AtCommandResult GsmWithGnss_StartRMCThread(tAtCmd *env) {
AtCmdPrepare(env);