Always read to end of u-blox CMEE error

This commit is contained in:
Sara Damiano
2019-05-31 18:11:06 -04:00
parent 17979905d2
commit eb61fe52c2

View File

@@ -646,8 +646,6 @@ protected:
result = stream.readStringUntil('\n').toInt();
// if (result) DBG("### DATA AVAILABLE:", result, "on", mux);
waitResponse();
} else if (res == 3) {
streamSkipUntil('\n'); // Skip the error text
}
if (!result) {
sockets[mux]->sock_connected = modemGetConnected(mux);
@@ -718,6 +716,9 @@ TINY_GSM_MODEM_STREAM_UTILITIES()
goto finish;
} else if (r3 && data.endsWith(r3)) {
index = 3;
if (r3 == GFP(GSM_CME_ERROR)) {
streamSkipUntil('\n'); // Read out the error
}
goto finish;
} else if (r4 && data.endsWith(r4)) {
index = 4;