Re: [MM PATCH 2/2] novatel-lte: retry $NWQMISTATUS upon an unknown error during connecting
- From: Aleksander Morgado <aleksander lanedo com>
- To: Ben Chan <benchan chromium org>
- Cc: networkmanager-list gnome org
- Subject: Re: [MM PATCH 2/2] novatel-lte: retry $NWQMISTATUS upon an unknown error during connecting
- Date: Mon, 22 Oct 2012 10:49:28 +0200
On 10/19/2012 08:44 AM, Ben Chan wrote:
> 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.
Pushed, thanks.
>
> (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
> ---
> 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 e570024..e1944bb 100644
> --- a/plugins/novatel/mm-broadband-bearer-novatel-lte.c
> +++ b/plugins/novatel/mm-broadband-bearer-novatel-lte.c
> @@ -191,12 +191,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");
>
--
Aleksander
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]