diff options
author | Ben Chan <benchan@chromium.org> | 2012-10-18 23:44:19 -0700 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-10-22 10:46:57 +0200 |
commit | 10a0ed12c461242ca3dbf6f9192907d320b561f7 (patch) | |
tree | ba232a0e14117c0f4efdddea2e1692ee0d5dd094 | |
parent | 8362171973c600eb7d253a3f9cc343488f93408f (diff) |
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
-rw-r--r-- | plugins/novatel/mm-broadband-bearer-novatel-lte.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/plugins/novatel/mm-broadband-bearer-novatel-lte.c b/plugins/novatel/mm-broadband-bearer-novatel-lte.c index bf085cd0..80c74645 100644 --- a/plugins/novatel/mm-broadband-bearer-novatel-lte.c +++ b/plugins/novatel/mm-broadband-bearer-novatel-lte.c @@ -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"); |