huawei: improved after-sim-unlock step
Submitted by Aleksander Morgado
Assigned to ModemManager bug user
Originally reported at: https://bugzilla.gnome.org/show_bug.cgi?id=719917 Please refer to the original bug report if more details are needed.
The Huawei plugin has already a "after-sim-unlock" step subclassed, which just waits 3s after a SIM unlock before going on with the initialization sequence (e.g. loading own numbers).
Some modems, like the Huawei K3520, may require even more time, though:
<debug> [1386259522.612855] [mm-at-serial-port.c:436]
debug_log(): (ttyUSB2): --> 'AT+CNUM
<debug> [1386259522.622586] [mm-at-serial-port.c:436]
debug_log(): (ttyUSB2): <-- '
<CR>``<LF>+CME ERROR: 14
<debug> [1386259522.622665] [mm-serial-parsers.c:364]
mm_serial_parser_v1_parse(): Got failure code 14: SIM busy
The after-sim-unlock step should be improved to make sure the SIM is fully initialized before going on; either looking for SIM busy errors or checking for "^SIMST: 1" indications.