From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: Stuck in modem driver enable
Date: Thu, 18 Oct 2018 17:48:01 -0500 [thread overview]
Message-ID: <d23da274-c820-db96-763b-6cf94110f21a@gmail.com> (raw)
In-Reply-To: <AM4PR1001MB0786A11CCCAC698C6DE3A93196F80@AM4PR1001MB0786.EURPRD10.PROD.OUTLOOK.COM>
[-- Attachment #1: Type: text/plain, Size: 1691 bytes --]
Hi Mattias,
On 10/18/2018 05:52 AM, Mattias Månsson wrote:
> We have implemented a driver for the Gemalto modem we are using and
> today I noticed that it got stuck in initialization (during enable). The
> problem is that the AT+CFUN=4 (which is the last step of our init) now
> returned a CME error. The error handling for this is inspired from all
> the other drivers:
>
>
> static void cfun_enable(gboolean ok, GAtResult *result, gpointer user_data)
> {
> struct ofono_modem *modem = user_data;
> struct verimalto_data *data = ofono_modem_get_data(modem);
>
> if (!ok) {
> g_at_chat_unref(data->app);
> data->app = NULL;
>
> g_at_chat_unref(data->mdm);
> data->mdm = NULL;
>
> ofono_modem_set_powered(modem, FALSE);
> return;
> }
>
> // Get initial SIM state
> data->sim_state_query = at_util_sim_state_query_new(data->app,
> 2, 20, sim_state_cb, modem,
> NULL);
> }
>
> This will put the modem in not powered state. The problem is that as it
> has not completed the initialization, there is now no interfaces at all
What interfaces? DBus interfaces? You still have the Modem interface
present...
> set up. So we can not try to power it again or anything else. Are all
The above code does not actually trigger the removal of the Modem
itself. So that object is still present and you can still try to set
Powered to True. It might still fail the second time of course...
> these drivers having an issue with error handling or have I missed
> something else? And how could I handle it better?
Not that I'm aware of. Is there perhaps something deeper happening here
than what you describe?
Regards,
-Denis
prev parent reply other threads:[~2018-10-18 22:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-18 10:52 Stuck in modem driver enable Mattias =?unknown-8bit?q?M=C3=A5nsson?=
2018-10-18 22:48 ` Denis Kenzior [this message]
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=d23da274-c820-db96-763b-6cf94110f21a@gmail.com \
--to=denkenz@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.