Fix
This commit is contained in:
parent
9fcacfb273
commit
08c825a2ed
|
|
@ -62,7 +62,20 @@ AtCommandResult AtGsmTelitLe910_PdpActivate(tAtCmd *env, uint8_t cid) {
|
||||||
|
|
||||||
AtCmdTxSendLn(env);
|
AtCmdTxSendLn(env);
|
||||||
|
|
||||||
return AtCmdOkErrAnswer(env, env->stdRxTimeout*10);
|
uint32_t leftMs;
|
||||||
|
uint32_t endMs = SystemGetMs() + env->stdRxTimeout * 2;
|
||||||
|
|
||||||
|
while (endMs > SystemGetMs()) {
|
||||||
|
leftMs = endMs - SystemGetMs();
|
||||||
|
if ((AtCmdReceiveNextLine(env, leftMs) == AT_OK) && (SystemGetMs() < endMs)) {
|
||||||
|
if (AtCmdRxBeginWithStatic(env, "OK"))return AT_OK;
|
||||||
|
if (AtCmdRxBeginWithStatic(env, "ERROR"))return AT_ERROR;
|
||||||
|
if (AtCmdRxBeginWithStatic(env, "+CME ERROR"))return AT_ERROR;
|
||||||
|
AtCmdProcessUnresolvedLine(env);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return AT_TIMEOUT;
|
||||||
}
|
}
|
||||||
|
|
||||||
AtCommandResult AtGsmTelitLe910_PdpDeactivate(tAtCmd *env, uint8_t cid) {
|
AtCommandResult AtGsmTelitLe910_PdpDeactivate(tAtCmd *env, uint8_t cid) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue