diff options
author | Eric Caruso <ejcaruso@chromium.org> | 2020-06-12 15:18:28 -0700 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2020-10-19 20:38:43 +0000 |
commit | e24a8240cb957c1875f2f3eab14aa5005c3b8f40 (patch) | |
tree | 369a6c88566a5721bbb7681c8294525c1cbfe668 /src/mm-modem-helpers-qmi.c | |
parent | 9fca0467801d41598666dd63e9394ed806c5a399 (diff) |
mm-shared-qmi: load EID during SIM slot loading
SIMs can be created with an EID fetched during load_sim_slots
while initializing the modem, if present.
Since load_eid would be implemented with the same mechanism
we avoid using it here (if Get Slot Status fails once, it
probably doesn't make a lot of sense to try it again).
Diffstat (limited to 'src/mm-modem-helpers-qmi.c')
-rw-r--r-- | src/mm-modem-helpers-qmi.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mm-modem-helpers-qmi.c b/src/mm-modem-helpers-qmi.c index e9291a71..52cad511 100644 --- a/src/mm-modem-helpers-qmi.c +++ b/src/mm-modem-helpers-qmi.c @@ -2026,3 +2026,17 @@ mm_qmi_uim_get_card_status_output_parse (gpointer log_ *o_lock = lock; return TRUE; } + +/*************************************************************************/ +/* EID parsing */ + +#define EID_BYTE_LENGTH 16 + +gchar * +mm_qmi_uim_decode_eid (const gchar *eid, gsize eid_len) +{ + if (eid_len != EID_BYTE_LENGTH) + return NULL; + + return mm_bcd_to_string ((const guint8 *) eid, eid_len, FALSE /* low_nybble_first */); +} |