All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergey Matyukevich <geomatsi@gmail.com>
To: ofono@ofono.org
Subject: Re: [RFC PATCH 4/4] plugins: gemalto: fix incomplete at-chat shutdown
Date: Mon, 17 Aug 2020 19:56:46 +0300	[thread overview]
Message-ID: <20200817165646.GA4449@curiosity> (raw)
In-Reply-To: <20200815214358.69100-5-geomatsi@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1349 bytes --]

> Function gemalto_modem_ready attempts to restart AT chat data->app
> after  incomplete shutdown. As a result, new AT chat does not work
> as expected loosing AT commands.
> 
> Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
> ---
>  plugins/gemalto.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/plugins/gemalto.c b/plugins/gemalto.c
> index 238c7cc4..321c8c1b 100644
> --- a/plugins/gemalto.c
> +++ b/plugins/gemalto.c

...

> @@ -451,6 +455,8 @@ static void gemalto_modem_ready(GAtResult *result, gpointer user_data)
>  	data->modem_ready_id = 0;
>  	data->trial_cmd_id = 0;
>  
> +	g_at_chat_cancel_all(data->app);
> +	g_at_chat_unregister_all(data->app);
>  	g_at_chat_unref(data->app);
>  
>  	data->app = open_device(app);

Please disregard this patch in the series. This change does not resolve
the root cause. It looks like when gemalto_modem_ready is called on
^SYSSTART, occasionally modem is not ready to process AT commands.
As a result, the upcoming gemalto_initialize function fails due to
timed out AT commands.

It turns out that the approach implemented in ublox plugin (repeated
probe AT command) provides more reliable results, in particular
in power-off tests. I will do more testing and update this patch
in the next revision of the patch set.

Regards,
Sergey

  reply	other threads:[~2020-08-17 16:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-15 21:43 [RFC PATCH 0/4] gemalto: USB ethernet data path for ELS81x Sergey Matyukevich
2020-08-15 21:43 ` [RFC PATCH 1/4] drivers: gemalto: add gprs-context driver Sergey Matyukevich
2020-08-17 19:23   ` Denis Kenzior
2020-08-15 21:43 ` [RFC PATCH 2/4] plugins: udevng: detect gemalto network interfaces Sergey Matyukevich
2020-08-15 21:43 ` [RFC PATCH 3/4] plugins: gemalto: add optional gprs-context driver Sergey Matyukevich
2020-08-15 21:43 ` [RFC PATCH 4/4] plugins: gemalto: fix incomplete at-chat shutdown Sergey Matyukevich
2020-08-17 16:56   ` Sergey Matyukevich [this message]
2020-08-17 19:54   ` Denis Kenzior
2020-08-17 20:22     ` Sergey Matyukevich
2020-08-18  9:06     ` Martin =?unknown-8bit?q?Hundeb=C3=B8ll?=
2020-08-18 14:33       ` Denis Kenzior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200817165646.GA4449@curiosity \
    --to=geomatsi@gmail.com \
    --cc=ofono@ofono.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.