zte: add 1 second delay after sim unlock to avoid IMSI reading issue
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/306 Signed-off-by: Louis-Alexis Eyraud <louis-alexis.eyraud@sigfox.com>
This commit is contained in:
committed by
Aleksander Morgado
parent
89cd1696c3
commit
9c353cf6f0
@@ -187,6 +187,19 @@ modem_after_sim_unlock_context_step (GTask *task)
|
||||
task);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
after_sim_unlock_wait_cb (GTask *task)
|
||||
{
|
||||
/* Attempt to disable floods of "+ZUSIMR:2" unsolicited responses that
|
||||
* eventually fill up the device's buffers and make it crash. Normally
|
||||
* done during probing, but if the device has a PIN enabled it won't
|
||||
* accept the +CPMS? during the probe and we have to do it here.
|
||||
*/
|
||||
modem_after_sim_unlock_context_step (task);
|
||||
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
|
||||
static void
|
||||
modem_after_sim_unlock (MMIfaceModem *self,
|
||||
GAsyncReadyCallback callback,
|
||||
@@ -201,12 +214,7 @@ modem_after_sim_unlock (MMIfaceModem *self,
|
||||
task = g_task_new (self, NULL, callback, user_data);
|
||||
g_task_set_task_data (task, ctx, g_free);
|
||||
|
||||
/* Attempt to disable floods of "+ZUSIMR:2" unsolicited responses that
|
||||
* eventually fill up the device's buffers and make it crash. Normally
|
||||
* done during probing, but if the device has a PIN enabled it won't
|
||||
* accept the +CPMS? during the probe and we have to do it here.
|
||||
*/
|
||||
modem_after_sim_unlock_context_step (task);
|
||||
g_timeout_add_seconds (1, (GSourceFunc)after_sim_unlock_wait_cb, task);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user