modem-helpers,sim: auto-detect if ICCID response is character swapped
This patch modifies mm_3gpp_parse_iccid() to auto-detect if an ICCID response is character swapped or not by comparsing the major industry identifier part of the ICCID response to the known value (89) for telecommunication purposes. This addresses the issue where the same AT command (e.g. AT^ICCID used by the huawei plugin) does not report ICCID in a consistent format.
This commit is contained in:

committed by
Aleksander Morgado

parent
b786ac0deb
commit
b5ef861d12
@@ -82,8 +82,7 @@ iccid_read_ready (MMBaseModem *modem,
|
||||
return;
|
||||
}
|
||||
|
||||
/* Sierra !ICCID response is already character swapped */
|
||||
parsed = mm_3gpp_parse_iccid (p, FALSE, &local);
|
||||
parsed = mm_3gpp_parse_iccid (p, &local);
|
||||
if (parsed)
|
||||
g_simple_async_result_set_op_res_gpointer (simple, parsed, g_free);
|
||||
else
|
||||
|
Reference in New Issue
Block a user