From f7ec13deb88e9bd292d69ec7442dc892e51f3c52 Mon Sep 17 00:00:00 2001 From: Vincent Palatin Date: Wed, 14 Apr 2021 15:32:26 +0200 Subject: sim-mbim: increase the timeout for the MBIM_CID_HOME_PROVIDER query Increase the timeout from 10 seconds to 30 seconds when reading the operator information through the MBIM_CID_HOME_PROVIDER query. We have observed cases where it took more than 12 seconds on a Fibocom L850-GL modem with specific China Unicom SIMs. This timeout was actually the cause of a corruption of the operator name (e.g. returning '@' rather than the real operator name) on the Intel XMM7360 based L850-GL. The following scenario was happening: - the base-sim code sends a first MBIM 'home-provider' query to read the operator identifier. - this query times-out after 10 seconds. - the base-sim immediately sends another MBIM 'home-provider' query to read the operator name. - the modem returns a corrupted operator identifier. Intel helped for the debugging and indicates that when the first query happens, the modem starts reading the SIM files (EF SPN/PNN), apparently it's taking a long time, when it's receives the second query while the first one is not entirely processed, this triggers a bug (in the modem firmware) and returns a corrupted name. --- src/mm-sim-mbim.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mm-sim-mbim.c b/src/mm-sim-mbim.c index e8889fa1..9fa24e96 100644 --- a/src/mm-sim-mbim.c +++ b/src/mm-sim-mbim.c @@ -274,7 +274,7 @@ load_operator_identifier (MMBaseSim *self, message = mbim_message_home_provider_query_new (NULL); mbim_device_command (device, message, - 10, + 30, NULL, (GAsyncReadyCallback)load_operator_identifier_ready, task); @@ -335,7 +335,7 @@ load_operator_name (MMBaseSim *self, message = mbim_message_home_provider_query_new (NULL); mbim_device_command (device, message, - 10, + 30, NULL, (GAsyncReadyCallback)load_operator_name_ready, task); -- cgit v1.2.3