Hi Denis,

I've just seen the same issue on a huawei E369. So i'm not so sure fixing
it in the plugin is the best way.
What i've done now is reschedule calling __ofono_sim_recheck after 5
seconds if sim_pin_query_cb get's a CME Error 14.
Is it ok to do it like this?

diff --git a/src/sim.c b/src/sim.c
index 8059d2b..46b0880 100644
--- a/src/sim.c
+++ b/src/sim.c
@@ -2689,6 +2689,13 @@ ofono_bool_t ofono_sim_remove_spn_watch(struct
ofono_sim *sim, unsigned int *id)
        return ret;
 }

+static gboolean sim_busy_poll(gpointer data)
+{
+       struct ofono_sim *sim = data;
+       __ofono_sim_recheck_pin(sim);
+       return FALSE;
+}
+
 static void sim_pin_query_cb(const struct ofono_error *error,
                                enum ofono_sim_password_type pin_type,
                                void *data)
@@ -2698,8 +2705,12 @@ static void sim_pin_query_cb(const struct
ofono_error *error,
        const char *path = __ofono_atom_get_path(sim->atom);
        const char *pin_name;

+
        if (error->type != OFONO_ERROR_TYPE_NO_ERROR) {
-               ofono_error("Querying PIN authentication state failed");
+               if (error->type == OFONO_ERROR_TYPE_CME && error->error ==
14)
+                       g_timeout_add_seconds(5, sim_busy_poll, sim);
+               else
+                       ofono_error("Querying PIN authentication state
failed");
                return;
        }

Thanks,
Cedric
_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono

Reply via email to