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.
This commit is contained in:
Vincent Palatin
2021-04-14 15:32:26 +02:00
parent a74c1c9bd8
commit f7ec13deb8

View File

@@ -274,7 +274,7 @@ load_operator_identifier (MMBaseSim *self,
message = mbim_message_home_provider_query_new (NULL); message = mbim_message_home_provider_query_new (NULL);
mbim_device_command (device, mbim_device_command (device,
message, message,
10, 30,
NULL, NULL,
(GAsyncReadyCallback)load_operator_identifier_ready, (GAsyncReadyCallback)load_operator_identifier_ready,
task); task);
@@ -335,7 +335,7 @@ load_operator_name (MMBaseSim *self,
message = mbim_message_home_provider_query_new (NULL); message = mbim_message_home_provider_query_new (NULL);
mbim_device_command (device, mbim_device_command (device,
message, message,
10, 30,
NULL, NULL,
(GAsyncReadyCallback)load_operator_name_ready, (GAsyncReadyCallback)load_operator_name_ready,
task); task);