Skip to content

Commit c8287e5

Browse files
author
Ari Parkkila
committed
Cellular: Fix AT URC handler not to dismiss incoming chars
1 parent 9c62ea3 commit c8287e5

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
@@ -282,21 +282,19 @@ void ATHandler::process_oob()
282282
if (!(_fileHandle->readable() || (_recv_pos < _recv_len))) {
283283
break; // we have nothing to read anymore
284284
}
285-
_start_time = rtos::Kernel::get_ms_count(); // time to process next (potential) URC
286285
} else if (mem_str(_recv_buff, _recv_len, CRLF, CRLF_LENGTH)) { // If no match found, look for CRLF and consume everything up to CRLF
287286
consume_to_tag(CRLF, true);
288287
} else {
289288
if (!fill_buffer()) {
289+
reset_buffer(); // consume anything that could not be handled
290290
break;
291291
}
292+
_start_time = rtos::Kernel::get_ms_count();
292293
}
293294
}
294295
_at_timeout = timeout;
295296
}
296297
tr_debug("process_oob exit");
297-
298-
flush(); // consume anything that could not be handled
299-
300298
unlock();
301299
}
302300

0 commit comments

Comments
 (0)