diff options
Diffstat (limited to 'src/mm-shared-qmi.c')
-rw-r--r-- | src/mm-shared-qmi.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mm-shared-qmi.c b/src/mm-shared-qmi.c index 695ca341..35911713 100644 --- a/src/mm-shared-qmi.c +++ b/src/mm-shared-qmi.c @@ -3308,8 +3308,10 @@ uim_get_slot_status_ready (QmiClientUim *client, continue; } - raw_iccid = mm_bcd_to_string ((const guint8 *)slot_status->iccid->data, slot_status->iccid->len, - TRUE /* low_nybble_first */); + /* This is supposed to be BCD, but some carriers have non-spec-compliant ICCIDs that use + * A-F characters as part of the operator-specific part of the ICCID. Parse it as hex and + * let mm_3gpp_parse_iccid take care of handling the A-F characters properly. */ + raw_iccid = mm_utils_bin2hexstr ((const guint8 *)slot_status->iccid->data, slot_status->iccid->len); if (!raw_iccid) { mm_obj_warn (self, "not creating SIM object: failed to convert ICCID from BCD"); g_ptr_array_add (ctx->sim_slots, NULL); |