Skip to content

Commit 5cd450c

Browse files
Ari Parkkilaadbridge
authored andcommitted
Cellular: Fix AT URC handler not to dismiss incoming chars
1 parent 28060c1 commit 5cd450c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

features/cellular/framework/AT/ATHandler.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -280,21 +280,19 @@ void ATHandler::process_oob()
280280
if (!(_fileHandle->readable() || (_recv_pos < _recv_len))) {
281281
break; // we have nothing to read anymore
282282
}
283-
_start_time = rtos::Kernel::get_ms_count(); // time to process next (potential) URC
284283
} else if (mem_str(_recv_buff, _recv_len, CRLF, CRLF_LENGTH)) { // If no match found, look for CRLF and consume everything up to CRLF
285284
consume_to_tag(CRLF, true);
286285
} else {
287286
if (!fill_buffer()) {
287+
reset_buffer(); // consume anything that could not be handled
288288
break;
289289
}
290+
_start_time = rtos::Kernel::get_ms_count();
290291
}
291292
}
292293
_at_timeout = timeout;
293294
}
294295
tr_debug("process_oob exit");
295-
296-
flush(); // consume anything that could not be handled
297-
298296
unlock();
299297
}
300298

0 commit comments

Comments
 (0)