Sync from SUSE:SLFO:Main libmbim revision 25953102e28c236853d2aa0fe47c3410

This commit is contained in:
Adrian Schröter 2024-05-06 13:37:18 +02:00
commit 598e724946
8 changed files with 2275 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

View File

@ -0,0 +1,698 @@
From 7665d32526f1192e94db2b4bb3e4e73d6a21f62e Mon Sep 17 00:00:00 2001
From: som <somashekhar.puttagangaiah@intel.com>
Date: Thu, 6 Oct 2022 20:52:18 +0530
Subject: [PATCH] intel-mutual-authentication: new service, fcc-lock
when the device is first shipped or comes out of the factory,
it should be protected with a lock till the device reaches
the end user. This FCC lock feature will ensure the device
is secured till its unlocked.
Co-author: Bestha, Lakshminarayana
(cherry picked from commit 910db9cb2b6fde303d3b4720890cf6dc6fc00880)
---
...m-service-intel-mutual-authentication.json | 23 ++
.../libmbim-glib/libmbim-glib-common.sections | 6 +
.../libmbim-glib/libmbim-glib-docs.xml | 6 +
src/libmbim-glib/generated/meson.build | 1 +
src/libmbim-glib/libmbim-glib.h | 2 +
src/libmbim-glib/mbim-cid.c | 15 ++
src/libmbim-glib/mbim-cid.h | 15 ++
src/libmbim-glib/mbim-message.c | 5 +
src/libmbim-glib/mbim-uuid.c | 14 ++
src/libmbim-glib/mbim-uuid.h | 14 ++
.../mbimcli-intel-mutual-authentication.c | 207 ++++++++++++++++++
src/mbimcli/mbimcli.c | 10 +
src/mbimcli/mbimcli.h | 5 +
src/mbimcli/meson.build | 1 +
14 files changed, 324 insertions(+)
create mode 100644 data/mbim-service-intel-mutual-authentication.json
create mode 100644 src/mbimcli/mbimcli-intel-mutual-authentication.c
diff --git a/data/mbim-service-intel-mutual-authentication.json b/data/mbim-service-intel-mutual-authentication.json
new file mode 100644
index 0000000..d3943a1
--- /dev/null
+++ b/data/mbim-service-intel-mutual-authentication.json
@@ -0,0 +1,23 @@
+[
+ // *********************************************************************************
+ { "type" : "Service",
+ "name" : "Intel Mutual Authentication" },
+
+ // *********************************************************************************
+ { "name" : "FCC Lock",
+ "service" : "Intel Mutual Authentication",
+ "type" : "Command",
+ "since" : "1.30",
+ "query" : [],
+ "set" : [ { "name" : "ResponsePresent",
+ "format" : "guint32",
+ "public-format" : "gboolean" },
+ { "name" : "Response",
+ "format" : "guint32" } ],
+
+ "response" : [ { "name" : "ChallengePresent",
+ "format" : "guint32",
+ "public-format" : "gboolean" },
+ { "name" : "Challenge",
+ "format" : "guint32" } ] }
+]
diff --git a/docs/reference/libmbim-glib/libmbim-glib-common.sections b/docs/reference/libmbim-glib/libmbim-glib-common.sections
index 48f7706..5a29bb5 100644
--- a/docs/reference/libmbim-glib/libmbim-glib-common.sections
+++ b/docs/reference/libmbim-glib/libmbim-glib-common.sections
@@ -33,6 +33,7 @@ MBIM_UUID_MS_UICC_LOW_LEVEL_ACCESS
MBIM_UUID_QUECTEL
MBIM_UUID_INTEL_THERMAL_RF
MBIM_UUID_MS_VOICE_EXTENSIONS
+MBIM_UUID_INTEL_MUTUAL_AUTHENTICATION
<SUBSECTION Methods>
mbim_service_get_string
mbim_service_lookup_name
@@ -75,6 +76,7 @@ MbimCidMsUiccLowLevelAccess
MbimCidQuectel
MbimCidIntelThermalRf
MbimCidMsVoiceExtensions
+MbimCidIntelMutualAuthentication
<SUBSECTION Methods>
mbim_cid_can_set
mbim_cid_can_query
@@ -100,6 +102,7 @@ mbim_cid_ms_uicc_low_level_access_get_string
mbim_cid_quectel_get_string
mbim_cid_intel_thermal_rf_get_string
mbim_cid_ms_voice_extensions_get_string
+mbim_cid_intel_mutual_authentication_get_string
<SUBSECTION Private>
mbim_cid_atds_build_string_from_mask
mbim_cid_basic_connect_build_string_from_mask
@@ -121,6 +124,7 @@ mbim_cid_ms_uicc_low_level_access_build_string_from_mask
mbim_cid_quectel_build_string_from_mask
mbim_cid_intel_thermal_rf_build_string_from_mask
mbim_cid_ms_voice_extensions_build_string_from_mask
+mbim_cid_intel_mutual_authentication_build_string_from_mask
<SUBSECTION Standard>
MBIM_TYPE_CID_ATDS
MBIM_TYPE_CID_AUTH
@@ -142,6 +146,7 @@ MBIM_TYPE_CID_MS_UICC_LOW_LEVEL_ACCESS
MBIM_TYPE_CID_QUECTEL
MBIM_TYPE_CID_INTEL_THERMAL_RF
MBIM_TYPE_CID_MS_VOICE_EXTENSIONS
+MBIM_TYPE_CID_INTEL_MUTUAL_AUTHENTICATION
mbim_cid_atds_get_type
mbim_cid_auth_get_type
mbim_cid_basic_connect_get_type
@@ -162,6 +167,7 @@ mbim_cid_ms_sar_get_type
mbim_cid_quectel_get_type
mbim_cid_intel_thermal_rf_get_type
mbim_cid_ms_voice_extensions_get_type
+mbim_cid_intel_mutual_authentication_get_type
</SECTION>
<SECTION>
diff --git a/docs/reference/libmbim-glib/libmbim-glib-docs.xml b/docs/reference/libmbim-glib/libmbim-glib-docs.xml
index 8b11b72..cc65e64 100644
--- a/docs/reference/libmbim-glib/libmbim-glib-docs.xml
+++ b/docs/reference/libmbim-glib/libmbim-glib-docs.xml
@@ -23,6 +23,7 @@
<year>2019</year>
<year>2020</year>
<year>2021</year>
+ <year>2022</year>
<holder>The libmbim-glib authors</holder>
</copyright>
@@ -103,6 +104,7 @@
<xi:include href="xml/mbim-intel-firmware-update.xml"/>
<xi:include href="xml/mbim-intel-firmware-update-v2.xml"/>
<xi:include href="xml/mbim-intel-thermal-rf.xml"/>
+ <xi:include href="xml/mbim-intel-mutual-authentication.xml"/>
</chapter>
<chapter>
@@ -188,6 +190,10 @@
<title>Index of new symbols in 1.28</title>
<xi:include href="xml/api-index-1.28.xml"></xi:include>
</chapter>
+ <chapter id="api-index-1-30" role="1.30">
+ <title>Index of new symbols in 1.30</title>
+ <xi:include href="xml/api-index-1.30.xml"></xi:include>
+ </chapter>
<xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
</book>
diff --git a/src/libmbim-glib/generated/meson.build b/src/libmbim-glib/generated/meson.build
index 2ec85ea..63fe8d1 100644
--- a/src/libmbim-glib/generated/meson.build
+++ b/src/libmbim-glib/generated/meson.build
@@ -108,6 +108,7 @@ services_data = [
['sms'],
['stk'],
['ussd'],
+ ['intel-mutual-authentication'],
]
foreach service_data: services_data
diff --git a/src/libmbim-glib/libmbim-glib.h b/src/libmbim-glib/libmbim-glib.h
index ff2e468..38d8db4 100644
--- a/src/libmbim-glib/libmbim-glib.h
+++ b/src/libmbim-glib/libmbim-glib.h
@@ -4,6 +4,7 @@
* libmbim-glib -- GLib/GIO based library to control MBIM devices
*
* Copyright (C) 2013 - 2014 Aleksander Morgado <aleksander@aleksander.es>
+ * Copyright (C) 2022 Intel Corporation
*/
#ifndef _LIBMBIM_GLIB_H_
@@ -45,6 +46,7 @@
#include "mbim-quectel.h"
#include "mbim-intel-thermal-rf.h"
#include "mbim-ms-voice-extensions.h"
+#include "mbim-intel-mutual-authentication.h"
/* backwards compatibility */
#include "mbim-compat.h"
diff --git a/src/libmbim-glib/mbim-cid.c b/src/libmbim-glib/mbim-cid.c
index d8aa377..11170b3 100644
--- a/src/libmbim-glib/mbim-cid.c
+++ b/src/libmbim-glib/mbim-cid.c
@@ -4,6 +4,7 @@
* libmbim-glib -- GLib/GIO based library to control MBIM devices
*
* Copyright (C) 2013 - 2014 Aleksander Morgado <aleksander@aleksander.es>
+ * Copyright (C) 2022 Intel Corporation
*/
#include "mbim-cid.h"
@@ -228,6 +229,12 @@ static const CidConfig cid_ms_voice_extensions_config [MBIM_CID_MS_VOICE_EXTENSI
{ NO_SET, QUERY, NOTIFY }, /* MBIM_CID_MS_VOICE_EXTENSIONS_NITZ */
};
+/* Note: index of the array is CID-1 */
+#define MBIM_CID_INTEL_MUTUAL_AUTHENTICATION_LAST MBIM_CID_INTEL_MUTUAL_AUTHENTICATION_FCC_LOCK
+static const CidConfig cid_intel_mutual_authentication_config [MBIM_CID_INTEL_MUTUAL_AUTHENTICATION_LAST] = {
+ { SET, QUERY, NO_NOTIFY }, /* MBIM_CID_INTEL_MUTUAL_AUTHENTICATION_FCC_LOCK */
+};
+
gboolean
mbim_cid_can_set (MbimService service,
guint cid)
@@ -279,6 +286,8 @@ mbim_cid_can_set (MbimService service,
return cid_intel_thermal_rf_config[cid - 1].set;
case MBIM_SERVICE_MS_VOICE_EXTENSIONS:
return cid_ms_voice_extensions_config[cid - 1].set;
+ case MBIM_SERVICE_INTEL_MUTUAL_AUTHENTICATION:
+ return cid_intel_mutual_authentication_config[cid - 1].set;
case MBIM_SERVICE_INVALID:
case MBIM_SERVICE_LAST:
default:
@@ -338,6 +347,8 @@ mbim_cid_can_query (MbimService service,
return cid_intel_thermal_rf_config[cid - 1].query;
case MBIM_SERVICE_MS_VOICE_EXTENSIONS:
return cid_ms_voice_extensions_config[cid - 1].query;
+ case MBIM_SERVICE_INTEL_MUTUAL_AUTHENTICATION:
+ return cid_intel_mutual_authentication_config[cid - 1].query;
case MBIM_SERVICE_INVALID:
case MBIM_SERVICE_LAST:
default:
@@ -397,6 +408,8 @@ mbim_cid_can_notify (MbimService service,
return cid_intel_thermal_rf_config[cid - 1].notify;
case MBIM_SERVICE_MS_VOICE_EXTENSIONS:
return cid_ms_voice_extensions_config[cid - 1].notify;
+ case MBIM_SERVICE_INTEL_MUTUAL_AUTHENTICATION:
+ return cid_intel_mutual_authentication_config[cid - 1].notify;
case MBIM_SERVICE_INVALID:
case MBIM_SERVICE_LAST:
default:
@@ -457,6 +470,8 @@ mbim_cid_get_printable (MbimService service,
return mbim_cid_intel_thermal_rf_get_string (cid);
case MBIM_SERVICE_MS_VOICE_EXTENSIONS:
return mbim_cid_ms_voice_extensions_get_string (cid);
+ case MBIM_SERVICE_INTEL_MUTUAL_AUTHENTICATION:
+ return mbim_cid_intel_mutual_authentication_get_string (cid);
case MBIM_SERVICE_LAST:
default:
g_assert_not_reached ();
diff --git a/src/libmbim-glib/mbim-cid.h b/src/libmbim-glib/mbim-cid.h
index c404271..82014db 100644
--- a/src/libmbim-glib/mbim-cid.h
+++ b/src/libmbim-glib/mbim-cid.h
@@ -4,6 +4,7 @@
* libmbim-glib -- GLib/GIO based library to control MBIM devices
*
* Copyright (C) 2013 - 2018 Aleksander Morgado <aleksander@aleksander.es>
+ * Copyright (C) 2022 Intel Corporation
*/
#ifndef _LIBMBIM_GLIB_MBIM_CID_H_
@@ -428,6 +429,20 @@ typedef enum { /*< since=1.28 >*/
MBIM_CID_INTEL_THERMAL_RF_RFIM = 9,
} MbimCidIntelThermalRf;
+/**
+ * MbimCidIntelMutualAuthentication:
+ * @MBIM_CID_INTEL_MUTUAL_AUTHENTICATION_UNKNOWN: Unknown command.
+ * @MBIM_CID_INTEL_MUTUAL_AUTHENTICATION_FCC_LOCK: FCC lock set.
+ *
+ * MBIM commands in the %MBIM_SERVICE_INTEL_MUTUAL_AUTHENTICATION service.
+ *
+ * Since: 1.30
+ */
+typedef enum { /*< since=1.30 >*/
+ MBIM_CID_INTEL_MUTUAL_AUTHENTICATION_UNKNOWN = 0,
+ MBIM_CID_INTEL_MUTUAL_AUTHENTICATION_FCC_LOCK = 1,
+} MbimCidIntelMutualAuthentication;
+
/**
* MbimCidMsVoiceExtensions:
* @MBIM_CID_MS_VOICE_EXTENSIONS_UNKNOWN: Unknown command.
diff --git a/src/libmbim-glib/mbim-message.c b/src/libmbim-glib/mbim-message.c
index 1b9975d..bead3d2 100644
--- a/src/libmbim-glib/mbim-message.c
+++ b/src/libmbim-glib/mbim-message.c
@@ -5,6 +5,7 @@
*
* Copyright (C) 2013 - 2022 Aleksander Morgado <aleksander@aleksander.es>
* Copyright (C) 2022 Google, Inc.
+ * Copyright (C) 2022 Intel Corporation
*/
#include <glib.h>
@@ -39,6 +40,7 @@
#include "mbim-quectel.h"
#include "mbim-intel-thermal-rf.h"
#include "mbim-ms-voice-extensions.h"
+#include "mbim-intel-mutual-authentication.h"
/*****************************************************************************/
@@ -2201,6 +2203,9 @@ mbim_message_get_printable_full (const MbimMessage *self,
case MBIM_SERVICE_MS_VOICE_EXTENSIONS:
fields_printable = __mbim_message_ms_voice_extensions_get_printable_fields (self, line_prefix, &inner_error);
break;
+ case MBIM_SERVICE_INTEL_MUTUAL_AUTHENTICATION:
+ fields_printable = __mbim_message_intel_mutual_authentication_get_printable_fields (self, line_prefix, &inner_error);
+ break;
case MBIM_SERVICE_INVALID:
case MBIM_SERVICE_LAST:
g_assert_not_reached ();
diff --git a/src/libmbim-glib/mbim-uuid.c b/src/libmbim-glib/mbim-uuid.c
index cda7258..fe95923 100644
--- a/src/libmbim-glib/mbim-uuid.c
+++ b/src/libmbim-glib/mbim-uuid.c
@@ -6,6 +6,7 @@
* Copyright (C) 2013 - 2014 Aleksander Morgado <aleksander@aleksander.es>
* Copyright (C) 2014 NVDIA Corporation
* Copyright (C) 2014 Smith Micro Software, Inc.
+ * Copyright (C) 2022 Intel Corporation
*/
#include <config.h>
@@ -256,6 +257,14 @@ static const MbimUuid uuid_ms_voice_extensions = {
.e = { 0x61, 0xcb, 0x03, 0x4a, 0x70, 0x2e }
};
+static const MbimUuid uuid_intel_mutual_authentication = {
+ .a = { 0xf8, 0x5d, 0x46, 0xef },
+ .b = { 0xab, 0x26 },
+ .c = { 0x40, 0x81 },
+ .d = { 0x98, 0x68 },
+ .e = { 0x4d, 0x18, 0x3c, 0x0a, 0x3a, 0xec }
+};
+
static GList *mbim_custom_service_list = NULL;
typedef struct {
@@ -391,6 +400,8 @@ mbim_uuid_from_service (MbimService service)
return &uuid_intel_thermal_rf;
case MBIM_SERVICE_MS_VOICE_EXTENSIONS:
return &uuid_ms_voice_extensions;
+ case MBIM_SERVICE_INTEL_MUTUAL_AUTHENTICATION:
+ return &uuid_intel_mutual_authentication;
case MBIM_SERVICE_LAST:
g_assert_not_reached ();
default:
@@ -467,6 +478,9 @@ mbim_uuid_to_service (const MbimUuid *uuid)
if (mbim_uuid_cmp (uuid, &uuid_ms_voice_extensions))
return MBIM_SERVICE_MS_VOICE_EXTENSIONS;
+ if (mbim_uuid_cmp (uuid, &uuid_intel_mutual_authentication))
+ return MBIM_SERVICE_INTEL_MUTUAL_AUTHENTICATION;
+
for (l = mbim_custom_service_list; l != NULL; l = l->next) {
if (mbim_uuid_cmp (&((MbimCustomService *)l->data)->uuid, uuid))
return ((MbimCustomService *)l->data)->service_id;
diff --git a/src/libmbim-glib/mbim-uuid.h b/src/libmbim-glib/mbim-uuid.h
index 0fe9b05..3d15adf 100644
--- a/src/libmbim-glib/mbim-uuid.h
+++ b/src/libmbim-glib/mbim-uuid.h
@@ -4,6 +4,7 @@
* libmbim-glib -- GLib/GIO based library to control MBIM devices
*
* Copyright (C) 2013 - 2014 Aleksander Morgado <aleksander@aleksander.es>
+ * Copyright (C) 2022 Intel Corporation
*/
#ifndef _LIBMBIM_GLIB_MBIM_UUID_H_
@@ -113,6 +114,7 @@ gboolean mbim_uuid_from_printable (const gchar *str,
* @MBIM_SERVICE_QUECTEL: Quectel specific operations. Since 1.26.2.
* @MBIM_SERVICE_INTEL_THERMAL_RF: Intel thermal rf related commands. Since 1.28
* @MBIM_SERVICE_MS_VOICE_EXTENSIONS: Microsoft Voice extensions service. Since 1.28.
+ * @MBIM_SERVICE_INTEL_MUTUAL_AUTHENTICATION: Intel mutual authentication commands. Since 1.30.
* @MBIM_SERVICE_LAST: Internal value.
*
* Enumeration of the generic MBIM services.
@@ -141,6 +143,7 @@ typedef enum { /*< since=1.0 >*/
MBIM_SERVICE_QUECTEL = 18,
MBIM_SERVICE_INTEL_THERMAL_RF = 19,
MBIM_SERVICE_MS_VOICE_EXTENSIONS = 20,
+ MBIM_SERVICE_INTEL_MUTUAL_AUTHENTICATION = 21,
#if defined LIBMBIM_GLIB_COMPILATION
MBIM_SERVICE_LAST /*< skip >*/
#endif
@@ -378,6 +381,17 @@ typedef enum { /*< since=1.0 >*/
*/
#define MBIM_UUID_MS_VOICE_EXTENSIONS mbim_uuid_from_service (MBIM_SERVICE_MS_VOICE_EXTENSIONS)
+/**
+ * MBIM_UUID_INTEL_MUTUAL_AUTHENTICATION:
+ *
+ * Get the UUID of the %MBIM_SERVICE_INTEL_MUTUAL_AUTHENTICATION service.
+ *
+ * Returns: (transfer none): a #MbimUuid.
+ *
+ * Since: 1.30
+ */
+#define MBIM_UUID_INTEL_MUTUAL_AUTHENTICATION mbim_uuid_from_service (MBIM_SERVICE_INTEL_MUTUAL_AUTHENTICATION)
+
/**
* mbim_service_lookup_name:
* @service: a MbimService or custom service.
diff --git a/src/mbimcli/mbimcli-intel-mutual-authentication.c b/src/mbimcli/mbimcli-intel-mutual-authentication.c
new file mode 100644
index 0000000..f1f867d
--- /dev/null
+++ b/src/mbimcli/mbimcli-intel-mutual-authentication.c
@@ -0,0 +1,207 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/*
+ * mbimcli -- Command line interface to control MBIM devices
+ *
+ * Copyright (C) 2022 Intel Corporation
+ */
+
+#include "config.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <locale.h>
+#include <string.h>
+#include <errno.h>
+
+#include <glib.h>
+#include <gio/gio.h>
+
+#include <libmbim-glib.h>
+
+#include "mbim-common.h"
+#include "mbimcli.h"
+#include "mbimcli-helpers.h"
+
+/* Context */
+typedef struct {
+ MbimDevice *device;
+ GCancellable *cancellable;
+} Context;
+static Context *ctx;
+
+/* Options */
+static gboolean query_fcc_lock_flag;
+static gchar *set_fcc_lock_str;
+
+static GOptionEntry entries[] = {
+ { "query-fcc-lock", 0, 0, G_OPTION_ARG_NONE, &query_fcc_lock_flag,
+ "Query FCC lock information",
+ NULL
+ },
+ { "set-fcc-lock", 0, 0, G_OPTION_ARG_STRING, &set_fcc_lock_str,
+ "Set FCC lock information",
+ "[(ResponsePresent),(Response)]"
+ },
+ {NULL}
+};
+
+GOptionGroup *
+mbimcli_intel_mutual_authentication_get_option_group (void)
+{
+ GOptionGroup *group;
+
+ group = g_option_group_new ("intel-mutual-authentication",
+ "Intel mutual authentication Service options:",
+ "Show Intel mutual authentication Service options",
+ NULL,
+ NULL);
+ g_option_group_add_entries (group, entries);
+
+ return group;
+}
+
+gboolean
+mbimcli_intel_mutual_authentication_options_enabled (void)
+{
+ static guint n_actions = 0;
+ static gboolean checked = FALSE;
+
+ if (checked)
+ return !!n_actions;
+
+ n_actions = (query_fcc_lock_flag +
+ !!set_fcc_lock_str);
+
+ if (n_actions > 1) {
+ g_printerr ("error: too many Intel mutual Authentication actions requested\n");
+ exit (EXIT_FAILURE);
+ }
+
+ checked = TRUE;
+ return !!n_actions;
+}
+
+static void
+context_free (Context *context)
+{
+ if (!context)
+ return;
+
+ if (context->cancellable)
+ g_object_unref (context->cancellable);
+ if (context->device)
+ g_object_unref (context->device);
+ g_slice_free (Context, context);
+}
+
+static void
+shutdown (gboolean operation_status)
+{
+ /* Cleanup context and finish async operation */
+ context_free (ctx);
+ mbimcli_async_operation_done (operation_status);
+}
+
+static void
+query_fcc_lock_ready (MbimDevice *device,
+ GAsyncResult *res,
+ gpointer user_data)
+{
+ MbimMessage *response = NULL;
+ GError *error = NULL;
+ gboolean challenge_present = FALSE;
+ guint32 challenge = 0;
+
+ response = mbim_device_command_finish (device, res, &error);
+ if (!response || !mbim_message_response_get_result (response, MBIM_MESSAGE_TYPE_COMMAND_DONE, &error)) {
+ g_printerr ("error: operation failed: %s\n", error->message);
+ shutdown (FALSE);
+ return;
+ }
+
+ if (!mbim_message_intel_mutual_authentication_fcc_lock_response_parse (response,
+ &challenge_present,
+ &challenge,
+ &error)) {
+ g_printerr ("error: couldn't parse response message: %s\n", error->message);
+ shutdown (FALSE);
+ return;
+ }
+
+ g_print ("FCC lock status: %s\n", challenge_present ? "locked" : "unlocked");
+ if (challenge_present)
+ g_print ("\tChallenge: %u\n", challenge);
+
+ shutdown (TRUE);
+}
+
+void
+mbimcli_intel_mutual_authentication_run (MbimDevice *device,
+ GCancellable *cancellable)
+{
+ g_autoptr(MbimMessage) request = NULL;
+ g_autoptr(GError) error = NULL;
+
+ /* Initialize context */
+ ctx = g_slice_new (Context);
+ ctx->device = g_object_ref (device);
+ ctx->cancellable = cancellable ? g_object_ref (cancellable) : NULL;
+
+ /* Query FCC lock information */
+ if (query_fcc_lock_flag) {
+ g_debug ("Asynchronously querying FCC lock information...");
+
+ request = mbim_message_intel_mutual_authentication_fcc_lock_query_new (NULL);
+ mbim_device_command (ctx->device,
+ request,
+ 10,
+ ctx->cancellable,
+ (GAsyncReadyCallback)query_fcc_lock_ready,
+ NULL);
+ return;
+ }
+
+ /* Set FCC lock information */
+ if (set_fcc_lock_str) {
+ gboolean response_present = FALSE;
+ guint32 response = 0;
+ g_auto(GStrv) split = NULL;
+
+ split = g_strsplit (set_fcc_lock_str, ",", -1);
+
+ if (g_strv_length (split) < 2) {
+ g_printerr ("error: couldn't parse input arguments, missing arguments\n");
+ shutdown (FALSE);
+ return;
+ }
+
+ if (g_strv_length (split) > 2) {
+ g_printerr ("error: couldn't parse input arguments, too many arguments\n");
+ shutdown (FALSE);
+ return;
+ }
+
+ if (!mbimcli_read_boolean_from_string (split[0], &response_present)) {
+ g_printerr ("error: couldn't parse input, wrong value given\n");
+ shutdown (FALSE);
+ return;
+ }
+
+ if (!mbimcli_read_uint_from_string (split[1], &response)) {
+ g_printerr ("error: couldn't parse input, wrong value given\n");
+ shutdown (FALSE);
+ return;
+ }
+
+ request = mbim_message_intel_mutual_authentication_fcc_lock_set_new (response_present, response, NULL);
+ mbim_device_command (ctx->device,
+ request,
+ 10,
+ ctx->cancellable,
+ (GAsyncReadyCallback)query_fcc_lock_ready,
+ NULL);
+ return;
+ }
+ g_warn_if_reached ();
+}
diff --git a/src/mbimcli/mbimcli.c b/src/mbimcli/mbimcli.c
index 3c12ac6..496d553 100644
--- a/src/mbimcli/mbimcli.c
+++ b/src/mbimcli/mbimcli.c
@@ -4,6 +4,7 @@
* mbimcli -- Command line interface to control MBIM devices
*
* Copyright (C) 2013 - 2014 Aleksander Morgado <aleksander@aleksander.es>
+ * Copyright (C) 2022 Intel Corporation
*/
#include "config.h"
@@ -311,6 +312,9 @@ device_open_ready (MbimDevice *dev,
case MBIM_SERVICE_MS_UICC_LOW_LEVEL_ACCESS:
mbimcli_ms_uicc_low_level_access_run (dev, cancellable);
return;
+ case MBIM_SERVICE_INTEL_MUTUAL_AUTHENTICATION:
+ mbimcli_intel_mutual_authentication_run (dev, cancellable);
+ return;
case MBIM_SERVICE_SMS:
case MBIM_SERVICE_USSD:
case MBIM_SERVICE_STK:
@@ -447,6 +451,11 @@ parse_actions (void)
actions_enabled++;
}
+ if (mbimcli_intel_mutual_authentication_options_enabled ()) {
+ service = MBIM_SERVICE_INTEL_MUTUAL_AUTHENTICATION;
+ actions_enabled++;
+ }
+
/* Noop */
if (noop_flag)
actions_enabled++;
@@ -495,6 +504,7 @@ int main (int argc, char **argv)
g_option_context_add_group (context, mbimcli_intel_thermal_rf_get_option_group ());
g_option_context_add_group (context, mbimcli_ms_voice_extensions_get_option_group ());
g_option_context_add_group (context, mbimcli_ms_uicc_low_level_access_get_option_group ());
+ g_option_context_add_group (context, mbimcli_intel_mutual_authentication_get_option_group ());
g_option_context_add_main_entries (context, main_entries, NULL);
if (!g_option_context_parse (context, &argc, &argv, &error)) {
g_printerr ("error: %s\n", error->message);
diff --git a/src/mbimcli/mbimcli.h b/src/mbimcli/mbimcli.h
index e7188e3..7553d3a 100644
--- a/src/mbimcli/mbimcli.h
+++ b/src/mbimcli/mbimcli.h
@@ -4,6 +4,7 @@
* mbimcli -- Command line interface to control MBIM devices
*
* Copyright (C) 2013 - 2014 Aleksander Morgado <aleksander@aleksander.es>
+ * Copyright (C) 2022 Intel Corporation
*/
#include <glib.h>
@@ -30,6 +31,7 @@ GOptionGroup *mbimcli_quectel_get_option_group (void);
GOptionGroup *mbimcli_intel_thermal_rf_get_option_group (void);
GOptionGroup *mbimcli_ms_voice_extensions_get_option_group (void);
GOptionGroup *mbimcli_ms_uicc_low_level_access_get_option_group (void);
+GOptionGroup *mbimcli_intel_mutual_authentication_get_option_group (void);
gboolean mbimcli_basic_connect_options_enabled (void);
gboolean mbimcli_phonebook_options_enabled (void);
@@ -44,6 +46,7 @@ gboolean mbimcli_quectel_options_enabled (void);
gboolean mbimcli_intel_thermal_rf_options_enabled (void);
gboolean mbimcli_ms_voice_extensions_options_enabled (void);
gboolean mbimcli_ms_uicc_low_level_access_options_enabled (void);
+gboolean mbimcli_intel_mutual_authentication_options_enabled (void);
void mbimcli_basic_connect_run (MbimDevice *device,
GCancellable *cancellable);
@@ -71,6 +74,8 @@ void mbimcli_ms_voice_extensions_run (MbimDevice *device,
GCancellable *cancellable);
void mbimcli_ms_uicc_low_level_access_run (MbimDevice *device,
GCancellable *cancellable);
+void mbimcli_intel_mutual_authentication_run (MbimDevice *device,
+ GCancellable *cancellable);
/* link management */
diff --git a/src/mbimcli/meson.build b/src/mbimcli/meson.build
index 2f50b6d..babe487 100644
--- a/src/mbimcli/meson.build
+++ b/src/mbimcli/meson.build
@@ -16,6 +16,7 @@ mbimcli_sources = files(
'mbimcli-ms-voice-extensions.c',
'mbimcli-phonebook.c',
'mbimcli-quectel.c',
+ 'mbimcli-intel-mutual-authentication.c',
)
sources = mbimcli_sources + files(
--
2.38.1

View File

@ -0,0 +1,758 @@
From f47daa58d18e490ee14636f504c4ee8fa04d62ff Mon Sep 17 00:00:00 2001
From: som <somashekhar.puttagangaiah@intel.com>
Date: Mon, 17 Oct 2022 14:53:08 +0530
Subject: [PATCH] intel-tools: new service, trace-config
To debug modem side issues, modem logs are required
to be captured in debug mode. This intel specific
cid is used to configure the modem trace information
which will be used by tool to configure.
Co-author: Bestha, Lakshminarayana
(cherry picked from commit 8a6dec6ed11931601e605c9537da9904b3be5bc0)
---
data/mbim-service-intel-tools.json | 24 ++
.../libmbim-glib/libmbim-glib-common.sections | 11 +
.../libmbim-glib/libmbim-glib-docs.xml | 1 +
src/libmbim-glib/generated/meson.build | 1 +
src/libmbim-glib/libmbim-glib.h | 1 +
src/libmbim-glib/mbim-cid.c | 21 ++
src/libmbim-glib/mbim-cid.h | 14 +
src/libmbim-glib/mbim-enums.h | 18 ++
src/libmbim-glib/mbim-message.c | 4 +
src/libmbim-glib/mbim-uuid.c | 13 +
src/libmbim-glib/mbim-uuid.h | 13 +
src/mbimcli/mbimcli-helpers.h | 3 +-
src/mbimcli/mbimcli-intel-tools.c | 255 ++++++++++++++++++
src/mbimcli/mbimcli.c | 9 +
src/mbimcli/mbimcli.h | 6 +-
src/mbimcli/meson.build | 1 +
16 files changed, 393 insertions(+), 2 deletions(-)
create mode 100644 data/mbim-service-intel-tools.json
create mode 100644 src/mbimcli/mbimcli-intel-tools.c
diff --git a/data/mbim-service-intel-tools.json b/data/mbim-service-intel-tools.json
new file mode 100644
index 0000000..2f2569d
--- /dev/null
+++ b/data/mbim-service-intel-tools.json
@@ -0,0 +1,24 @@
+[
+ // *********************************************************************************
+ { "type" : "Service",
+ "name" : "Intel Tools" },
+
+ // *********************************************************************************
+
+ { "name" : "Trace Config",
+ "type" : "Command",
+ "since" : "1.30",
+ "set" : [ { "name" : "TraceCmd",
+ "format" : "guint32",
+ "public-format" : "MbimTraceCommand" },
+ { "name" : "TraceValue",
+ "format" : "guint32" } ],
+ "query" : [ { "name" : "TraceCmd",
+ "format" : "guint32",
+ "public-format" : "MbimTraceCommand" } ],
+ "response" : [ { "name" : "TraceCmd",
+ "format" : "guint32",
+ "public-format" : "MbimTraceCommand" },
+ { "name" : "Result",
+ "format" : "guint32" } ] }
+]
diff --git a/docs/reference/libmbim-glib/libmbim-glib-common.sections b/docs/reference/libmbim-glib/libmbim-glib-common.sections
index 5a29bb5..1425e2c 100644
--- a/docs/reference/libmbim-glib/libmbim-glib-common.sections
+++ b/docs/reference/libmbim-glib/libmbim-glib-common.sections
@@ -34,6 +34,7 @@ MBIM_UUID_QUECTEL
MBIM_UUID_INTEL_THERMAL_RF
MBIM_UUID_MS_VOICE_EXTENSIONS
MBIM_UUID_INTEL_MUTUAL_AUTHENTICATION
+MBIM_UUID_INTEL_TOOLS
<SUBSECTION Methods>
mbim_service_get_string
mbim_service_lookup_name
@@ -77,6 +78,7 @@ MbimCidQuectel
MbimCidIntelThermalRf
MbimCidMsVoiceExtensions
MbimCidIntelMutualAuthentication
+MbimCidIntelTools
<SUBSECTION Methods>
mbim_cid_can_set
mbim_cid_can_query
@@ -103,6 +105,7 @@ mbim_cid_quectel_get_string
mbim_cid_intel_thermal_rf_get_string
mbim_cid_ms_voice_extensions_get_string
mbim_cid_intel_mutual_authentication_get_string
+mbim_cid_intel_tools_get_string
<SUBSECTION Private>
mbim_cid_atds_build_string_from_mask
mbim_cid_basic_connect_build_string_from_mask
@@ -125,6 +128,7 @@ mbim_cid_quectel_build_string_from_mask
mbim_cid_intel_thermal_rf_build_string_from_mask
mbim_cid_ms_voice_extensions_build_string_from_mask
mbim_cid_intel_mutual_authentication_build_string_from_mask
+mbim_cid_intel_tools_build_string_from_mask
<SUBSECTION Standard>
MBIM_TYPE_CID_ATDS
MBIM_TYPE_CID_AUTH
@@ -147,6 +151,7 @@ MBIM_TYPE_CID_QUECTEL
MBIM_TYPE_CID_INTEL_THERMAL_RF
MBIM_TYPE_CID_MS_VOICE_EXTENSIONS
MBIM_TYPE_CID_INTEL_MUTUAL_AUTHENTICATION
+MBIM_TYPE_CID_INTEL_TOOLS
mbim_cid_atds_get_type
mbim_cid_auth_get_type
mbim_cid_basic_connect_get_type
@@ -168,6 +173,7 @@ mbim_cid_quectel_get_type
mbim_cid_intel_thermal_rf_get_type
mbim_cid_ms_voice_extensions_get_type
mbim_cid_intel_mutual_authentication_get_type
+mbim_cid_intel_tools_get_type
</SECTION>
<SECTION>
@@ -421,6 +427,7 @@ MbimUiccApplicationType
MbimUiccFileAccessibility
MbimUiccFileType
MbimUiccFileStructure
+MbimTraceCommand
<SUBSECTION Methods>
mbim_device_type_get_string
mbim_cellular_class_build_string_from_mask
@@ -516,6 +523,7 @@ mbim_uicc_application_type_get_string
mbim_uicc_file_accessibility_get_string
mbim_uicc_file_type_get_string
mbim_uicc_file_structure_get_string
+mbim_trace_command_get_string
<SUBSECTION Private>
mbim_device_type_build_string_from_mask
mbim_cellular_class_get_string
@@ -613,6 +621,7 @@ mbim_uicc_application_type_build_string_from_mask
mbim_uicc_file_accessibility_build_string_from_mask
mbim_uicc_file_type_build_string_from_mask
mbim_uicc_file_structure_build_string_from_mask
+mbim_trace_command_build_string_from_mask
<SUBSECTION Standard>
MBIM_TYPE_ACTIVATION_COMMAND
MBIM_TYPE_ACTIVATION_STATE
@@ -713,6 +722,7 @@ MBIM_TYPE_UICC_APPLICATION_TYPE
MBIM_TYPE_UICC_FILE_ACCESSIBILITY
MBIM_TYPE_UICC_FILE_TYPE
MBIM_TYPE_UICC_FILE_STRUCTURE
+MBIM_TYPE_TRACE_COMMAND
mbim_activation_command_get_type
mbim_activation_state_get_type
mbim_auth_protocol_get_type
@@ -812,6 +822,7 @@ mbim_uicc_application_type_get_type
mbim_uicc_file_accessibility_get_type
mbim_uicc_file_type_get_type
mbim_uicc_file_structure_get_type
+mbim_trace_command_get_type
</SECTION>
<SECTION>
diff --git a/docs/reference/libmbim-glib/libmbim-glib-docs.xml b/docs/reference/libmbim-glib/libmbim-glib-docs.xml
index cc65e64..ccf939b 100644
--- a/docs/reference/libmbim-glib/libmbim-glib-docs.xml
+++ b/docs/reference/libmbim-glib/libmbim-glib-docs.xml
@@ -105,6 +105,7 @@
<xi:include href="xml/mbim-intel-firmware-update-v2.xml"/>
<xi:include href="xml/mbim-intel-thermal-rf.xml"/>
<xi:include href="xml/mbim-intel-mutual-authentication.xml"/>
+ <xi:include href="xml/mbim-intel-tools.xml"/>
</chapter>
<chapter>
diff --git a/src/libmbim-glib/generated/meson.build b/src/libmbim-glib/generated/meson.build
index 63fe8d1..cd13cb6 100644
--- a/src/libmbim-glib/generated/meson.build
+++ b/src/libmbim-glib/generated/meson.build
@@ -109,6 +109,7 @@ services_data = [
['stk'],
['ussd'],
['intel-mutual-authentication'],
+ ['intel-tools'],
]
foreach service_data: services_data
diff --git a/src/libmbim-glib/libmbim-glib.h b/src/libmbim-glib/libmbim-glib.h
index 38d8db4..6b963c8 100644
--- a/src/libmbim-glib/libmbim-glib.h
+++ b/src/libmbim-glib/libmbim-glib.h
@@ -47,6 +47,7 @@
#include "mbim-intel-thermal-rf.h"
#include "mbim-ms-voice-extensions.h"
#include "mbim-intel-mutual-authentication.h"
+#include "mbim-intel-tools.h"
/* backwards compatibility */
#include "mbim-compat.h"
diff --git a/src/libmbim-glib/mbim-cid.c b/src/libmbim-glib/mbim-cid.c
index 11170b3..fec3515 100644
--- a/src/libmbim-glib/mbim-cid.c
+++ b/src/libmbim-glib/mbim-cid.c
@@ -235,6 +235,19 @@ static const CidConfig cid_intel_mutual_authentication_config [MBIM_CID_INTEL_MU
{ SET, QUERY, NO_NOTIFY }, /* MBIM_CID_INTEL_MUTUAL_AUTHENTICATION_FCC_LOCK */
};
+/* Note: index of the array is CID-1 */
+#define MBIM_CID_INTEL_TOOLS_LAST MBIM_CID_INTEL_TOOLS_TRACE_CONFIG
+static const CidConfig cid_intel_tools_config [MBIM_CID_INTEL_TOOLS_LAST] = {
+ { NO_SET, NO_QUERY, NO_NOTIFY }, /* Unused */
+ { NO_SET, NO_QUERY, NO_NOTIFY }, /* Unused */
+ { NO_SET, NO_QUERY, NO_NOTIFY }, /* Unused */
+ { NO_SET, NO_QUERY, NO_NOTIFY }, /* Unused */
+ { NO_SET, NO_QUERY, NO_NOTIFY }, /* Unused */
+ { NO_SET, NO_QUERY, NO_NOTIFY }, /* Unused */
+ { NO_SET, NO_QUERY, NO_NOTIFY }, /* Unused */
+ { SET , QUERY , NO_NOTIFY }, /* MBIM_CID_INTEL_TOOLS_TRACE_CONFIG */
+};
+
gboolean
mbim_cid_can_set (MbimService service,
guint cid)
@@ -288,6 +301,8 @@ mbim_cid_can_set (MbimService service,
return cid_ms_voice_extensions_config[cid - 1].set;
case MBIM_SERVICE_INTEL_MUTUAL_AUTHENTICATION:
return cid_intel_mutual_authentication_config[cid - 1].set;
+ case MBIM_SERVICE_INTEL_TOOLS:
+ return cid_intel_tools_config[cid - 1].set;
case MBIM_SERVICE_INVALID:
case MBIM_SERVICE_LAST:
default:
@@ -349,6 +364,8 @@ mbim_cid_can_query (MbimService service,
return cid_ms_voice_extensions_config[cid - 1].query;
case MBIM_SERVICE_INTEL_MUTUAL_AUTHENTICATION:
return cid_intel_mutual_authentication_config[cid - 1].query;
+ case MBIM_SERVICE_INTEL_TOOLS:
+ return cid_intel_tools_config[cid - 1].query;
case MBIM_SERVICE_INVALID:
case MBIM_SERVICE_LAST:
default:
@@ -410,6 +427,8 @@ mbim_cid_can_notify (MbimService service,
return cid_ms_voice_extensions_config[cid - 1].notify;
case MBIM_SERVICE_INTEL_MUTUAL_AUTHENTICATION:
return cid_intel_mutual_authentication_config[cid - 1].notify;
+ case MBIM_SERVICE_INTEL_TOOLS:
+ return cid_intel_tools_config[cid - 1].notify;
case MBIM_SERVICE_INVALID:
case MBIM_SERVICE_LAST:
default:
@@ -472,6 +491,8 @@ mbim_cid_get_printable (MbimService service,
return mbim_cid_ms_voice_extensions_get_string (cid);
case MBIM_SERVICE_INTEL_MUTUAL_AUTHENTICATION:
return mbim_cid_intel_mutual_authentication_get_string (cid);
+ case MBIM_SERVICE_INTEL_TOOLS:
+ return mbim_cid_intel_tools_get_string (cid);
case MBIM_SERVICE_LAST:
default:
g_assert_not_reached ();
diff --git a/src/libmbim-glib/mbim-cid.h b/src/libmbim-glib/mbim-cid.h
index 82014db..7bde46e 100644
--- a/src/libmbim-glib/mbim-cid.h
+++ b/src/libmbim-glib/mbim-cid.h
@@ -457,6 +457,20 @@ typedef enum { /*< since=1.28 >*/
MBIM_CID_MS_VOICE_EXTENSIONS_NITZ = 10,
} MbimCidMsVoiceExtensions;
+/**
+ * MbimCidIntelTools:
+ * @MBIM_CID_INTEL_TOOLS_UNKNOWN: Unknown command.
+ * @MBIM_CID_INTEL_TOOLS_TRACE_CONFIG: Configure Modem traces.
+ *
+ * MBIM commands in the %MBIM_SERVICE_INTEL_TOOLS service.
+ *
+ * Since: 1.30
+ */
+typedef enum { /*< since=1.30 >*/
+ MBIM_CID_INTEL_TOOLS_UNKNOWN = 0,
+ MBIM_CID_INTEL_TOOLS_TRACE_CONFIG = 8,
+} MbimCidIntelTools;
+
/**
* mbim_cid_can_set:
* @service: a #MbimService.
diff --git a/src/libmbim-glib/mbim-enums.h b/src/libmbim-glib/mbim-enums.h
index 9dcdfd1..3b54825 100644
--- a/src/libmbim-glib/mbim-enums.h
+++ b/src/libmbim-glib/mbim-enums.h
@@ -2007,6 +2007,24 @@ typedef enum { /*< since=1.28 >*/
MBIM_UICC_FILE_STRUCTURE_BER_TLV = 4,
} MbimUiccFileStructure;
+/**
+ * MbimTraceCommand:
+ * @MBIM_TRACE_COMMAND_MODE: Trace command mode value.
+ * @MBIM_TRACE_COMMAND_LEVEL: Trace command level value.
+ * @MBIM_TRACE_COMMAND_LOCATION: Trace command location information.
+ * @MBIM_TRACE_COMMAND_FLASH_INTERVAL: Trace command flash interval information.
+ *
+ * The trace command value.
+ *
+ * Since: 1.30
+ */
+typedef enum { /*< since=1.28 >*/
+ MBIM_TRACE_COMMAND_MODE = 0,
+ MBIM_TRACE_COMMAND_LEVEL = 1,
+ MBIM_TRACE_COMMAND_LOCATION = 2,
+ MBIM_TRACE_COMMAND_FLASH_INTERVAL = 3,
+} MbimTraceCommand;
+
G_END_DECLS
#endif /* _LIBMBIM_GLIB_MBIM_ENUMS_H_ */
diff --git a/src/libmbim-glib/mbim-message.c b/src/libmbim-glib/mbim-message.c
index bead3d2..6a362ac 100644
--- a/src/libmbim-glib/mbim-message.c
+++ b/src/libmbim-glib/mbim-message.c
@@ -41,6 +41,7 @@
#include "mbim-intel-thermal-rf.h"
#include "mbim-ms-voice-extensions.h"
#include "mbim-intel-mutual-authentication.h"
+#include "mbim-intel-tools.h"
/*****************************************************************************/
@@ -2206,6 +2207,9 @@ mbim_message_get_printable_full (const MbimMessage *self,
case MBIM_SERVICE_INTEL_MUTUAL_AUTHENTICATION:
fields_printable = __mbim_message_intel_mutual_authentication_get_printable_fields (self, line_prefix, &inner_error);
break;
+ case MBIM_SERVICE_INTEL_TOOLS:
+ fields_printable = __mbim_message_intel_tools_get_printable_fields (self, line_prefix, &inner_error);
+ break;
case MBIM_SERVICE_INVALID:
case MBIM_SERVICE_LAST:
g_assert_not_reached ();
diff --git a/src/libmbim-glib/mbim-uuid.c b/src/libmbim-glib/mbim-uuid.c
index fe95923..e734b9b 100644
--- a/src/libmbim-glib/mbim-uuid.c
+++ b/src/libmbim-glib/mbim-uuid.c
@@ -265,6 +265,14 @@ static const MbimUuid uuid_intel_mutual_authentication = {
.e = { 0x4d, 0x18, 0x3c, 0x0a, 0x3a, 0xec }
};
+static const MbimUuid uuid_intel_tools = {
+ .a = { 0x4a, 0xda, 0x49, 0x62 },
+ .b = { 0xb9, 0x88 },
+ .c = { 0x46, 0xc3 },
+ .d = { 0x87, 0xa7 },
+ .e = { 0x97, 0xf2, 0x0f, 0x99, 0x4a, 0xbb }
+};
+
static GList *mbim_custom_service_list = NULL;
typedef struct {
@@ -402,6 +410,8 @@ mbim_uuid_from_service (MbimService service)
return &uuid_ms_voice_extensions;
case MBIM_SERVICE_INTEL_MUTUAL_AUTHENTICATION:
return &uuid_intel_mutual_authentication;
+ case MBIM_SERVICE_INTEL_TOOLS:
+ return &uuid_intel_tools;
case MBIM_SERVICE_LAST:
g_assert_not_reached ();
default:
@@ -481,6 +491,9 @@ mbim_uuid_to_service (const MbimUuid *uuid)
if (mbim_uuid_cmp (uuid, &uuid_intel_mutual_authentication))
return MBIM_SERVICE_INTEL_MUTUAL_AUTHENTICATION;
+ if (mbim_uuid_cmp (uuid, &uuid_intel_tools))
+ return MBIM_SERVICE_INTEL_TOOLS;
+
for (l = mbim_custom_service_list; l != NULL; l = l->next) {
if (mbim_uuid_cmp (&((MbimCustomService *)l->data)->uuid, uuid))
return ((MbimCustomService *)l->data)->service_id;
diff --git a/src/libmbim-glib/mbim-uuid.h b/src/libmbim-glib/mbim-uuid.h
index 3d15adf..7bcf321 100644
--- a/src/libmbim-glib/mbim-uuid.h
+++ b/src/libmbim-glib/mbim-uuid.h
@@ -115,6 +115,7 @@ gboolean mbim_uuid_from_printable (const gchar *str,
* @MBIM_SERVICE_INTEL_THERMAL_RF: Intel thermal rf related commands. Since 1.28
* @MBIM_SERVICE_MS_VOICE_EXTENSIONS: Microsoft Voice extensions service. Since 1.28.
* @MBIM_SERVICE_INTEL_MUTUAL_AUTHENTICATION: Intel mutual authentication commands. Since 1.30.
+ * @MBIM_SERVICE_INTEL_TOOLS: Intel tools service. Since 1.30.
* @MBIM_SERVICE_LAST: Internal value.
*
* Enumeration of the generic MBIM services.
@@ -144,6 +145,7 @@ typedef enum { /*< since=1.0 >*/
MBIM_SERVICE_INTEL_THERMAL_RF = 19,
MBIM_SERVICE_MS_VOICE_EXTENSIONS = 20,
MBIM_SERVICE_INTEL_MUTUAL_AUTHENTICATION = 21,
+ MBIM_SERVICE_INTEL_TOOLS = 22,
#if defined LIBMBIM_GLIB_COMPILATION
MBIM_SERVICE_LAST /*< skip >*/
#endif
@@ -392,6 +394,17 @@ typedef enum { /*< since=1.0 >*/
*/
#define MBIM_UUID_INTEL_MUTUAL_AUTHENTICATION mbim_uuid_from_service (MBIM_SERVICE_INTEL_MUTUAL_AUTHENTICATION)
+/**
+ * MBIM_UUID_INTEL_TOOLS:
+ *
+ * Get the UUID of the %MBIM_SERVICE_INTEL_TOOLS service.
+ *
+ * Returns: (transfer none): a #MbimUuid.
+ *
+ * Since: 1.30
+ */
+#define MBIM_UUID_INTEL_TOOLS mbim_uuid_from_service (MBIM_SERVICE_INTEL_TOOLS)
+
/**
* mbim_service_lookup_name:
* @service: a MbimService or custom service.
diff --git a/src/mbimcli/mbimcli-helpers.h b/src/mbimcli/mbimcli-helpers.h
index dc4e2ee..91410e8 100644
--- a/src/mbimcli/mbimcli-helpers.h
+++ b/src/mbimcli/mbimcli-helpers.h
@@ -70,7 +70,8 @@ gboolean mbimcli_parse_sar_config_state_array (const gchar *str,
MBIMCLI_ENUM_LIST_ITEM (MbimUiccSecureMessaging, uicc_secure_messaging, "uicc secure messaging") \
MBIMCLI_ENUM_LIST_ITEM (MbimUiccClassByteType, uicc_class_byte_type, "uicc class byte type") \
MBIMCLI_ENUM_LIST_ITEM (MbimUiccPassThroughAction, uicc_pass_through_action, "uicc pass through action") \
- MBIMCLI_ENUM_LIST_ITEM (MbimIntelBootMode, intel_boot_mode, "intel boot mode")
+ MBIMCLI_ENUM_LIST_ITEM (MbimIntelBootMode, intel_boot_mode, "intel boot mode") \
+ MBIMCLI_ENUM_LIST_ITEM (MbimTraceCommand, trace_command, "trace command")
#define MBIMCLI_ENUM_LIST_ITEM(TYPE,TYPE_UNDERSCORE,DESCR) \
gboolean mbimcli_read_## TYPE_UNDERSCORE ##_from_string (const gchar *str, TYPE *out);
diff --git a/src/mbimcli/mbimcli-intel-tools.c b/src/mbimcli/mbimcli-intel-tools.c
new file mode 100644
index 0000000..3ba7893
--- /dev/null
+++ b/src/mbimcli/mbimcli-intel-tools.c
@@ -0,0 +1,255 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * mbimcli -- Command line interface to control MBIM devices
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Copyright (C) 2022 Intel Corporation
+ */
+
+#include "config.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <locale.h>
+#include <string.h>
+
+#include <glib.h>
+#include <gio/gio.h>
+#include <glib/gprintf.h>
+#include <libmbim-glib.h>
+
+#include "mbim-common.h"
+#include "mbimcli.h"
+#include "mbimcli-helpers.h"
+
+/* Context */
+typedef struct {
+ MbimDevice *device;
+ GCancellable *cancellable;
+} Context;
+static Context *ctx;
+
+/* Options */
+static char *set_trace_config_str;
+static char *query_trace_config_str;
+
+static GOptionEntry entries[] = {
+ { "set-trace-config", 0, 0, G_OPTION_ARG_STRING, &set_trace_config_str,
+ "Set trace configuration",
+ "[(TraceCmd)|(TraceValue)]"
+ },
+ { "query-trace-config", 0, 0, G_OPTION_ARG_STRING, &query_trace_config_str,
+ "Query trace configuration",
+ "[(TraceCmd)]"
+ },
+ { NULL }
+};
+
+GOptionGroup *
+mbimcli_intel_tools_get_option_group (void)
+{
+ GOptionGroup *group;
+ group = g_option_group_new ("intel-tools",
+ "Intel 5G tools options",
+ "Show Intel 5G tools options",
+ NULL,
+ NULL);
+ g_option_group_add_entries (group, entries);
+
+ return group;
+}
+
+gboolean
+mbimcli_intel_tools_options_enabled (void)
+{
+ static guint n_actions = 0;
+ static gboolean checked = FALSE;
+
+ if (checked)
+ return !!n_actions;
+
+ n_actions =(!!set_trace_config_str +
+ !!query_trace_config_str);
+
+ if (n_actions > 1) {
+ g_printerr ("error: too many intel tools actions requested\n");
+ exit (EXIT_FAILURE);
+ }
+
+ checked = TRUE;
+ return !!n_actions;
+}
+
+static void
+context_free (Context *context)
+{
+ if (!context)
+ return;
+
+ if (context->cancellable)
+ g_object_unref (context->cancellable);
+ if (context->device)
+ g_object_unref (context->device);
+ g_slice_free (Context, context);
+}
+
+static void
+shutdown (gboolean operation_status)
+{
+ /* Cleanup context and finish async operation */
+ context_free (ctx);
+ mbimcli_async_operation_done (operation_status);
+}
+
+static void
+query_trace_config_ready (MbimDevice *device,
+ GAsyncResult *res)
+{
+ g_autoptr(MbimMessage) response = NULL;
+ g_autoptr(GError) error = NULL;
+ MbimTraceCommand trace_cmd;
+ const gchar *trace_cmd_str;
+ guint32 trace_result;
+
+ response = mbim_device_command_finish (device, res, &error);
+ if (!response || !mbim_message_response_get_result (response, MBIM_MESSAGE_TYPE_COMMAND_DONE, &error)) {
+ g_printerr ("error: operation failed: %s\n", error->message);
+ shutdown (FALSE);
+ return;
+ }
+
+ g_print ("[%s] Successfully retrieved trace configuration\n",
+ mbim_device_get_path_display (device));
+ if (!mbim_message_intel_tools_trace_config_response_parse (
+ response,
+ &trace_cmd,
+ &trace_result,
+ &error)) {
+ g_printerr ("error: couldn't parse response messages: %s\n", error->message);
+ shutdown (FALSE);
+ return;
+ }
+
+ trace_cmd_str = mbim_trace_command_get_string (trace_cmd);
+
+ g_print ("[%s] Trace configuration retrieved:\n"
+ "\t Trace Command: '%s'\n"
+ "\t Trace Result: '%u'\n",
+ mbim_device_get_path_display (device),
+ VALIDATE_UNKNOWN(trace_cmd_str),
+ trace_result);
+
+ shutdown (TRUE);
+}
+
+static void
+set_trace_config_ready (MbimDevice *device,
+ GAsyncResult *res)
+{
+ g_autoptr(MbimMessage) response = NULL;
+ g_autoptr(GError) error = NULL;
+
+ response = mbim_device_command_finish (device, res, &error);
+ if (!response || !mbim_message_response_get_result (response, MBIM_MESSAGE_TYPE_COMMAND_DONE, &error)) {
+ g_printerr ("error: operation failed: %s\n", error->message);
+ shutdown (FALSE);
+ return;
+ }
+
+ g_print ("[%s] Successfully retrieved trace configuration\n",
+ mbim_device_get_path_display (device));
+
+ shutdown (TRUE);
+}
+
+void
+mbimcli_intel_tools_run (MbimDevice *device,
+ GCancellable *cancellable)
+{
+ g_autoptr(MbimMessage) request = NULL;
+ g_autoptr(GError) error = NULL;
+
+ /* Initialize context */
+ ctx = g_slice_new (Context);
+ ctx->device = g_object_ref (device);
+ ctx->cancellable = cancellable ? g_object_ref (cancellable) : NULL;
+
+ /* Request to set trace config? */
+ if (set_trace_config_str) {
+ g_auto(GStrv) split = NULL;
+ MbimTraceCommand trace_command;
+ guint32 trace_value = 0;
+
+ split = g_strsplit (set_trace_config_str, ",", -1);
+
+ if (g_strv_length (split) > 2) {
+ g_printerr ("error: couldn't parse input string, too many arguments\n");
+ return;
+ }
+
+ if (g_strv_length (split) < 2) {
+ g_printerr ("error: couldn't parse input string, missing arguments\n");
+ return;
+ }
+
+ if (split[0]) {
+ if (!mbimcli_read_trace_command_from_string (split[0], &trace_command)) {
+ g_printerr ("error: couldn't parse input string, invalid trace command '%s'\n", split[0]);
+ return;
+ }
+ }
+
+ if (split[1]) {
+ if (!mbimcli_read_uint_from_string (split[1], &trace_value)) {
+ g_printerr ("error: couldn't parse input string, invalid trace value '%s'\n", split[1]);
+ return;
+ }
+ }
+
+ g_debug ("Asynchronously setting trace info...");
+ request = mbim_message_intel_tools_trace_config_set_new (trace_command, trace_value, NULL);
+ mbim_device_command (ctx->device,
+ request,
+ 10,
+ ctx->cancellable,
+ (GAsyncReadyCallback)set_trace_config_ready,
+ NULL);
+ return;
+ }
+
+ /* Request to get trace config? */
+ if (query_trace_config_str) {
+ MbimTraceCommand trace_command;
+
+ if (query_trace_config_str) {
+ if (!mbimcli_read_trace_command_from_string (query_trace_config_str, &trace_command)) {
+ g_printerr ("error: couldn't parse input string, invalid trace command '%d'\n", trace_command);
+ return;
+ }
+ }
+
+ g_debug ("Asynchronously querying trace info...");
+ request = mbim_message_intel_tools_trace_config_query_new (trace_command, NULL);
+ mbim_device_command (ctx->device,
+ request,
+ 10,
+ ctx->cancellable,
+ (GAsyncReadyCallback)query_trace_config_ready,
+ NULL);
+ return;
+ }
+
+ g_warn_if_reached ();
+}
diff --git a/src/mbimcli/mbimcli.c b/src/mbimcli/mbimcli.c
index 496d553..922291f 100644
--- a/src/mbimcli/mbimcli.c
+++ b/src/mbimcli/mbimcli.c
@@ -322,6 +322,9 @@ device_open_ready (MbimDevice *dev,
case MBIM_SERVICE_PROXY_CONTROL:
case MBIM_SERVICE_QMI:
case MBIM_SERVICE_QDU:
+ case MBIM_SERVICE_INTEL_TOOLS:
+ mbimcli_intel_tools_run (dev, cancellable);
+ return;
/* unsupported actions in the CLI */
case MBIM_SERVICE_INVALID:
default:
@@ -456,6 +459,11 @@ parse_actions (void)
actions_enabled++;
}
+ if (mbimcli_intel_tools_options_enabled ()) {
+ service = MBIM_SERVICE_INTEL_TOOLS;
+ actions_enabled++;
+ }
+
/* Noop */
if (noop_flag)
actions_enabled++;
@@ -505,6 +513,7 @@ int main (int argc, char **argv)
g_option_context_add_group (context, mbimcli_ms_voice_extensions_get_option_group ());
g_option_context_add_group (context, mbimcli_ms_uicc_low_level_access_get_option_group ());
g_option_context_add_group (context, mbimcli_intel_mutual_authentication_get_option_group ());
+ g_option_context_add_group (context, mbimcli_intel_tools_get_option_group ());
g_option_context_add_main_entries (context, main_entries, NULL);
if (!g_option_context_parse (context, &argc, &argv, &error)) {
g_printerr ("error: %s\n", error->message);
diff --git a/src/mbimcli/mbimcli.h b/src/mbimcli/mbimcli.h
index 7553d3a..0989106 100644
--- a/src/mbimcli/mbimcli.h
+++ b/src/mbimcli/mbimcli.h
@@ -32,6 +32,7 @@ GOptionGroup *mbimcli_intel_thermal_rf_get_option_group (void);
GOptionGroup *mbimcli_ms_voice_extensions_get_option_group (void);
GOptionGroup *mbimcli_ms_uicc_low_level_access_get_option_group (void);
GOptionGroup *mbimcli_intel_mutual_authentication_get_option_group (void);
+GOptionGroup *mbimcli_intel_tools_get_option_group (void);
gboolean mbimcli_basic_connect_options_enabled (void);
gboolean mbimcli_phonebook_options_enabled (void);
@@ -47,6 +48,7 @@ gboolean mbimcli_intel_thermal_rf_options_enabled (void);
gboolean mbimcli_ms_voice_extensions_options_enabled (void);
gboolean mbimcli_ms_uicc_low_level_access_options_enabled (void);
gboolean mbimcli_intel_mutual_authentication_options_enabled (void);
+gboolean mbimcli_intel_tools_options_enabled (void);
void mbimcli_basic_connect_run (MbimDevice *device,
GCancellable *cancellable);
@@ -74,7 +76,9 @@ void mbimcli_ms_voice_extensions_run (MbimDevice *device,
GCancellable *cancellable);
void mbimcli_ms_uicc_low_level_access_run (MbimDevice *device,
GCancellable *cancellable);
-void mbimcli_intel_mutual_authentication_run (MbimDevice *device,
+void mbimcli_intel_mutual_authentication_run (MbimDevice *device,
+ GCancellable *cancellable);
+void mbimcli_intel_tools_run (MbimDevice *device,
GCancellable *cancellable);
diff --git a/src/mbimcli/meson.build b/src/mbimcli/meson.build
index babe487..ae659cb 100644
--- a/src/mbimcli/meson.build
+++ b/src/mbimcli/meson.build
@@ -17,6 +17,7 @@ mbimcli_sources = files(
'mbimcli-phonebook.c',
'mbimcli-quectel.c',
'mbimcli-intel-mutual-authentication.c',
+ 'mbimcli-intel-tools.c',
)
sources = mbimcli_sources + files(
--
2.38.1

15
_service Normal file
View File

@ -0,0 +1,15 @@
<?xml version="1.0"?>
<services>
<service name="obs_scm" mode="manual">
<param name="scm">git</param>
<param name="url">https://gitlab.freedesktop.org/mobile-broadband/libmbim.git</param>
<param name="revision">refs/tags/1.28.4</param>
<param name="versionformat">@PARENT_TAG@</param>
</service>
<service name="tar" mode="buildtime"/>
<service name="recompress" mode="buildtime">
<param name="file">*.tar</param>
<param name="compression">xz</param>
</service>
<service name="set_version" mode="manual" />
</services>

BIN
libmbim-1.28.4.obscpio (Stored with Git LFS) Normal file

Binary file not shown.

643
libmbim.changes Normal file
View File

@ -0,0 +1,643 @@
-------------------------------------------------------------------
Tue Nov 7 08:53:28 UTC 2023 - Dominique Leuenberger <dimstar@opensuse.org>
- Fix build with RPM 4.19: unnumbered patches are no longer
supported.
-------------------------------------------------------------------
Sat Apr 8 21:05:44 UTC 2023 - Bjørn Lie <bjorn.lie@gmail.com>
- Update to version 1.28.4:
+ libmbim-glib:
- Fixed context type conversions to consider all possible APN
types.
- Duplicate UTF-16 strings during processing to avoid alignment
issues.
- Changes from version 1.28.2:
+ libmbim-glib: fixed validation of complete fragments to avoid
reading out of bounds.
+ mbim-proxy: added --verbose-full flag to allow printing logs
with personal info included.
- Changes from version 1.28:
+ This version includes support for most operations in MBIM
Extensions v2 (for 5G NSA) and v3 (for 5G SA). The enabling of
the updated extensions requires the user of the library to
explicitly request what version wants to be used, via the new
'MBIM_DEVICE_OPEN_FLAGS_MS_MBIMEX_V2' or
'MBIM_DEVICE_OPEN_FLAGS_MS_MBIMEX_V3' flags in the device open
request. Please note that if one process enables the v2 or v3
support, it will apply to operations done by other processes as
well. When using the proxy, the current version support is
propagated to all clients of the proxy automatically.
+ The verbose message logging will now by default hide all fields
that are considered personal information. Extended message
logging including all field contents should be explicitly
requested.
+ Build:
- The GNU autotools (autoconf/automake/libtool) support has
been fully removed, this release requires the use of the
meson build system.
- The 'instrospection' meson option is now a boolean.
- New boolean 'man' meson option to allow disabling the man
page generation.
+ Extended the Basic Connect service, including the following
operations:
- MBIM_CID_BASIC_CONNECT_REGISTER_STATE (MBIMEx v2.0)
- MBIM_CID_BASIC_CONNECT_PACKET_SERVICE (MBIMEx v2.0)
- MBIM_CID_BASIC_CONNECT_SIGNAL_STATE (MBIMEx v2.0)
- MBIM_CID_BASIC_CONNECT_SUBCRIBER_READY_STATUS (MBIMEx v3.0)
- MBIM_CID_BASIC_CONNECT_PACKET_SERVICE (MBIMEx v3.0)
- MBIM_CID_BASIC_CONNECT_CONNECT (MBIMEx v3.0)
- MBIM_CID_BASIC_CONNECT_IP_PACKET_FILTERS (MBIMEx v3.0)
+ Extended the Microsoft-defined Basic Connect Extensions
service, including the following operations:
- MBIM_CID_MS_BASIC_CONNECT_EXTENSIONS_LOCATION_INFO_STATUS
(MBIMEx v1.0)
- MBIM_CID_MS_BASIC_CONNECT_EXTENSIONS_PROVISIONED_CONTEXTS
(MBIMEx v1.0)
- MBIM_CID_MS_BASIC_CONNECT_EXTENSIONS_BASE_STATIONS_INFO
(MBIMEx v1.0)
- MBIM_CID_MS_BASIC_CONNECT_EXTENSIONS_VERSION (MBIMEx v2.0)
- MBIM_CID_MS_BASIC_CONNECT_EXTENSIONS_DEVICE_CAPS
(MBIMEx v3.0)
- MBIM_CID_MS_BASIC_CONNECT_EXTENSIONS_MODEM_CONFIGURATION
(MBIMEx v3.0)
- MBIM_CID_MS_BASIC_CONNECT_EXTENSIONS_REGISTRATION_PARAMETERS
(MBIMEx v3.0)
- MBIM_CID_MS_BASIC_CONNECT_EXTENSIONS_LTE_ATTACH_INFO
(MBIMEx v3.0)
- MBIM_CID_MS_BASIC_CONNECT_EXTENSIONS_BASE_STATIONS_INFO
(MBIMEx v3.0)
- MBIM_CID_MS_BASIC_CONNECT_EXTENSIONS_WAKE_REASON
(MBIMEx v3.0)
+ Extended the Microsoft-defined UICC Low Level Access service,
including the following operations:
- MBIM_CID_MS_UICC_LOW_LEVEL_ACCESS_APPLICATION_LIST
- MBIM_CID_MS_UICC_LOW_LEVEL_ACCESS_FILE_STATUS
- MBIM_CID_MS_UICC_LOW_LEVEL_ACCESS_READ_BINARY
- MBIM_CID_MS_UICC_LOW_LEVEL_ACCESS_READ_RECORD
+ New Microsoft-defined Voice Extensions service, including the
following operations: MBIM_CID_MS_VOICE_EXTENSIONS_NITZ
+ Extended the Intel-defined Firmware Update service, including
the following operations:
MBIM_CID_INTEL_FIRMWARE_UPDATE_MODEM_REBOOT (MBIMEx v2.0)
+ New Intel-defined Thermal RF service, including the following
operations: MBIM_CID_INTEL_THERMAL_RF_RFIM
+ Extended the QDU service, including the following operations:
- MBIM_CID_QDU_QUECTEL_REBOOT
- MBIM_CID_QDU_QUECTEL_READ_VERSION
+ libmbim-glib:
- Updated the net link operations to support devices exposed by
the wwan subsystem.
- New mbim_message_get_printable_full() method to print the
contents of a given message specifying the specific MBIMEx
version in use.
- New mbim_message_validate() method to validate the contents
of the headers in a MBIM message, to be used before accessing
its contents.
- Updated all MbimMessage getters so that an implicit
validation is done in the g_return_* macros. This validation
will not be done if those macros are disabled during build.
- New MBIM_DEVICE_CONSECUTIVE_TIMEOUTS signal in the MbimDevice
to report the number of consecutive MBIM request timeouts
detected.
- New mbim_device_[get|set|check]_ms_mbimex_version() methods
to manage the MBIMEx version support in the MbimDevice.
- New MBIM_DEVICE_OPEN_FLAGS_MS_MBIMEX_[V2|V3] flags in
mbim_device_open_full() to allow enabling MBIMEx v2.0 or v3.0
support.
- New MbimTlv type to support the variable-sized fields in
MBIMEx v3.0 operations.
- Ensure CLOSED state always in mbim_device_close(), even on
error.
- Disallow device close if an open operation is ongoing.
- Extended MbimDataClass with 5G NSA/SA values, used in MBIMEx
v2.0, and added new MbimDataClassV3 and MbimDataSubclass
types, used in MBIMEX v3.0.
- Extended MbimCtrlCaps and MbimSubscriberReadyState with
values reported in MBIMEX v3.0 extensions.
- New MbimWakeType, MbimAccessMediaType,
MbimModemConfigurationStatus, MbimFrequencyRange,
MbimContextRoamingControl, MbimContextMediaType,
MbimContextState, MbimContextOperation, MbimMicoMode,
MbimLadnInfo, MbimDefaultPduActivationHint, MbimDrxCycle,
MbimSubscriberReadyStatusFlag enums used in MBIMEx v3.0
specific operations.
- New MbimUiccApplicationType, MbimUiccFileAccessibility,
MbimUiccFileType and MbimUiccFileStructure enums, used in the
MS UICC Low Level Access service.
- New MbimIntelServingCellInfo enum, used in the Intel Thermal
RF service.
- New MbimIntelBootMode enum, used in the Intel Firmware Update
service.
- New MbimQduQuectelRebootType and MbimQduQuectelVersionType
enums used in the Quectel-defined QDU service updates.
- Extended the list of MbimNwError values with values from the
3GPP specs.
- Deprecated MBIM_NW_ERROR_UNKNOWN, use NONE instead.
- Deprecated
MBIM_CID_MS_BASIC_CONNECT_EXTENSIONS_NETWORK_BLACKLIST, use
NETWORK_DENYLIST instead.
- Fixed the public format for CDMA language in the SMS service.
+ mbimcli:
- New '--device-open-ms-mbimex-v2' option to request to enable
MBIMEX v2.0 support.
- New '--device-open-ms-mbimex-v3' option to request to enable
MBIMEX v3.0support.
- New '--verbose-full' option to request enabling logs that
include personal information.
- New '--set-ip-packet-filters' action.
- New '--set-provisioned-contexts' action.
- New '--set-signal-state' action.
- New '--set-network-idle-hint' action.
- New '--query-network-idle-hint' action.
- New '--set-emergency-mode' action.
- New '--query-emergency-mode' action.
- New '--set-service-activation' action.
- New '--ms-query-location-info-status' action.
- New '--ms-query-provisioned-contexts' action.
- New '--ms-set-provisioned-contexts' action.
- New '--ms-query-base-stations' action
- New '--ms-query-version' action.
- New '--ms-query-registration-parameters' action.
- New '--ms-set-registration-parameters' action.
- New '--ms-query-modem-configuration' action.
- New '--ms-query-wake-reason' action.
- New '--ms-query-uicc-application-list' action.
- New '--ms-query-uicc-file-status' action.
- New '--ms-query-uicc-read-binary' action.
- New '--ms-query-uicc-read-record' action.
- New '--ms-set-uicc-open-channel' action.
- New '--ms-set-uicc-close-channel' action.
- New '--ms-query-uicc-atr' action.
- New '--ms-set-uicc-apdu' action.
- New '--ms-set-uicc-reset' action.
- New '--ms-query-uicc-reset' action.
- New '--ms-set-uicc-terminal-capability' action.
- New '--ms-query-uicc-terminal-capability' action.
- New '--ms-query-nitz' action.
- New '--intel-query-rfim' action.
- New '--intel-set-rfim' action.
- Updated '--connect' action to deprecate 'apn' and prefer
'access-string'.
- Updated '--connect' action to support 'compression' and
'context-type'.
- Updated '--intel-modem-reboot' action to optionally receive
the boot mode type argument.
- Fixed the Quectel specific operations so that they have the
--quectel prefix and do not overwrite the ones in the Basic
Connect service.
+ Several other improvements and fixes.
- Switch to meson buildsystem, add meson BuildRequires and macros.
- Update URL and Source to new home.
- New dependencies: help2man
- Replace bash-comletion with pkgconfig(bash-completion)
BuildRequires, meson checks for it. Update Supplements to current
standard.
- Drop sed call to fix python env, already set to python3 upstream.
- Update Licenses, drop COPYING.LIB and COPYING, now named
LICENSES.
- Use ldconfig_scriptlets macro.
- Build mbimcli-bash-completion as noarch.
- Add patches from upstream:
+ 0001-intel-mutual-authentication-new-service-fcc-lock.patch
+ 0002-intel-tools-new-service-trace-config.patch
-------------------------------------------------------------------
Sun May 29 19:31:10 UTC 2022 - Dirk Müller <dmueller@suse.com>
- update to 1.26.4:
* meson: force building doc on normal builds, not only during install.
* meson: fix 'export_packages' in GIR setup.
* compat: deprecate the MbimLteAttachStatus type.
* net-port-manager: use unaligned netlink attribute length.
* include MBIM proxy control service in docs.
* codegen: add section doc for each service.
* utils: add missing short description in section.
* compat: add missing MbimLteAttachStatus doc.
* device: add missing mbim_device_list_links() doc.
* device: fix MbimDevice 'device-in-session' property doc.
* version: add missing MBIM_CHECK_VERSION() documentation.
* device: fix wrong reference to QmiDevice
* Several other minor improvements and fixes.
-------------------------------------------------------------------
Mon Dec 20 22:07:09 UTC 2021 - Dirk Müller <dmueller@suse.com>
- Update to version 1.26.2:
+ The GUdev optional build/runtime requirement is now fully
dropped, it's no longer used.
+ Implemented new link management operations, exclusively for the
cdc_mbim driver for now. These new operations allow creating or
deleting VLAN network interfaces in order to run multiplexed
data sessions over one single physical network interface.
+ Added support for the Microsoft-defined SAR service, including
the following operations:
- MBIM_CID_MS_SAR_CONFIG
- MBIM_CID_MS_SAR_TRANSMISSION_STATUS
+ libmbim-glib:
- Logic updated to make sure full packets are written at once,
instead of writing them in chunks.
- Updated the "LTE attach status" APIs in order to avoid
creating unneeded struct types in the interface. The older
methods have been deprecated and maintained in the library
for compatibility purposes only.
+ Bugfixes.
- Drop pkgconfig(gudev-1.0) BuildRequires: no longer used.
-------------------------------------------------------------------
Fri Jan 22 18:02:46 UTC 2021 - Martin Hauke <mardnh@gmx.de>
- Update to version 1.24.6:
* libmbim-glib,device:
+ Fixed a GSource use after free.
+ Avoid g_file_test() on NULL path.
+ Don't warn if descriptors file cannot be read.
* Several other minor improvements and fixes.
-------------------------------------------------------------------
Fri Oct 2 17:38:23 UTC 2020 - Martin Hauke <mardnh@gmx.de>
- Update to version 1.24.4:
* libmbim-glib,device:
+ Added new mbim_device_get_transaction_id() to retrieve the
transaction id currently being used.
* libmbim-glib,proxy:
+ Fixed the transaction id used in fragments of the same
request.
+ Avoid creating device context when it's already being
untracked.
+ Fixed double GError free.
* mbimcli:
+ Fixed missing EOL in error string when closing device.
-------------------------------------------------------------------
Wed Aug 19 12:23:25 UTC 2020 - Dominique Leuenberger <dimstar@opensuse.org>
- Upate to version 1.24.2:
+ libmbim-glib:
- Fixed several issues in the logic that merges the service
subscribe list.
- Improved message reading logic to skip malformed MBIM
messages (e.g. AT URCs emitted wrongly in the MBIM port by
some Cinterion modules).
-------------------------------------------------------------------
Fri Jun 19 08:50:16 UTC 2020 - Martin Hauke <mardnh@gmx.de>
- Update to version 1.24
* Build now requires GLib/GObject/GIO 2.48.
* Added new GObject Introspection support in the library, that
can be explicitly requested during configure with
--enable-introspection=yes. With the new introspection support,
the libmbim-glib library can now be used directly from e.g.
python programs, as in the example included with the release.
* Added release version information to all the types and methods
of the public library API, and added new per-version indices
in the documentation.
* Added g_autoptr() support to all public types.
* Several other minor improvements and fixes.
- Introduce subpackage for Introspection bindings
-------------------------------------------------------------------
Wed Jan 15 20:07:04 UTC 2020 - Martin Hauke <mardnh@gmx.de>
- Update to version 1.22.0
+ libmbim-glib: Message parsing logic improved to avoid reading
fields out of bounds, e.g. if the messages sent by the modem
are malformed or not in line with the specs.
+ Several other minor improvements and fixes.
-------------------------------------------------------------------
Sat Jan 4 17:47:58 UTC 2020 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
- Only require python3-base package for building instead of
full python3 package.
-------------------------------------------------------------------
Sat Dec 21 16:21:42 UTC 2019 - Martin Hauke <mardnh@gmx.de>
- Update to version 1.20.4:
+ libmbim-glib:
- Fixed memleak when processing responses with multiple
fragments.
- Fixed memleak when processing failed Open operations.
- Removed redundant method declaration in UUID header.
-------------------------------------------------------------------
Wed Nov 6 20:34:29 UTC 2019 - Martin Hauke <mardnh@gmx.de>
- Update to version 1.20.2:
+ mbim-proxy:
- Fixed device control port management when using symlinks.
+ libmbim-glib:
- Fixed handling of fragmented indication messages.
+ Several other minor improvements and fixes.
-------------------------------------------------------------------
Sat Sep 14 13:31:28 UTC 2019 - Bjørn Lie <bjorn.lie@gmail.com>
- Update to version 1.20.0:
+ Build updated with several fixes:
- Explicitly define max allowed GLib version.
- Fix issues with -Werror=type-limits.
- Made compiler warning options compatible with clang.
+ mbim-proxy:
- Fixed client subscription to service indications using
wildcard.
- Fixed client subscription update logic when services/cids are
being removed.
- New '--empty-timeout=[SECS}' option to specify the empty
lifetime duration.
- New '--no-exit' option to avoid the proxy from exiting.
+ Several other minor improvements and fixes.
- Drop libmbim-fix-build-commits.patch: Fixed upstream. Follwing
this, drop libtool BuildRequires and autoreconf call.
-------------------------------------------------------------------
Mon Sep 2 22:48:36 UTC 2019 - Bjørn Lie <bjorn.lie@gmail.com>
- Add libmbim-fix-build-commits.patch: Fix build with new glib2.
- Follwing the above patch, add libtool BuildRequires and pass
autoreconf as the patch touches the buildsystem.
- Use modern macros and url's.
-------------------------------------------------------------------
Sun Apr 14 11:01:24 UTC 2019 - Martin Hauke <mardnh@gmx.de>
- Update to version 1.18.2:
+ mbim-proxy: Increased empty lifetime to 300s.
- Fix wording in the package summary.
-------------------------------------------------------------------
Tue Jan 8 20:40:43 UTC 2019 - mardnh@gmx.de
- Update to version 1.18.0
+ New Microsoft Basic Connect Extensions service, that includes
new commands to manage Protocol Configuration Operations (PCO)
as well as LTE attach status and settings.
+ libmbim-glib:
- Added support to fully print all message contents, including
all fields, when traces are enabled.
- Added support for QMI indications over MBIM.
- Added additional cause codes to MbimNwError.
- Fixed signal emission in device, so that it's done before
completing transaction task.
+ mbim-proxy: Fixed the management of subscribed events, so that
the lists are maintained per-device.
+ mbimcli:
- New '--ms-query-pco' action.
- New '--ms-query-lte-attach-configuration' action.
- New '--ms-query-lte-attach-status' action.
+ Several other minor improvements and fixes.
-------------------------------------------------------------------
Sat Aug 25 19:54:09 UTC 2018 - mardnh@gmx.de
- Update to version 1.16.2:
+ mbimcli:
- Fix SNR reporting in --atds-query-signal output.
- Longer timeout (60s) in --disconnect.
- Add "ip-type" property to --connect.
+ libmbim-glib:
- Fix printing message in Intel Firmware Update service.
- Fix error reporting when unknown status.
-------------------------------------------------------------------
Wed Feb 28 16:35:35 UTC 2018 - dimstar@opensuse.org
- Modernize spec-file by calling spec-cleaner
-------------------------------------------------------------------
Mon Jan 22 02:06:52 UTC 2018 - luc14n0@linuxmail.org
- Update to version 1.16.0:
+ All the code base was ported to use the GTask based
asynchronous operations support instead of the deprecated
GSimpleAsyncResult.
+ New support for AT&T Device Service and Intel Firmware Update
Service.
+ libmbim-glib:
- Added:
. MBIM_STATUS_ERROR_CONTEXT_NOT_SUPPORTED to MbimStatusError.
. Support to detect already open MBIM channels on the Sierra
Wireless EM7345.
- Avoid using iconv() directly for the UTF-16BE conversions,
which makes it possible to use libmbim on systems with a stub
iconv() implementation.
- Prefer realpath() to canonicalize_file_name().
- Added MBIM_READY_INFO_FLAG_NONE to MbimReadyInfoFlag.
+ mbimcli:
- New: --query-ip-packet-filters, --query-pin-list action,
--atds-query-signal, --atds-query-location and
--intel-modem-reboot actions.
- Add cancellability to the query-ip-configuration action.
+ mbim-proxy: Avoid receiving signals from the parent process.
- Add pkgconfig(gio-unix-2.0) BuildRequires: it was being pulled
by another pkgconfig module that live in glib2-devel package and
used already.
-------------------------------------------------------------------
Thu Nov 2 09:06:32 UTC 2017 - mpluskal@suse.com
- Enable tests
- Do not rely on env for python during build
- Run spec-cleaner
-------------------------------------------------------------------
Thu Sep 7 15:06:56 UTC 2017 - zaitor@opensuse.org
- Update to version 1.14.2:
+ libmbim-glib:
- Added MBIM_READY_INFO_FLAG_NONE to MbimReadyInfoFlag.
- Fixed G_DEPRECATED_FOR annotations.
+ mbim-proxy:
- Fixed segfault when device goes away while being opened.
- Avoid receiving signals from the parent process.
+ mbimcli:
- Fix second ctrl+c handling.
- Add cancellability to the query-ip-configuration action.
+ mbim-network: Fix bashisms.
+ Several other minor improvements and fixes.
- Drop libmbim-plug-mem-leak.patch: Fixed upstream.
-------------------------------------------------------------------
Wed Mar 1 17:53:28 UTC 2017 - zaitor@opensuse.org
- Add libmbim-plug-mem-leak.patch: libmbim-glib: device: Plug
memory leak in open timeout, patch from upstream stable git.
-------------------------------------------------------------------
Mon Jul 11 20:03:00 UTC 2016 - bruno@ioda-net.ch
- Update to version 1.14.0:
+ New support for the 'QMI over MBIM' service, so that clients
can use libqmi to build messages and libmbim to transport them.
+ The GUDev library, which we use to read the max message size
from the USB descriptor, is now optional. When configuring, it
will be used by default only if it's found. It can also be
explicitly disabled using the new configure switch
'--without-udev' or explicitly enabled using '--with-udev'.
If GUDev isn't used, libmbim-glib will rely on sysfs directly.
+ libmbim-glib updates: Added support for building messages of
custom services.
+ mbim-network updates:
- Added support for loading profiles from different paths using
the new '--profile' option. This makes it possible to use
mbim-network with multiple devices running in the same
system.
- Added support to allow specifying APN user (APN_USER),
password (APN_PASS) and authentication type (APN_AUTH) in the
profile.
- Added support to allow using the mbim-proxy setup by
configuring it in the profile file (PROXY=yes).
+ Several other minor improvements and fixes.
+ The following features which were backported to 1.12.x releases
are also present in libmbim 1.14.0:
- mbimcli updates:
. Updated '--connect' arguments to allow specifying
"key=value" pairs. The old legacy
"[(APN),(PAP|CHAP|MSCHAPV2),(Username),(Password)]" format
is kept as valid for backwards compatibility, although it
should be assumed deprecated.
. Longer timeouts for connect/register operations.
. Report IP configuration when connected.
. Allow specifying session ids.
+ libmbim-glib updates: Probing retry interval increased to 5s.
- Split out mbimcli-bash-completion package, requiring and
supplementing bash-completion.
- Pass --with-udev to configure: new config parameter, but keeping
the old behavior (it was non-optional before).
-------------------------------------------------------------------
Fri Apr 15 02:09:53 CEST 2016 - hpj@suse.com
- Update to GNOME 3.20 -- Fate#318572.
-------------------------------------------------------------------
Fri Mar 18 15:03:56 UTC 2016 - zaitor@opensuse.org
- Update to version 1.12.4:
+ Updated '--connect' arguments to allow specifying "key=value"
pairs. The old legacy "[(APN), (PAP|CHAP|MSCHAPV2), (Username),
(Password)]" format is kept as valid for backwards
compatibility, although it should be assumed deprecated.
+ mbimcli:
- Longer timeouts for connect/register operations.
- Report IP configuration when connected.
- Allow specifying session ids.
+ libmbim-glib: probing retry interval increased to 5s.
+ Some other minor fixes.
-------------------------------------------------------------------
Sun Feb 1 09:10:57 UTC 2015 - zaitor@opensuse.org
- Update to version 1.12.2:
+ Fix assertion triggered by a bug in the removal of unreleased
transactions.
-------------------------------------------------------------------
Wed Jan 28 15:46:04 UTC 2015 - dimstar@opensuse.org
- Update to version 1.12.0:
+ New `--enable-mbim-username' option during configure, which
allows specifying which will be the user owning the
/dev/cdc-wdm character devices of all MBIM modems (udev rules
are installed to change file ownership). If this option is
used, the mbim-proxy will only allow connections from processes
running by the specified user or by the root user.
+ Function error messages can now be returned by the MbimDevice
as responses to `Command', `Open' or `Close' messages. Users of
the library should not assume the type of message returned to
the previous actions.
+ The MbimProxy will monitor for 'NotOpened' errors, and when one
detected it will directly close the internal MbimDevice. Any
subsequent request sent by clients to that specific device will
be aborted with a proxy-generated 'NotOpened' error. Clients
will need to explicitly reopen the ports in that case.
+ The API now has a new mbim_message_response_get_result() method
which allows getting a GError from a message which may be of a
specific type (e.g. a `Command Done' message in response to a
`Command' request) or instead the generic `Function Error'
message type. Users of the library can use this new method to
avoid assuming the type of message returned.
+ Other bugfixes and minor improvements:
- Attach timeout and idle events to the thread-default context.
- Fix bashisms in the mbim-network script.
- Drop libmbim-1.10.0-fix-bashisms.patch: fixed upstream.
-------------------------------------------------------------------
Thu Nov 27 01:00:00 UTC 2014 - Led <ledest@gmail.com>
- Add libmbim-1.10.0-fix-bashisms.patch: fix bashisms in
mbim-network script.
-------------------------------------------------------------------
Mon Oct 20 12:09:00 UTC 2014 - dimstar@opensuse.org
- Update to version 1.10.0:
+ API break: Flag values in 'MbimRegistrationFlag' were updated
to match the ones in the MBIM documentation.
+ Implemented a new 'mbim-proxy', which allows sharing a single
MBIM control port among different processes. The usage of the
proxy is optional, and can be requested by specifying the
MBIM_DEVICE_OPEN_FLAGS_PROXY flag in the new
mbim_device_open_full() method. The 'mbimcli' command line tool
was also extended with a new '--device-open-proxy,-p' option,
to allow requesting the use of the proxy process.
+ New 'removed' signal added to the MbimDevice, to notify when
the underlying connection to the device is lost (e.g. lost
connection to the mbim-proxy, or lost access to the MBIM
control port).
+ Added support for registering and using custom services.
+ Added additional GMM cause codes to MbimNwError.
+ Transactions are now matched not only by ID but also by type.
+ Several other minor improvements and fixes.
- Changes from version 1.8.0:
+ Added support for additional MBIM messages:
- MBIM_CID_MS_FIRMWARE_ID_GET
- MBIM_CID_MS_HOST_SHUTDOWN_NOTIFY
+ Updated mbimcli with new commands:
- --set-radio-state
- --ms-query-firmware-id
- --ms-notify-host-shutdown
- --dss-connect
- --dss-disconnect
+ Several enums and functions were renamed, and marked as
deprecated. A small layer is given to provide backwards
compatibility.
+ Several other minor improvements and fixes.
- Rename libmbim-glib0 subpackage to libmbim-glib4, following
upstreams soname change.
-------------------------------------------------------------------
Sun Feb 2 14:41:50 UTC 2014 - zaitor@opensuse.org
- Update to version 1.6.0:
+ Updated mbimcli with new commands:
--phonebook-query-configuration, --phonebook-read,
--phonebook-read-all, --phonebook-write, --phonebook-delete,
--phonebook-delete-all.
+ Added generation of man pages for mbimcli and mbim-network.
+ Several other minor improvements and fixes.
- Stop packaging Changelog in docs as it is empty.
-------------------------------------------------------------------
Mon Dec 16 18:11:23 UTC 2013 - dimstar@opensuse.org
- Update License fields:
+ Main package: GPL-2.0+ and LGPL-2.1+ (also for the src pkg).
+ Library and -devel subpackage: LGPL-2.1+.
+ The Small tools shipped in the main package (binary) are
licensed GPL-2.0+.
-------------------------------------------------------------------
Wed Dec 4 20:05:30 UTC 2013 - dimstar@opensuse.org
- Call ldconfig on post/postun of libmbim-glib0.
-------------------------------------------------------------------
Sun Dec 1 17:35:58 UTC 2013 - dimstar@opensuse.org
- Initial package, version 1.4.0.

4
libmbim.obsinfo Normal file
View File

@ -0,0 +1,4 @@
name: libmbim
version: 1.28.4
mtime: 1677661477
commit: 7f1c7907c4654ba5c619a635cef5475ca161d027

131
libmbim.spec Normal file
View File

@ -0,0 +1,131 @@
#
# spec file for package libmbim
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2013 Dominique Leuenberger, Amsterdam, The Netherlands
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: libmbim
Version: 1.28.4
Release: 0
Summary: Mobile Broadband Interface Model (MBIM) protocol
License: GPL-2.0-or-later AND LGPL-2.0-or-later
Group: Productivity/Networking/System
URL: https://gitlab.freedesktop.org/mobile-broadband/libmbim
Source: %{name}-%{version}.tar.xz
# PATCH-FIX-UPSTREAM 0001-intel-mutual-authentication-new-service-fcc-lock.patch -- intel-mutual-authentication: new service, fcc-lock
Patch0: 0001-intel-mutual-authentication-new-service-fcc-lock.patch
# PATCH-FIX-UPSTREAM 0002-intel-tools-new-service-trace-config.patch --intel-tools: new service, trace-config
Patch2: 0002-intel-tools-new-service-trace-config.patch
BuildRequires: help2man
BuildRequires: meson
BuildRequires: pkgconfig
BuildRequires: python3-base
BuildRequires: pkgconfig(gio-2.0)
BuildRequires: pkgconfig(gio-unix-2.0)
BuildRequires: pkgconfig(glib-2.0) >= 2.48
BuildRequires: pkgconfig(gobject-2.0)
BuildRequires: pkgconfig(gobject-introspection-1.0)
BuildRequires: pkgconfig(udev)
%description
libmbim is a glib-based library for talking to WWAN modems and devices
which speak the Mobile Broadband Interface Model (MBIM) protocol.
%package -n libmbim-glib4
Summary: Mobile Broadband Interface Model (MBIM) protocol
License: LGPL-2.1-or-later
Group: System/Libraries
%description -n libmbim-glib4
libmbim is a glib-based library for talking to WWAN modems and devices
which speak the Mobile Broadband Interface Model (MBIM) protocol.
%package devel
Summary: Mobile Broadband Interface Model (MBIM) protocol - Development files
License: LGPL-2.1-or-later
Group: Development/Languages/C and C++
Requires: libmbim-glib4 = %{version}
%description devel
libmbim is a glib-based library for talking to WWAN modems and devices
which speak the Mobile Broadband Interface Model (MBIM) protocol.
%package -n mbimcli-bash-completion
Summary: Bash completion for mbimcli
License: GPL-2.0-or-later AND LGPL-2.0-or-later
Group: Productivity/Networking/System
BuildArch: noarch
BuildRequires: pkgconfig(bash-completion)
Requires: bash-completion
Supplements: (%{name} and bash-completion)
%description -n mbimcli-bash-completion
This package contain de bash completion command for mbimcli tools.
%package -n typelib-1_0-Mbim-1_0
Summary: Introspection bindings for libmbim
License: GPL-2.0-or-later AND LGPL-2.0-or-later
Group: System/Libraries
%description -n typelib-1_0-Mbim-1_0
libmbim is a glib-based library for talking to WWAN modems and devices
which speak the Mobile Broadband Interface Model (MBIM) protocol.
This package provides the GObject Introspection bindings for libmbim.
%prep
%autosetup -p1
%build
%meson \
%{nil}
%meson_build
%install
%meson_install
%check
%meson_test
%ldconfig_scriptlets -n libmbim-glib4
%files
%doc NEWS
%{_bindir}/mbim-network
%{_bindir}/mbimcli
%{_libexecdir}/mbim-proxy
%{_mandir}/man1/mbim-network.1%{?ext_man}
%{_mandir}/man1/mbimcli.1%{?ext_man}
%files -n libmbim-glib4
%license LICENSES
%{_libdir}/libmbim-glib.so.*
%files devel
%doc AUTHORS README.md
%{_datadir}/gir-1.0/*.gir
%{_includedir}/libmbim-glib/
%{_libdir}/libmbim-glib.so
%{_libdir}/pkgconfig/mbim-glib.pc
%files -n mbimcli-bash-completion
%{_datadir}/bash-completion/completions/mbimcli
%files -n typelib-1_0-Mbim-1_0
%{_libdir}/girepository-1.0/Mbim-1.0.typelib
%changelog