Skip to content

Commit 18d4adf

Browse files
authored
Merge pull request #11719 from wajahat-ublox/echo_fix
Ensure modem echo is off before sending other AT commands
2 parents fe94092 + c5f164d commit 18d4adf

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

features/cellular/framework/AT/AT_CellularDevice.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -454,10 +454,12 @@ nsapi_error_t AT_CellularDevice::init()
454454
_at->clear_error();
455455
_at->flush();
456456
_at->at_cmd_discard("E0", "");
457-
_at->at_cmd_discard("+CMEE", "=1");
458-
_at->at_cmd_discard("+CFUN", "=1");
459457
if (_at->get_last_error() == NSAPI_ERROR_OK) {
460-
break;
458+
_at->at_cmd_discard("+CMEE", "=1");
459+
_at->at_cmd_discard("+CFUN", "=1");
460+
if (_at->get_last_error() == NSAPI_ERROR_OK) {
461+
break;
462+
}
461463
}
462464
tr_debug("Wait 100ms to init modem");
463465
rtos::ThisThread::sleep_for(100); // let modem have time to get ready

0 commit comments

Comments
 (0)