aboutsummaryrefslogtreecommitdiff
path: root/src/mm-modem-helpers-qmi.h
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2019-09-16 14:45:10 +0200
committerAleksander Morgado <aleksander@aleksander.es>2019-10-11 08:16:04 +0000
commit6977b41adb6adaad4a7fe00d34bd2a0eb82d46d1 (patch)
tree07e2389c04e6208f37c45f2662cdc415b46393ef /src/mm-modem-helpers-qmi.h
parenta55543d11e2eb4fa4114932573e6a84656bc99ea (diff)
broadband-modem-qmi: prefer ASCII unique IDs
If the manufacturer uses QMI unique IDs in ASCII, use the same format in our APIs, instead of blindly converting them to a 16-byte HEX string. This makes user operations much nicer, e.g. instead of: $ sudo mmcli -m 0 --firmware-list ---------------- Firmware | list: 02.20.03.00_GENERIC | current: yes | gobi pri unique id: 3030322E3031375F3030300000000000 | gobi modem unique id: 3F5F3F00000000000000000000000000 | 02.14.03.02_SPRINT | current: no | gobi pri unique id: 3030322E3031325F3030310000000000 | gobi modem unique id: 3F5F3F00000000000000000000000000 | 02.20.03.22_VERIZON | current: no | gobi pri unique id: 3030322E3032365F3030300000000000 | gobi modem unique id: 3F5F3F00000000000000000000000000 | 02.14.03.00_VODAFONE | current: no | gobi pri unique id: 3030302E3030385F3030300000000000 | gobi modem unique id: 3F5F3F00000000000000000000000000 We will have: $ sudo mmcli -m 1 --firmware-list ---------------- Firmware | list: 02.20.03.00_GENERIC | current: no | gobi pri unique id: 002.017_000 | gobi modem unique id: ?_? | 02.14.03.02_SPRINT | current: no | gobi pri unique id: 002.012_001 | gobi modem unique id: ?_? | 02.20.03.22_VERIZON | current: yes | gobi pri unique id: 002.026_000 | gobi modem unique id: ?_? | 02.14.03.00_VODAFONE | current: no | gobi pri unique id: 000.008_000 | gobi modem unique id: ?_?
Diffstat (limited to 'src/mm-modem-helpers-qmi.h')
-rw-r--r--src/mm-modem-helpers-qmi.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mm-modem-helpers-qmi.h b/src/mm-modem-helpers-qmi.h
index a51c4f66..5c0200e4 100644
--- a/src/mm-modem-helpers-qmi.h
+++ b/src/mm-modem-helpers-qmi.h
@@ -138,4 +138,12 @@ typedef struct {
MMModemCapability mm_modem_capability_from_qmi_capabilities_context (MMQmiCapabilitiesContext *ctx);
+/*****************************************************************************/
+/* QMI unique id manipulation */
+
+gchar *mm_qmi_unique_id_to_firmware_unique_id (GArray *qmi_unique_id,
+ GError **error);
+GArray *mm_firmware_unique_id_to_qmi_unique_id (const gchar *unique_id,
+ GError **error);
+
#endif /* MM_MODEM_HELPERS_QMI_H */