novatel-lte: retry $NWQMISTATUS upon an unknown error during connecting

The $NWQMISTATUS command sometimes replies an ERROR shortly after
calling the $NWQMICONNECT command, but then replies the proper QMI
status if we retry it. This behavior is observed on an E362 modem with
4.08 firmware.

    (ttyUSB0): --> 'AT$NWQMICONNECT=,,,,,,"",,,"",""<CR>'
    (ttyUSB0): <-- '<CR><LF>OK<CR><LF>'
    (ttyUSB0): --> 'AT$NWQMISTATUS<CR>'
    (ttyUSB0): <-- '<CR><LF>ERROR<CR><LF>'
    Got failure code 100: Unknown error
    QMI connection status failed: Unknown error
This commit is contained in:
Ben Chan
2012-10-18 23:44:19 -07:00
committed by Aleksander Morgado
parent 8362171973
commit 10a0ed12c4

View File

@@ -193,12 +193,14 @@ connect_3gpp_qmistatus_ready (MMBaseModem *modem,
&error);
if (!result) {
mm_warn ("QMI connection status failed: %s", error->message);
g_simple_async_result_take_error (ctx->result, error);
detailed_connect_context_complete_and_free (ctx);
return;
}
if (is_qmistatus_connected (result)) {
if (!g_error_matches (error, MM_MOBILE_EQUIPMENT_ERROR, MM_MOBILE_EQUIPMENT_ERROR_UNKNOWN)) {
g_simple_async_result_take_error (ctx->result, error);
detailed_connect_context_complete_and_free (ctx);
return;
}
g_error_free (error);
result = "Unknown error";
} else if (is_qmistatus_connected (result)) {
MMBearerIpConfig *config;
mm_dbg("Connected");