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
_______________________________________________
ofono mailing list
ofono@ofono.org
https://lists.ofono.org/mailman/listinfo/ofono